Salome HOME
Copyrights update
[modules/gui.git] / src / SALOME_PYQT / SalomePyQt / SalomePyQt.h
index 9eda4b6ae174ea34714ff2d029f15352e286a7e0..51f245f2300d64a5aaf95f0c8c883331a6629cf3 100644 (file)
@@ -1,3 +1,21 @@
+// Copyright (C) 2005  OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either 
+// version 2.1 of the License.
+// 
+// This library is distributed in the hope that it will be useful 
+// but WITHOUT ANY WARRANTY; without even the implied warranty of 
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public  
+// License along with this library; if not, write to the Free Software 
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/
+//
 //=============================================================================
 // File      : SalomePyQt.h
 // Created   : 25/04/05
 #ifndef SALOME_PYQT_H
 #define SALOME_PYQT_H
 
-#include <qwidget.h>
 #include <qstring.h>
-#include <qmenubar.h>
+#include <qobject.h>
+#include <qcolor.h>
 
-class SalomeApp_SelectionMgr;
+#include <LightApp_Application.h>
+
+class LightApp_SelectionMgr;
+class SalomeApp_Application;
+class QMenuBar;
+class QPopupMenu;
+class QWidget;
+class QtxAction;
 
 class SALOME_Selection : public QObject
 {
   Q_OBJECT
 
 public:
-  SALOME_Selection();
+  ~SALOME_Selection();
+  static SALOME_Selection* GetSelection( SalomeApp_Application* );
 
   void Clear();
   void ClearIObjects();
@@ -34,7 +60,8 @@ private slots:
   void onSelMgrDestroyed();
 
 private:
-  SalomeApp_SelectionMgr* mySelMgr;
+  LightApp_SelectionMgr* mySelMgr;
+  SALOME_Selection( QObject* );
 };
 
 enum MenuName {
@@ -47,6 +74,13 @@ enum MenuName {
   Help        = 7  
 };
 
+enum {
+  WT_ObjectBrowser = LightApp_Application::WT_ObjectBrowser,
+  WT_PyConsole     = LightApp_Application::WT_PyConsole,
+  WT_LogWindow     = LightApp_Application::WT_LogWindow,
+  WT_User          = LightApp_Application::WT_User
+};
+
 class SalomePyQt
 {
 public:
@@ -68,6 +102,34 @@ public:
 
   static bool              dumpView( const QString& );
 
+  static int               createTool( const QString& );
+  static int               createTool( const int,  const int,      const int = -1 );
+  static int               createTool( const int,  const QString&, const int = -1 );
+  static int               createTool( QtxAction*, const int,      const int = -1, const int = -1 );
+  static int               createTool( QtxAction*, const QString&, const int = -1, const int = -1 );
+
+  static int               createMenu( const QString&, const int = -1,
+                                      const int = -1, const int = -1 );
+  static int               createMenu( const QString&, const QString& = QString::null, 
+                                      const int = -1, const int = -1 );
+  static int               createMenu( const int,      const int = -1,
+                                      const int = -1, const int = -1 );
+  static int               createMenu( const int,      const QString& = QString::null, 
+                                      const int = -1, const int = -1 );
+  static int               createMenu( QtxAction*,     const int,      const int = -1, 
+                                      const int = -1, const int = -1 );
+  static int               createMenu( QtxAction*,     const QString&, const int = -1, 
+                                      const int = -1, const int = -1 );
+
+  static QtxAction*        createSeparator();
+
+  static QtxAction*        createAction( const int, const QString&,
+                                        const QString& = QString::null, const QString& = QString::null, 
+                                        const QString& = QString::null, const int = 0, const bool = false );
+
+  static QtxAction*        action( const int );
+  static int               actionId( const QtxAction* );
+
   static void              addSetting    ( const QString&, const QString&, const double );
   static void              addSetting    ( const QString&, const QString&, const int );
   static void              addSetting    ( const QString&, const QString&, const QString& );