manages recent files menu used in ParaView. More...
#include <pqRecentFilesMenu.h>
Inherits QObject.
Public Member Functions | |
pqRecentFilesMenu (QMenu &menu, QObject *p=nullptr) | |
Assigns the menu that will display the list of files. More... | |
~pqRecentFilesMenu () override | |
virtual bool | open (pqServer *server, const pqServerResource &resource) const |
Open a resource on the given server. More... | |
void | setSortByServers (bool val) |
When set to true (default), the menu is arranged to keep resources that use the same server together. More... | |
bool | sortByServers () const |
manages recent files menu used in ParaView.
pqRecentFilesMenu manages the recent files (states, etc.) menu used in ParaView. pqRecentFilesMenu uses implementations of pqRecentlyUsedResourceLoaderInterface
to handle how to show (icon, label) a recent item and how to handle user requesting to load that item.
To add support for different types of recent items in your custom application, you may want to provide new implementations for pqRecentlyUsedResourceLoaderInterface
.
Definition at line 35 of file pqRecentFilesMenu.h.
pqRecentFilesMenu::pqRecentFilesMenu | ( | QMenu & | menu, |
QObject * | p = nullptr |
||
) |
Assigns the menu that will display the list of files.
|
override |
|
virtual |
Open a resource on the given server.
|
inline |
When set to true (default), the menu is arranged to keep resources that use the same server together.
This also results in the menu have separators for the server names. Set to false if your application does not support connecting/disconnecting from server or you don't case about sorting the menu by servers.
Definition at line 58 of file pqRecentFilesMenu.h.
|
inline |
Definition at line 59 of file pqRecentFilesMenu.h.