An implementation of BasicTableModelMenuAdapter for RecentFile objects.
More...
#include <RecentFileTableModelMenuAdapter.h++>
An implementation of BasicTableModelMenuAdapter for RecentFile objects.
May be used to implement a "recently opened documents" menu.
- Author
- Mark Lindner
◆ Option
Item model menu adapter options.
| Enumerator |
|---|
| InsertAtTop | An option indicating that the menu items should be inserted above any menu items that existed in the menu at the time of this adapter's construction.
By default, items are added below existing items.
|
| Checkable | An option indicating that the menu items created by this adapter are checkable.
|
| Exclusive | An option indicating that the menu items created by this adapter are mutually exclusive; that is, only one may be checked at any given time.
This option is only meaningful if the Checkable option is also set.
|
◆ RecentFileTableModelMenuAdapter()
◆ ~RecentFileTableModelMenuAdapter()
◆ getMenuLabelForItem()
| QString getMenuLabelForItem |
( |
const RecentFile & |
item | ) |
const |
|
protectedvirtual |
◆ handleItemSelection()
| void handleItemSelection |
( |
const RecentFile * |
item | ) |
|
|
protectedvirtual |
◆ Q_DECLARE_FLAGS()
| Q_DECLARE_FLAGS |
( |
Options |
, |
|
|
Option |
|
|
) |
| |
|
inherited |
◆ recentFileSelected
| void recentFileSelected |
( |
const QString & |
path | ) |
|
|
signal |
Emitted when a menu item is selected.
- Parameters
-
◆ setSelectedItem()
Selects the (checkable) menu item corresponding to the given model item.
- Parameters
-
◆ sync()
Synchronizes the menu with the model.
This method must be called at least once to populate the menu with any items that may exist in the model.
The documentation for this class was generated from the following file: