#ifndef GUITOOLBAR_H
#define GUITOOLBAR_H
-#include "Session.h"
-
#include <QList>
#include <QToolBar>
#include <QToolButton>
///
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:
///
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);
/// 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();
ToolbarInfo const & tbinfo_;
///
bool filled_;
+ ///
+ bool restored_;
};
} // namespace frontend