Qt Utilities 6.14.4
Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models
|
The RecentMenuManager class manages the entries for a "recently opened files" menu. More...
#include <recentmenumanager.h>
Public Slots | |
void | restore (const QStringList &savedEntries) |
Restores the specified entries. | |
QStringList | save () |
Saves the current entries. | |
void | addEntry (const QString &path) |
Ensures an entry for the specified path is present and the first entry in the list. | |
void | clearEntries () |
Clears all entries. | |
Signals | |
void | fileSelected (const QString &path) |
Emitted after the user selected a file. | |
Public Member Functions | |
RecentMenuManager (QMenu *menu, QObject *parent=nullptr) | |
Constructs a new recent menu manager. | |
The RecentMenuManager class manages the entries for a "recently opened files" menu.
Definition at line 13 of file recentmenumanager.h.
QtUtilities::RecentMenuManager::RecentMenuManager | ( | QMenu * | menu, |
QObject * | parent = nullptr ) |
Constructs a new recent menu manager.
menu | Specifies the QMenu instance to operate with. |
parent | Specifies the parent QObject; might be nullptr. |
Definition at line 30 of file recentmenumanager.cpp.
|
slot |
Ensures an entry for the specified path is present and the first entry in the list.
Definition at line 82 of file recentmenumanager.cpp.
|
slot |
Clears all entries.
Definition at line 120 of file recentmenumanager.cpp.
|
signal |
Emitted after the user selected a file.
|
slot |
Restores the specified entries.
Definition at line 44 of file recentmenumanager.cpp.
|
slot |
Saves the current entries.
Definition at line 64 of file recentmenumanager.cpp.