00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include "dialog-operations.qt.hh"
00025 #include "window.qt.hh"
00026 #include "HtmlEntities.hh"
00027 #include "SpaceWidget.qt.hh"
00028
00029 #include <QtGui/QLabel>
00030
00031
00032
00033
00034
00035
00036
00037 champsOperations :: champsOperations(QToolBar * parent , QBoxLayout * Layout)
00038 :
00039 QWidget(parent),
00040 FParent(parent)
00041 {
00042 FAffX = new QLabel(" X : ") ;
00043 FSaisieX = new FloatSpinBox(0.5) ;
00044 FSaisieX -> setWrapping(true) ;
00045
00046 FAffY = new QLabel(" Y : ") ;
00047 FSaisieY = new FloatSpinBox(0.5) ;
00048 FSaisieY -> setWrapping(true) ;
00049
00050 FAffZ = new QLabel(" Z : ") ;
00051 FSaisieZ = new FloatSpinBox(0.5) ;
00052 FSaisieZ -> setWrapping(true) ;
00053
00054 FRecuperer = new QPushButton(*HTML::decode("Récuperer")) ;
00055
00056 if (Layout != NULL)
00057 {
00058 Layout -> addWidget(FAffX);
00059 Layout -> addWidget(FSaisieX);
00060 Layout -> addWidget(FAffY);
00061 Layout -> addWidget(FSaisieY);
00062 Layout -> addWidget(FAffZ);
00063 Layout -> addWidget(FSaisieZ);
00064 Layout -> addSpacing(8);
00065 Layout -> addWidget(FRecuperer);
00066 }
00067 else
00068 {
00069 parent -> addWidget(FAffX);
00070 parent -> addWidget(FSaisieX);
00071 parent -> addWidget(FAffY);
00072 parent -> addWidget(FSaisieY);
00073 parent -> addWidget(FAffZ);
00074 parent -> addWidget(FSaisieZ);
00075 parent -> addWidget(new SpaceWidget(8, 8));
00076 parent -> addWidget(FRecuperer);
00077 }
00078 }
00079
00080
00081
00082 champsOperations:: ~champsOperations()
00083 {}
00084
00085
00086
00087 QPushButton * champsOperations :: getButtonRecuperer()
00088 {
00089 return FRecuperer ;
00090 }
00091
00092 FloatSpinBox * champsOperations :: getSaisieX()
00093 {
00094 return FSaisieX ;
00095 }
00096
00097 FloatSpinBox * champsOperations :: getSaisieY()
00098 {
00099 return FSaisieY ;
00100 }
00101
00102 FloatSpinBox * champsOperations :: getSaisieZ()
00103 {
00104 return FSaisieZ ;
00105 }
00106
00107 QLabel * champsOperations :: getLabelX()
00108 {
00109 return FAffX ;
00110 }
00111 QLabel * champsOperations :: getLabelY()
00112 {
00113 return FAffY ;
00114 }
00115 QLabel * champsOperations :: getLabelZ()
00116 {
00117 return FAffZ ;
00118 }
00119
00120 float champsOperations :: getValueX() const
00121 {
00122 return FSaisieX -> valuef() ;
00123 }
00124
00125 float champsOperations :: getValueY() const
00126 {
00127 return FSaisieY -> valuef() ;
00128 }
00129
00130 float champsOperations :: getValueZ() const
00131 {
00132 return FSaisieZ -> valuef() ;
00133 }
00134
00135
00136
00137 void champsOperations :: setValueX(float X)
00138 {
00139 FSaisieX -> setValuef(X) ;
00140 }
00141
00142 void champsOperations :: setValueY(float Y)
00143 {
00144 FSaisieY -> setValuef(Y) ;
00145 }
00146
00147 void champsOperations :: setValueZ(float Z)
00148 {
00149 FSaisieZ -> setValuef(Z) ;
00150 }
00151
00152
00153
00154
00155
00156
00157 dialogOperations :: dialogOperations(Window * parent ,
00158 QString * nomOperation ,
00159 GMap3d :: CControlerGMap * controler ,
00160 Qt :: ToolBarArea dir)
00161 :
00162 QToolBar(*nomOperation, parent),
00163 FControler(controler) ,
00164 FParent(parent) ,
00165 FUpdate(false)
00166 {
00167 setVisible(false);
00168 parent -> addToolBar(dir, this);
00169 setAllowedAreas(Qt::BottomToolBarArea | Qt::TopToolBarArea);
00170 }
00171
00172
00173
00174 dialogOperations :: ~dialogOperations()
00175 {
00176 }
00177
00178
00179
00180 GMap3d :: CControlerGMap * dialogOperations :: getControler() const
00181 {
00182 return FControler ;
00183 }
00184
00185
00186
00187 void dialogOperations :: repaint()
00188 {
00189 QToolBar :: repaint() ;
00190 FParent -> repaint() ;
00191 }
00192
00193
00194
00195 void dialogOperations :: update()
00196 {
00197 }
00198
00199
00200
00201 void dialogOperations :: callbackClose()
00202 {
00203
00204 getControler()->setMode(MODE_SELECTION);
00205 setVisible(false);
00206 }