#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:
///
void actionTriggered(QAction * action);
+ ///
+ void updateTriggered();
};
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();
///
void showEvent(QShowEvent *);
- ///
- QString name_;
///
QList<Action *> actions_;
/// initial visibility flags
int visibility_;
///
- bool allowauto_;
- ///
GuiView & owner_;
///
GuiCommandBuffer * command_buffer_;
ToolbarInfo const & tbinfo_;
///
bool filled_;
+ ///
+ bool restored_;
};
} // namespace frontend