1 // Copyright (C) 2003 CEA/DEN, EDF R&D
5 // File : VisuGUI_SetupPlot2dDlg.h
6 // Author : Vadim SANDLER
10 #ifndef VISUGUI_SetupPlot2dDlg_H
11 #define VISUGUI_SetupPlot2dDlg_H
13 #include "Plot2d_Curve.h"
15 #include <SALOMEDSClient_SObject.hxx>
20 //=================================================================================
21 // class : VisuGUI_SetupPlot2dDlg
22 // purpose : Dialog box for setup Plot2d view
23 //=================================================================================
32 class VisuGUI_ItemContainer;
34 class VisuGUI_SetupPlot2dDlg : public QDialog
39 VisuGUI_SetupPlot2dDlg( _PTR(SObject) object, QWidget* parent = 0 );
40 ~VisuGUI_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 );
50 void enableControls();
55 QPushButton* myCancelBtn;
56 QPushButton* myHelpBtn;
57 QPtrList<VisuGUI_ItemContainer> myItems;
59 _PTR(SObject) myObject;
62 class VisuGUI_ItemContainer : public QObject
67 VisuGUI_ItemContainer( QObject* parent = 0, const char* name = 0 );
69 void createWidgets( QWidget* parentWidget );
70 void enableWidgets( bool enable );
72 void setHorizontalOn( bool on );
73 bool isHorizontalOn() const;
74 void setVerticalOn( bool on );
75 bool isVerticalOn() const;
76 bool isAutoAssign() const;
77 void setAutoAssign( bool on );
78 void setLine( const int line, const int width );
80 int getLineWidth() const;
81 void setMarker( const int marker );
82 int getMarker() const;
83 void setColor( const QColor& color );
84 QColor getColor() const;
91 void horToggled( bool );
92 void verToggled( bool );
96 void onColorChanged();
97 void onHVToggled( bool );
105 QCheckBox* myAutoCheck;
106 QComboBox* myLineCombo;
107 QSpinBox* myLineSpin;
108 QComboBox* myMarkerCombo;
109 QToolButton* myColorBtn;
112 #endif // VISUGUI_SetupPlot2dDlg_H