X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiToc.h;h=5e759895a5168fb90d83e868e8d564c34547d161;hb=425d092204118ea6c24c28e85fdf03fcf2bb51a4;hp=99e0e6dba737e883d5e4cd064fcbf5850e57653c;hpb=8c73b3d2ce356e2720186f8cf5208614d124fdcf;p=lyx.git diff --git a/src/frontends/qt4/GuiToc.h b/src/frontends/qt4/GuiToc.h index 99e0e6dba7..5e759895a5 100644 --- a/src/frontends/qt4/GuiToc.h +++ b/src/frontends/qt4/GuiToc.h @@ -21,9 +21,7 @@ #include "TocBackend.h" -#include #include -#include #include @@ -48,67 +46,29 @@ public: /// bool initialiseParams(std::string const & data); - /// void updateView(); - /// Test if outlining operation is possible - bool canOutline(int type) const; + void enableView(bool enable); + bool wantInitialFocus() const { return false; } + void closeEvent(QCloseEvent * event); + bool isClosing() const { return is_closing_; } - QStandardItemModel * tocModel(int type); +public: + /// clean-up on hide. + void clearParams() {} /// - QModelIndex currentIndex(int type) const; + void dispatchParams(); /// - void goTo(int type, QModelIndex const & index); + bool isBufferDependent() const { return true; } /// - int getType(); + void doDispatch(Cursor & cur, FuncRequest const & fr); /// - int getTocDepth(int type); - -Q_SIGNALS: - /// Signal that the internal toc_models_ has been reset. - void modelReset(); + bool getStatus(Cursor & cur, FuncRequest const & fr, FuncStatus & fs) const; private: /// TocWidget * widget_; /// - std::vector toc_models_; - /// - void clearTocModels(); - -public: - /// - TocList const & tocs() const; - - /// Return the list of types available - std::vector const & typeNames() const - { return type_names_; } - - /// Return the first TocItem before the cursor - TocIterator currentTocItem(int type) const; - - /// Apply the selected outlining operation - void outlineUp(); - /// - void outlineDown(); - /// - void outlineIn(); - /// - void outlineOut(); - /// - void updateBackend(); - - std::vector types_; - std::vector type_names_; - - /// Return the guiname from a given cmdName of the TOC param - docstring guiName(std::string const & type) const; - - /// clean-up on hide. - void clearParams() {} - /// - void dispatchParams(); - /// - bool isBufferDependent() const { return true; } + bool is_closing_; }; } // namespace frontend