X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiToolbar.h;h=badd59930ab4d2d97fe12f99fabb7b1c1d3a09a1;hb=c0a1893008bd13650d470afff16f56720b65c87c;hp=c5e1aebee360ee2eef82386423b0766ebd6c4499;hpb=9236a93894f6a182eb17a219b216eff747e50a27;p=lyx.git diff --git a/src/frontends/qt4/GuiToolbar.h b/src/frontends/qt4/GuiToolbar.h index c5e1aebee3..badd59930a 100644 --- a/src/frontends/qt4/GuiToolbar.h +++ b/src/frontends/qt4/GuiToolbar.h @@ -16,12 +16,12 @@ #ifndef GUITOOLBAR_H #define GUITOOLBAR_H -#include "Session.h" - #include #include #include +class QSettings; + namespace lyx { class DocumentClass; @@ -45,16 +45,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: /// @@ -72,6 +70,10 @@ 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); @@ -84,17 +86,22 @@ public: **/ QString sessionKey() const; /// Save session settings. - void saveSession() const; + void saveSession(QSettings & settings) const; /// 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); + void update(int context = 0); /// void toggle(); + /// toggles movability + void movable(bool silent = false); + /// GuiCommandBuffer * commandBuffer() { return command_buffer_; } @@ -125,6 +132,8 @@ private: ToolbarInfo const & tbinfo_; /// bool filled_; + /// + bool restored_; }; } // namespace frontend