X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt%2FGuiToolbar.h;h=6b3581c2d2dbb9c249a7d63e84bcdffaf26842ba;hb=b41293352ea8d52890b7668f059fd07f09bd6bb6;hp=262b09ef0793202c9c987d50fb3391264dd3ea3f;hpb=f66146973407ecb44ca93bae074ee916d5ed2f04;p=features.git diff --git a/src/frontends/qt/GuiToolbar.h b/src/frontends/qt/GuiToolbar.h index 262b09ef07..6b3581c2d2 100644 --- a/src/frontends/qt/GuiToolbar.h +++ b/src/frontends/qt/GuiToolbar.h @@ -96,6 +96,8 @@ public: ~DynamicMenuButton(); /// static bool isMenuType(std::string const & s); + /// + static void resetIconCache(); protected: /// void initialize() override; @@ -107,6 +109,12 @@ protected: protected Q_SLOTS: /// 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_; }; @@ -141,7 +149,7 @@ public: bool isRestored() const; /// - bool isVisibiltyOn() const; + bool isVisibilityOn() const; int visibility() const { return visibility_; } /// Refresh the contents of the bar. @@ -152,14 +160,18 @@ public: /// void toggle(); + /// + void refill(); + /// toggles movability void movable(bool silent = false); /// GuiCommandBuffer * commandBuffer() { return command_buffer_; } - /// - Action * addItem(ToolbarItem const & item); + /// 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); /// GuiView const & owner() { return owner_; }