-// Copyright (C) 2007-2013 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
// 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
#include <LightApp_Application.h>
#include <LightApp_Preferences.h>
+#include <Plot2d_ViewFrame.h>
class LightApp_SelectionMgr;
class QMenuBar;
class QAction;
class QTreeView;
class QtxActionGroup;
+class Plot2d_Curve;
class SALOME_Selection : public QObject
{
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:
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& );
static void helpContext( const QString&, const QString& );
- static bool dumpView( const QString& );
+ static bool dumpView( const QString&, const int = 0 );
static int defaultMenuGroup();
static QString getViewTitle( const int );
static QList<int> 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 );
static bool moveView( const int, const int, const bool );
static QList<int> 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<double> getPlot2dFitRangeByCurves(const int);
+ static QList<double> 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 );