]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiToolbar.h
Improve wording (#10670)
[lyx.git] / src / frontends / qt4 / GuiToolbar.h
index 0745b7dcd2870ac98ea0ff969e75d7c1f415410f..43f61887485d56ef778944c3db59248b37772dc2 100644 (file)
@@ -16,8 +16,6 @@
 #ifndef GUITOOLBAR_H
 #define GUITOOLBAR_H
 
-#include "Session.h"
-
 #include <QList>
 #include <QToolBar>
 #include <QToolButton>
@@ -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<Action *> actions_;
        /// initial visibility flags
@@ -125,6 +130,8 @@ private:
        ToolbarInfo const & tbinfo_;
        ///
        bool filled_;
+       ///
+       bool restored_;
 };
 
 } // namespace frontend