00001 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE 00002 // 00003 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, 00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 00005 // 00006 // This library is free software; you can redistribute it and/or 00007 // modify it under the terms of the GNU Lesser General Public 00008 // License as published by the Free Software Foundation; either 00009 // version 2.1 of the License. 00010 // 00011 // This library is distributed in the hope that it will be useful, 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 // Lesser General Public License for more details. 00015 // 00016 // You should have received a copy of the GNU Lesser General Public 00017 // License along with this library; if not, write to the Free Software 00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 // 00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com 00021 // 00022 00023 // File : LightApp_Operation.h 00024 // Author : Sergey LITONIN 00025 // Module : LIGHT 00026 // 00027 #ifndef LightApp_Operation_H 00028 #define LightApp_Operation_H 00029 00030 #include "LightApp.h" 00031 #include <SUIT_Operation.h> 00032 00033 class LightApp_Module; 00034 class LightApp_SelectionMgr; 00035 class LightApp_Dialog; 00036 class SUIT_Desktop; 00037 00043 class LIGHTAPP_EXPORT LightApp_Operation : public SUIT_Operation 00044 { 00045 Q_OBJECT 00046 00047 public: 00048 LightApp_Operation(); 00049 virtual ~LightApp_Operation(); 00050 00051 virtual void setModule( LightApp_Module* ); 00052 LightApp_Module* module() const; 00053 00054 bool isAutoResumed() const; 00055 00056 virtual LightApp_Dialog* dlg() const; 00057 00058 protected: 00059 00060 // Methods redefined from base class 00061 00062 virtual void startOperation(); 00063 virtual void suspendOperation(); 00064 virtual void resumeOperation(); 00065 virtual void abortOperation(); 00066 virtual void commitOperation(); 00067 00068 // Additional virtual methods may be redefined by derived classes 00069 00070 virtual void setDialogActive( const bool ); 00071 virtual void activateSelection(); 00072 virtual void selectionDone(); 00073 00074 00075 // Axiluary methods 00076 00077 SUIT_Desktop* desktop() const; 00078 SUIT_Operation* activeOperation() const; 00079 LightApp_SelectionMgr* selectionMgr() const; 00080 void update( const int ); 00081 void setAutoResumed( const bool ); 00082 00083 private slots: 00084 00085 virtual void onSelectionDone(); 00086 00087 private: 00088 00089 LightApp_Module* myModule; 00090 bool myIsAutoResumed; 00091 }; 00092 00093 #endif 00094 00095 00096 00097 00098 00099