1 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // File : VisuGUI_SetupPlot2dDlg.h
21 // Author : Vadim SANDLER
24 #ifndef VISUGUI_SetupPlot2dDlg_H
25 #define VISUGUI_SetupPlot2dDlg_H
27 #include "Plot2d_Curve.h"
29 #include <SALOMEDSClient_SObject.hxx>
34 //=================================================================================
35 // class : VisuGUI_SetupPlot2dDlg
36 // purpose : Dialog box for setup Plot2d view
37 //=================================================================================
46 class VisuGUI_ItemContainer;
48 class VisuGUI_SetupPlot2dDlg : public QDialog
53 VisuGUI_SetupPlot2dDlg( _PTR(SObject) object, QWidget* parent = 0 );
54 ~VisuGUI_SetupPlot2dDlg();
56 void getCurves( QPtrList<Plot2d_Curve>& container );
57 void getCurvesSource( int& horIndex, QValueList<int>& verIndexes, QValueList<int>& zIndexes );
58 bool getCurveAttributes( const int vIndex, bool& isAuto, int& marker, int& line, int& lineWidth, QColor& color);
61 void keyPressEvent( QKeyEvent* e );
64 void onHBtnToggled( bool );
65 void onVBtnToggled( bool );
67 void enableControls();
72 QPushButton* myCancelBtn;
73 QPushButton* myHelpBtn;
74 QPtrList<VisuGUI_ItemContainer> myItems;
76 _PTR(SObject) myObject;
79 class VisuGUI_ItemContainer : public QObject
84 VisuGUI_ItemContainer( QObject* parent = 0, const char* name = 0 );
86 void createWidgets( QWidget* parentWidget, const QStringList& );
87 void enableWidgets( bool enable );
89 void setHorizontalOn( bool on );
90 bool isHorizontalOn() const;
91 void setVerticalOn( bool on );
92 bool isVerticalOn() const;
93 bool isAutoAssign() const;
94 void setAutoAssign( bool on );
95 void setLine( const int line, const int width );
97 int getLineWidth() const;
98 void setMarker( const int marker );
99 int getMarker() const;
100 void setColor( const QColor& color );
101 QColor getColor() const;
102 int assigned() const;
109 void horToggled( bool );
110 void verToggled( bool );
113 void onAutoChanged();
114 void onColorChanged();
115 void onHVToggled( bool );
123 QCheckBox* myAutoCheck;
124 QComboBox* myLineCombo;
125 QSpinBox* myLineSpin;
126 QComboBox* myMarkerCombo, *myAssigned;
127 QToolButton* myColorBtn;
130 #endif // VISUGUI_SetupPlot2dDlg_H