X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiToolbar.h;h=43f61887485d56ef778944c3db59248b37772dc2;hb=161f7b7f62cb33dab681add6c5b5b68a887e2ea1;hp=fb65506bc58260ed9181d592ab12ae29abaab997;hpb=b6a63bfce81819ae0edf3dded0e02c4439e27f90;p=lyx.git diff --git a/src/frontends/qt4/GuiToolbar.h b/src/frontends/qt4/GuiToolbar.h index fb65506bc5..43f6188748 100644 --- a/src/frontends/qt4/GuiToolbar.h +++ b/src/frontends/qt4/GuiToolbar.h @@ -16,8 +16,6 @@ #ifndef GUITOOLBAR_H #define GUITOOLBAR_H -#include "Session.h" - #include #include #include @@ -45,16 +43,14 @@ public: /// MenuButton(GuiToolbar * bar, ToolbarItem const & item, bool const sticky = false); - /// - void mousePressEvent(QMouseEvent * e); private: + /// + void initialize(); /// GuiToolbar * bar_; /// ToolbarItem const & tbitem_; - /// - bool initialized_; private Q_SLOTS: /// @@ -71,6 +67,10 @@ class GuiToolbar : public QToolBar public: /// GuiToolbar(ToolbarInfo const &, GuiView &); + + /// Reimplemented from QToolbar to detect whether the + /// toolbar is restored with MainWindow::restoreState(). + void setVisible(bool visible); /// void setVisibility(int visibility); @@ -88,13 +88,18 @@ public: /// Restore session settings. void restoreSession(); + /// + bool isRestored() const; + /// Refresh the contents of the bar. - void update(bool in_math, bool in_table, bool review, - bool in_mathmacrotemplate, bool in_ipa); + void update(int context = 0); /// void toggle(); + /// toggles movability + void movable(bool silent = false); + /// GuiCommandBuffer * commandBuffer() { return command_buffer_; } @@ -125,6 +130,8 @@ private: ToolbarInfo const & tbinfo_; /// bool filled_; + /// + bool restored_; }; } // namespace frontend