]> git.lyx.org Git - features.git/blobdiff - src/frontends/qt/GuiToolbar.h
Fix broken Apple speller interface
[features.git] / src / frontends / qt / GuiToolbar.h
index aebc9e28442899d3cfb011548983a10d736aa49b..6b3581c2d2dbb9c249a7d63e84bcdffaf26842ba 100644 (file)
@@ -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,23 +149,29 @@ public:
        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_; }
 
-       ///
-       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_; }