X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiToolbar.h;h=43f61887485d56ef778944c3db59248b37772dc2;hb=161f7b7f62cb33dab681add6c5b5b68a887e2ea1;hp=0745b7dcd2870ac98ea0ff969e75d7c1f415410f;hpb=e38c6048875d377fb37048f361d63c3118e945f4;p=lyx.git diff --git a/src/frontends/qt4/GuiToolbar.h b/src/frontends/qt4/GuiToolbar.h index 0745b7dcd2..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,20 +43,20 @@ 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: /// void actionTriggered(QAction * action); + /// + void updateTriggered(); }; @@ -69,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); @@ -86,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); + void update(int context = 0); /// void toggle(); + /// toggles movability + void movable(bool silent = false); + /// GuiCommandBuffer * commandBuffer() { return command_buffer_; } @@ -111,8 +118,6 @@ private: /// void showEvent(QShowEvent *); - /// - QString name_; /// QList actions_; /// initial visibility flags @@ -125,6 +130,8 @@ private: ToolbarInfo const & tbinfo_; /// bool filled_; + /// + bool restored_; }; } // namespace frontend