ParaView
|
This class is the crux of the ParaView application. More...
#include <pqApplicationCore.h>
Public Slots | |
void | prepareForQuit () |
Applications calls this to ensure that any cleanup is performed correctly. More... | |
void | quit () |
Calls QCoreApplication::quit(). More... | |
void | showOutputWindow () |
Causes the output window to be shown. More... | |
void | loadConfiguration (const QString &filename) |
Load configuration xml. More... | |
void | loadConfigurationXML (const char *xmldata) |
void | render () |
Renders all windows. More... | |
Signals | |
void | aboutToLoadState (vtkPVXMLElement *root) |
Fired before a state xml is being loaded. More... | |
void | stateLoaded (vtkPVXMLElement *root, vtkSMProxyLocator *locator) |
Fired when a state file is loaded successfully. More... | |
void | stateSaved (vtkPVXMLElement *root) |
Fired to save state xml. More... | |
void | undoStackChanged (pqUndoStack *) |
Fired when the undo stack is set. More... | |
void | loadXML (vtkPVXMLElement *) |
Fired on loadConfiguration(). More... | |
void | forceFilterMenuRefresh () |
Fired when the filter menu state needs to be manually updated. More... | |
void | updateMasterEnableState (bool) |
Fired when master changed. true if current user is master, false otherwise. More... | |
Public Member Functions | |
pqApplicationCore (int &argc, char **argv, pqOptions *options=0, QObject *parent=0) | |
Preferred constructor. More... | |
pqOptions * | getOptions () const |
Provides access to the command line options object. More... | |
pqObjectBuilder * | getObjectBuilder () const |
Get the Object Builder. More... | |
void | setUndoStack (pqUndoStack *stack) |
Set/Get the application's central undo stack. More... | |
pqUndoStack * | getUndoStack () const |
void | registerManager (const QString &function, QObject *manager) |
Custom Applications may need use various "managers" All such manager can be registered with the pqApplicationCore so that that can be used by other components of the application. More... | |
QObject * | manager (const QString &function) |
Returns a manager for a particular function, if any. More... | |
void | unRegisterManager (const QString &function) |
Unregisters a manager for a particular function, if any. More... | |
QHelpEngine * | helpEngine () |
provides access to the help engine. More... | |
void | registerDocumentation (const QString &filename) |
QHelpEngine doesn't like filenames in resource space. More... | |
pqServerManagerObserver * | getServerManagerObserver () |
ServerManagerObserver observer the vtkSMProxyManager for changes to the server manager and fires signals on certain actions such as registeration/unregistration of proxies etc. More... | |
pqServerManagerModel * | getServerManagerModel () const |
ServerManagerModel is the representation of the ServerManager using pqServerManagerModelItem subclasses. More... | |
pq3DWidgetFactory * | get3DWidgetFactory () const |
pqInterfaceTracker * | interfaceTracker () const |
Locates the interface tracker for the application. More... | |
pqLinksModel * | getLinksModel () const |
pqLinksModel is the model used to keep track of proxy/property links maintained by vtkSMProxyManager. More... | |
pqPluginManager * | getPluginManager () const |
pqPluginManager manages all functionality associated with loading plugins. More... | |
pqProgressManager * | getProgressManager () const |
ProgressManager is the manager that streamlines progress. More... | |
pqDisplayPolicy * | getDisplayPolicy () const |
pqOutputWindowAdapter * | outputWindowAdapter () |
Returns the output window. More... | |
pqOutputWindow * | outputWindow () |
void | setDisplayPolicy (pqDisplayPolicy *dp) |
It is possible to change the display policy used by the application. More... | |
virtual pqTestUtility * | testUtility () |
Provides access to the test utility. More... | |
pqRecentlyUsedResourcesList & | recentlyUsedResources () |
Returns the set of recently-used resources i.e. More... | |
pqServerConfigurationCollection & | serverConfigurations () |
Returns the collection of server configurations known. More... | |
pqSettings * | settings () |
Get the application settings. More... | |
vtkPVXMLElement * | saveState () |
Save the ServerManager state. More... | |
void | saveState (const QString &filename) |
void | loadState (vtkPVXMLElement *root, pqServer *server, vtkSMStateLoader *loader=NULL) |
Loads the ServerManager state. More... | |
void | loadState (const char *filename, pqServer *server, vtkSMStateLoader *loader=NULL) |
Load state xml from a file. More... | |
void | loadStateFromString (const char *xmlcontents, pqServer *server, vtkSMStateLoader *loader=NULL) |
Loads state from an in-memory buffer. More... | |
void | loadStateIncremental (vtkPVXMLElement *root, pqServer *server, vtkSMStateLoader *loader=NULL) |
Same as loadState() except that it doesn't clear the current visualization state. More... | |
void | loadStateIncremental (const QString &filename, pqServer *server, vtkSMStateLoader *loader=NULL) |
bool | isLoadingState () |
Check to see if its in the process of loading a state Reliance on this flag is chimerical since we cannot set this ivar when state file is being loaded from python shell. More... | |
pqServer * | getActiveServer () const |
returns the active server is any. More... | |
void | loadDistributedPlugins (const char *filename=0) |
Called to load the configuration xml bundled with the application the lists the plugins that the application is aware by default. More... | |
virtual | ~pqApplicationCore () |
Destructor. More... | |
Static Public Member Functions | |
static pqApplicationCore * | instance () |
Protected Slots | |
void | onStateLoaded (vtkPVXMLElement *root, vtkSMProxyLocator *locator) |
void | onStateSaved (vtkPVXMLElement *root) |
This class is the crux of the ParaView application.
It creates and manages various managers which are necessary for the ParaView-based client to work with the ServerManager. For clients based of the pqCore library, simply instantiate this pqApplicationCore after QApplication initialization and then create your main window etc. like a standard Qt application. You can then use the facilities provided by pqCore such as the pqObjectBuilder, pqUndoStack etc. in your application. After that point.
Definition at line 74 of file pqApplicationCore.h.
pqApplicationCore::pqApplicationCore | ( | int & | argc, |
char ** | argv, | ||
pqOptions * | options = 0 , |
||
QObject * | parent = 0 |
||
) |
Preferred constructor.
Initializes the server-manager engine and sets up the core functionality. If application supports special command line options, pass an instance of pqOptions subclass to the constructor, otherwise a new instance of pqOptions with standard ParaView command line options will be created.
|
virtual |
Destructor.
|
static |
|
inline |
Provides access to the command line options object.
Definition at line 90 of file pqApplicationCore.h.
|
inline |
Get the Object Builder.
Object Buider must be used to create complex objects such as sources, filters, readers, views, displays etc.
Definition at line 96 of file pqApplicationCore.h.
void pqApplicationCore::setUndoStack | ( | pqUndoStack * | stack | ) |
Set/Get the application's central undo stack.
By default no undo stack is provided. Applications must set on up as required.
|
inline |
Definition at line 102 of file pqApplicationCore.h.
void pqApplicationCore::registerManager | ( | const QString & | function, |
QObject * | manager | ||
) |
Custom Applications may need use various "managers" All such manager can be registered with the pqApplicationCore so that that can be used by other components of the application.
Registering with pqApplicationCore gives easy access to these managers from the application code. Note that custom applications are not required to register managers. However certain optional components of the pqCore may expect some managers. Only one manager can be registered for a function
.
QObject* pqApplicationCore::manager | ( | const QString & | function | ) |
Returns a manager for a particular function, if any.
void pqApplicationCore::unRegisterManager | ( | const QString & | function | ) |
Unregisters a manager for a particular function, if any.
QHelpEngine* pqApplicationCore::helpEngine | ( | ) |
provides access to the help engine.
The engine is created the first time this method is called.
void pqApplicationCore::registerDocumentation | ( | const QString & | filename | ) |
QHelpEngine doesn't like filenames in resource space.
This method creates a temporary file for the resource and registers that with the QHelpEngine.
|
inline |
ServerManagerObserver observer the vtkSMProxyManager for changes to the server manager and fires signals on certain actions such as registeration/unregistration of proxies etc.
Returns the ServerManagerObserver used by the application.
Definition at line 135 of file pqApplicationCore.h.
|
inline |
ServerManagerModel is the representation of the ServerManager using pqServerManagerModelItem subclasses.
It makes it possible to explore the ServerManager with ease by separating proxies based on their functionality/type.
Definition at line 142 of file pqApplicationCore.h.
|
inline |
Definition at line 145 of file pqApplicationCore.h.
|
inline |
Locates the interface tracker for the application.
pqInterfaceTracker is used to locate all interface implementations typically loaded from plugins.
Definition at line 151 of file pqApplicationCore.h.
|
inline |
pqLinksModel is the model used to keep track of proxy/property links maintained by vtkSMProxyManager.
TODO: It may be worthwhile to investigate if we even need a global pqLinksModel. All the information is already available in vtkSMProxyManager.
Definition at line 159 of file pqApplicationCore.h.
|
inline |
pqPluginManager manages all functionality associated with loading plugins.
Definition at line 163 of file pqApplicationCore.h.
|
inline |
ProgressManager is the manager that streamlines progress.
Definition at line 167 of file pqApplicationCore.h.
|
inline |
Definition at line 173 of file pqApplicationCore.h.
|
inline |
Returns the output window.
Definition at line 177 of file pqApplicationCore.h.
|
inline |
Definition at line 180 of file pqApplicationCore.h.
void pqApplicationCore::setDisplayPolicy | ( | pqDisplayPolicy * | dp | ) |
It is possible to change the display policy used by the application.
Used to change the active display policy. The pqApplicationCore takes over the ownership of the display policy.
|
virtual |
Provides access to the test utility.
Reimplemented in pqPVApplicationCore.
pqRecentlyUsedResourcesList& pqApplicationCore::recentlyUsedResources | ( | ) |
Returns the set of recently-used resources i.e.
data files and state files.
pqServerConfigurationCollection& pqApplicationCore::serverConfigurations | ( | ) |
Returns the collection of server configurations known.
Server configurations have information about connecting to different servers.
pqSettings* pqApplicationCore::settings | ( | ) |
Get the application settings.
vtkPVXMLElement* pqApplicationCore::saveState | ( | ) |
Save the ServerManager state.
void pqApplicationCore::saveState | ( | const QString & | filename | ) |
void pqApplicationCore::loadState | ( | vtkPVXMLElement * | root, |
pqServer * | server, | ||
vtkSMStateLoader * | loader = NULL |
||
) |
Loads the ServerManager state.
Emits the signal stateLoaded() on loading state successfully.
void pqApplicationCore::loadState | ( | const char * | filename, |
pqServer * | server, | ||
vtkSMStateLoader * | loader = NULL |
||
) |
Load state xml from a file.
The filename can be a Qt resource file, besides regular filesystem files (refer to QFile documentation for more information on Qt resource system).
void pqApplicationCore::loadStateFromString | ( | const char * | xmlcontents, |
pqServer * | server, | ||
vtkSMStateLoader * | loader = NULL |
||
) |
Loads state from an in-memory buffer.
void pqApplicationCore::loadStateIncremental | ( | vtkPVXMLElement * | root, |
pqServer * | server, | ||
vtkSMStateLoader * | loader = NULL |
||
) |
Same as loadState() except that it doesn't clear the current visualization state.
void pqApplicationCore::loadStateIncremental | ( | const QString & | filename, |
pqServer * | server, | ||
vtkSMStateLoader * | loader = NULL |
||
) |
|
inline |
Check to see if its in the process of loading a state Reliance on this flag is chimerical since we cannot set this ivar when state file is being loaded from python shell.
Definition at line 226 of file pqApplicationCore.h.
pqServer* pqApplicationCore::getActiveServer | ( | ) | const |
returns the active server is any.
void pqApplicationCore::loadDistributedPlugins | ( | const char * | filename = 0 | ) |
Called to load the configuration xml bundled with the application the lists the plugins that the application is aware by default.
If no filename is specified, {executable-path}/.plugins is loaded.
|
slot |
Applications calls this to ensure that any cleanup is performed correctly.
|
slot |
Calls QCoreApplication::quit().
|
slot |
Causes the output window to be shown.
|
slot |
Load configuration xml.
This results in firing of the loadXML() signal which different components that support configuration catch and process to update their behavior.
|
slot |
|
slot |
Renders all windows.
|
signal |
Fired before a state xml is being loaded.
One can add slots for this signal and modify the fired xml-element as part of pre-processing before attempting to load the state xml. Note that never attempt to connect to signal in a delayed fashion i.e using Qt::QueuedConnection etc. since the root
will be destroyed.
|
signal |
Fired when a state file is loaded successfully.
GUI components that may have state saved in the XML state file must listen to this signal and handle process the XML to update their state.
|
signal |
Fired to save state xml.
Components that need to save XML state should listen to this signal and add their XML elements to the root. DO NOT MODIFY THE ROOT besides adding new children.
|
signal |
Fired when the undo stack is set.
|
signal |
Fired on loadConfiguration().
|
signal |
Fired when the filter menu state needs to be manually updated.
|
signal |
Fired when master changed. true if current user is master, false otherwise.
|
protectedslot |
|
protectedslot |
|
protected |
Definition at line 294 of file pqApplicationCore.h.
|
protected |
Definition at line 296 of file pqApplicationCore.h.
|
protected |
Definition at line 297 of file pqApplicationCore.h.
|
protected |
Definition at line 298 of file pqApplicationCore.h.
|
protected |
Definition at line 300 of file pqApplicationCore.h.
|
protected |
Definition at line 301 of file pqApplicationCore.h.
|
protected |
Definition at line 302 of file pqApplicationCore.h.
|
protected |
Definition at line 303 of file pqApplicationCore.h.
|
protected |
Definition at line 304 of file pqApplicationCore.h.
|
protected |
Definition at line 305 of file pqApplicationCore.h.
|
protected |
Definition at line 306 of file pqApplicationCore.h.
|
protected |
Definition at line 307 of file pqApplicationCore.h.
|
protected |
Definition at line 308 of file pqApplicationCore.h.
|
protected |
Definition at line 309 of file pqApplicationCore.h.
|
protected |
Definition at line 310 of file pqApplicationCore.h.
|
protected |
Definition at line 311 of file pqApplicationCore.h.
|
protected |
Definition at line 312 of file pqApplicationCore.h.
|
protected |
Definition at line 313 of file pqApplicationCore.h.
|
protected |
Definition at line 314 of file pqApplicationCore.h.