RibbonCustomizeManager Class

RibbonCustomizeManager is a base class to customize actions on the RibbonBar. More...

Header: #include <RibbonCustomizeManager>
Inherits: QObject

Public Functions

virtual ~RibbonCustomizeManager()
QString actionId(QAction *action) const
QList<QAction *> actions(QToolBar *toolBar) const
QList<QAction *> actionsAll() const
QList<QAction *> actionsByCategory(const QString &category) const
QList<QAction *> actionsGroup(RibbonGroup *group) const
void addAllActionsCategory(const QString &category)
void addToCategory(const QString &category, QAction *action)
void addToCategory(const QString &category, QToolBar *toolBar)
void addToCategory(const QString &category, RibbonPage *page)
void addToCategory(const QString &category, RibbonGroup *group)
void addToolBar(QToolBar *toolBar)
void appendActions(RibbonGroup *group, const QList<QAction *> &actions)
void cancel()
QStringList categories() const
void clearActions(RibbonGroup *group)
void commit()
bool containsAction(QToolBar *toolBar, QAction *action) const
bool containsAction(RibbonGroup *group, QAction *action) const
RibbonGroup *createGroup(RibbonPage *page, const QString &groupName, int index = -1)
RibbonPage *createPage(const QString &pageName, int index = -1)
void deleteGroup(RibbonPage *page, int index)
void deletePage(RibbonPage *page)
QString groupId(RibbonGroup *group) const
QString groupName(RibbonGroup *group) const
QList<RibbonGroup *> groupsByCategory(const QString &category) const
void insertAction(QToolBar *toolBar, QAction *action, int index)
void insertAction(RibbonGroup *group, QAction *action, int index)
bool isEditMode() const
bool isPageHidden(RibbonPage *page) const
bool isPageVisible(RibbonPage *page) const
bool loadStateFromDevice(QIODevice *device)
bool loadStateFromXML(IXmlStreamReader *xmlreader)
void moveGroup(RibbonPage *page, int oldIndex, int newIndex)
void movePage(int oldIndex, int newIndex)
RibbonGroupList pageGroups(RibbonPage *page) const
QString pageId(RibbonPage *page) const
int pageIndex(RibbonPage *page) const
QString pageName(RibbonPage *page) const
RibbonPageList pages() const
QList<RibbonPage *> pagesByCategory(const QString &category) const
void removeActionAt(QToolBar *toolBar, int index)
void removeActionAt(RibbonGroup *group, int index)
void removeFromCategory(const QString &category, QAction *action)
void reset(QToolBar *toolBar = Q_NULL)
bool saveStateToDevice(QIODevice *device, bool autoFormatting = true)
bool saveStateToXML(IXmlStreamWriter *xmlwriter)
void setActionId(QAction *action, const QString &id)
void setDefaultState()
void setEditMode(bool set = true)
void setGroupId(RibbonGroup *group, const QString &id)
void setGroupName(RibbonGroup *group, const QString &groupName)
void setPageHidden(RibbonPage *page, bool hide)
void setPageId(RibbonPage *page, const QString &id)
void setPageName(RibbonPage *page, const QString &pageName)
void setPageVisible(RibbonPage *page, bool visible)
QList<QToolBar *> toolBarsByCategory(const QString &category) const

Detailed Description

Member Function Documentation

[virtual noexcept] RibbonCustomizeManager::~RibbonCustomizeManager()

Destructor.

QString RibbonCustomizeManager::actionId(QAction *action) const

Returns unique identifier for action.

See also setActionId().

QList<QAction *> RibbonCustomizeManager::actions(QToolBar *toolBar) const

Returns all actions from toolBar.

QList<QAction *> RibbonCustomizeManager::actionsAll() const

Returns a list of all actions which are subject to customize.

QList<QAction *> RibbonCustomizeManager::actionsByCategory(const QString &category) const

Returns all actions from the specific category.

QList<QAction *> RibbonCustomizeManager::actionsGroup(RibbonGroup *group) const

Returns all actions from group.

void RibbonCustomizeManager::addAllActionsCategory(const QString &category)

Adds new category to customize manager.

void RibbonCustomizeManager::addToCategory(const QString &category, QAction *action)

Adds action to the specific category.

void RibbonCustomizeManager::addToCategory(const QString &category, QToolBar *toolBar)

Adds toolBar to the specific category.

void RibbonCustomizeManager::addToCategory(const QString &category, RibbonPage *page)

Adds ribbon page to the specific category.

void RibbonCustomizeManager::addToCategory(const QString &category, RibbonGroup *group)

Adds ribbon group to the specific category.

void RibbonCustomizeManager::addToolBar(QToolBar *toolBar)

Adds QToolBar toolBar to customize manager.

void RibbonCustomizeManager::appendActions(RibbonGroup *group, const QList<QAction *> &actions)

Inserts a list of actions to the group in last postion.

void RibbonCustomizeManager::cancel()

Cancel all changes that were made.

QStringList RibbonCustomizeManager::categories() const

Returns list of all categories.

void RibbonCustomizeManager::clearActions(RibbonGroup *group)

Clear all actions in group.

void RibbonCustomizeManager::commit()

Apply all changes to the toolBars.

bool RibbonCustomizeManager::containsAction(QToolBar *toolBar, QAction *action) const

Returns true if toolBar contains the action.

bool RibbonCustomizeManager::containsAction(RibbonGroup *group, QAction *action) const

Returns true if group contains the action.

RibbonGroup *RibbonCustomizeManager::createGroup(RibbonPage *page, const QString &groupName, int index = -1)

Creates a new group in page with name groupName in the position index. If index is -1 then group will be added to the last position.

RibbonPage *RibbonCustomizeManager::createPage(const QString &pageName, int index = -1)

Creates page with name pageName and moves it to the position index. If index is -1 then page will be added to the last position.

void RibbonCustomizeManager::deleteGroup(RibbonPage *page, int index)

Deletes group by index from page.

void RibbonCustomizeManager::deletePage(RibbonPage *page)

Deletes the page.

QString RibbonCustomizeManager::groupId(RibbonGroup *group) const

Returns unique identifier for group.

See also setGroupId().

QString RibbonCustomizeManager::groupName(RibbonGroup *group) const

Returns the name of the group.

See also setGroupName().

QList<RibbonGroup *> RibbonCustomizeManager::groupsByCategory(const QString &category) const

Returns all ribbon groups from the specific category.

void RibbonCustomizeManager::insertAction(QToolBar *toolBar, QAction *action, int index)

Insert action to toolBar in the position index.

void RibbonCustomizeManager::insertAction(RibbonGroup *group, QAction *action, int index)

Inserts action to the group in the position index.

bool RibbonCustomizeManager::isEditMode() const

Returns true if customize manager in edit mode. Otherwise, returns false.

bool RibbonCustomizeManager::isPageHidden(RibbonPage *page) const

Returns true if page is hidden.

bool RibbonCustomizeManager::isPageVisible(RibbonPage *page) const

Returns true if page is visible.

See also isPageHidden().

bool RibbonCustomizeManager::loadStateFromDevice(QIODevice *device)

Restore the ribbon bar state from the device.

See also loadStateFromXML and setDefaultState.

bool RibbonCustomizeManager::loadStateFromXML(IXmlStreamReader *xmlreader)

Restore the ribbon bar state from the xml/fastinfoset stream xmlreader.

See also loadStateFromDevice and setDefaultState.

void RibbonCustomizeManager::moveGroup(RibbonPage *page, int oldIndex, int newIndex)

Moves group from position oldIndex to newIndex in page.

void RibbonCustomizeManager::movePage(int oldIndex, int newIndex)

Moves page from position oldIndex to newIndex.

RibbonGroupList RibbonCustomizeManager::pageGroups(RibbonPage *page) const

Returns all groups in page.

QString RibbonCustomizeManager::pageId(RibbonPage *page) const

Returns unique identifier for page.

See also setPageId().

int RibbonCustomizeManager::pageIndex(RibbonPage *page) const

Returns an index of the page.

QString RibbonCustomizeManager::pageName(RibbonPage *page) const

Returns the name of the page.

See also setPageName().

RibbonPageList RibbonCustomizeManager::pages() const

Returns all pages that were added to customize manager.

QList<RibbonPage *> RibbonCustomizeManager::pagesByCategory(const QString &category) const

Returns all ribbon pages from the specific category.

void RibbonCustomizeManager::removeActionAt(QToolBar *toolBar, int index)

Remove an action from toolBar in the position index.

void RibbonCustomizeManager::removeActionAt(RibbonGroup *group, int index)

Removes an action from group in the position index.

void RibbonCustomizeManager::removeFromCategory(const QString &category, QAction *action)

Romoves action from the specific category.

void RibbonCustomizeManager::reset(QToolBar *toolBar = Q_NULL)

Reset all changes to the default for additional toolBar. If toolBar is NULL then reset changes for RibbonBar.

bool RibbonCustomizeManager::saveStateToDevice(QIODevice *device, bool autoFormatting = true)

Save the ribbon bar state to the device with given autoFormatting.

See also saveStateToXML and setDefaultState.

bool RibbonCustomizeManager::saveStateToXML(IXmlStreamWriter *xmlwriter)

Save the ribbon bar state to the xml/fastinfoset stream xmlwriter.

See also saveStateToXML and setDefaultState.

void RibbonCustomizeManager::setActionId(QAction *action, const QString &id)

Assigns the unique identifier id for action.

See also actionId().

void RibbonCustomizeManager::setDefaultState()

Sets the default state of the ribbon bar. The method must be called immediately after the ribbon bar is initialized in order to fix the state in the customization manager, which state should be used by default.

See also saveStateToXML, saveStateToDevice, loadStateFromDevice, and loadStateFromXML.

void RibbonCustomizeManager::setEditMode(bool set = true)

Sets customize manager to the edit mode.

See also isEditMode().

void RibbonCustomizeManager::setGroupId(RibbonGroup *group, const QString &id)

Assign the unique identifier id for group.

See also groupId().

void RibbonCustomizeManager::setGroupName(RibbonGroup *group, const QString &groupName)

Assigns the name groupName for the group.

See also groupName().

void RibbonCustomizeManager::setPageHidden(RibbonPage *page, bool hide)

Assigns page hiddenness to hide.

See also isPageHidden().

void RibbonCustomizeManager::setPageId(RibbonPage *page, const QString &id)

Assign the unique identifier id for page.

See also pageId().

void RibbonCustomizeManager::setPageName(RibbonPage *page, const QString &pageName)

Assigns the name pageName for the page.

See also pageName().

void RibbonCustomizeManager::setPageVisible(RibbonPage *page, bool visible)

Assigns page visibility to visible.

See also isPageVisible().

QList<QToolBar *> RibbonCustomizeManager::toolBarsByCategory(const QString &category) const

Returns all toolbars from the specific category.