X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSALOME_PYQT%2FSalomePyQt%2FSalomePyQt.h;h=d160c193caab818567983583b48dbe3567c252bc;hb=f830c97c748d8f8a6a7eccc8e3a58e19066a1181;hp=6d9feb87d7578282d7712277ef7ede65339844c5;hpb=9b85f317987edb9b0a03c506232e56d0c82629e5;p=modules%2Fgui.git diff --git a/src/SALOME_PYQT/SalomePyQt/SalomePyQt.h b/src/SALOME_PYQT/SalomePyQt/SalomePyQt.h index 6d9feb87d..d160c193c 100644 --- a/src/SALOME_PYQT/SalomePyQt/SalomePyQt.h +++ b/src/SALOME_PYQT/SalomePyQt/SalomePyQt.h @@ -1,11 +1,21 @@ -//============================================================================= -// File : SalomePyQt.h -// Created : 25/04/05 -// Author : Vadim SANDLER -// Project : SALOME -// Copyright : 2003-2005 CEA/DEN, EDF R&D -// $Header : $ -//============================================================================= +// 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/ or email : webmaster.salome@opencascade.com +// #ifndef SALOME_PYQT_H #define SALOME_PYQT_H @@ -14,6 +24,9 @@ #include #include +#include +#include + class LightApp_SelectionMgr; class SalomeApp_Application; class QMenuBar; @@ -54,6 +67,30 @@ 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 +}; + +enum { + PT_Space = LightApp_Preferences::Space, + PT_Bool = LightApp_Preferences::Bool, + PT_Color = LightApp_Preferences::Color, + PT_String = LightApp_Preferences::String, + PT_Selector = LightApp_Preferences::Selector, + PT_DblSpin = LightApp_Preferences::DblSpin, + PT_IntSpin = LightApp_Preferences::IntSpin, + PT_Double = LightApp_Preferences::Double, + PT_Integer = LightApp_Preferences::Integer, + PT_GroupBox = LightApp_Preferences::GroupBox, + PT_Font = LightApp_Preferences::Font, + PT_DirList = LightApp_Preferences::DirList, + PT_File = LightApp_Preferences::File, + PT_User = LightApp_Preferences::User +}; + class SalomePyQt { public: @@ -75,6 +112,8 @@ public: static bool dumpView( const QString& ); + static int defaultMenuGroup(); + 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 ); @@ -82,9 +121,9 @@ public: 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 ); + const int = -1, const int = -1, const int = -1 ); static int createMenu( const QString&, const QString& = QString::null, - const int = -1, const int = -1 ); + const int = -1, 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, @@ -103,22 +142,46 @@ public: static QtxAction* action( const int ); static int actionId( const QtxAction* ); + static bool clearMenu( const int = 0, const int = 0, + const bool = true ); + 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 bool, const int ); static void addSetting ( const QString&, const QString&, const QString& ); static void addSetting ( const QString&, const QString&, const QColor& ); static int integerSetting( const QString&, const QString&, const int = 0 ); - static double doubleSetting ( const QString&, const QString&, const int = 0 ); + static double doubleSetting ( const QString&, const QString&, const double = 0 ); static bool boolSetting ( const QString&, const QString&, const bool = 0 ); static QString stringSetting ( const QString&, const QString&, const QString& = QString("") ); static QColor colorSetting ( const QString&, const QString&, const QColor& = QColor() ); static void removeSetting ( const QString&, const QString& ); + static bool hasSetting ( const QString&, const QString& ); // obsolete static void addStringSetting( const QString&, const QString&, bool = true ); static void addIntSetting ( const QString&, const int, bool = true ); + static void addBoolSetting ( const QString&, const bool, bool = true ); static void addDoubleSetting( const QString&, const double, bool = true ); static void removeSettings ( const QString& ); static QString getSetting ( const QString& ); + + static int addGlobalPreference( const QString& ); + static int addPreference( const QString& ); + static int addPreference( const QString&, + const int, const int = -1, + const QString& = QString::null, + const QString& = QString::null ); + static QVariant preferenceProperty( const int, const QString& ); + static void setPreferenceProperty( const int, + const QString&, + const QVariant& ); + static void addPreferenceProperty( const int, + const QString&, + const int, + const QVariant& ); + + static void message( const QString&, bool = true ); + static void clearMessages(); }; #endif // SALOME_PYQT_H