1 // Copyright (C) 2003 CEA/DEN, EDF R&D
5 // File : SPlot2d_SetupPlot2dDlg.h
6 // Author : Vadim SANDLER
10 #ifndef SPlot2d_SetupPlot2dDlg_H
11 #define SPlot2d_SetupPlot2dDlg_H
13 #include "Plot2d_Curve.h"
15 #include <SALOMEDSClient_SObject.hxx>
20 //=================================================================================
21 // class : SPlot2d_SetupPlot2dDlg
22 // purpose : Dialog box for setup Plot2d view
23 //=================================================================================
32 class SPlot2d_ItemContainer;
34 class SPlot2d_SetupPlot2dDlg : public QDialog
39 SPlot2d_SetupPlot2dDlg( _PTR(SObject) object, QWidget* parent = 0 );
40 ~SPlot2d_SetupPlot2dDlg();
42 void getCurves( QPtrList<Plot2d_Curve>& container );
43 void getCurvesSource( int& horIndex, QValueList<int>& verIndexes );
44 bool getCurveAttributes( const int vIndex, bool& isAuto, int& marker, int& line, int& lineWidth, QColor& color);
47 void onHBtnToggled( bool );
48 void onVBtnToggled( bool );
49 void enableControls();
54 QPushButton* myCancelBtn;
55 QPtrList<SPlot2d_ItemContainer> myItems;
57 _PTR(SObject) myObject;
60 class SPlot2d_ItemContainer : public QObject
65 SPlot2d_ItemContainer( QObject* parent = 0, const char* name = 0 );
67 void createWidgets( QWidget* parentWidget );
68 void enableWidgets( bool enable );
70 void setHorizontalOn( bool on );
71 bool isHorizontalOn() const;
72 void setVerticalOn( bool on );
73 bool isVerticalOn() const;
74 bool isAutoAssign() const;
75 void setAutoAssign( bool on );
76 void setLine( const int line, const int width );
78 int getLineWidth() const;
79 void setMarker( const int marker );
80 int getMarker() const;
81 void setColor( const QColor& color );
82 QColor getColor() const;
89 void horToggled( bool );
90 void verToggled( bool );
94 void onColorChanged();
95 void onHVToggled( bool );
103 QCheckBox* myAutoCheck;
104 QComboBox* myLineCombo;
105 QSpinBox* myLineSpin;
106 QComboBox* myMarkerCombo;
107 QToolButton* myColorBtn;
110 #endif // SPlot2d_SetupPlot2dDlg_H