RibbonSystemMenu Class
Implements the system menu for ribbon bar. Inherited from QMenu, but has a number of additional methods for adding items as a follow ms office specification. More...
Header: | #include <RibbonSystemMenu> |
Inherits: | PopupMenu |
Public Functions
RibbonSystemMenu(RibbonBar *ribbonBar) | |
virtual | ~RibbonSystemMenu() override |
RibbonPageSystemRecentFileList * | addPageRecentFile(const QString &caption) |
RibbonPageSystemPopup * | addPageSystemPopup(const QString &caption, QAction *defaultAction, bool splitAction) |
QAction * | addPopupBarAction(const QString &text) |
void | addPopupBarAction(QAction *action, Qt::ToolButtonStyle style = Qt::ToolButtonTextOnly) |
RibbonBar * | ribbonBar() const |
Reimplemented Public Functions
virtual void | setVisible(bool visible) override |
virtual QSize | sizeHint() const override |
virtual void | updateLayout() override |
Reimplemented Protected Functions
virtual void | changeEvent(QEvent *event) override |
virtual void | keyPressEvent(QKeyEvent *event) override |
virtual void | mousePressEvent(QMouseEvent *event) override |
virtual void | mouseReleaseEvent(QMouseEvent *event) override |
virtual void | paintEvent(QPaintEvent *event) override |
Detailed Description
Member Function Documentation
[explicit]
RibbonSystemMenu::RibbonSystemMenu(RibbonBar *ribbonBar)
Constructs RibbonSystemMenu object with the given parent.
[override virtual noexcept]
RibbonSystemMenu::~RibbonSystemMenu()
Destructor of the RibbonSystemMenu object.
RibbonPageSystemRecentFileList *RibbonSystemMenu::addPageRecentFile(const QString &caption)
Adds the page to the right side of the system menu for a list of recently used files. Parameter caption - is a title of the recent file list page. Returns a pointer to RibbonPageSystemRecentFileList for later use.
RibbonPageSystemPopup *RibbonSystemMenu::addPageSystemPopup(const QString &caption, QAction *defaultAction, bool splitAction)
Adds the system popup menu to the menu with the given
. Parameter defaultAction is a default action for the popup that can be additionaly configured with splitAction parameter. Returns a pointer to RibbonPageSystemPopup for later use.
QAction *RibbonSystemMenu::addPopupBarAction(const QString &text)
Adds the button to the bottom of the menu. text - the text on the button. Returns a pointer to the QAction, associated with the button.
void RibbonSystemMenu::addPopupBarAction(QAction *action, Qt::ToolButtonStyle style = Qt::ToolButtonTextOnly)
Adds the button to the bottom of the menu with the given style. Parameter action - is a pointer to the QAction object used to initialize the tips (ToolTip), the text in the Status Bar (StatusTip) and icon.
[override virtual protected]
void RibbonSystemMenu::changeEvent(QEvent *event)
Reimplements: PopupMenu::changeEvent(QEvent *event).
[override virtual protected]
void RibbonSystemMenu::keyPressEvent(QKeyEvent *event)
Reimplements: PopupMenu::keyPressEvent(QKeyEvent *event).
[override virtual protected]
void RibbonSystemMenu::mousePressEvent(QMouseEvent *event)
Reimplements: QMenu::mousePressEvent(QMouseEvent *e).
[override virtual protected]
void RibbonSystemMenu::mouseReleaseEvent(QMouseEvent *event)
Reimplements: QMenu::mouseReleaseEvent(QMouseEvent *e).
[override virtual protected]
void RibbonSystemMenu::paintEvent(QPaintEvent *event)
Reimplements: PopupMenu::paintEvent(QPaintEvent *event).
RibbonBar *RibbonSystemMenu::ribbonBar() const
Returns RibbonBar that owns the menu.
[override virtual]
void RibbonSystemMenu::setVisible(bool visible)
[override virtual]
QSize RibbonSystemMenu::sizeHint() const
Reimplements: PopupMenu::sizeHint() const.