]> SALOME platform Git repositories - modules/kernel.git/blob - src/SALOME_PYQT/SalomePyQt.hxx
Salome HOME
PR: merge from tag mergeto_HEAD_25Jan05
[modules/kernel.git] / src / SALOME_PYQT / SalomePyQt.hxx
1 //  Copyright (C) 2003  CEA/DEN, EDF R&D
2 //
3 //
4 //
5 //  File   : SalomePyQt.hxx
6 //  Module : SALOME
7
8 #ifndef _SALOME_PYQT_H
9 #define _SALOME_PYQT_H
10
11 #include <SALOME_Selection.h>
12
13 #include <qwidget.h>
14 #include <qworkspace.h>
15 #include <qstring.h>
16 #include <qmenubar.h>
17
18 enum MenuName {
19   File        = 1,
20   View        = 2,
21   Edit        = 3,
22   Preferences = 4,
23   Tools       = 5,
24   Window      = 6,
25   Help        = 7  
26 };
27
28 class SalomePyQt
29 {
30 public:
31   static QWidget*          getDesktop();
32   static QWorkspace*       getMainFrame();
33   static QMenuBar*         getMainMenuBar();
34   static QPopupMenu*       getPopupMenu( const MenuName menu );
35   static SALOME_Selection* getSelection();
36   static int               getStudyId();
37   static void              putInfo( const QString& );
38   static void              putInfo( const QString&, int );
39
40   static const QString&    getActiveComponent();
41
42   static void              updateObjBrowser( int studyId, bool updateSelection);
43
44   static void              addStringSetting(QString _name, QString _value, bool _autoValue);
45   static void              addIntSetting(QString _name, int _value, bool _autoValue);
46   static void              addDoubleSetting(QString _name, double _value, bool _autoValue);
47   static bool              removeSettings(QString name);
48   static QString           getSetting(QString name);
49
50   static QString           getFileName(QWidget*           parent, 
51                                        const QString&     initial, 
52                                        const QStringList& filters, 
53                                        const QString&     caption,
54                                        bool               open);
55   static QStringList       getOpenFileNames(QWidget*           parent, 
56                                             const QString&     initial, 
57                                             const QStringList& filters, 
58                                             const QString&     caption);
59   static QString           getExistingDirectory(QWidget*       parent,
60                                                 const QString& initial,
61                                                 const QString& caption);
62   static void              helpContext(const QString& source, const QString& context);
63   static bool              dumpView(const QString& filename);
64 };
65
66 #endif