1 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
20 // File : GEOM_DlgRef.cxx
21 // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
24 #include "GEOM_DlgRef.h"
26 //////////////////////////////////////////
27 // DlgRef_1List1Spin1Btn
28 //////////////////////////////////////////
30 DlgRef_1List1Spin1Btn::DlgRef_1List1Spin1Btn( QWidget* parent, Qt::WindowFlags f )
31 : QWidget( parent, f )
36 DlgRef_1List1Spin1Btn::~DlgRef_1List1Spin1Btn()
40 //////////////////////////////////////////
41 // DlgRef_1Sel1Check1List
42 //////////////////////////////////////////
44 DlgRef_1Sel1Check1List::DlgRef_1Sel1Check1List( QWidget* parent, Qt::WindowFlags f )
45 : QWidget( parent, f )
50 DlgRef_1Sel1Check1List::~DlgRef_1Sel1Check1List()
54 //////////////////////////////////////////
56 //////////////////////////////////////////
58 DlgRef_1Sel1Check::DlgRef_1Sel1Check( QWidget* parent, Qt::WindowFlags f )
59 : QWidget( parent, f )
64 DlgRef_1Sel1Check::~DlgRef_1Sel1Check()
68 //////////////////////////////////////////
69 // DlgRef_1Sel1Spin1Check
70 //////////////////////////////////////////
72 DlgRef_1Sel1Spin1Check::DlgRef_1Sel1Spin1Check( QWidget* parent, Qt::WindowFlags f )
73 : QWidget( parent, f )
78 DlgRef_1Sel1Spin1Check::~DlgRef_1Sel1Spin1Check()
82 //////////////////////////////////////////
84 //////////////////////////////////////////
86 DlgRef_1Sel1Spin::DlgRef_1Sel1Spin( QWidget* parent, Qt::WindowFlags f )
87 : QWidget( parent, f )
92 DlgRef_1Sel1Spin::~DlgRef_1Sel1Spin()
96 //////////////////////////////////////////
98 //////////////////////////////////////////
100 DlgRef_1Sel2Spin::DlgRef_1Sel2Spin( QWidget* parent, Qt::WindowFlags f )
101 : QWidget( parent, f )
106 DlgRef_1Sel2Spin::~DlgRef_1Sel2Spin()
110 //////////////////////////////////////////
112 //////////////////////////////////////////
114 DlgRef_1Sel3Check::DlgRef_1Sel3Check( QWidget* parent, Qt::WindowFlags f )
115 : QWidget( parent, f )
120 DlgRef_1Sel3Check::~DlgRef_1Sel3Check()
124 //////////////////////////////////////////
126 //////////////////////////////////////////
128 DlgRef_1Sel3Spin::DlgRef_1Sel3Spin( QWidget* parent, Qt::WindowFlags f )
129 : QWidget( parent, f )
134 DlgRef_1Sel3Spin::~DlgRef_1Sel3Spin()
138 //////////////////////////////////////////
140 //////////////////////////////////////////
142 DlgRef_1Sel4Spin::DlgRef_1Sel4Spin( QWidget* parent, Qt::WindowFlags f )
143 : QWidget( parent, f )
148 DlgRef_1Sel4Spin::~DlgRef_1Sel4Spin()
152 //////////////////////////////////////////
154 //////////////////////////////////////////
156 DlgRef_1Sel5Spin::DlgRef_1Sel5Spin( QWidget* parent, Qt::WindowFlags f )
157 : QWidget( parent, f )
162 DlgRef_1Sel5Spin::~DlgRef_1Sel5Spin()
166 //////////////////////////////////////////
168 //////////////////////////////////////////
170 DlgRef_1Spin::DlgRef_1Spin( QWidget* parent, Qt::WindowFlags f )
171 : QWidget( parent, f )
176 DlgRef_1Spin::~DlgRef_1Spin()
180 //////////////////////////////////////////
182 //////////////////////////////////////////
184 DlgRef_1Sel::DlgRef_1Sel( QWidget* parent, Qt::WindowFlags f )
185 : QWidget( parent, f )
190 DlgRef_1Sel::~DlgRef_1Sel()
194 //////////////////////////////////////////
196 //////////////////////////////////////////
198 DlgRef_2Sel1List::DlgRef_2Sel1List( QWidget* parent, Qt::WindowFlags f )
199 : QWidget( parent, f )
204 DlgRef_2Sel1List::~DlgRef_2Sel1List()
208 //////////////////////////////////////////
209 // DlgRef_2Sel1Spin2Check
210 //////////////////////////////////////////
212 DlgRef_2Sel1Spin2Check::DlgRef_2Sel1Spin2Check( QWidget* parent, Qt::WindowFlags f )
213 : QWidget( parent, f )
218 DlgRef_2Sel1Spin2Check::~DlgRef_2Sel1Spin2Check()
222 //////////////////////////////////////////
224 //////////////////////////////////////////
226 DlgRef_2Sel1Spin::DlgRef_2Sel1Spin( QWidget* parent, Qt::WindowFlags f )
227 : QWidget( parent, f )
232 DlgRef_2Sel1Spin::~DlgRef_2Sel1Spin()
236 //////////////////////////////////////////
237 // DlgRef_2Sel2Spin1Check
238 //////////////////////////////////////////
240 DlgRef_2Sel2Spin1Check::DlgRef_2Sel2Spin1Check( QWidget* parent, Qt::WindowFlags f )
241 : QWidget( parent, f )
246 DlgRef_2Sel2Spin1Check::~DlgRef_2Sel2Spin1Check()
250 //////////////////////////////////////////
252 //////////////////////////////////////////
254 DlgRef_2Sel2Spin::DlgRef_2Sel2Spin( QWidget* parent, Qt::WindowFlags f )
255 : QWidget( parent, f )
260 DlgRef_2Sel2Spin::~DlgRef_2Sel2Spin()
264 //////////////////////////////////////////
266 //////////////////////////////////////////
268 DlgRef_2Sel3Spin::DlgRef_2Sel3Spin( QWidget* parent, Qt::WindowFlags f )
269 : QWidget( parent, f )
274 DlgRef_2Sel3Spin::~DlgRef_2Sel3Spin()
278 //////////////////////////////////////////
279 // DlgRef_2Sel4Spin1Check
280 //////////////////////////////////////////
282 DlgRef_2Sel4Spin1Check::DlgRef_2Sel4Spin1Check( QWidget* parent, Qt::WindowFlags f )
283 : QWidget( parent, f )
288 DlgRef_2Sel4Spin1Check::~DlgRef_2Sel4Spin1Check()
292 //////////////////////////////////////////
294 //////////////////////////////////////////
296 DlgRef_2Sel::DlgRef_2Sel( QWidget* parent, Qt::WindowFlags f )
297 : QWidget( parent, f )
302 DlgRef_2Sel::~DlgRef_2Sel()
306 //////////////////////////////////////////
308 //////////////////////////////////////////
310 DlgRef_2Spin::DlgRef_2Spin( QWidget* parent, Qt::WindowFlags f )
311 : QWidget( parent, f )
316 DlgRef_2Spin::~DlgRef_2Spin()
320 //////////////////////////////////////////
322 //////////////////////////////////////////
324 DlgRef_3Check::DlgRef_3Check( QWidget* parent, Qt::WindowFlags f )
325 : QWidget( parent, f )
330 DlgRef_3Check::~DlgRef_3Check()
334 //////////////////////////////////////////
336 //////////////////////////////////////////
338 DlgRef_3Sel1Check::DlgRef_3Sel1Check( QWidget* parent, Qt::WindowFlags f )
339 : QWidget( parent, f )
344 DlgRef_3Sel1Check::~DlgRef_3Sel1Check()
348 //////////////////////////////////////////
350 //////////////////////////////////////////
352 DlgRef_3Sel1Spin::DlgRef_3Sel1Spin( QWidget* parent, Qt::WindowFlags f )
353 : QWidget( parent, f )
358 DlgRef_3Sel1Spin::~DlgRef_3Sel1Spin()
362 //////////////////////////////////////////
363 // DlgRef_3Sel3Spin1Check
364 //////////////////////////////////////////
366 DlgRef_3Sel3Spin1Check::DlgRef_3Sel3Spin1Check( QWidget* parent, Qt::WindowFlags f )
367 : QWidget( parent, f )
372 DlgRef_3Sel3Spin1Check::~DlgRef_3Sel3Spin1Check()
376 void DlgRef_3Sel3Spin1Check::ShowRows( int fromRow, int toRow, bool toShow )
378 const int maxRows = 6;
380 if ( toRow >= fromRow && fromRow >= 0 && toRow <= maxRows ) {
381 int c = gridLayout1->count();
382 for ( int i = 0; i < c; i++ ) {
383 QWidget* w = gridLayout1->itemAt( i )->widget();
384 int row, col, rowspan, colspan;
385 gridLayout1->getItemPosition( i, &row, &col, &rowspan, &colspan );
386 if ( w && row >= fromRow && row <= toRow )
387 w->setVisible( toShow );
392 //////////////////////////////////////////
393 // DlgRef_3Sel4Spin2Check
394 //////////////////////////////////////////
396 DlgRef_3Sel4Spin2Check::DlgRef_3Sel4Spin2Check( QWidget* parent, Qt::WindowFlags f )
397 : QWidget( parent, f )
402 DlgRef_3Sel4Spin2Check::~DlgRef_3Sel4Spin2Check()
406 //////////////////////////////////////////
408 //////////////////////////////////////////
410 DlgRef_3Sel::DlgRef_3Sel( QWidget* parent, Qt::WindowFlags f )
411 : QWidget( parent, f )
416 DlgRef_3Sel::~DlgRef_3Sel()
420 //////////////////////////////////////////
421 // DlgRef_3Spin1Check
422 //////////////////////////////////////////
424 DlgRef_3Spin1Check::DlgRef_3Spin1Check( QWidget* parent, Qt::WindowFlags f )
425 : QWidget( parent, f )
430 DlgRef_3Spin1Check::~DlgRef_3Spin1Check()
434 //////////////////////////////////////////
436 //////////////////////////////////////////
438 DlgRef_3Spin::DlgRef_3Spin( QWidget* parent, Qt::WindowFlags f )
439 : QWidget( parent, f )
444 DlgRef_3Spin::~DlgRef_3Spin()
448 //////////////////////////////////////////
449 // DlgRef_4Sel1List1Check
450 //////////////////////////////////////////
452 DlgRef_4Sel1List1Check::DlgRef_4Sel1List1Check( QWidget* parent, Qt::WindowFlags f )
453 : QWidget( parent, f )
458 DlgRef_4Sel1List1Check::~DlgRef_4Sel1List1Check()
462 //////////////////////////////////////////
464 //////////////////////////////////////////
466 DlgRef_4Sel1List::DlgRef_4Sel1List( QWidget* parent, Qt::WindowFlags f )
467 : QWidget( parent, f )
472 DlgRef_4Sel1List::~DlgRef_4Sel1List()
476 //////////////////////////////////////////
477 // DlgRef_4Sel1Spin2Check
478 //////////////////////////////////////////
480 DlgRef_4Sel1Spin2Check::DlgRef_4Sel1Spin2Check( QWidget* parent, Qt::WindowFlags f )
481 : QWidget( parent, f )
486 DlgRef_4Sel1Spin2Check::~DlgRef_4Sel1Spin2Check()
490 void DlgRef_4Sel1Spin2Check::ShowRows( int fromRow, int toRow, bool toShow )
492 const int maxRows = 6;
494 if ( toRow >= fromRow && fromRow >= 0 && toRow <= maxRows ) {
495 int c = gridLayout1->count();
496 for ( int i = 0; i < c; i++ ) {
497 QWidget* w = gridLayout1->itemAt( i )->widget();
498 int row, col, rowspan, colspan;
499 gridLayout1->getItemPosition( i, &row, &col, &rowspan, &colspan );
500 if ( w && row >= fromRow && row <= toRow )
501 w->setVisible( toShow );
506 //////////////////////////////////////////
508 //////////////////////////////////////////
510 DlgRef_6Sel::DlgRef_6Sel( QWidget* parent, Qt::WindowFlags f )
511 : QWidget( parent, f )
516 DlgRef_6Sel::~DlgRef_6Sel()
520 //////////////////////////////////////////
522 //////////////////////////////////////////
524 DlgRef_Skeleton::DlgRef_Skeleton( QWidget* parent, Qt::WindowFlags f )
525 : QDialog( parent, f )
530 DlgRef_Skeleton::DlgRef_Skeleton( QWidget* parent, bool modal, Qt::WindowFlags f )
531 : QDialog( parent, f )
537 DlgRef_Skeleton::~DlgRef_Skeleton()