}
/*!
- \brief Static method, cleans up ParaView session at application exit. Not yet implemented.
+ \brief Static method, cleans up ParaView session at application exit.
*/
void PVGUI_Module::pvShutdown()
{
- // TODO...
+ if ( pqImplementation::myPVHelper )
+ pqImplementation::myPVHelper->finalize();
}
/*!
dialog->show();
}
+/*!
+ \brief Slot to show native ParaView user documentation.
+*/
+void PVGUI_Module::onParaViewHelp()
+{
+ showHelpForProxy("index");
+}
+
/*!
\brief Slot to show help for proxy.
*/
return LightApp_Module::deactivateModule( study );
}
+/*!
+ \brief Called when application is closed.
+
+ Process finalize application functionality from ParaView in order to save server settings
+ and nullify application pointer if the application is being closed.
+
+ \param theApp application
+*/
+void PVGUI_Module::onApplicationClosed( SUIT_Application* theApp )
+{
+ pvShutdown();
+
+ CAM_Module::onApplicationClosed(theApp);
+}
+
/*!
\brief Compares the contents of the window with the given reference image,
returns true if they "match" within some tolerance.
void onHelpAbout();
+ void onParaViewHelp();
+
void showHelpForProxy( const QString& proxy );
void makeAssistant();
void assistantError( const QString& err );
public slots:
virtual bool activateModule( SUIT_Study* );
virtual bool deactivateModule( SUIT_Study* );
+ virtual void onApplicationClosed( SUIT_Application* );
private:
class pqImplementation;
tr( "MEN_ABOUT" ), tr( "STB_ABOUT" ),
0, desk, false, this, SLOT( onHelpAbout() ) );
- // ParaView Help
- // TODO...
+ // Native ParaView user documentation
+ aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_PARAVIEW_HELP"), false );
+ createAction( ParaViewHelpId, tr( "TOP_PARAVIEW_HELP" ), QIcon(aPixmap),
+ tr( "MEN_PARAVIEW_HELP" ), tr( "STB_PARAVIEW_HELP" ),
+ 0, desk, false, this, SLOT( onParaViewHelp() ) );
// Enable Tooltips
aQtxAction = new QtxAction( tr("TOP_ENABLE_TOOLTIPS"), QIcon(),
int aHelpMnu = createMenu( tr( "MEN_DESK_HELP" ), -1, -1 );
createMenu( AboutParaViewId, aHelpMnu );
- // ParaView Help
- // It's needed to install module docs into <module>_ROOT_DIR/share/doc/salome/gui/<module>
- // createMenu( ParaViewHelpId, aHelpMnu );
- createMenu( EnableTooltipsId, aHelpMnu );
+ createMenu( ParaViewHelpId, aHelpMnu );
createMenu( separator(), aHelpMnu );
+ createMenu( EnableTooltipsId, aHelpMnu );
}
createTool( separator(), aToolId );
createTool( ConnectId, aToolId );
createTool( DisconnectId, aToolId );
- //createTool( separator(), aToolId );
- //createTool( ParaViewHelpId, aToolId );
+ createTool( separator(), aToolId );
+ createTool( ParaViewHelpId, aToolId );
// --- Toolbar "Selection Controls"
{
}
+//-----------------------------------------------------------------------------
+/*!
+ \brief Finalize application in order to save server settings.
+*/
+void PVGUI_ProcessModuleHelper::finalize()
+{
+ this->FinalizeApplication();
+}
+
//-----------------------------------------------------------------------------
/*!
\brief Calls the base implementation and redirects ParaView output to PVGUI_OutputWindowAdapter instance.
virtual void showWindow();
virtual void hideWindow();
+ void finalize();
+
protected:
virtual int InitializeApplication(int argc, char** argv);
<source>ICON_LOOP</source>
<translation>pqVcrLoop24.png</translation>
</message>
+ <message>
+ <source>ICON_PARAVIEW_HELP</source>
+ <translation>pqHelp24.png</translation>
+ </message>
</context>
</TS>
</message>
<message>
<source>TOP_PARAVIEW_HELP</source>
- <translation>ParaView Help</translation>
+ <translation>ParaView User Documentation</translation>
</message>
<message>
<source>MEN_PARAVIEW_HELP</source>
- <translation>ParaView Help</translation>
+ <translation>ParaView User Documentation</translation>
</message>
<message>
<source>STB_PARAVIEW_HELP</source>
- <translation>ParaView Help</translation>
+ <translation>ParaView User Documentation reference</translation>
</message>
<message>
<source>TOP_ENABLE_TOOLTIPS</source>