+// 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();
void onSelMgrDestroyed();
private:
- SalomeApp_SelectionMgr* mySelMgr;
+ LightApp_SelectionMgr* mySelMgr;
+ SALOME_Selection( QObject* );
};
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:
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& );