abstract interface used to load recently used resources. More...
#include <pqRecentlyUsedResourceLoaderInterface.h>
Public Member Functions | |
virtual | ~pqRecentlyUsedResourceLoaderInterface () |
virtual bool | canLoad (const pqServerResource &resource)=0 |
Return true of the interface supports loading the given resource. More... | |
virtual bool | load (const pqServerResource &resource, pqServer *server)=0 |
Loads the resource and returns the true if successfully loaded, otherwise false. More... | |
virtual QIcon | icon (const pqServerResource &resource) |
Return an icon, if any, to use for the resource. More... | |
virtual QString | label (const pqServerResource &resource)=0 |
Return label to use for the resource. More... | |
Protected Member Functions | |
pqRecentlyUsedResourceLoaderInterface () | |
abstract interface used to load recently used resources.
pqRecentlyUsedResourceLoaderInterface provides the interface for code that handles loading of recently used resources typically maintained in pqRecentlyUsedResourcesList
. pqRecentFilesMenu
uses implementations of this interface to determine the action to trigger when user clicks on a specific resource in the menu.
Definition at line 27 of file pqRecentlyUsedResourceLoaderInterface.h.
|
virtual |
|
protected |
|
pure virtual |
Return true of the interface supports loading the given resource.
Implemented in pqStandardRecentlyUsedResourceLoaderImplementation.
|
pure virtual |
Loads the resource and returns the true if successfully loaded, otherwise false.
If returned false, the resource is treated as defunct and may be removed. from the recent list.
Implemented in pqStandardRecentlyUsedResourceLoaderImplementation.
|
virtual |
Return an icon, if any, to use for the resource.
Default implementation simply returns an empty QIcon.
Reimplemented in pqStandardRecentlyUsedResourceLoaderImplementation.
|
pure virtual |
Return label to use for the resource.
Implemented in pqStandardRecentlyUsedResourceLoaderImplementation.