a special QMenu that allows to manage a list of recently loaded files
More...
#include <jkqterecentfilesmenu.h>
|
| void | openRecentFile (const QString &filename) |
| | emitted when the user clicks one of the recent files in the menu. More...
|
| |
a special QMenu that allows to manage a list of recently loaded files
Usage example:
ui->menubar->addMenu(menuRecent);
menuRecent->
addRecentFile(QApplication::instance()->applicationFilePath());
◆ JKQTERecentFilesMenu()
| JKQTERecentFilesMenu::JKQTERecentFilesMenu |
( |
QWidget * |
parent = 0 | ) |
|
|
explicit |
◆ addRecentFile()
| void JKQTERecentFilesMenu::addRecentFile |
( |
const QString & |
filename | ) |
|
add a new file to the list of recent files
◆ clearRecentFiles()
| void JKQTERecentFilesMenu::clearRecentFiles |
( |
| ) |
|
◆ doesShowIcons()
| bool JKQTERecentFilesMenu::doesShowIcons |
( |
| ) |
const |
show icons next to the recent files
◆ iconForFile()
| QIcon JKQTERecentFilesMenu::iconForFile |
( |
const QFileInfo & |
fileinfo | ) |
|
|
protected |
◆ intOpenRecentFile
| void JKQTERecentFilesMenu::intOpenRecentFile |
( |
| ) |
|
|
protectedslot |
◆ maxRecentFilesCount()
| int JKQTERecentFilesMenu::maxRecentFilesCount |
( |
| ) |
const |
returns the max. number of files in the list
◆ openRecentFile
| void JKQTERecentFilesMenu::openRecentFile |
( |
const QString & |
filename | ) |
|
|
signal |
emitted when the user clicks one of the recent files in the menu.
◆ readSettings()
| void JKQTERecentFilesMenu::readSettings |
( |
QSettings & |
settings, |
|
|
QString |
prefix = QString("") |
|
) |
| |
read the list of recent files from a QSettings object.
The settings are saved under the key [prefix] + "recentfilelist"
◆ setAlwaysEnabled()
| void JKQTERecentFilesMenu::setAlwaysEnabled |
( |
bool |
enabled | ) |
|
◆ setDefaultIcon()
| void JKQTERecentFilesMenu::setDefaultIcon |
( |
const QIcon & |
defaultIcon | ) |
|
◆ setIconForExtension()
| void JKQTERecentFilesMenu::setIconForExtension |
( |
const QString & |
extension, |
|
|
const QIcon & |
icon |
|
) |
| |
register an icon for a given filetype this overrides the display of system icons
◆ setMaxRecentFilesCount()
| void JKQTERecentFilesMenu::setMaxRecentFilesCount |
( |
int |
num | ) |
|
set the max. number of files in the list
◆ setMenuEnabled
| void JKQTERecentFilesMenu::setMenuEnabled |
( |
bool |
enabled | ) |
|
|
slot |
◆ setShowIcons()
| void JKQTERecentFilesMenu::setShowIcons |
( |
bool |
enabled | ) |
|
show icons next to the recent files
◆ setUseSystemFileIcons()
| void JKQTERecentFilesMenu::setUseSystemFileIcons |
( |
bool |
use | ) |
|
use file icons from system
◆ storeSettings()
| void JKQTERecentFilesMenu::storeSettings |
( |
QSettings & |
settings, |
|
|
QString |
prefix = QString("") |
|
) |
| |
save the list of recent files into a QSettings object.
The settings are saved under the key [prefix] + "recentfilelist"
◆ strippedName()
| QString JKQTERecentFilesMenu::strippedName |
( |
const QString & |
fullFileName | ) |
|
|
protected |
◆ updateActions
| void JKQTERecentFilesMenu::updateActions |
( |
| ) |
|
|
protectedslot |
◆ alwaysDisabled
| bool JKQTERecentFilesMenu::alwaysDisabled |
|
protected |
◆ iconProvider
| QFileIconProvider JKQTERecentFilesMenu::iconProvider |
|
protected |
◆ m_actions
| QList<QAction*> JKQTERecentFilesMenu::m_actions |
|
protected |
◆ m_alwaysEnabled
| bool JKQTERecentFilesMenu::m_alwaysEnabled |
|
protected |
◆ m_defaultIcon
| QIcon JKQTERecentFilesMenu::m_defaultIcon |
|
protected |
◆ m_fileIcons
| QMap<QString, QIcon> JKQTERecentFilesMenu::m_fileIcons |
|
protected |
◆ m_files
| QStringList JKQTERecentFilesMenu::m_files |
|
protected |
◆ m_icons
| bool JKQTERecentFilesMenu::m_icons |
|
protected |
◆ m_useSystemFileIcons
| bool JKQTERecentFilesMenu::m_useSystemFileIcons |
|
protected |
The documentation for this class was generated from the following file: