Recently opened menu.
More...
#include <RabbitRecentMenu.h>
|
| void | addRecentFile (const QString &fileName, const QString &title=QString()) |
| |
| void | clearMenu () |
| | Removes all the menu's actions.
|
| |
| void | setMaxCount (int) |
| | Sets the maximum number of entries int he menu.
|
| |
|
|
void | recentFileTriggered (const QString &filename) |
| | This signal is emitted when a recent file in this menu is triggered.
|
| |
|
void | sigSaveState () |
| |
|
| | CRecentMenu (QWidget *parent=0) |
| | Constructs a menu with parent parent.
|
| |
| | CRecentMenu (const QString &title, QWidget *parent=0) |
| | Constructs a menu with a title and a parent.
|
| |
| | CRecentMenu (const QString &title, const QIcon &icon, QWidget *parent=0) |
| | Constructs a menu with a title, icon and a parent.
|
| |
| int | maxCount () const |
| | Returns the maximum number of entries in the menu.
|
| |
| void | setFormat (const QString &format) |
| | This property holds the string used to generate the item text.
|
| |
| const QString & | format () const |
| | Returns the current format. /sa setFormat.
|
| |
| bool | disableSaveState (bool disable) |
| | Default enable save state.
|
| |
| QByteArray | saveState () const |
| | Saves the state of the recent entries.
|
| |
| bool | restoreState (const QByteArray &state) |
| | Restores the recent entries to the state specified.
|
| |
Recently opened menu.
Definition at line 26 of file RabbitRecentMenu.h.
◆ CRecentMenu() [1/3]
| RabbitCommon::CRecentMenu::CRecentMenu |
( |
QWidget * |
parent = 0 | ) |
|
◆ CRecentMenu() [2/3]
| RabbitCommon::CRecentMenu::CRecentMenu |
( |
const QString & |
title, |
|
|
QWidget * |
parent = 0 |
|
) |
| |
◆ CRecentMenu() [3/3]
| RabbitCommon::CRecentMenu::CRecentMenu |
( |
const QString & |
title, |
|
|
const QIcon & |
icon, |
|
|
QWidget * |
parent = 0 |
|
) |
| |
◆ addRecentFile
| void RabbitCommon::CRecentMenu::addRecentFile |
( |
const QString & |
fileName, |
|
|
const QString & |
title = QString() |
|
) |
| |
|
slot |
◆ clearMenu
| void RabbitCommon::CRecentMenu::clearMenu |
( |
| ) |
|
|
slot |
◆ disableSaveState()
| bool RabbitCommon::CRecentMenu::disableSaveState |
( |
bool |
disable | ) |
|
◆ format()
| const QString & RabbitCommon::CRecentMenu::format |
( |
| ) |
const |
◆ maxCount()
| int RabbitCommon::CRecentMenu::maxCount |
( |
| ) |
const |
◆ menuTriggered
| void RabbitCommon::CRecentMenu::menuTriggered |
( |
QAction * |
action | ) |
|
|
privateslot |
◆ restoreState()
| bool RabbitCommon::CRecentMenu::restoreState |
( |
const QByteArray & |
state | ) |
|
Restores the recent entries to the state specified.
Typically this is used in conjunction with QSettings to restore entries from a past session. Returns false if there are errors. Here is an example: QSettings settings; recentFilesMenu->restoreState(settings.value("recentFiles").toByteArray());
Definition at line 123 of file RabbitRecentMenu.cpp.
◆ saveState()
| QByteArray RabbitCommon::CRecentMenu::saveState |
( |
| ) |
const |
Saves the state of the recent entries.
Typically this is used in conjunction with QSettings to remember entries for a future session. A version number is stored as part of the data. Here is an example: QSettings settings; settings.setValue("recentFiles", recentFilesMenu->saveState());
Definition at line 107 of file RabbitRecentMenu.cpp.
◆ setFormat()
| void RabbitCommon::CRecentMenu::setFormat |
( |
const QString & |
format | ) |
|
This property holds the string used to generate the item text.
d is replaced by the item number s is replaced by the item text The default value is "%d %s".
Definition at line 88 of file RabbitRecentMenu.cpp.
◆ setMaxCount
| void RabbitCommon::CRecentMenu::setMaxCount |
( |
int |
count | ) |
|
|
slot |
◆ slotSaveState
| void RabbitCommon::CRecentMenu::slotSaveState |
( |
| ) |
|
|
privateslot |
◆ updateRecentFileActions
| void RabbitCommon::CRecentMenu::updateRecentFileActions |
( |
| ) |
|
|
privateslot |
◆ operator<<
| QDataStream & operator<< |
( |
QDataStream & |
d, |
|
|
const _Content & |
image |
|
) |
| |
|
friend |
◆ operator>>
◆ m_bUpdate
| bool RabbitCommon::CRecentMenu::m_bUpdate |
|
private |
◆ m_DisableSaveState
| bool RabbitCommon::CRecentMenu::m_DisableSaveState |
|
private |
◆ m_format
| QString RabbitCommon::CRecentMenu::m_format |
|
private |
◆ m_maxCount
| int RabbitCommon::CRecentMenu::m_maxCount |
|
private |
◆ m_OpenContent
| QList<_Content> RabbitCommon::CRecentMenu::m_OpenContent |
|
private |
◆ format
| QString RabbitCommon::CRecentMenu::format |
|
readwrite |
◆ maxCount
| int RabbitCommon::CRecentMenu::maxCount |
|
readwrite |
The documentation for this class was generated from the following files: