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/
27 #include <LightApp_Application.h>
29 class LightApp_SelectionMgr;
30 class SalomeApp_Application;
36 class SALOME_Selection : public QObject
42 static SALOME_Selection* GetSelection( SalomeApp_Application* );
49 void currentSelectionChanged();
52 void onSelMgrDestroyed();
55 LightApp_SelectionMgr* mySelMgr;
56 SALOME_Selection( QObject* );
70 WT_ObjectBrowser = LightApp_Application::WT_ObjectBrowser,
71 WT_PyConsole = LightApp_Application::WT_PyConsole,
72 WT_LogWindow = LightApp_Application::WT_LogWindow,
73 WT_User = LightApp_Application::WT_User
79 static QWidget* getDesktop();
80 static QWidget* getMainFrame();
81 static QMenuBar* getMainMenuBar();
82 static QPopupMenu* getPopupMenu( const MenuName );
83 static SALOME_Selection* getSelection();
84 static int getStudyId();
85 static void putInfo( const QString&, const int = 0 );
86 static const QString getActiveComponent();
87 static void updateObjBrowser( const int = 0, bool = true );
89 static QString getFileName ( QWidget*, const QString&, const QStringList&, const QString&, bool );
90 static QStringList getOpenFileNames ( QWidget*, const QString&, const QStringList&, const QString& );
91 static QString getExistingDirectory( QWidget*, const QString&, const QString& );
93 static void helpContext( const QString&, const QString& );
95 static bool dumpView( const QString& );
97 static int defaultMenuGroup();
99 static int createTool( const QString& );
100 static int createTool( const int, const int, const int = -1 );
101 static int createTool( const int, const QString&, const int = -1 );
102 static int createTool( QtxAction*, const int, const int = -1, const int = -1 );
103 static int createTool( QtxAction*, const QString&, const int = -1, const int = -1 );
105 static int createMenu( const QString&, const int = -1,
106 const int = -1, const int = -1, const int = -1 );
107 static int createMenu( const QString&, const QString& = QString::null,
108 const int = -1, const int = -1, const int = -1 );
109 static int createMenu( const int, const int = -1,
110 const int = -1, const int = -1 );
111 static int createMenu( const int, const QString& = QString::null,
112 const int = -1, const int = -1 );
113 static int createMenu( QtxAction*, const int, const int = -1,
114 const int = -1, const int = -1 );
115 static int createMenu( QtxAction*, const QString&, const int = -1,
116 const int = -1, const int = -1 );
118 static QtxAction* createSeparator();
120 static QtxAction* createAction( const int, const QString&,
121 const QString& = QString::null, const QString& = QString::null,
122 const QString& = QString::null, const int = 0, const bool = false );
124 static QtxAction* action( const int );
125 static int actionId( const QtxAction* );
127 static bool clearMenu( const int = 0, const int = 0,
130 static void addSetting ( const QString&, const QString&, const double );
131 static void addSetting ( const QString&, const QString&, const int );
132 static void addSetting ( const QString&, const QString&, const QString& );
133 static void addSetting ( const QString&, const QString&, const QColor& );
134 static int integerSetting( const QString&, const QString&, const int = 0 );
135 static double doubleSetting ( const QString&, const QString&, const int = 0 );
136 static bool boolSetting ( const QString&, const QString&, const bool = 0 );
137 static QString stringSetting ( const QString&, const QString&, const QString& = QString("") );
138 static QColor colorSetting ( const QString&, const QString&, const QColor& = QColor() );
139 static void removeSetting ( const QString&, const QString& );
141 static void addStringSetting( const QString&, const QString&, bool = true );
142 static void addIntSetting ( const QString&, const int, bool = true );
143 static void addDoubleSetting( const QString&, const double, bool = true );
144 static void removeSettings ( const QString& );
145 static QString getSetting ( const QString& );
148 #endif // SALOME_PYQT_H