1 // Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/
19 #ifndef CAM_APPLICATION_H
20 #define CAM_APPLICATION_H
22 #include "STD_Application.h"
24 #include "CAM_Module.h"
31 #pragma warning( disable:4251 )
34 class CAM_EXPORT CAM_Application : public STD_Application
39 typedef QPtrList<CAM_Module> ModuleList;
40 typedef QPtrListIterator<CAM_Module> ModuleListIterator;
43 CAM_Application( const bool = true );
44 virtual ~CAM_Application();
48 CAM_Module* activeModule() const;
49 CAM_Module* module( const QString& ) const;
51 /** @name Modules lists.*/
53 ModuleListIterator modules() const;
54 void modules( ModuleList& ) const;
55 void modules( QStringList&, const bool loaded = true ) const;
58 virtual void addModule( CAM_Module* );
60 virtual void loadModules();
61 virtual CAM_Module* loadModule( const QString& );
63 virtual bool activateModule( const QString& );
65 virtual void contextMenuPopup( const QString&, QPopupMenu*, QString& );
67 QString moduleName( const QString& ) const;
68 QString moduleTitle( const QString& ) const;
70 virtual void createEmptyStudy();
73 virtual SUIT_Study* createNewStudy();
74 virtual void updateCommandsStatus();
76 virtual void moduleAdded( CAM_Module* );
77 virtual void beforeCloseDoc( SUIT_Study* );
78 virtual bool activateModule( CAM_Module* = 0 );
80 virtual void setActiveStudy( SUIT_Study* );
82 QString moduleLibrary( const QString&, const bool = true ) const;
85 void readModuleList();
88 typedef struct { QString name, title, internal; } ModuleInfo;
89 typedef QValueList<ModuleInfo> ModuleInfoList;
94 ModuleInfoList myInfoList;
99 #pragma warning( default:4251 )