http://bugzilla.lyx.org/show_bug.cgi?id=3759
It also simplifies and fix the smallcaps case which was not correct WRT unicode. Even though I don't know if toUpper() means something in the non ucs2 range.
FYI, I used toqstr() to do the ucs4 -> ucs2 conversion when needed. This helper method works only with Qt >= 4.2.
* GuiFontMetrics::smallcapsWidth(): changed to work with single ucs4 characters.
* GuiFontMetrics::xxx(): make sure that font metrics works with characters not in the ucs2 range.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18593 a592a061-630c-0410-9148-cb99ea01b6c8
* added Qt::Drawer flag to TOC
* reverted Jürgen's patch (i.e. the source view is docked below the text again),
wide drawers are not Mac-like (tm)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18557 a592a061-630c-0410-9148-cb99ea01b6c8
* Inset: new destroyed signal (copy ctor and operator= needed because of a signal is not copiable)
* CursorSlice:
- connect to inset destructor wherever possible
- invalidate(), isValid(): new method.
- inset_: now private
* DocIterator::fixIfBroken(): new method for properly fixing cursors.
* StableDocIterator::asDocIterator(): verify cursor sanity before creating it.
* Cursor::fixIfBroken(): now a simple wrapper around DocIterator::fixIfBroken()
* BufferView::setBuffer(): verify cursor sanity before restoring it.
* WorkArea::redraw(): verify cursor sanity of concurrent BufferView display.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18516 a592a061-630c-0410-9148-cb99ea01b6c8
* src/Buffer.cpp:
- make view-source string translatable
* src/frontends/controllers/ControlToc.h:
- make getGuiName public
* src/frontends/qt4/TocWidget.cpp:
- use getGuiName for the combo.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18505 a592a061-630c-0410-9148-cb99ea01b6c8
- adds a "toggle math toolbar" and "toggle table toolbar" buttons to the main toolbar
(i also moved "toggle toc" there)
- adds a "toggle math panels" button to the math toolbar
- reshuffles the Big Operators panel to avoid confusion with the sum icon on the math toolbar
- adds some icons
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18478 a592a061-630c-0410-9148-cb99ea01b6c8
* src/insets/InsetListingsParams.cpp:
- complete list of languages/dialects
- fix some typos
- (validate): check for braces
* src/frontends/qt4/QListings.cpp:
- fix list of languages (not yet complete)
- make it possible to enter [dialect]language in the advanced widget
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18451 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/qt4/QListings.cpp (validate_listings_params):
- care for the apply button as well.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18444 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/qt4/QListings.cpp:
- make widget entries translatable
- clean up and shuffle around some code
* src/frontends/qt4/ui/ListingsUi.ui:
- set isEditable here, not in QListings.cpp
* src/frontends/qt4/QDocument.cpp:
* src/frontends/qt4/QInclude.cpp:
- make Listings strings translatable
Fix bug 3654 (by Bo Peng):
* src/frontends/qt4/QListings.h:
- new slot on_numberSideCO_currentIndexChanged
* src/frontends/qt4/QListings.cpp:
- use this slot and enable(disable the appropriate widgets
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18432 a592a061-630c-0410-9148-cb99ea01b6c8
* Sqrt and Root draw their vertical horizontal line with a single line command to make them showup non-antialiased.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18419 a592a061-630c-0410-9148-cb99ea01b6c8
1) Open EmbeddedObject.lyx
2) Open Toc
3) Click on section 7.2.2 which is in the second child document
4) assertion.
This commit adds proper support for multi-part documents. With this each child document has access to the _full_ TOC tree (including LOT and LOF). This enables to switch between master and child document using the TOC.
* buffer_funcs.cpp:
- updateLabels(): do not emit Buffer::structureChanged() signal for child document
- checkBufferStructure(): update the structure of the master document.
* ControlToc.cpp: always use the TocBackend of the master document.
* LyXView::connectBuffer(): connect structureChanged() of master document.
* TocBackend:
- TocItem: get rid of child_ member.
- TocBackend::item(): only compare items from the same document.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18386 a592a061-630c-0410-9148-cb99ea01b6c8
Delete cached conversions if the converter changes.
* src/frontends/qt4/QPrefs.cpp
(PrefConverters::update_converter): delete cached files since the
new converter might create different ones
(PrefConverters::remove_converter): ditto
* src/support/convert.cpp
(unsigned long convert<unsigned long>): New template specialization
* src/ConverterCache.h
(ConverterCache::remove_all): New method, removes all cached
conversions of a particular converter
* src/ConverterCache.cpp
(CacheType): Also store source file format
(ConverterCache::Impl::readIndex): Handle files with spaces correctly
(ConverterCache::Impl::writeIndex): ditto
(various): adapt to changed CacheType
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18378 a592a061-630c-0410-9148-cb99ea01b6c8
* TocWidget::select()
- Do not allow select ModelItem from the code for non-TOC types
- add a FIXME explaining the situation.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18348 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/qt4/TocWidget.{cpp,h}:
- new member disconnectSelectionModel()
- (select): replace blockSignal() directives for tocTV selectionModel()
with disconnect (the above new function) and reconnect relevant signal
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18338 a592a061-630c-0410-9148-cb99ea01b6c8
* ControlDocument::id(): new method returning the id of the current buffer.
* PreambleModule: new class for the preamble module. Handle everything preamble related, including memorizing the cursor position for each Buffer.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18307 a592a061-630c-0410-9148-cb99ea01b6c8
In insert graphic window: canceling open dialog erases entry in text box). This bug is not Mac specific, but exist in Linux. (should exist in other OSes.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18268 a592a061-630c-0410-9148-cb99ea01b6c8
Solution: Move the color initialization from the constructor to the update() method. I've read the mail from Richard (referenced in the source code) concerning this, but i don't understand why we should not move parts of the initialization the constructor does into the update method. With this changes the hack for fixing http://bugzilla.lyx.org/show_bug.cgi?id=3109 is not needed.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18249 a592a061-630c-0410-9148-cb99ea01b6c8
Solution: Disable the alter button if no item is selected and add an additional test for a valid index.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18247 a592a061-630c-0410-9148-cb99ea01b6c8
Solution: Add a test whether the color returned from the color dialog is valid.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18245 a592a061-630c-0410-9148-cb99ea01b6c8
with skips.
Added helper method canIndent() to controller and appropriate logic to
QParagraph::update_contents().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18236 a592a061-630c-0410-9148-cb99ea01b6c8
* GuiApplication::event():
special case for FileOpen events: memorize the filenames if LyX is not properly started yet.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18201 a592a061-630c-0410-9148-cb99ea01b6c8
* ControlDocument::params(): replace BufferParams local copy with Buffer::params() direct access.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18186 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/controllers/ControlCommandBuffer.{cpp,h}:
- new member hide()
* src/frontends/qt4QCommandEdit.{cpp,h}:
- new signal hidePressed(), emit it on M-x/Alt-x
* src/frontends/qt4/QCommandBuffer.{cpp,h}:
- new slot hideParent(), connected to QCommandEdit::hidePressed()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18081 a592a061-630c-0410-9148-cb99ea01b6c8
somewhat better layout; ideally, the whole dialog should be laid out in a grid,
but then qt insists on drawing the listwidgets much wider than the need to be.
The drawback of this approach is that the dialog cannot really be resized.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17949 a592a061-630c-0410-9148-cb99ea01b6c8
some code is moved from QMath
to QDelimiterDialog and QMathMatrixDialog
for the rest pretty mechanical
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17872 a592a061-630c-0410-9148-cb99ea01b6c8
add signal that provides action when triggered
* ToolbarBackend.[Ch]
add popupmenu and iconpallete item types
* QLToolbar.[Ch]
take care of popupmenu and iconpallete
* stdtoolbars.inc
add panels and menus (and move spellchecker to main ;-)
* functions.xpm
icon for function list
* iconpalette.[Ch]
new iconpanel that will replace old iconpalette,
als subclass of qmenu that updates parent toolbutton
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17868 a592a061-630c-0410-9148-cb99ea01b6c8
toolbaritems, toolbar(info) and backend
stdtoolbars.inc now defines the toolbars inbetween
a ToolbarSet/End tag just as the menus
* the other files contain straightforward changes
because of the toolbarbackend refactoring
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17867 a592a061-630c-0410-9148-cb99ea01b6c8
http://bugzilla.lyx.org/show_bug.cgi?id=3460
The problem was that the list_items map is ordered by key.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17858 a592a061-630c-0410-9148-cb99ea01b6c8
* bigleft, bigright: move empty item from last to first to synchronize it with GUI representation
* fix_name(): add FIXME for Enrico
* updateTeXCode():
- move C-style string declaration.
- simplify empty string logic.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17848 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/qt4/TocWidget.[Ch]:
- rename enableButtons to enableControls and include slider enabling/disabling
- only set slider if there is some content
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17835 a592a061-630c-0410-9148-cb99ea01b6c8
http://bugzilla.lyx.org/show_bug.cgi?id=3450
* ControlMath
- new MathSymbol struct that summarize the symbol attributes (including font and fontcode)
* QDelimiterDialog:
- make use of the new MathSymbol for the ListWidget.
- store the latex name in the tooltip instead of lookup for it.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17786 a592a061-630c-0410-9148-cb99ea01b6c8
options accepted by the current paragraph.
ui/QParagraphUi.ui
Changed combo box for alignment to radio buttons. Added
checkbox for default alignment.
QParagraphDialog.[Ch]
public:
void checkAlignmentRadioButtons();
void alignmentToRadioButtons(LyXAlignment);
LyXAlignment getAlignmentFromDialog();
private:
typedef std::map<LyXAlignment, QRadioButton *> QPRadioMap;
QPRadioMap radioMap;
protected Q_SLOTS:
void change_adaptor();
void enableLinespacingValue(int);
void on_alignDefaultCB_toggled(bool);
QParagraph.C
Rework apply() and update_contents() using new functions just
mentioned.
Thanks to Abdel for his help.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17776 a592a061-630c-0410-9148-cb99ea01b6c8
* src/mathed/MathSupport.C:
add "slash" to the decoration table.
* src/mathed/InsetMathBig.C
(InsetMathBig::draw): don't remove backslash delimiter.
(InsetMathBig::isBigInsetDelim): add "\\" and "\slash" to
the delimiters table.
* src/frontends/qt4/QDelimiterDialog.C
(fix_name): return "\\" instead of "\backslash" as that now
works after the fixes above.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17771 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/qt4/QDelimiterDialog.C
(fix_name): Return "|" instead of "\|" as this is equivalent to \Vert.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17752 a592a061-630c-0410-9148-cb99ea01b6c8
http://bugzilla.lyx.org/show_bug.cgi?id=3413
* ui/QNomenclUi.ui
- description field: replace LineEdit with TexEdit
* QNomencl.C: take care of the \n <-> \\ conversion in the description field.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17748 a592a061-630c-0410-9148-cb99ea01b6c8
* ControlMath.[Ch]
- mathSymbol(), texName(): new method for easy access of math symbols and associated TeX names
- latex_delimiters: allowed delimiters transferred from QDelimiterDialog.C
* QDelimiterDialog.C:
- makes use of the above.
- display the TeX code in a label instead of beside the symbol.
* QDelimiterUi.ui
- shrink it so that it could nicely fit in a DockWidget but this doesn't work, the dialog is too large!
- texCodeL: new label.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17747 a592a061-630c-0410-9148-cb99ea01b6c8
This fixes some encoding problems, and hopefully also bug 3410.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17746 a592a061-630c-0410-9148-cb99ea01b6c8
Changed dialog and added routines to deal with an "auto" label
in cases where defaults are used.
ui/MarginsUi.ui: Changed labels for width and height to checkboxes. Removed connections.
checkwidgets.[Ch]: Extended checkedLineEdit routines to take a QWidget.
qt_helpers.[Ch]:
Added void lengthToWidgets(QLineEdit *, LengthCombo *, LyXLength const &, LyXLength::UNIT)
Added void lengthAutoToWidgets(QLineEdit *, LengthCombo *, LyXLength const &, LyXLength::UNIT)
Added void setAutoTextCB(QCheckBox *, QLineEdit *, LengthCombo *)
validators.[Ch]:
Added class LengthAutoValidator : public LengthValidator
Added class DoubleAutoValidator : public QDoubleValidator
QGraphicsDialog.[Ch]
Added virtual void setAutoText()
Added virtual void on_WidthCB_toggled(bool)
Added virtual void on_HeightCB_toggled(bool)
Used the new functions to set "auto" in default cases and toggle checkboxes as needed.
Set validator for scale.
Re-organized connect routines.
QGraphics.C:
Completely re-worked update_contents().
Significant changes to apply().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17735 a592a061-630c-0410-9148-cb99ea01b6c8
1) launch the dialog
2) select a delimiter in the left pane
3) Tab
4) select a delimiter in the right pane
5) Enter
So:
- Also enable the quick insertion while in the right pane
- Do not limit the quick insertion to matched key
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17732 a592a061-630c-0410-9148-cb99ea01b6c8
- ListWidget instead of combo,
- matched delimiters on the same row,
- immediate insertion on "enter" or "double-click" if the 'match' option is checked.
- simplification of the code.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17731 a592a061-630c-0410-9148-cb99ea01b6c8
Most of the change is about using the new private member delimiters_ instead of the "delim" table. Also, we don't display an icon when the delimiter is one character.
I did not manage to let the combos expand to the maximum.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17727 a592a061-630c-0410-9148-cb99ea01b6c8
http://bugzilla.lyx.org/show_bug.cgi?id=3412
* QNomenclDialog::QNomenclDialog(): setting the focus proxy in the Description edit box.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17719 a592a061-630c-0410-9148-cb99ea01b6c8
* ControlToc::update(): get rid of the pure virutal method.
* QToc::initialiseParams(): overload ControlToc method.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17708 a592a061-630c-0410-9148-cb99ea01b6c8
keyboard input via kmap, clipboard and selection) to normalized form KC
(precomposed characters) since we don't support the decomposed form very
well.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17702 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/qt4/QTabular.C: change "Block" to "Justified"
to avoid translation clash and to align with paragraph settings
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17694 a592a061-630c-0410-9148-cb99ea01b6c8
http://bugzilla.lyx.org/show_bug.cgi?id=3288
This is recommended by Qt:
Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.
* GuiApplication::notify(): reimplemented from QApplication::notify().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17688 a592a061-630c-0410-9148-cb99ea01b6c8
* Painter:
- preeditText(), dashedUnderline(): new methods for CJK support.
* GuiWorkArea:
- inputMethodQuery(): new Qt inherited method for proper CJK support.
- inputMethodEvent(): now properly take care of input methods.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17671 a592a061-630c-0410-9148-cb99ea01b6c8
Problem was that SIGNAL itemSelectionChanged was not connected to anything.
* QRefDialog::selectionChanged(): new slot for itemSelectionChanged signal.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17615 a592a061-630c-0410-9148-cb99ea01b6c8
"View" button in TeX information dialog not enabled when file is selected with the keyboard. Problem was that SIGNAL itemSelectionChanged was not connected to anything. Also made some minor stylistic changes to the code.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17614 a592a061-630c-0410-9148-cb99ea01b6c8
- whitespace. I forgot to save the changes before committing :-(
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17595 a592a061-630c-0410-9148-cb99ea01b6c8
- some further refinement (and cleanup) of the triple click behaviour,
from Richard G. Heck.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17594 a592a061-630c-0410-9148-cb99ea01b6c8
- reimplement doubleClickTimeout() from the qt3 frontend
in order to get triple clicking working (bug 3272).
This is just an emultation of triple clicking, since qt does not have
a mouseTripleClickEvent()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17588 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/qt4/ui/BulletsUi.ui:
- assure that six columns of bullets are displayed in the widget
(fix bug 3147).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17584 a592a061-630c-0410-9148-cb99ea01b6c8
This changes the semantics of isOK() and operator(), comments from Bernhard below:
With the old version of lyxlex it was _impossible_ to check whether reading an integer, float, ... succeeded or not. The current solution to check for is.bad() in some cases and in other cases use is.good() does not give the desired information. Moreover the result of is.bad() depends on the stl implementation and behaves different for linux and windows.
the bug was introduced by the patch that fixed the bug that crashed lyx when "inset-insert ert" was executed from the command buffer.
The lexer has the method isOK() which reflects the status of the stream is.
The operators void* and ! are not really well defined (they depend on the value of is.bad()). What is missing is a test if the last reading operation was successful and thus the returned value is valid.
That's what i implemented in this patch.
The new rule for using the lexer:
if you want to know if the lexer still has data to read (either from the stream or from the pushed token) then use "lex.isOK()".
If you want to test if the last reading operation was successful then use eg. "if (lex) {...}" or unsuccessful then use eg. "if (!lex) {...}"
an example:
int readParam(LyxLex &lex) {
int param = 1; // default value
if (lex.isOK()) { // the lexer has data to read
int p; // temporary variable
lex >> p;
if (lex) param = p; // only use the input if the reading operation was successful
}
return param;
}
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17569 a592a061-630c-0410-9148-cb99ea01b6c8
- add flags for debug/release/profile
- also build qt4 as one file with gcc
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17558 a592a061-630c-0410-9148-cb99ea01b6c8
TODO: extract the latexHighlighter class into its own .[Ch] files.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17553 a592a061-630c-0410-9148-cb99ea01b6c8
Those arguments are not needed because update() will always look at what is currently selected and the info is there.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17546 a592a061-630c-0410-9148-cb99ea01b6c8
- now simple citation insertion can be done with the keyboard only (enter key will close the dialog and insert the chosen key).
- now search also within bib entry information (very fast)
- new case sensitive option
- new regex option.
- QCitation: code simplified, some code went to ControlCitation.
- QCitationDialog: code simplified
- lots of polish in the dialogs...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17539 a592a061-630c-0410-9148-cb99ea01b6c8
* DockView.h: add the orientation option.
* QViewSource: now a model and a controller
* QViewSourceDialog: now only a simple QWidget.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17538 a592a061-630c-0410-9148-cb99ea01b6c8
* transfer CiteEngine enum declaration to biblio.h
* delete unneeded CiteEngine_enum
* cite_engine is now cite_engine_ and is private.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17537 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/controllers/ControlCharacter.[Ch]
(reset_lang_) New flag (needed because the language is never
inherited)
* src/frontends/controllers/ControlCharacter.C
(ControlCharacter::getLanguage): Use reset_lang_
(ControlCharacter::setLanguage): Set reset_lang_ if needed
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17526 a592a061-630c-0410-9148-cb99ea01b6c8
* insetcite: call getEngine()
* bufferparams: move getEngine() here, and let it sense the
provides(natbib)
flag
* ControlBibtex, ControlCitation: correct getEngine() call
* biblio: remove old getEngine()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17505 a592a061-630c-0410-9148-cb99ea01b6c8
"Include" was for good reason the default method but not the first item in the dropdown list.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17467 a592a061-630c-0410-9148-cb99ea01b6c8
* TocBackend
- addType(), types_, types(): deleted.
* ControlToc
- tocs(): new
- selectedType(): access to selected_type_
- initialiseParams(): transfer code from QToc::update() and look for selected type.
- getTypes(), getContents(): deleted
* QToc: do not maintain current type. Get the info from the View.
- setTocModel(): deleted
* TocWidget: always pass the currently selected type to the model/controller.
- setTocModel(): new slot.
- updateGui(): transfer code to setTocModel().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17455 a592a061-630c-0410-9148-cb99ea01b6c8
- initialiseParams(): overload ControlCommand::initialiseParams() so that we can update the model at this point (QToc is the controller _and_ the model).
- update(): new
- updateBackend(): new protected method to update the TocBackend (called for the "Update" button).
* QToc:
- is now a QObject
- modelReset: new Qt signal to indicate a model reset to associated dialog(s).
- QToc(): avoid the duplicate update() call that will be done in the show command anyway.
* Dialogs.C
- use new TocWidget in a DockView.
* TocWidget.[Ch]: renamed from QTocDialog. This striped down widget is only a widget that connects to the 'QToc' model/controller.
* DockView.h: new template class that encapsulates a given Widget inside a DockWidget and presents a Dialog::View interface.
* QTocUi.ui:
- now is a simple Widget.
- rearrange the buttons a bit
- get rid of the unneeded close button.
- modify the shortcut to "Promote" to 'r' because of a clash with "Alt-p" number (we really need real, always valid, shortcuts for all outline action!)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17416 a592a061-630c-0410-9148-cb99ea01b6c8
- update dialogs instead of hiding for dialogs that support that.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17414 a592a061-630c-0410-9148-cb99ea01b6c8
* buffer.h:
- structureChanged(): new boost signal. I intend to use that also when a text is changed in a section or caption item.
* buffer_funcs.C:
- updateLabels(): emit Buffer::structureChanged() after TocBackend is updated.
- checkBufferStructure(): new method for updating the TocBackend if needed.
* LyXView:
- updateToc(): new slot for Buffer::structureChanged() signal.
* text.C:
- call checkBufferStructure() whenever text is added or erased.
* TocBackend.[Ch]:
- updateItem(): new method to update a specific item (called from checkBufferStructure()).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17413 a592a061-630c-0410-9148-cb99ea01b6c8