Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
LightApp_Application Class Reference

#include <LightApp_Application.h>

Inheritance diagram for LightApp_Application:
Inheritance graph

Public Types

enum  WindowTypes { WT_ObjectBrowser, WT_PyConsole, WT_LogWindow, WT_User }
 
enum  { MenuWindowId = 6 }
 
enum  {
  RenameId = CAM_Application::UserID, CloseId, CloseAllId, GroupAllId,
  PreferencesId, MRUId, ModulesListId, NewGLViewId,
  NewPlot2dId, NewOCCViewId, NewVTKViewId, NewQxSceneViewId,
  NewGraphicsViewId, NewPVViewId, NewPyViewerId, StyleId,
  FullScreenId, UserID
}
 
- Public Types inherited from CAM_Application
typedef QList< CAM_Module * > ModuleList
 
typedef QList< ModuleShortInfoModuleShortInfoList
 
- Public Types inherited from STD_Application
enum  {
  MenuFileId, FileNewId, FileOpenId, FileReopenId,
  FileCloseId, FileSaveId, FileSaveAsId, FileExitId,
  MenuViewId, ViewWindowsId, ViewToolBarsId, ViewStatusBarId,
  NewWindowId, MenuEditId, EditCutId, EditCopyId,
  EditPasteId, MenuHelpId, HelpAboutId, UserID
}
 

Public Slots

virtual void onHelpContentsModule ()
 
virtual void onHelpContextModule (const QString &, const QString &, const QString &=QString())
 
virtual void onNewDoc ()
 
virtual void onOpenDoc ()
 
virtual void onHelpAbout ()
 
virtual bool onOpenDoc (const QString &)
 
virtual void onCopy ()
 
virtual void onPaste ()
 
virtual void onSelectionChanged ()
 
virtual void onDockWindowVisibilityChanged (bool)
 

Signals

void studyOpened ()
 
void studySaved ()
 
void studyClosed ()
 
void preferenceChanged (const QString &, const QString &, const QString &)
 
void preferenceResetToDefaults ()
 
void operationFinished (const QString &, const QString &, const QStringList &)
 

Public Member Functions

 LightApp_Application ()
 
virtual ~LightApp_Application ()
 
virtual QString applicationName () const
 
virtual QString applicationVersion () const
 
virtual CAM_ModuleloadModule (const QString &, const bool=true)
 
virtual bool activateModule (const QString &)
 
LightApp_SelectionMgrselectionMgr () const
 
LogWindowlogWindow ()
 
SUIT_DataBrowserobjectBrowser ()
 
PyConsole_Console * pythonConsole (const bool force=false)
 
virtual void updateObjectBrowser (const bool=true)
 
LightApp_Preferencespreferences () const
 
virtual QString getFileFilter (bool) const
 
virtual QString getFileName (bool open, const QString &initial, const QString &filters, const QString &caption, QWidget *parent)
 
virtual QString getDirectory (const QString &initial, const QString &caption, QWidget *parent)
 
virtual QStringList getOpenFileNames (const QString &initial, const QString &filters, const QString &caption, QWidget *parent)
 
void updateActions ()
 
SUIT_ViewManagergetViewManager (const QString &, const bool)
 
virtual void addViewManager (SUIT_ViewManager *)
 
virtual void removeViewManager (SUIT_ViewManager *)
 
virtual SUIT_ViewManagercreateViewManager (const QString &vmType, bool detached=false)
 
virtual SUIT_ViewManagercreateViewManager (const QString &vmType, QWidget *w)
 
virtual SUIT_ViewManagercreateViewManager (SUIT_ViewModel *)
 
QWidgetgetWindow (const int, const int=-1)
 
QWidgetdockWindow (const int) const
 
void removeDockWindow (const int)
 
void insertDockWindow (const int, QWidget *)
 
void placeDockWindow (const int, Qt::DockWidgetArea)
 
virtual void start ()
 
virtual void closeApplication ()
 
virtual void contextMenuPopup (const QString &, QMenu *, QString &)
 
virtual void createEmptyStudy ()
 
virtual void setDesktop (SUIT_Desktop *)
 
SUIT_Accelaccel () const
 
void setDefaultStudyName (const QString &theName)
 
virtual bool event (QEvent *)
 
virtual bool checkDataObject (LightApp_DataObject *theObj)
 
virtual void updateDesktopTitle ()
 
QStringList viewManagersTypes () const
 Returns list of view manager types which are supported by this application. More...
 
virtual void clearKnownViewManagers ()
 Removes ViewManagers only of known type. More...
 
virtual QString browseObjects (const QStringList &theEntryList, const bool theIsApplyAndClose=true, const bool theIsOptimizedBrowsing=false)
 
virtual SUIT_DataObjectfindObject (const QString &) const
 
virtual bool renameAllowed (const QString &) const
 Return true if object can be renamed. More...
 
virtual bool renameObject (const QString &, const QString &)
 Return true if rename operation finished successfully, false otherwise. More...
 
void emitOperationFinished (const QString &, const QString &, const QStringList &)
 Emits operationFinished signal. More...
 
void updateVisibilityState (DataObjectList &theList, SUIT_ViewModel *theViewModel)
 
virtual bool checkExistingDoc ()
 
PyConsole_InterpgetPyInterp ()
 
- Public Member Functions inherited from CAM_Application
 CAM_Application (const bool=true)
 Constructor. More...
 
virtual ~CAM_Application ()
 Destructor. More...
 
CAM_ModuleactiveModule () const
 Get active module. More...
 
CAM_Modulemodule (const QString &) const
 Get the module with specified name. More...
 
ModuleList modules () const
 Get all loaded modules. More...
 
void modules (ModuleList &) const
 Get all loaded modules. More...
 
void modules (QStringList &, const bool loaded=true) const
 Get names of all modules. More...
 
virtual void addModule (CAM_Module *)
 Add module mod to the modules list. More...
 
virtual void loadModules ()
 Load modules from the modules information list. More...
 
bool activateOperation (const QString &modName, int actionId)
 Load module modName and activate its operation, corresponding to actionId. This method is dedicated to run operations of some module from any other module. More...
 
bool activateOperation (const QString &modName, const QString &actionId)
 Load module modName and activate its operation, corresponding to actionId. This method is dedicated to run operations of some module from any other module. More...
 
bool activateOperation (const QString &modName, const QString &actionId, const QString &pluginName)
 Load module modName and activate its operation, corresponding to actionId and pluginName. This method is dedicated to run operations of some module from any other module. More...
 
- Public Member Functions inherited from STD_Application
 STD_Application ()
 
virtual ~STD_Application ()
 
virtual bool isPossibleToClose (bool &)
 
virtual bool useFile (const QString &)
 
void setEditEnabled (const bool)
 
bool isEditEnabled () const
 
void clearViewManagers ()
 
SUIT_ViewManageractiveViewManager () const
 
SUIT_ViewManagerviewManager (const QString &) const
 
bool containsViewManager (SUIT_ViewManager *) const
 
ViewManagerList viewManagers () const
 
void viewManagers (ViewManagerList &) const
 
void viewManagers (const QString &, ViewManagerList &) const
 
virtual int viewManagerId (const SUIT_ViewManager *) const
 
QString getDirectory (const QString &initial, const QString &caption, QWidget *parent)
 
bool exitConfirmation () const
 
void setExitConfirmation (const bool)
 
- Public Member Functions inherited from SUIT_Application
 SUIT_Application ()
 
virtual ~SUIT_Application ()
 
virtual SUIT_Desktopdesktop ()
 Returns main widget (Desktop) of the application (if it exists) More...
 
virtual SUIT_StudyactiveStudy () const
 Returns active Study. If Application supports wirking with several studies this method should be redefined. More...
 
virtual int getNbStudies () const
 
SUIT_ResourceMgrresourceMgr () const
 
SUIT_ShortcutMgrshortcutMgr () const
 Get access to shortcut manager. More...
 
void putInfo (const QString &, const int=0)
 Puts the message to the status bar. More...
 
QActionaction (const int) const
 
void addPostRoutine (void(*theRoutine)())
 

Static Public Member Functions

static int studyId ()
 
- Static Public Member Functions inherited from CAM_Application
static QString moduleName (const QString &)
 Get module name by its title (user name). More...
 
static QString moduleTitle (const QString &)
 Get module title (user name) by its name. More...
 
static QString moduleIcon (const QString &)
 Get module icon name. More...
 
static bool isModuleAccessible (const QString &)
 Returns true if module is accessible for the current application. Singleton module can be loaded only in one application object. In other application objects this module will be unavailable. More...
 
static ModuleShortInfoList getVersionInfo ()
 Return information about version of the each module. More...
 

Protected Types

enum  { NewStudyId = 1, OpenStudyId }
 
enum  BrowsePolicy { BP_Never = 0, BP_ApplyAndClose, BP_Always }
 
enum  { OpenReload = CAM_Application::OpenExist + 1 }
 
typedef QPointer< QWidgetWinPtr
 
typedef QMap< int, WinPtrWinMap
 
typedef QMap< QString, QByteArray > WinVis
 
typedef QMap< QString, QByteArray > WinGeom
 

Protected Slots

virtual void onDesktopActivated ()
 
virtual void onViewManagerRemoved (SUIT_ViewManager *)
 
virtual void onWindowActivated (SUIT_ViewWindow *theViewWindow)
 
void onNewWindow ()
 
void onModuleActivation (const QString &)
 
void onCloseView (SUIT_ViewManager *)
 
virtual void onStudyCreated (SUIT_Study *)
 
virtual void onStudyOpened (SUIT_Study *)
 
virtual void onStudySaved (SUIT_Study *)
 
virtual void onStudyClosed (SUIT_Study *)
 
void onWCDestroyed (QObject *)
 
void onMRUActivated (const QString &)
 
void onStylePreferences ()
 
void onFullScreen ()
 
virtual void onDesktopMessage (const QString &)
 

Protected Member Functions

virtual void createActions ()
 
virtual void createActionForViewer (const int id, const int parentId, const QString &suffix, const int accel)
 
virtual SUIT_StudycreateNewStudy ()
 
virtual QWidgetcreateWindow (const int)
 
virtual void defaultWindows (QMap< int, int > &) const
 
void defaultViewManagers (QStringList &) const
 
virtual void setActiveStudy (SUIT_Study *)
 
virtual void updateCommandsStatus ()
 
virtual void beforeCloseDoc (SUIT_Study *)
 
virtual void afterCloseDoc ()
 
virtual void moduleAdded (CAM_Module *)
 
virtual bool activateModule (CAM_Module *=0)
 
LightApp_Preferencespreferences (const bool) const
 
virtual void createPreferences (LightApp_Preferences *)
 
virtual void preferencesChanged (const QString &, const QString &)
 
virtual void loadPreferences ()
 
virtual void savePreferences ()
 
virtual QMap< int, QString > activateModuleActions () const
 Get map of the operations which can be performed on the module activation. More...
 
virtual void moduleActionSelected (const int)
 Called when the used selectes required operation chosen from "Activate module" dialog box. More...
 
virtual PyConsole_InterpcreatePyInterp ()
 
void updateWindows ()
 
void updateViewManagers ()
 
void updateModuleActions ()
 
void removeModuleAction (const QString &)
 
void loadDockWindowsState ()
 
void saveDockWindowsState ()
 
virtual void studyOpened (SUIT_Study *)
 
virtual void studyCreated (SUIT_Study *)
 
virtual void studySaved (SUIT_Study *)
 
void updatePreference (const QString &, const QString &, const QString &)
 
QString defaultModule () const
 
virtual void currentWindows (QMap< int, int > &) const
 
void currentViewManagers (QStringList &) const
 
void moduleIconNames (QMap< QString, QString > &) const
 
bool isLibExists (const QString &) const
 
QDockWidgetwindowDock (QWidget *) const
 
QByteArray dockWindowsState (const QMap< QString, bool > &, const QMap< QString, bool > &) const
 
void dockWindowsState (const QByteArray &, QMap< QString, bool > &, QMap< QString, bool > &) const
 
virtual int openChoice (const QString &)
 
virtual bool openAction (const int, const QString &)
 
void showPreferences (const QString &=QString())
 
- Protected Member Functions inherited from CAM_Application
virtual bool abortAllOperations ()
 Abort active operations if there are any. More...
 
- Protected Member Functions inherited from STD_Application
virtual void setActiveViewManager (SUIT_ViewManager *)
 
virtual int closeChoice (const QString &)
 
virtual bool closeAction (const int, bool &)
 
virtual bool closeDoc (bool ask=true)
 
virtual bool closeActiveDoc (bool permanently=true)
 
- Protected Member Functions inherited from SUIT_Application
SUIT_ApplicationstartApplication (int, char **) const
 
SUIT_ApplicationstartApplication (const QString &, int, char **) const
 
void setActionShown (QAction *, const bool)
 
void setActionShown (const int, const bool)
 
int actionId (const QAction *) const
 
QList< QAction * > actions () const
 
QList< int > actionIds () const
 
int registerAction (const int, QAction *)
 
QActioncreateAction (const int, const QString &, const QIcon &, const QString &, const QString &, const int, QObject *=0, const bool=false, QObject *=0, const char *=0, const QString &=QString())
 
QActioncreateAction (const int, const QString &, const QIcon &, const QString &, const QString &, const QKeySequence &, QObject *=0, const bool=false, QObject *=0, const char *=0, const QString &=QString())
 
int createTool (const QString &, const QString &=QString())
 
int createTool (const int, const int, const int=-1)
 
int createTool (const int, const QString &, const int=-1)
 
int createTool (QAction *, const int, const int=-1, const int=-1)
 
int createTool (QAction *, const QString &, const int=-1, const int=-1)
 
int createMenu (const QString &, const int, const int=-1, const int=-1, const int=-1)
 
int createMenu (const QString &, const QString &, const int=-1, const int=-1, const int=-1)
 
int createMenu (const int, const int, const int=-1, const int=-1)
 
int createMenu (const int, const QString &, const int=-1, const int=-1)
 
int createMenu (QAction *, const int, const int=-1, const int=-1, const int=-1)
 
int createMenu (QAction *, const QString &, const int=-1, const int=-1, const int=-1)
 
void setMenuShown (QAction *, const bool)
 
void setMenuShown (const int, const bool)
 
void setToolShown (QAction *, const bool)
 
void setToolShown (const int, const bool)
 

Protected Attributes

LightApp_PreferencesmyPrefs
 
LightApp_SelectionMgrmySelMgr
 
LightApp_FullScreenHelpermyScreenHelper
 
WinMap myWin
 
WinVis myWinVis
 
SUIT_AccelmyAccel
 
QTimer * myAutoSaveTimer
 
QStringList myUserWmTypes
 

Static Protected Attributes

static LightApp_Preferences_prefs_ = 0
 
static int lastStudyId = 0
 

Private Slots

void onSelection ()
 
void onRefresh ()
 
void onDropped (const QList< SUIT_DataObject * > &, SUIT_DataObject *, int, Qt::DropAction)
 
void onPreferences ()
 
void onPreferenceChanged (QString &, QString &, QString &)
 
void onRenameWindow ()
 
void onCloseWindow ()
 
void onCloseAllWindow ()
 
void onGroupAllWindow ()
 
void onRenamed ()
 

Private Member Functions

void emptyPreferences (const QString &)
 
QList< QToolBar * > findToolBars (const QStringList &names=QStringList())
 
QByteArray processState (QByteArray &input, const bool processWin, const bool processTb, const bool isRestoring, QByteArray defaultState=QByteArray())
 

Additional Inherited Members

- Static Protected Member Functions inherited from CAM_Application
static QString moduleLibrary (const QString &, const bool=true)
 Get module library name by its title (user name). More...
 

Detailed Description

Description : Application containing only LightApp module

Application containing LightApp module

Member Typedef Documentation

typedef QMap<QString, QByteArray> LightApp_Application::WinGeom
protected
typedef QMap<int, WinPtr> LightApp_Application::WinMap
protected
typedef QPointer<QWidget> LightApp_Application::WinPtr
protected
typedef QMap<QString, QByteArray> LightApp_Application::WinVis
protected

Member Enumeration Documentation

anonymous enum
Enumerator
MenuWindowId 
anonymous enum
Enumerator
RenameId 
CloseId 
CloseAllId 
GroupAllId 
PreferencesId 
MRUId 
ModulesListId 
NewGLViewId 
NewPlot2dId 
NewOCCViewId 
NewVTKViewId 
NewQxSceneViewId 
NewGraphicsViewId 
NewPVViewId 
NewPyViewerId 
StyleId 
FullScreenId 
UserID 
anonymous enum
protected
Enumerator
NewStudyId 
OpenStudyId 
anonymous enum
protected
Enumerator
OpenReload 
Enumerator
BP_Never 
BP_ApplyAndClose 
BP_Always 
Enumerator
WT_ObjectBrowser 
WT_PyConsole 
WT_LogWindow 
WT_User 

Constructor & Destructor Documentation

LightApp_Application::~LightApp_Application ( )
virtual

Destructor.

  • Save window geometry.
  • Save desktop geometry.
  • Save resource maneger.
  • Delete selection manager.

References myScreenHelper, mySelMgr, and savePreferences().

Member Function Documentation

SUIT_Accel * LightApp_Application::accel ( ) const
Returns
keyborad accelerators manager object

References myAccel.

bool LightApp_Application::activateModule ( CAM_Module mod = 0)
protectedvirtual

Activates module

Parameters
mod- module to be activated

Reimplemented from CAM_Application.

References CAM_Application::activateModule(), objectBrowser(), and SUIT_DataBrowser::updateTree().

QMap< int, QString > LightApp_Application::activateModuleActions ( ) const
protectedvirtual

The method should return the map of the kind { <id>:<name>} where <id> is an integer identifier of the operation and <name> is a title for the button to be added to the dialog box. After user selects the required operation by the clicking the corresponding button in the dialog box, its identifier is passed to the moduleActionSelected() method to process the made choice.

Returns
map of the operations
See Also
moduleActionSelected()

Reimplemented in SalomeApp_Application.

References NewStudyId, and OpenStudyId.

void LightApp_Application::addViewManager ( SUIT_ViewManager vm)
virtual

Connects just added view manager

Reimplemented from STD_Application.

References STD_Application::addViewManager(), and onCloseView().

void LightApp_Application::afterCloseDoc ( )
protectedvirtual

Updates windows after close document

Reimplemented from CAM_Application.

Reimplemented in SalomeApp_Application.

References CAM_Application::afterCloseDoc(), and updateWindows().

QString LightApp_Application::applicationName ( ) const
virtual

Gets application name.

Reimplemented from STD_Application.

QString LightApp_Application::applicationVersion ( ) const
virtual

Gets application version.

Reimplemented from SUIT_Application.

void LightApp_Application::beforeCloseDoc ( SUIT_Study s)
protectedvirtual

Remove all windows from study.

Reimplemented from CAM_Application.

References CAM_Application::beforeCloseDoc(), objectBrowser(), and saveDockWindowsState().

QString LightApp_Application::browseObjects ( const QStringList &  theEntryList,
const bool  theIsApplyAndClose = true,
const bool  theIsOptimizedBrowsing = false 
)
virtual

Browse (i.e. set focus on) the published objects

Parameters
theIsApplyAndClose- flag indicating that the dialog for creating objects has been accepted by Ok (or Apply & Close) button
theIsOptimizedBrowsing- flag switching to optimized browsing mode (to select the first published object only)
Returns
entry of the selected object

References SUIT_Application::activeStudy(), SUIT_DataOwnerPtrList::append(), BP_Always, BP_ApplyAndClose, BP_Never, LightApp_DataObject::componentDataType(), LightApp_DataObject::entry(), LightApp_Study::findObjectByEntry(), Handle(), SUIT_AbstractModel::index(), OB_Browser::model(), SUIT_DataObject::name(), objectBrowser(), SUIT_Application::resourceMgr(), SALOME_InteractiveObject(), selectionMgr(), SUIT_SelectionMgr::selectors(), LightApp_SelectionMgr::setSelected(), and OB_Browser::treeView().

bool LightApp_Application::checkDataObject ( LightApp_DataObject theObj)
virtual
bool LightApp_Application::checkExistingDoc ( )
virtual
void LightApp_Application::clearKnownViewManagers ( )
virtual

Removes all view managers of known types Other view managers are ignored

References SUIT_ViewManager::getType(), removeViewManager(), STD_Application::viewManagers(), and viewManagersTypes().

void LightApp_Application::closeApplication ( )
virtual

Closeapplication.

Reimplemented from STD_Application.

References STD_Application::closeApplication().

void LightApp_Application::createActionForViewer ( const int  id,
const int  parentId,
const QString &  suffix,
const int  accel 
)
protectedvirtual

Creat action "New window" for certain type of viewer:

References SUIT_Application::createAction(), SUIT_Application::createMenu(), SUIT_Application::desktop(), and onNewWindow().

void LightApp_Application::createActions ( )
protectedvirtual
SUIT_Study * LightApp_Application::createNewStudy ( )
protectedvirtual

Creates new study

Reimplemented from CAM_Application.

Reimplemented in SalomeApp_Application.

References lastStudyId, onStudyClosed(), onStudyCreated(), onStudyOpened(), and onStudySaved().

PyConsole_Interp * LightApp_Application::createPyInterp ( )
protectedvirtual

Reimplemented in SalomeApp_Application.

SUIT_ViewManager * LightApp_Application::createViewManager ( const QString &  vmType,
bool  detached = false 
)
virtual

Creates view manager of some type

Parameters
vmType- type of view manager

References SUIT_Application::activeStudy(), addViewManager(), SVTK_Viewer::anaglyphFilter(), OCCViewer_Viewer::anaglyphFilter(), VTKViewer_Viewer::background(), SVTK_Viewer::background(), OCCViewer_Viewer::background(), Plot2d_ViewFrame::backgroundColor(), QtxResourceMgr::backgroundValue(), QtxResourceMgr::booleanValue(), OCCViewer_ViewFrame::BOTTOM_LEFT, OCCViewer_ViewFrame::BOTTOM_RIGHT, OCCViewer_Viewer::clippingColor(), OCCViewer_Viewer::clippingTexture(), OCCViewer_Viewer::clippingTextureScale(), QtxResourceMgr::colorValue(), SUIT_ViewManager::createViewWindow(), SUIT_Application::desktop(), QtxResourceMgr::doubleValue(), OCCViewer_Viewer::enablePreselection(), OCCViewer_Viewer::enableSelection(), SVTK_Viewer::enableSelection(), SUIT_ViewManager::getActiveView(), Plot2d_ViewWindow::getViewFrame(), getViewManager(), SUIT_ViewManager::getViewModel(), SVTK_Viewer::incrementalSpeed(), SVTK_Viewer::incrementalSpeedMode(), QtxResourceMgr::integerValue(), OCCViewer_Viewer::interactionStyle(), SVTK_Viewer::interactionStyle(), OCCViewer_Viewer::interocularDistanceType(), OCCViewer_Viewer::interocularDistanceValue(), OCCViewer_Viewer::isDefaultTextureUsed(), OCCViewer_Viewer::isPreselectionEnabled(), SVTK_Viewer::isQuadBufferSupport(), OCCViewer_Viewer::isQuadBufferSupport(), OCCViewer_Viewer::isReverseStereo(), OCCViewer_Viewer::isSelectionEnabled(), SVTK_Viewer::isSelectionEnabled(), SVTK_Viewer::isStaticTrihedronVisible(), OCCViewer_Viewer::isTextureModulated(), OCCViewer_Viewer::isVSync(), logWindow(), OCCViewer_ViewFrame::MAIN_VIEW, mySelMgr, SVTK_Viewer::preSelectionMode(), SVTK_Viewer::projectionMode(), OCCViewer_Viewer::projectionType(), SUIT_Application::resourceMgr(), SVTK_Viewer::setAnaglyphFilter(), OCCViewer_Viewer::setAnaglyphFilter(), VTKViewer_Viewer::setBackground(), SVTK_Viewer::setBackground(), OCCViewer_Viewer::setBackground(), Plot2d_ViewFrame::setBackgroundColor(), OCCViewer_Viewer::setClippingColor(), OCCViewer_Viewer::setClippingTextureParams(), SUIT_ViewManager::setDetached(), SUIT_ViewWindow::setDropDownButtons(), SVTK_Viewer::setIncrementalSpeed(), OCCViewer_Viewer::setInteractionStyle(), SVTK_Viewer::setInteractionStyle(), OCCViewer_Viewer::setInterocularDistance(), SVTK_Viewer::setPreSelectionMode(), SVTK_Viewer::setProjectionMode(), OCCViewer_Viewer::setProjectionType(), SVTK_Viewer::setQuadBufferSupport(), OCCViewer_Viewer::setQuadBufferSupport(), OCCViewer_Viewer::setReverseStereo(), SVTK_Viewer::setSpacemouseButtons(), SVTK_Viewer::setStaticTrihedronVisible(), OCCViewer_Viewer::setStereographicFocus(), SVTK_Viewer::setStereoType(), OCCViewer_Viewer::setStereoType(), SVTK_Viewer::setTrihedronSize(), OCCViewer_Viewer::setTrihedronSize(), SUIT_ViewManager::setViewModel(), OCCViewer_Viewer::setVSync(), SVTK_Viewer::setZoomingStyle(), OCCViewer_Viewer::setZoomingStyle(), SVTK_Viewer::spacemouseBtn(), OCCViewer_Viewer::stereographicFocusType(), OCCViewer_Viewer::stereographicFocusValue(), SVTK_Viewer::stereoType(), OCCViewer_Viewer::stereoType(), QtxResourceMgr::stringValue(), OCCViewer_ViewFrame::TOP_LEFT, OCCViewer_ViewFrame::TOP_RIGHT, SVTK_Viewer::trihedronRelative(), OCCViewer_Viewer::trihedronRelative(), SVTK_Viewer::trihedronSize(), OCCViewer_Viewer::trihedronSize(), QxScene_Viewer::Type(), Plot2d_Viewer::Type(), PVViewer_Viewer::Type(), PyViewer_Viewer::Type(), VTKViewer_Viewer::Type(), GraphicsView_Viewer::Type(), SVTK_Viewer::Type(), GLViewer_Viewer::Type(), OCCViewer_Viewer::Type(), SVTK_Viewer::zoomingStyle(), and OCCViewer_Viewer::zoomingStyle().

void LightApp_Application::currentViewManagers ( QStringList &  lst) const
protected

Gets current view managers.

Parameters
lst- output current view managers list.

References CAM_Application::activeModule(), SUIT_Application::activeStudy(), defaultViewManagers(), and STD_Application::viewManagers().

void LightApp_Application::currentWindows ( QMap< int, int > &  winMap) const
protectedvirtual

Gets current windows.

Parameters
winMap- output current windows map.

References CAM_Application::activeModule(), and defaultWindows().

QString LightApp_Application::defaultModule ( ) const
protected

Default module activation.

If there's the one and only module –> activate it automatically TODO: Possible improvement - default module can be taken from preferences

References CAM_Application::modules().

void LightApp_Application::defaultViewManagers ( QStringList &  ) const
protected

Default view managers

Do nothing.

void LightApp_Application::defaultWindows ( QMap< int, int > &  aMap) const
protectedvirtual
Returns
default windows( Object Browser, Python Console ) Adds to map aMap.

References SUIT_Application::activeStudy(), WT_ObjectBrowser, and WT_PyConsole.

QWidget * LightApp_Application::dockWindow ( const int  id) const

References myWin.

QByteArray LightApp_Application::dockWindowsState ( const QMap< QString, bool > &  tb,
const QMap< QString, bool > &  dw 
) const
protected

References DockWidgetMarker, and ToolBarMarker.

void LightApp_Application::dockWindowsState ( const QByteArray &  arr,
QMap< QString, bool > &  tb,
QMap< QString, bool > &  dw 
) const
protected

References DockWidgetMarker, and ToolBarMarker.

void LightApp_Application::emitOperationFinished ( const QString &  theModuleName,
const QString &  theOperationName,
const QStringList &  theEntryList 
)
Parameters
theModuleNamethe name of the module which perfomed the operation
theOperationNamethe operation name
theEntryListthe list of the created objects entries

References operationFinished().

bool LightApp_Application::event ( QEvent e)
virtual
SUIT_DataObject * LightApp_Application::findObject ( const QString &  id) const
virtual
QList< QToolBar * > LightApp_Application::findToolBars ( const QStringList &  names = QStringList())
private

Internal method. Returns all top level toolbars. Note : Result list contains only main window toolbars, not including toolbars from viewers.

References SUIT_Application::desktop(), and Qtx::findParent().

QString LightApp_Application::getDirectory ( const QString &  initial,
const QString &  caption,
QWidget parent 
)
virtual
QString LightApp_Application::getFileFilter ( bool  ) const
virtual

Gets file filter.

Return values
QString"(*.hdf)"

Reimplemented from STD_Application.

QString LightApp_Application::getFileName ( bool  open,
const QString &  initial,
const QString &  filters,
const QString &  caption,
QWidget parent 
)
virtual

Shows file dialog and return user selected file name

Reimplemented from STD_Application.

References SUIT_Application::desktop(), and SUIT_FileDlg::getFileName().

QStringList LightApp_Application::getOpenFileNames ( const QString &  initial,
const QString &  filters,
const QString &  caption,
QWidget parent 
)
virtual

Get open file names

References SUIT_Application::desktop(), and SUIT_FileDlg::getOpenFileNames().

PyConsole_Interp * LightApp_Application::getPyInterp ( )

References createPyInterp().

SUIT_ViewManager * LightApp_Application::getViewManager ( const QString &  vmType,
const bool  create 
)
Returns
first view manager of some type
Parameters
vmType- type of view manager
create- is it necessary to create view manager in case, when there is no manager of such type

References STD_Application::activeViewManager(), SUIT_ViewManager::createView(), createViewManager(), SUIT_Application::desktop(), SUIT_ViewManager::getActiveView(), SUIT_ViewManager::getDetached(), SUIT_ViewManager::getType(), SUIT_Desktop::setActiveWindow(), and STD_Application::viewManager().

QWidget * LightApp_Application::getWindow ( const int  flag,
const int  = -1 
)

Gets window.

Parameters
flag- key for window
studyId- study id Flag used how identificator of window in windows list.

References createWindow(), currentWindows(), dockWindow(), insertDockWindow(), and placeDockWindow().

void LightApp_Application::insertDockWindow ( const int  id,
QWidget wid 
)
bool LightApp_Application::isLibExists ( const QString &  moduleTitle) const
protected
Returns
if the library of module exists
Parameters
moduleTitle- title of module

References Qtx::addSlash(), CAM_Application::moduleLibrary(), and CAM_Application::moduleName().

CAM_Module * LightApp_Application::loadModule ( const QString &  name,
const bool  showMsg = true 
)
virtual

Load module by name.

Reimplemented from CAM_Application.

References CAM_Application::loadModule(), studyClosed(), studyOpened(), and studySaved().

LogWindow * LightApp_Application::logWindow ( )
Returns
Log Window

References dockWindow(), and WT_LogWindow.

void LightApp_Application::moduleActionSelected ( const int  id)
protectedvirtual

Performs the required operation according to the user choice.

Parameters
idoperation identifier
See Also
activateModuleActions()

Reimplemented in SalomeApp_Application.

References NewStudyId, onNewDoc(), onOpenDoc(), and OpenStudyId.

void LightApp_Application::moduleAdded ( CAM_Module mod)
protectedvirtual
void LightApp_Application::moduleIconNames ( QMap< QString, QString > &  iconMap) const
protected
SUIT_DataBrowser * LightApp_Application::objectBrowser ( )
Returns
Object Browser

References dockWindow(), and WT_ObjectBrowser.

void LightApp_Application::onCloseAllWindow ( )
privateslot

Closes all windows of desktop

References SUIT_Application::desktop(), and STD_TabDesktop::windows().

void LightApp_Application::onCloseView ( SUIT_ViewManager theVM)
protectedslot

SLOT: Removes view manager from application

References removeViewManager().

void LightApp_Application::onCloseWindow ( )
privateslot

Closes active window of desktop

References SUIT_Desktop::activeWindow(), and SUIT_Application::desktop().

void LightApp_Application::onCopy ( )
virtualslot

Copy of current selection

References CAM_Application::activeModule(), and LightApp_Module::copy().

void LightApp_Application::onDesktopActivated ( )
protectedvirtualslot
void LightApp_Application::onDesktopMessage ( const QString &  message)
protectedvirtualslot
void LightApp_Application::onDockWindowVisibilityChanged ( bool  )
virtualslot

SLOT: Performs some actions when dockable windows are triggered

void LightApp_Application::onDropped ( const QList< SUIT_DataObject * > &  objects,
SUIT_DataObject parent,
int  row,
Qt::DropAction  action 
)
privateslot

Private SLOT. Update actions after rename object.

Private SLOT. Support drag-and-drop operation.

References LightApp_Module::dropObjects(), and CAM_DataObject::module().

void LightApp_Application::onGroupAllWindow ( )
privateslot

Groups all windows of desktop

References SUIT_Application::desktop(), QtxWorkstack::stack(), and STD_TabDesktop::workstack().

void LightApp_Application::onHelpAbout ( )
virtualslot

SLOT: Displays "About" message box

References applicationName(), applicationVersion(), and SUIT_Application::desktop().

void LightApp_Application::onHelpContentsModule ( )
virtualslot
void LightApp_Application::onHelpContextModule ( const QString &  theComponentName,
const QString &  theFileName,
const QString &  theContext = QString() 
)
virtualslot
void LightApp_Application::onMRUActivated ( const QString &  name)
protectedslot
void LightApp_Application::onNewDoc ( )
virtualslot

SLOT: Creates new document

References checkExistingDoc(), STD_Application::onNewDoc(), and saveDockWindowsState().

void LightApp_Application::onOpenDoc ( )
virtualslot
bool LightApp_Application::onOpenDoc ( const QString &  aName)
virtualslot
void LightApp_Application::onPaste ( )
virtualslot

Paste of current data in clipboard

References CAM_Application::activeModule(), and LightApp_Module::paste().

void LightApp_Application::onPreferenceChanged ( QString &  modName,
QString &  section,
QString &  param 
)
privateslot
void LightApp_Application::onPreferences ( )
privateslot

Private SLOT. On preferences.

References CAM_Application::activeModule(), CAM_Application::moduleName(), and showPreferences().

void LightApp_Application::onRefresh ( )
privateslot

Private SLOT. Update object browser.

References updateObjectBrowser().

void LightApp_Application::onRenamed ( )
privateslot

Private SLOT. Update actions after rename object.

References SUIT_Application::activeStudy(), SUIT_Study::Modified(), and updateActions().

void LightApp_Application::onRenameWindow ( )
privateslot

Renames active window of desktop

References SUIT_Desktop::activeWindow(), and SUIT_Application::desktop().

void LightApp_Application::onSelection ( )
privateslot

Private SLOT: Called on selection is changed Dispatchs active module that selection is changed

References CAM_Application::activeModule(), and onSelectionChanged().

void LightApp_Application::onSelectionChanged ( )
virtualslot
void LightApp_Application::onStudyClosed ( SUIT_Study s)
protectedvirtualslot

Protected SLOT. On study closed.

References activateModule(), SUIT_SelectionMgr::clearSelected(), myAutoSaveTimer, mySelMgr, and studyClosed().

void LightApp_Application::onStudyCreated ( SUIT_Study theStudy)
protectedvirtualslot
void LightApp_Application::onStudyOpened ( SUIT_Study theStudy)
protectedvirtualslot
void LightApp_Application::onStudySaved ( SUIT_Study s)
protectedvirtualslot
void LightApp_Application::onStylePreferences ( )
protectedslot
void LightApp_Application::onViewManagerRemoved ( SUIT_ViewManager )
protectedvirtualslot
void LightApp_Application::onWCDestroyed ( QObject ob)
protectedslot

Removes dead widget container from map

References myWin.

void LightApp_Application::onWindowActivated ( SUIT_ViewWindow theViewWindow)
protectedvirtualslot
bool LightApp_Application::openAction ( const int  choice,
const QString &  aName 
)
protectedvirtual
int LightApp_Application::openChoice ( const QString &  aName)
protectedvirtual
void LightApp_Application::operationFinished ( const QString &  ,
const QString &  ,
const QStringList &   
)
signal
void LightApp_Application::placeDockWindow ( const int  id,
Qt::DockWidgetArea  place 
)
void LightApp_Application::preferenceChanged ( const QString &  ,
const QString &  ,
const QString &   
)
signal
void LightApp_Application::preferenceResetToDefaults ( )
signal
LightApp_Preferences * LightApp_Application::preferences ( ) const
Returns
preferences
void LightApp_Application::preferencesChanged ( const QString &  sec,
const QString &  param 
)
protectedvirtual

Changes appearance of application according to changed preferences

Parameters
sec- section
param- name of changed parameter

References SUIT_Application::action(), SUIT_Application::activeStudy(), OB_Browser::adjustColumnsWidth(), OB_Browser::adjustFirstColumnWidth(), aTexture, QtxResourceMgr::booleanValue(), QtxResourceMgr::colorValue(), SUIT_Application::desktop(), QtxResourceMgr::doubleValue(), QtxSearchTool::enableAutoHide(), OCCViewer_Viewer::enablePreselection(), OCCViewer_Viewer::enableSelection(), SVTK_Viewer::enableSelection(), QtxResourceMgr::fontValue(), SUIT_ViewManager::getActiveView(), Plot2d_ViewWindow::getViewFrame(), SUIT_ViewManager::getViewModel(), SUIT_ViewManager::getViews(), QtxResourceMgr::integerValue(), MRUId, myAutoSaveTimer, objectBrowser(), pythonConsole(), SVTK_Viewer::Repaint(), SUIT_Application::resourceMgr(), OB_Browser::searchTool(), SVTK_Viewer::setAnaglyphFilter(), OCCViewer_Viewer::setAnaglyphFilter(), SUIT_DataBrowser::setAutoSizeColumns(), SUIT_DataBrowser::setAutoSizeFirstColumn(), QtxMRUAction::setClearPossible(), OCCViewer_Viewer::setClippingColor(), OCCViewer_Viewer::setClippingTextureParams(), SUIT_ViewWindow::setDropDownButtons(), QtxMRUAction::setHistoryCount(), SVTK_Viewer::setIncrementalSpeed(), QtxMRUAction::setInsertMode(), OCCViewer_Viewer::setInteractionStyle(), SVTK_Viewer::setInteractionStyle(), OCCViewer_Viewer::setInterocularDistance(), QtxMRUAction::setLinkType(), QtxMainWindow::setOpaqueResize(), Plot2d_ViewFrame::SetPreference(), SVTK_Viewer::setPreSelectionMode(), SVTK_Viewer::setProjectionMode(), OCCViewer_Viewer::setProjectionType(), SVTK_Viewer::setQuadBufferSupport(), OCCViewer_Viewer::setQuadBufferSupport(), SUIT_DataBrowser::setResizeOnExpandItem(), OCCViewer_Viewer::setReverseStereo(), SVTK_Viewer::setSpacemouseButtons(), OCCViewer_Viewer::setStaticTrihedronDisplayed(), SVTK_Viewer::setStaticTrihedronVisible(), OCCViewer_Viewer::setStereographicFocus(), SVTK_Viewer::setStereoType(), OCCViewer_Viewer::setStereoType(), SVTK_Viewer::setTrihedronSize(), OCCViewer_Viewer::setTrihedronSize(), SUIT_ViewManager::setViewModel(), QtxMRUAction::setVisibleCount(), OCCViewer_Viewer::setVSync(), SVTK_Viewer::setZoomingStyle(), OCCViewer_Viewer::setZoomingStyle(), QtxResourceMgr::stringValue(), Plot2d_Viewer::Type(), SVTK_Viewer::Type(), OCCViewer_Viewer::Type(), and STD_Application::viewManagers().

QByteArray LightApp_Application::processState ( QByteArray &  input,
const bool  processWin,
const bool  processTb,
const bool  isRestoring,
QByteArray  defaultState = QByteArray() 
)
private

Internal method to parse toolbars and dockable windows state.

References SUIT_Application::desktop(), findToolBars(), QDockWidgetMarker, and QToolBarMarker.

PyConsole_Console * LightApp_Application::pythonConsole ( const bool  force = false)

This returns the python console integrated to the GUI. Depending when you request the python console, this function could return null. Then the optional parameter force (default to false) can be set to force the creation of the python console if it is not done already.

Parameters
force- if true, the pythonConsole is created if it does not exist yet
Returns
Python Console

References dockWindow(), getWindow(), and WT_PyConsole.

void LightApp_Application::removeDockWindow ( const int  id)

References dockWindow(), myWin, and windowDock().

void LightApp_Application::removeModuleAction ( const QString &  modName)
protected
bool LightApp_Application::renameAllowed ( const QString &  ) const
virtual

Checks that an object can be renamed.

Parameters
entryentry of the object

Reimplemented in SalomeApp_Application.

bool LightApp_Application::renameObject ( const QString &  entry,
const QString &   
)
virtual

Rename object by entry.

Parameters
entryentry of the object
namenew name of the object

Reimplemented in SalomeApp_Application.

LightApp_SelectionMgr * LightApp_Application::selectionMgr ( ) const

Gets selection manager.

References mySelMgr.

void LightApp_Application::setActiveStudy ( SUIT_Study study)
protectedvirtual

Sets active study.

Parameters
study- SUIT_Study.

Reimplemented from CAM_Application.

References CAM_Application::setActiveStudy().

void LightApp_Application::setDefaultStudyName ( const QString &  theName)
void LightApp_Application::setDesktop ( SUIT_Desktop desk)
virtual

Set desktop:

Reimplemented from STD_Application.

References onDesktopMessage(), onWindowActivated(), and STD_Application::setDesktop().

void LightApp_Application::start ( )
virtual
void LightApp_Application::studyClosed ( )
signal
void LightApp_Application::studyCreated ( SUIT_Study )
protectedvirtual

Custom activity after study is created Updates desktop and actions

Reimplemented from STD_Application.

References STD_Application::studyCreated(), updateViewManagers(), and updateWindows().

int LightApp_Application::studyId ( )
static
Returns
last global id of study

References lastStudyId.

void LightApp_Application::studyOpened ( )
signal
void LightApp_Application::studyOpened ( SUIT_Study )
protectedvirtual

Custom activity after study is opened Updates desktop and actions

Reimplemented from STD_Application.

References STD_Application::studyOpened(), updateViewManagers(), and updateWindows().

void LightApp_Application::studySaved ( )
signal
void LightApp_Application::studySaved ( SUIT_Study )
protectedvirtual

Custom activity after study is opened Updates desktop and actions

Reimplemented from STD_Application.

References SUIT_Application::activeStudy(), QtxResourceMgr::integerValue(), myAutoSaveTimer, SUIT_Session::resourceMgr(), SUIT_Session::session(), and STD_Application::studyOpened().

void LightApp_Application::updateActions ( )

Update actions.

References updateCommandsStatus().

void LightApp_Application::updateCommandsStatus ( )
protectedvirtual
void LightApp_Application::updateDesktopTitle ( )
virtual
void LightApp_Application::updateObjectBrowser ( const bool  updateModels = true)
virtual

Updates object browser and maybe data models

Parameters
updateModels- if it is true, then data models are updated

Reimplemented in SalomeApp_Application.

References SUIT_Application::activeStudy(), SUIT_DataBrowser::autoUpdate(), CAM_Study::dataModels(), objectBrowser(), SUIT_DataBrowser::setAutoUpdate(), and SUIT_DataBrowser::updateTree().

void LightApp_Application::updatePreference ( const QString &  ,
const QString &  ,
const QString &   
)
protected
void LightApp_Application::updateViewManagers ( )
protected

Updates view managers

References currentViewManagers(), and getViewManager().

void LightApp_Application::updateWindows ( )
protected
QDockWidget * LightApp_Application::windowDock ( QWidget wid) const
protected

Member Data Documentation

LightApp_Preferences * LightApp_Application::_prefs_ = 0
staticprotected
int LightApp_Application::lastStudyId = 0
staticprotected
SUIT_Accel* LightApp_Application::myAccel
protected
QTimer* LightApp_Application::myAutoSaveTimer
protected
LightApp_Preferences* LightApp_Application::myPrefs
protected
LightApp_FullScreenHelper* LightApp_Application::myScreenHelper
protected
LightApp_SelectionMgr* LightApp_Application::mySelMgr
protected
QStringList LightApp_Application::myUserWmTypes
protected
WinMap LightApp_Application::myWin
protected
WinVis LightApp_Application::myWinVis
protected

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