1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : VisuGUI_SetupPlot2dDlg.h
23 // Author : Vadim SANDLER
26 #ifndef VISUGUI_SetupPlot2dDlg_H
27 #define VISUGUI_SetupPlot2dDlg_H
29 #include "Plot2d_Curve.h"
31 #include <SALOMEDSClient_SObject.hxx>
36 //=================================================================================
37 // class : VisuGUI_SetupPlot2dDlg
38 // purpose : Dialog box for setup Plot2d view
39 //=================================================================================
48 class VisuGUI_ItemContainer;
51 class VisuGUI_SetupPlot2dDlg : public QDialog
56 VisuGUI_SetupPlot2dDlg( _PTR(SObject) object, QWidget* parent = 0 );
57 ~VisuGUI_SetupPlot2dDlg();
59 void getCurves( QList<Plot2d_Curve*>& container );
60 void getCurvesSource( int& horIndex, QList<int>& verIndexes, QList<int>& zIndexes );
61 bool getCurveAttributes( const int vIndex, bool& isAuto, int& marker, int& line, int& lineWidth, QColor& color);
64 void keyPressEvent( QKeyEvent* e );
67 void onHBtnToggled( bool );
68 void onVBtnToggled( bool );
70 void enableControls();
75 QPushButton* myCancelBtn;
76 QPushButton* myHelpBtn;
77 QList<VisuGUI_ItemContainer*> myItems;
79 _PTR(SObject) myObject;
82 class VisuGUI_ItemContainer : public QObject
87 VisuGUI_ItemContainer( QObject* parent = 0 );
89 void createWidgets( QWidget* parentWidget, const QStringList& );
90 void enableWidgets( bool enable );
92 void setHorizontalOn( bool on );
93 bool isHorizontalOn() const;
94 void setVerticalOn( bool on );
95 bool isVerticalOn() const;
96 bool isAutoAssign() const;
97 void setAutoAssign( bool on );
98 void setLine( const int line, const int width );
100 int getLineWidth() const;
101 void setMarker( const int marker );
102 int getMarker() const;
103 void setColor( const QColor& color );
104 QColor getColor() const;
105 int assigned() const;
112 void horToggled( bool );
113 void verToggled( bool );
116 void onAutoChanged();
117 //void onColorChanged();
118 void onHVToggled( bool );
126 QCheckBox* myAutoCheck;
127 QComboBox* myLineCombo;
128 QSpinBox* myLineSpin;
129 QComboBox* myMarkerCombo, *myAssigned;
130 QtxColorButton* myColorBtn;
133 #endif // VISUGUI_SetupPlot2dDlg_H