Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef VISUGUI_SetupPlot2dDlg_H
00028 #define VISUGUI_SetupPlot2dDlg_H
00029
00030 #include "Plot2d_Curve.h"
00031
00032 #include <SALOMEDSClient_SObject.hxx>
00033
00034 #include <QDialog>
00035 #include <QList>
00036
00037
00038
00039
00040
00041
00042 class QScrollArea;
00043 class QPushButton;
00044 class QLabel;
00045 class QCheckBox;
00046 class QComboBox;
00047 class SalomeApp_IntSpinBox;
00048 class QToolButton;
00049 class VisuGUI_ItemContainer;
00050 class QtxColorButton;
00051
00052 class VisuGUI_SetupPlot2dDlg : public QDialog
00053 {
00054 Q_OBJECT
00055
00056 public:
00057 VisuGUI_SetupPlot2dDlg( _PTR(SObject) object, QWidget* parent = 0 );
00058 ~VisuGUI_SetupPlot2dDlg();
00059
00060 void getCurves( QList<Plot2d_Curve*>& container );
00061 void getCurvesSource( int& horIndex, QList<int>& verIndexes, QList<int>& ver2Indexes, QList<int>& zIndexes );
00062 bool getCurveAttributes( const int vIndex, bool& isAuto, int& marker, int& line, int& lineWidth, QColor& color);
00063
00064 private:
00065 void keyPressEvent( QKeyEvent* e );
00066
00067 private slots:
00068 void onHBtnToggled( bool );
00069 void onVBtnToggled( bool );
00070 void onV2BtnToggled( bool );
00071 void onHelp();
00072 void enableControls();
00073
00074 private:
00075 QScrollArea* myView;
00076 QPushButton* myOkBtn;
00077 QPushButton* myCancelBtn;
00078 QPushButton* myHelpBtn;
00079 QList<VisuGUI_ItemContainer*> myItems;
00080
00081 _PTR(SObject) myObject;
00082 };
00083
00084 class VisuGUI_ItemContainer : public QObject
00085 {
00086 Q_OBJECT
00087
00088 public:
00089 VisuGUI_ItemContainer( QObject* parent = 0 );
00090
00091 void createWidgets( QWidget* parentWidget, const QStringList& );
00092 void enableWidgets( bool enable );
00093
00094 void setHorizontalOn( bool on );
00095 bool isHorizontalOn() const;
00096 void setVerticalOn( bool on );
00097 bool isVerticalOn() const;
00098 void setVertical2On( bool on );
00099 bool isVertical2On() const;
00100 bool isAutoAssign() const;
00101 void setAutoAssign( bool on );
00102 void setLine( const int line, const int width );
00103 int getLine() const;
00104 int getLineWidth() const;
00105 void setMarker( const int marker );
00106 int getMarker() const;
00107 void setColor( const QColor& color );
00108 QColor getColor() const;
00109 int assigned() const;
00110
00111 protected:
00112 void updateState();
00113
00114 signals:
00115 void autoClicked();
00116 void horToggled( bool );
00117 void verToggled( bool );
00118 void ver2Toggled( bool );
00119
00120 public slots:
00121 void onAutoChanged();
00122
00123 void onHVToggled( bool );
00124
00125 public:
00126 bool myEnabled;
00127 QToolButton* myHBtn;
00128 QToolButton* myVBtn;
00129 QToolButton* myV2Btn;
00130 QLabel* myTitleLab;
00131 QLabel* myUnitLab;
00132 QCheckBox* myAutoCheck;
00133 QComboBox* myLineCombo;
00134 SalomeApp_IntSpinBox* myLineSpin;
00135 QComboBox* myMarkerCombo, *myAssigned;
00136 QtxColorButton* myColorBtn;
00137 };
00138
00139 #endif // VISUGUI_SetupPlot2dDlg_H
00140