X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSALOME_PYQT%2FSalomePyQt%2FSalomePyQt.h;h=e9956afd4ffb74fb541d7a5774a602d6420f90fe;hb=02904c3728214667f919cfe06072a91e1687b12f;hp=f413631ccfb8bde7897a68c08caac17663fb7813;hpb=e4b132cf6375e1f4bc1fef8ce9eb7aaf703e2ffc;p=modules%2Fgui.git diff --git a/src/SALOME_PYQT/SalomePyQt/SalomePyQt.h b/src/SALOME_PYQT/SalomePyQt/SalomePyQt.h index f413631cc..e9956afd4 100644 --- a/src/SALOME_PYQT/SalomePyQt/SalomePyQt.h +++ b/src/SALOME_PYQT/SalomePyQt/SalomePyQt.h @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -6,7 +6,7 @@ // 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. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -33,7 +33,11 @@ #include #include +#ifndef GUI_DISABLE_CORBA +#include +#endif #include +#include class LightApp_SelectionMgr; class QMenuBar; @@ -42,6 +46,7 @@ class QWidget; class QAction; class QTreeView; class QtxActionGroup; +class Plot2d_Curve; class SALOME_Selection : public QObject { @@ -80,7 +85,12 @@ enum { WT_ObjectBrowser = LightApp_Application::WT_ObjectBrowser, WT_PyConsole = LightApp_Application::WT_PyConsole, WT_LogWindow = LightApp_Application::WT_LogWindow, +#ifndef GUI_DISABLE_CORBA + WT_NoteBook = SalomeApp_Application::WT_NoteBook, + WT_User = SalomeApp_Application::WT_User +#else WT_User = LightApp_Application::WT_User +#endif }; enum { @@ -115,6 +125,32 @@ enum Action { SplitAt = 2 //!< the view area is splitted in such a way, that specified view and all views which follow it, are moved to the new area }; +//! Type of titles in Plot3d View +enum ObjectType +{ + MainTitle = Plot2d_ViewFrame::MainTitle, + XTitle = Plot2d_ViewFrame::XTitle, + YTitle = Plot2d_ViewFrame::YTitle, + Y2Title = Plot2d_ViewFrame::Y2Title, + XAxis = Plot2d_ViewFrame::XAxis, + YAxis = Plot2d_ViewFrame::YAxis, + Y2Axis = Plot2d_ViewFrame::Y2Axis +}; + +enum VisibilityState +{ + ShownState, //!< Object is shown in viewer + HiddenState, //!< Object is hidden in viewer + UnpresentableState //!< Unpresentable object +}; + +enum Axis { + yLeft = QwtPlot::yLeft, + yRight = QwtPlot::yRight, + xBottom = QwtPlot::xBottom, + xTop = QwtPlot::xTop, +}; + class SalomePyQt { public: @@ -151,6 +187,13 @@ public: static QString getName( const QString& ); static QString getToolTip( const QString& ); + static void setVisibilityState( const QString&, VisibilityState ); + static VisibilityState getVisibilityState( const QString& ); + + static void setObjectPosition( const QString&, int ); + static int getObjectPosition( const QString& ); + + static void setColor( const QString&, const QColor& ); static QColor getColor( const QString& ); @@ -161,7 +204,7 @@ public: static void helpContext( const QString&, const QString& ); - static bool dumpView( const QString& ); + static bool dumpView( const QString&, const int = 0 ); static int defaultMenuGroup(); @@ -228,10 +271,11 @@ public: static QString getViewTitle( const int ); static QList findViews( const QString& ); static bool activateView( const int ); - static int createView( const QString& ); + static int createView( const QString&, bool visible = true, const int width = 0, const int height = 0 ); static int createView( const QString&, QWidget* ); static bool closeView( const int ); static int cloneView( const int ); + static void setViewVisible( const int id, bool visible = true ); static bool isViewVisible( const int ); static void setViewClosable( const int, const bool ); static bool isViewClosable( const int ); @@ -241,6 +285,16 @@ public: static bool moveView( const int, const int, const bool ); static QList neighbourViews( const int ); + static void displayCurve(const int, Plot2d_Curve*); + static void eraseCurve(const int, Plot2d_Curve*); + static void eraseCurve(Plot2d_Curve*); + static void updateCurves( const int ); + static QString getPlot2dTitle(const int, ObjectType = MainTitle); + static void setPlot2dTitle(const int, const QString&, ObjectType = MainTitle, bool = true); + static QList getPlot2dFitRangeByCurves(const int); + static QList getPlot2dFitRangeCurrent(const int); + static void setPlot2dFitRange(const int, const double XMin, const double XMax, const double YMin, const double YMax); + // the following methods are obsolete static void addStringSetting( const QString&, const QString&, bool = true ); static void addIntSetting ( const QString&, const int, bool = true );