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 //=============================================================================
20 // File : SalomePyQt.h
22 // Author : Vadim SANDLER
24 // Copyright : 2003-2005 CEA/DEN, EDF R&D
26 //=============================================================================
35 #include <LightApp_Application.h>
37 class LightApp_SelectionMgr;
38 class SalomeApp_Application;
44 class SALOME_Selection : public QObject
50 static SALOME_Selection* GetSelection( SalomeApp_Application* );
57 void currentSelectionChanged();
60 void onSelMgrDestroyed();
63 LightApp_SelectionMgr* mySelMgr;
64 SALOME_Selection( QObject* );
78 WT_ObjectBrowser = LightApp_Application::WT_ObjectBrowser,
79 WT_PyConsole = LightApp_Application::WT_PyConsole,
80 WT_LogWindow = LightApp_Application::WT_LogWindow,
81 WT_User = LightApp_Application::WT_User
87 static QWidget* getDesktop();
88 static QWidget* getMainFrame();
89 static QMenuBar* getMainMenuBar();
90 static QPopupMenu* getPopupMenu( const MenuName );
91 static SALOME_Selection* getSelection();
92 static int getStudyId();
93 static void putInfo( const QString&, const int = 0 );
94 static const QString getActiveComponent();
95 static void updateObjBrowser( const int = 0, bool = true );
97 static QString getFileName ( QWidget*, const QString&, const QStringList&, const QString&, bool );
98 static QStringList getOpenFileNames ( QWidget*, const QString&, const QStringList&, const QString& );
99 static QString getExistingDirectory( QWidget*, const QString&, const QString& );
101 static void helpContext( const QString&, const QString& );
103 static bool dumpView( const QString& );
105 static int createTool( const QString& );
106 static int createTool( const int, const int, const int = -1 );
107 static int createTool( const int, const QString&, const int = -1 );
108 static int createTool( QtxAction*, const int, const int = -1, const int = -1 );
109 static int createTool( QtxAction*, const QString&, const int = -1, const int = -1 );
111 static int createMenu( const QString&, const int = -1,
112 const int = -1, const int = -1 );
113 static int createMenu( const QString&, const QString& = QString::null,
114 const int = -1, const int = -1 );
115 static int createMenu( const int, const int = -1,
116 const int = -1, const int = -1 );
117 static int createMenu( const int, const QString& = QString::null,
118 const int = -1, const int = -1 );
119 static int createMenu( QtxAction*, const int, const int = -1,
120 const int = -1, const int = -1 );
121 static int createMenu( QtxAction*, const QString&, const int = -1,
122 const int = -1, const int = -1 );
124 static QtxAction* createSeparator();
126 static QtxAction* createAction( const int, const QString&,
127 const QString& = QString::null, const QString& = QString::null,
128 const QString& = QString::null, const int = 0, const bool = false );
130 static QtxAction* action( const int );
131 static int actionId( const QtxAction* );
133 static void addSetting ( const QString&, const QString&, const double );
134 static void addSetting ( const QString&, const QString&, const int );
135 static void addSetting ( const QString&, const QString&, const QString& );
136 static void addSetting ( const QString&, const QString&, const QColor& );
137 static int integerSetting( const QString&, const QString&, const int = 0 );
138 static double doubleSetting ( const QString&, const QString&, const int = 0 );
139 static bool boolSetting ( const QString&, const QString&, const bool = 0 );
140 static QString stringSetting ( const QString&, const QString&, const QString& = QString("") );
141 static QColor colorSetting ( const QString&, const QString&, const QColor& = QColor() );
142 static void removeSetting ( const QString&, const QString& );
144 static void addStringSetting( const QString&, const QString&, bool = true );
145 static void addIntSetting ( const QString&, const int, bool = true );
146 static void addDoubleSetting( const QString&, const double, bool = true );
147 static void removeSettings ( const QString& );
148 static QString getSetting ( const QString& );
151 #endif // SALOME_PYQT_H