]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiToolbar.h
Disable CheckTeX while buffer is processed
[lyx.git] / src / frontends / qt4 / GuiToolbar.h
index 0745b7dcd2870ac98ea0ff969e75d7c1f415410f..badd59930ab4d2d97fe12f99fabb7b1c1d3a09a1 100644 (file)
 #ifndef GUITOOLBAR_H
 #define GUITOOLBAR_H
 
-#include "Session.h"
-
 #include <QList>
 #include <QToolBar>
 #include <QToolButton>
 
+class QSettings;
+
 namespace lyx {
 
 class DocumentClass;
@@ -45,20 +45,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();
 };
 
 
@@ -70,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);
 
@@ -82,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_; }
 
@@ -111,8 +120,6 @@ private:
        ///
        void showEvent(QShowEvent *);
 
-       ///
-       QString name_;
        ///
        QList<Action *> actions_;
        /// initial visibility flags
@@ -125,6 +132,8 @@ private:
        ToolbarInfo const & tbinfo_;
        ///
        bool filled_;
+       ///
+       bool restored_;
 };
 
 } // namespace frontend