namespace lyx {
-class DocumentClass;
-class Inset;
-
namespace frontend {
class Action;
class GuiCommandBuffer;
-class GuiLayoutFilterModel;
class GuiToolbar;
class GuiView;
-class LayoutBox;
class ToolbarInfo;
class ToolbarItem;
protected:
///
- void initialize();
+ void initialize() override;
protected Q_SLOTS:
///
- void updateTriggered();
+ void updateTriggered() override;
};
~DynamicMenuButton();
///
static bool isMenuType(std::string const & s);
+ ///
+ static void resetIconCache();
protected:
///
- void initialize();
+ void initialize() override;
///
void loadFlexInsets();
/// pimpl so we don't have to include big files
Private * d;
protected Q_SLOTS:
///
- void updateTriggered();
+ void updateTriggered() override;
+private:
+ /// These icons are needed at each updateTriggered() call, and
+ /// therefore we have to cache them.
+ static QIcon icon_textstyle_apply_;
+ static QIcon icon_undo_;
+ static QIcon icon_paste_;
};
/// Reimplemented from QToolbar to detect whether the
/// toolbar is restored with MainWindow::restoreState().
- void setVisible(bool visible);
+ void setVisible(bool visible) override;
///
void setVisibility(int visibility);
bool isRestored() const;
///
- bool isVisibiltyOn() const;
+ bool isVisibilityOn() const;
int visibility() const { return visibility_; }
/// Refresh the contents of the bar.
void update(int context = 0);
+ ///
+ void setState(std::string const state);
///
void toggle();
+ ///
+ void refill();
+
/// toggles movability
void movable(bool silent = false);
///
GuiCommandBuffer * commandBuffer() { return command_buffer_; }
+ /// add item to toolbar.
+ /// \param menu : when true, the item is for a menu entry, not a button.
+ Action * addItem(ToolbarItem const & item, bool menu = false);
///
- Action * addItem(ToolbarItem const & item);
- ///
- GuiView const & owner() { return owner_; }
+ GuiView const & owner() { return owner_; }
Q_SIGNALS:
///
///
void fill();
///
- void showEvent(QShowEvent *);
- ///
- bool eventFilter(QObject * obj, QEvent * ev);
+ void showEvent(QShowEvent *) override;
///
QList<Action *> actions_;