X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FLightApp%2FLightApp_Application.h;h=54be0df781f7e9e4622c2fd155a5b4a1300b2fa7;hb=1c1e0526d452336651ccecf48deb5d8227ecdd47;hp=5baf1faa1718f59cec4c3a015ca9b5c289ce3cc5;hpb=23218a1c80fada79acf67996d16d65c615ecaba4;p=modules%2Fgui.git diff --git a/src/LightApp/LightApp_Application.h b/src/LightApp/LightApp_Application.h index 5baf1faa1..54be0df78 100644 --- a/src/LightApp/LightApp_Application.h +++ b/src/LightApp/LightApp_Application.h @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -6,7 +6,7 @@ // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -33,6 +33,7 @@ #include "LightApp.h" #include +#include #include #include @@ -41,6 +42,7 @@ class LogWindow; #ifndef DISABLE_PYCONSOLE class PyConsole_Console; +class PyConsole_Interp; #endif class LightApp_WidgetContainer; class LightApp_Preferences; @@ -50,6 +52,7 @@ class LightApp_DataObject; class SUIT_DataBrowser; class SUIT_Study; class SUIT_Accel; +class SUIT_ViewModel; class CAM_Module; class QString; @@ -85,7 +88,7 @@ public: CloseId, CloseAllId, GroupAllId, PreferencesId, MRUId, ModulesListId, NewGLViewId, NewPlot2dId, NewOCCViewId, NewVTKViewId, - NewQxSceneViewId, StyleId, FullScreenId, + NewQxSceneViewId, NewGraphicsViewId, NewPVViewId, StyleId, FullScreenId, UserID }; protected: @@ -130,6 +133,7 @@ public: virtual void removeViewManager( SUIT_ViewManager* ); virtual SUIT_ViewManager* createViewManager( const QString& vmType ); virtual SUIT_ViewManager* createViewManager( const QString& vmType, QWidget* w ); + virtual SUIT_ViewManager* createViewManager( SUIT_ViewModel* ); QWidget* getWindow( const int, const int = -1 ); QWidget* dockWindow( const int ) const; @@ -172,17 +176,31 @@ public: virtual bool renameAllowed( const QString& ) const; virtual bool renameObject( const QString&, const QString& ); + void emitOperationFinished( const QString&, const QString&, const QStringList& ); + + void updateVisibilityState( DataObjectList& theList, + SUIT_ViewModel* theViewModel ); + + virtual bool checkExistingDoc(); + +#ifndef DISABLE_PYCONSOLE + PyConsole_Interp* getPyInterp(); +#endif + 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 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(); @@ -218,17 +236,23 @@ protected: virtual QMap activateModuleActions() const; virtual void moduleActionSelected( const int ); +#ifndef DISABLE_PYCONSOLE + virtual PyConsole_Interp* createPyInterp(); +#endif + 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* ); - void onStudyCreated( SUIT_Study* ); - void onStudyOpened( SUIT_Study* ); - void onStudySaved( SUIT_Study* ); - void onStudyClosed( SUIT_Study* ); + virtual void onStudyCreated( SUIT_Study* ); + virtual void onStudyOpened( SUIT_Study* ); + virtual void onStudySaved( SUIT_Study* ); + virtual void onStudyClosed( SUIT_Study* ); void onWCDestroyed( QObject* ); @@ -283,9 +307,13 @@ protected: private: void emptyPreferences( const QString& ); - QList findToolBars(); + QList findToolBars( const QStringList& names = QStringList() ); - QByteArray processState(QByteArray& input, const bool processWin,const bool processTb, QByteArray defaultState = QByteArray()); + QByteArray processState(QByteArray& input, + const bool processWin, + const bool processTb, + const bool isRestoring, + QByteArray defaultState = QByteArray()); protected: typedef QPointer WinPtr;