00001 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE 00002 // 00003 // This library is free software; you can redistribute it and/or 00004 // modify it under the terms of the GNU Lesser General Public 00005 // License as published by the Free Software Foundation; either 00006 // version 2.1 of the License. 00007 // 00008 // This library is distributed in the hope that it will be useful, 00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 // Lesser General Public License for more details. 00012 // 00013 // You should have received a copy of the GNU Lesser General Public 00014 // License along with this library; if not, write to the Free Software 00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00016 // 00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com 00018 // 00019 00020 // VISU VISUGUI : GUI of VISU component 00021 // File : VisuGUI_SizeBox.h 00022 // Author : Oleg UVAROV 00023 // Module : VISU 00024 // 00025 #ifndef VISUGUI_SIZEBOX_H 00026 #define VISUGUI_SIZEBOX_H 00027 00028 #include <QWidget> 00029 00030 class QLabel; 00031 class QLineEdit; 00032 class QPushButton; 00033 class QCheckBox; 00034 class QGroupBox; 00035 00036 class SalomeApp_DoubleSpinBox; 00037 class SalomeApp_IntSpinBox; 00038 class QtxColorButton; 00039 00040 class VisuGUI_SizeBox : public QWidget 00041 { 00042 Q_OBJECT 00043 00044 public: 00045 enum { Results = 0, Geometry, Inside, Outside }; 00046 00047 public: 00048 VisuGUI_SizeBox( QWidget* ); 00049 ~VisuGUI_SizeBox() {} 00050 00051 public: 00052 int getType() const { return myType; } 00053 void setType( int ); 00054 00055 float getOutsideSize() const; 00056 void setOutsideSize( float ); 00057 00058 float getGeomSize() const; 00059 void setGeomSize( float ); 00060 00061 float getMinSize() const; 00062 void setMinSize( float ); 00063 00064 float getMaxSize() const; 00065 void setMaxSize( float ); 00066 00067 float getMagnification() const; 00068 void setMagnification( float ); 00069 00070 float getIncrement() const; 00071 void setIncrement( float ); 00072 00073 bool getUniform() const; 00074 void setUniform( bool ); 00075 00076 QColor getColor() const; 00077 void setColor( const QColor& ); 00078 00079 void enableSizeControls( bool enabled ); 00080 00081 protected slots: 00082 void onToggleResults(); 00083 void onToggleGeometry(); 00084 void onToggleInside(); 00085 void onToggleOutside(); 00086 00087 //void onColorButtonPressed(); 00088 00089 private: 00090 int myType; 00091 00092 QLabel* myOutsideSizeLabel; 00093 SalomeApp_IntSpinBox* myOutsideSizeSpinBox; 00094 00095 QLabel* myGeomSizeLabel; 00096 SalomeApp_IntSpinBox* myGeomSizeSpinBox; 00097 00098 QLabel* myMinSizeLabel; 00099 SalomeApp_IntSpinBox* myMinSizeSpinBox; 00100 00101 QLabel* myMaxSizeLabel; 00102 SalomeApp_IntSpinBox* myMaxSizeSpinBox; 00103 00104 QLabel* myMagnificationLabel; 00105 SalomeApp_IntSpinBox* myMagnificationSpinBox; 00106 00107 QLabel* myIncrementLabel; 00108 SalomeApp_DoubleSpinBox* myIncrementSpinBox; 00109 00110 QCheckBox* myUniformCheckBox; 00111 00112 QGroupBox* myColorGroup; 00113 QLabel* myColorLabel; 00114 QtxColorButton* myColorButton; 00115 }; 00116 00117 00118 00119 #endif