Public Member Functions | List of all members
pqRecentFilesMenu Class Reference

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
 

Detailed Description

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.

See also
pqStandardRecentlyUsedResourceLoaderImplementation
pqParaViewBehaviors,
pqParaViewMenuBuilders

Definition at line 35 of file pqRecentFilesMenu.h.

Constructor & Destructor Documentation

◆ pqRecentFilesMenu()

pqRecentFilesMenu::pqRecentFilesMenu ( QMenu &  menu,
QObject *  p = nullptr 
)

Assigns the menu that will display the list of files.

◆ ~pqRecentFilesMenu()

pqRecentFilesMenu::~pqRecentFilesMenu ( )
override

Member Function Documentation

◆ open()

virtual bool pqRecentFilesMenu::open ( pqServer server,
const pqServerResource resource 
) const
virtual

Open a resource on the given server.

◆ setSortByServers()

void pqRecentFilesMenu::setSortByServers ( bool  val)
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.

◆ sortByServers()

bool pqRecentFilesMenu::sortByServers ( ) const
inline

Definition at line 59 of file pqRecentFilesMenu.h.


The documentation for this class was generated from the following file: