1 // Copyright (C) 2003 CEA/DEN, EDF R&D
5 // File : Plot2d_SetupPlot2dDlg.h
6 // Author : Vadim SANDLER
10 #ifndef Plot2d_SetupPlot2dDlg_H
11 #define Plot2d_SetupPlot2dDlg_H
16 #include <SALOMEconfig.h>
17 #include CORBA_SERVER_HEADER(SALOMEDS)
18 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
20 //=================================================================================
21 // class : Plot2d_SetupPlot2dDlg
22 // purpose : Dialog box for setup Plot2d view
23 //=================================================================================
32 class Plot2d_ItemContainer;
33 class Plot2d_CurveContainer;
35 class Plot2d_SetupPlot2dDlg : public QDialog
40 Plot2d_SetupPlot2dDlg( SALOMEDS::SObject_var object, QWidget* parent = 0 );
41 ~Plot2d_SetupPlot2dDlg();
43 void getCurves( Plot2d_CurveContainer& container );
44 void getCurvesSource( int& horIndex, QValueList<int>& verIndexes );
45 bool getCurveAttributes( const int vIndex, bool& isAuto, int& marker, int& line, int& lineWidth, QColor& color);
48 void onHBtnToggled( bool );
49 void onVBtnToggled( bool );
50 void enableControls();
55 QPushButton* myCancelBtn;
56 QList<Plot2d_ItemContainer> myItems;
58 SALOMEDS::SObject_var myObject;
61 class Plot2d_ItemContainer : public QObject
66 Plot2d_ItemContainer( QObject* parent = 0, const char* name = 0 );
68 void createWidgets( QWidget* parentWidget );
69 void enableWidgets( bool enable );
71 void setHorizontalOn( bool on );
72 bool isHorizontalOn() const;
73 void setVerticalOn( bool on );
74 bool isVerticalOn() const;
75 bool isAutoAssign() const;
76 void setAutoAssign( bool on );
77 void setLine( const int line, const int width );
79 int getLineWidth() const;
80 void setMarker( const int marker );
81 int getMarker() const;
82 void setColor( const QColor& color );
83 QColor getColor() const;
90 void horToggled( bool );
91 void verToggled( bool );
95 void onColorChanged();
96 void onHVToggled( bool );
104 QCheckBox* myAutoCheck;
105 QComboBox* myLineCombo;
106 QSpinBox* myLineSpin;
107 QComboBox* myMarkerCombo;
108 QToolButton* myColorBtn;
111 #endif // Plot2d_SetupPlot2dDlg_H