28 #include <QtGui/QLabel>
29 #include <QtGui/QBoxLayout>
30 #include <Qt3Support/Q3Accel>
42 setWindowTitle (
"chamfering" ) ;
46 Q3Accel * Raccourci =
new Q3Accel (
this ) ;
47 Raccourci -> insertItem ( QKeySequence ( Qt :: Key_Space ) , 9 ) ;
48 Raccourci -> connectItem ( 9 , FParent ,
49 SLOT ( callbackHideAllWindow ( ) ) ) ;
52 QBoxLayout * placement =
new QBoxLayout ( QBoxLayout::TopToBottom,
this ) ;
55 QWidget * WidgetHaut =
new QWidget (
this ) ;
56 QBoxLayout * haut =
new QBoxLayout ( QBoxLayout::LeftToRight, WidgetHaut );
58 FAffSommet =
new QLabel (
"Weights of vertices" , WidgetHaut ) ;
62 FGetSommet =
new QPushButton (
"Get" , WidgetHaut ) ;
63 FSetSommet =
new QPushButton (
"Set" , WidgetHaut ) ;
64 FNextSommet =
new QPushButton (
">>" , WidgetHaut ) ;
66 haut -> addWidget ( FAffSommet ) ;
67 haut -> addWidget ( FSaisie[0] ) ;
68 haut -> addWidget ( FGetSommet ) ;
69 haut -> addWidget ( FSetSommet ) ;
70 haut -> addWidget ( FNextSommet ) ;
73 QWidget * WidgetBas =
new QWidget (
this ) ;
74 QBoxLayout * bas =
new QBoxLayout ( QBoxLayout::LeftToRight, WidgetBas ) ;
76 FAffArete =
new QLabel ( *
HTML::decode(
"Weights of edges") ,
79 FGetArete =
new QPushButton (
"Get" , WidgetBas ) ;
80 FSetArete =
new QPushButton (
"Set" , WidgetBas) ;
81 FNextArete =
new QPushButton (
" >>" , WidgetBas ) ;
83 bas -> addWidget ( FAffArete ) ;
84 bas -> addWidget ( FSaisie[1] ) ;
85 bas -> addWidget ( FGetArete ) ;
86 bas -> addWidget ( FSetArete ) ;
87 bas -> addWidget ( FNextArete ) ;
89 FClose =
new QPushButton (
"Close" ,
this ) ;
90 QObject :: connect ( FClose ,
91 SIGNAL ( clicked ( ) ) ,
93 SLOT ( close ( ) ) ) ;
94 FClose -> setFocus ( ) ;
95 placement -> addWidget ( WidgetHaut ) ;
96 placement -> addWidget ( WidgetBas ) ;
97 placement -> addWidget ( FClose ) ;
99 QObject :: connect ( FSaisie[0] ,
100 SIGNAL ( valueChanged (
double ) ) ,
104 QObject :: connect ( FGetSommet ,
105 SIGNAL ( clicked ( ) ) ,
108 QObject :: connect ( FSetSommet ,
109 SIGNAL ( clicked ( ) ) ,
113 QObject :: connect ( FNextSommet ,
114 SIGNAL ( clicked ( ) ) ,
119 QObject :: connect ( FSaisie[1] ,
120 SIGNAL ( valueChanged (
double ) ) ,
124 QObject :: connect ( FGetArete ,
125 SIGNAL ( clicked ( ) ) ,
128 QObject :: connect ( FSetArete ,
129 SIGNAL ( clicked ( ) ) ,
132 QObject :: connect ( FNextArete ,
133 SIGNAL ( clicked ( ) ) ,
151 CParameterOperations * p = FParent -> getControler ( )
152 -> getParameterOperations();
154 FSaisie[0] -> setValuef ( p -> getDefaultRoundingCoefForVertices() );
155 FSaisie[1] -> setValuef ( p -> getDefaultRoundingCoefForEdges () );
208 #ifdef MODULE_ROUNDING
210 bool same = FParent ->
212 modeRoundingGetCoefOfMarkedDarts ( ADimension , value ) ;
215 FSaisie [ ADimension ] -> setValuef ( value ) ;
217 #endif // MODULE_ROUNDING
222 #ifdef MODULE_ROUNDING
223 FParent -> getControler ( )
224 ->modeRoundingSetCoefOfMarkedDarts ( ADimension,
225 FSaisie [ ADimension ] -> valuef ( ) ) ;
226 #endif // MODULE_ROUNDING
231 #ifdef MODULE_ROUNDING
232 float result = FParent ->
234 modeRoundingSelectNextCoef ( ADimension ) ;
235 FSaisie [ ADimension ] -> setValuef ( result ) ;
236 FParent -> repaint ( ) ;
237 #endif // MODULE_ROUNDING
245 CParameterOperations * p = FParent ->
246 getControler ( ) -> getParameterOperations ( ) ;
251 p -> setDefaultRoundingCoefForVertices ( k ) ;
255 p -> setDefaultRoundingCoefForEdges ( k ) ;