Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/geom.git] / src / DlgRef / DlgRef.cxx
1 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 // File   : DlgRef.cxx
21 // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
22
23 #include "DlgRef.h"
24
25 //////////////////////////////////////////
26 // DlgRef_1List1Spin1Btn
27 //////////////////////////////////////////
28
29 DlgRef_1List1Spin1Btn::DlgRef_1List1Spin1Btn( QWidget* parent, Qt::WindowFlags f )
30 : QWidget( parent, f )
31 {
32   setupUi( this );
33 }
34
35 DlgRef_1List1Spin1Btn::~DlgRef_1List1Spin1Btn()
36 {
37 }
38
39 //////////////////////////////////////////
40 // DlgRef_1Sel1Check1List
41 //////////////////////////////////////////
42
43 DlgRef_1Sel1Check1List::DlgRef_1Sel1Check1List( QWidget* parent, Qt::WindowFlags f )
44 : QWidget( parent, f )
45 {
46   setupUi( this );
47 }
48
49 DlgRef_1Sel1Check1List::~DlgRef_1Sel1Check1List()
50 {
51 }
52
53 //////////////////////////////////////////
54 // DlgRef_1Sel1Check1Sel
55 //////////////////////////////////////////
56
57 DlgRef_1Sel1Check1Sel::DlgRef_1Sel1Check1Sel( QWidget* parent, Qt::WindowFlags f )
58 : QWidget( parent, f )
59 {
60   setupUi( this );
61 }
62
63 DlgRef_1Sel1Check1Sel::~DlgRef_1Sel1Check1Sel()
64 {
65 }
66
67 //////////////////////////////////////////
68 // DlgRef_1Sel1Check
69 //////////////////////////////////////////
70
71 DlgRef_1Sel1Check::DlgRef_1Sel1Check( QWidget* parent, Qt::WindowFlags f )
72 : QWidget( parent, f )
73 {
74   setupUi( this );
75 }
76
77 DlgRef_1Sel1Check::~DlgRef_1Sel1Check()
78 {
79 }
80
81 //////////////////////////////////////////
82 // DlgRef_1Sel1Frame
83 //////////////////////////////////////////
84
85 DlgRef_1Sel1Frame::DlgRef_1Sel1Frame( QWidget* parent, Qt::WindowFlags f )
86 : QWidget( parent, f )
87 {
88   setupUi( this );
89 }
90
91 DlgRef_1Sel1Frame::~DlgRef_1Sel1Frame()
92 {
93 }
94
95 //////////////////////////////////////////
96 // DlgRef_1Sel1List1Check3Btn
97 //////////////////////////////////////////
98
99 DlgRef_1Sel1List1Check3Btn::DlgRef_1Sel1List1Check3Btn( QWidget* parent, Qt::WindowFlags f )
100 : QWidget( parent, f )
101 {
102   setupUi( this );
103 }
104
105 DlgRef_1Sel1List1Check3Btn::~DlgRef_1Sel1List1Check3Btn()
106 {
107 }
108
109 //////////////////////////////////////////
110 // DlgRef_1Sel1Spin1Check
111 //////////////////////////////////////////
112
113 DlgRef_1Sel1Spin1Check::DlgRef_1Sel1Spin1Check( QWidget* parent, Qt::WindowFlags f )
114 : QWidget( parent, f )
115 {
116   setupUi( this );
117 }
118
119 DlgRef_1Sel1Spin1Check::~DlgRef_1Sel1Spin1Check()
120 {
121 }
122
123 //////////////////////////////////////////
124 // DlgRef_1Sel1Spin
125 //////////////////////////////////////////
126
127 DlgRef_1Sel1Spin::DlgRef_1Sel1Spin( QWidget* parent, Qt::WindowFlags f )
128 : QWidget( parent, f )
129 {
130   setupUi( this );
131 }
132
133 DlgRef_1Sel1Spin::~DlgRef_1Sel1Spin()
134 {
135 }
136
137 //////////////////////////////////////////
138 // DlgRef_1Sel2Spin1View1Check
139 //////////////////////////////////////////
140
141 DlgRef_1Sel2Spin1View1Check::DlgRef_1Sel2Spin1View1Check( QWidget* parent, Qt::WindowFlags f )
142 : QWidget( parent, f )
143 {
144   setupUi( this );
145 }
146
147 DlgRef_1Sel2Spin1View1Check::~DlgRef_1Sel2Spin1View1Check()
148 {
149 }
150
151 //////////////////////////////////////////
152 // DlgRef_1Sel2Spin
153 //////////////////////////////////////////
154
155 DlgRef_1Sel2Spin::DlgRef_1Sel2Spin( QWidget* parent, Qt::WindowFlags f )
156 : QWidget( parent, f )
157 {
158   setupUi( this );
159 }
160
161 DlgRef_1Sel2Spin::~DlgRef_1Sel2Spin()
162 {
163 }
164
165 //////////////////////////////////////////
166 // DlgRef_1Sel3Check
167 //////////////////////////////////////////
168
169 DlgRef_1Sel3Check::DlgRef_1Sel3Check( QWidget* parent, Qt::WindowFlags f )
170 : QWidget( parent, f )
171 {
172   setupUi( this );
173 }
174
175 DlgRef_1Sel3Check::~DlgRef_1Sel3Check()
176 {
177 }
178
179 //////////////////////////////////////////
180 // DlgRef_1Sel3Spin
181 //////////////////////////////////////////
182
183 DlgRef_1Sel3Spin::DlgRef_1Sel3Spin( QWidget* parent, Qt::WindowFlags f )
184 : QWidget( parent, f )
185 {
186   setupUi( this );
187 }
188
189 DlgRef_1Sel3Spin::~DlgRef_1Sel3Spin()
190 {
191 }
192
193 //////////////////////////////////////////
194 // DlgRef_1Sel3Spin2Check1Spin
195 //////////////////////////////////////////
196
197 DlgRef_1Sel3Spin2Check1Spin::DlgRef_1Sel3Spin2Check1Spin( QWidget* parent, Qt::WindowFlags f )
198 : QWidget( parent, f )
199 {
200   setupUi( this );
201 }
202
203 DlgRef_1Sel3Spin2Check1Spin::~DlgRef_1Sel3Spin2Check1Spin()
204 {
205 }
206
207 //////////////////////////////////////////
208 // DlgRef_1Sel3Spin1Check
209 //////////////////////////////////////////
210
211 DlgRef_1Sel3Spin1Check::DlgRef_1Sel3Spin1Check( QWidget* parent, Qt::WindowFlags f )
212 : QWidget( parent, f )
213 {
214   setupUi( this );
215 }
216
217 DlgRef_1Sel3Spin1Check::~DlgRef_1Sel3Spin1Check()
218 {
219 }
220
221 //////////////////////////////////////////
222 // DlgRef_1Sel4Spin2Check
223 //////////////////////////////////////////
224
225 DlgRef_1Sel4Spin2Check::DlgRef_1Sel4Spin2Check( QWidget* parent, Qt::WindowFlags f )
226 : QWidget( parent, f )
227 {
228   setupUi( this );
229 }
230
231 DlgRef_1Sel4Spin2Check::~DlgRef_1Sel4Spin2Check()
232 {
233 }
234
235 //////////////////////////////////////////
236 // DlgRef_1Sel4Spin
237 //////////////////////////////////////////
238
239 DlgRef_1Sel4Spin::DlgRef_1Sel4Spin( QWidget* parent, Qt::WindowFlags f )
240 : QWidget( parent, f )
241 {
242   setupUi( this );
243 }
244
245 DlgRef_1Sel4Spin::~DlgRef_1Sel4Spin()
246 {
247 }
248
249 //////////////////////////////////////////
250 // DlgRef_1Sel5Spin1Check
251 //////////////////////////////////////////
252
253 DlgRef_1Sel5Spin1Check::DlgRef_1Sel5Spin1Check( QWidget* parent, Qt::WindowFlags f )
254 : QWidget( parent, f )
255 {
256   setupUi( this );
257 }
258
259 DlgRef_1Sel5Spin1Check::~DlgRef_1Sel5Spin1Check()
260 {
261 }
262
263 //////////////////////////////////////////
264 // DlgRef_1Sel5Spin
265 //////////////////////////////////////////
266
267 DlgRef_1Sel5Spin::DlgRef_1Sel5Spin( QWidget* parent, Qt::WindowFlags f )
268 : QWidget( parent, f )
269 {
270   setupUi( this );
271 }
272
273 DlgRef_1Sel5Spin::~DlgRef_1Sel5Spin()
274 {
275 }
276
277 //////////////////////////////////////////
278 // DlgRef_1Spin
279 //////////////////////////////////////////
280
281 DlgRef_1Spin::DlgRef_1Spin( QWidget* parent, Qt::WindowFlags f )
282 : QWidget( parent, f )
283 {
284   setupUi( this );
285 }
286
287 DlgRef_1Spin::~DlgRef_1Spin()
288 {
289 }
290
291 //////////////////////////////////////////
292 // DlgRef_1Sel
293 //////////////////////////////////////////
294
295 DlgRef_1Sel::DlgRef_1Sel( QWidget* parent, Qt::WindowFlags f )
296 : QWidget( parent, f )
297 {
298   setupUi( this );
299 }
300
301 DlgRef_1Sel::~DlgRef_1Sel()
302 {
303 }
304
305 //////////////////////////////////////////
306 // DlgRef_1SelExt
307 //////////////////////////////////////////
308
309 DlgRef_1SelExt::DlgRef_1SelExt( QWidget* parent, Qt::WindowFlags f )
310 : QWidget( parent, f )
311 {
312   setupUi( this );
313 }
314
315 DlgRef_1SelExt::~DlgRef_1SelExt()
316 {
317 }
318
319 //////////////////////////////////////////
320 // DlgRef_2Sel1List1Check
321 //////////////////////////////////////////
322
323 DlgRef_2Sel1List1Check::DlgRef_2Sel1List1Check( QWidget* parent, Qt::WindowFlags f )
324 : QWidget( parent, f )
325 {
326   setupUi( this );
327 }
328
329 DlgRef_2Sel1List1Check::~DlgRef_2Sel1List1Check()
330 {
331 }
332
333 //////////////////////////////////////////
334 // DlgRef_2Sel1List2Check
335 //////////////////////////////////////////
336
337 DlgRef_2Sel1List2Check::DlgRef_2Sel1List2Check( QWidget* parent, Qt::WindowFlags f )
338 : QWidget( parent, f )
339 {
340   setupUi( this );
341 }
342
343 DlgRef_2Sel1List2Check::~DlgRef_2Sel1List2Check()
344 {
345 }
346
347 //////////////////////////////////////////
348 // DlgRef_2Sel1List
349 //////////////////////////////////////////
350
351 DlgRef_2Sel1List::DlgRef_2Sel1List( QWidget* parent, Qt::WindowFlags f )
352 : QWidget( parent, f )
353 {
354   setupUi( this );
355 }
356
357 DlgRef_2Sel1List::~DlgRef_2Sel1List()
358 {
359 }
360
361 //////////////////////////////////////////
362 // DlgRef_2Sel1Spin2Check
363 //////////////////////////////////////////
364
365 DlgRef_2Sel1Spin2Check::DlgRef_2Sel1Spin2Check( QWidget* parent, Qt::WindowFlags f )
366 : QWidget( parent, f )
367 {
368   setupUi( this );
369 }
370
371 DlgRef_2Sel1Spin2Check::~DlgRef_2Sel1Spin2Check()
372 {
373 }
374
375 //////////////////////////////////////////
376 // DlgRef_2Sel1Spin3Check1Spin
377 //////////////////////////////////////////
378
379 DlgRef_2Sel1Spin3Check1Spin::DlgRef_2Sel1Spin3Check1Spin( QWidget* parent, Qt::WindowFlags f )
380 : QWidget( parent, f )
381 {
382   setupUi( this );
383 }
384
385 DlgRef_2Sel1Spin3Check1Spin::~DlgRef_2Sel1Spin3Check1Spin()
386 {
387 }
388
389 //////////////////////////////////////////
390 // DlgRef_2Sel1Spin
391 //////////////////////////////////////////
392
393 DlgRef_2Sel1Spin::DlgRef_2Sel1Spin( QWidget* parent, Qt::WindowFlags f )
394 : QWidget( parent, f )
395 {
396   setupUi( this );
397 }
398
399 DlgRef_2Sel1Spin::~DlgRef_2Sel1Spin()
400 {
401 }
402
403 //////////////////////////////////////////
404 // DlgRef_2Sel1SpinInt
405 //////////////////////////////////////////
406
407 DlgRef_2Sel1SpinInt::DlgRef_2Sel1SpinInt( QWidget* parent, Qt::WindowFlags f )
408 : QWidget( parent, f )
409 {
410   setupUi( this );
411 }
412
413 DlgRef_2Sel1SpinInt::~DlgRef_2Sel1SpinInt()
414 {
415 }
416
417 //////////////////////////////////////////
418 // DlgRef_2Sel2List
419 //////////////////////////////////////////
420
421 DlgRef_2Sel2List::DlgRef_2Sel2List( QWidget* parent, Qt::WindowFlags f )
422 : QWidget( parent, f )
423 {
424   setupUi( this );
425 }
426
427 DlgRef_2Sel2List::~DlgRef_2Sel2List()
428 {
429 }
430
431 //////////////////////////////////////////
432 // DlgRef_2Sel2Spin1Check
433 //////////////////////////////////////////
434
435 DlgRef_2Sel2Spin1Check::DlgRef_2Sel2Spin1Check( QWidget* parent, Qt::WindowFlags f )
436 : QWidget( parent, f )
437 {
438   setupUi( this );
439 }
440
441 DlgRef_2Sel2Spin1Check::~DlgRef_2Sel2Spin1Check()
442 {
443 }
444
445 //////////////////////////////////////////
446 // DlgRef_2Sel2Spin3Check
447 //////////////////////////////////////////
448
449 DlgRef_2Sel2Spin3Check::DlgRef_2Sel2Spin3Check( QWidget* parent, Qt::WindowFlags f )
450 : QWidget( parent, f )
451 {
452   setupUi( this );
453 }
454
455 DlgRef_2Sel2Spin3Check::~DlgRef_2Sel2Spin3Check()
456 {
457 }
458
459 //////////////////////////////////////////
460 // DlgRef_2Sel2Spin
461 //////////////////////////////////////////
462
463 DlgRef_2Sel2Spin::DlgRef_2Sel2Spin( QWidget* parent, Qt::WindowFlags f )
464 : QWidget( parent, f )
465 {
466   setupUi( this );
467 }
468
469 DlgRef_2Sel2Spin::~DlgRef_2Sel2Spin()
470 {
471 }
472
473 //////////////////////////////////////////
474 // DlgRef_2Sel2Spin1Push
475 //////////////////////////////////////////
476
477 DlgRef_2Sel2Spin1Push::DlgRef_2Sel2Spin1Push( QWidget* parent, Qt::WindowFlags f )
478 : QWidget( parent, f )
479 {
480   setupUi( this );
481 }
482
483 DlgRef_2Sel2Spin1Push::~DlgRef_2Sel2Spin1Push()
484 {
485 }
486
487 //////////////////////////////////////////
488 // DlgRef_2Sel2Spin2Push
489 //////////////////////////////////////////
490
491 DlgRef_2Sel2Spin2Push::DlgRef_2Sel2Spin2Push( QWidget* parent, Qt::WindowFlags f )
492 : QWidget( parent, f )
493 {
494   setupUi( this );
495 }
496
497 DlgRef_2Sel2Spin2Push::~DlgRef_2Sel2Spin2Push()
498 {
499 }
500
501 //////////////////////////////////////////
502 // DlgRef_2Sel3Spin2Rb
503 //////////////////////////////////////////
504
505 DlgRef_2Sel3Spin2Rb::DlgRef_2Sel3Spin2Rb( QWidget* parent, Qt::WindowFlags f )
506 : QWidget( parent, f )
507 {
508   setupUi( this );
509 }
510
511 DlgRef_2Sel3Spin2Rb::~DlgRef_2Sel3Spin2Rb()
512 {
513 }
514
515 //////////////////////////////////////////
516 // DlgRef_2Sel3Spin
517 //////////////////////////////////////////
518
519 DlgRef_2Sel3Spin::DlgRef_2Sel3Spin( QWidget* parent, Qt::WindowFlags f )
520 : QWidget( parent, f )
521 {
522   setupUi( this );
523 }
524
525 DlgRef_2Sel3Spin::~DlgRef_2Sel3Spin()
526 {
527 }
528
529 //////////////////////////////////////////
530 // DlgRef_2Sel4Spin1Check
531 //////////////////////////////////////////
532
533 DlgRef_2Sel4Spin1Check::DlgRef_2Sel4Spin1Check( QWidget* parent, Qt::WindowFlags f )
534 : QWidget( parent, f )
535 {
536   setupUi( this );
537 }
538
539 DlgRef_2Sel4Spin1Check::~DlgRef_2Sel4Spin1Check()
540 {
541 }
542
543 //////////////////////////////////////////
544 // DlgRef_2Sel
545 //////////////////////////////////////////
546
547 DlgRef_2Sel::DlgRef_2Sel( QWidget* parent, Qt::WindowFlags f )
548 : QWidget( parent, f )
549 {
550   setupUi( this );
551 }
552
553 DlgRef_2Sel::~DlgRef_2Sel()
554 {
555 }
556
557 //////////////////////////////////////////
558 // DlgRef_2SelExt
559 //////////////////////////////////////////
560
561 DlgRef_2SelExt::DlgRef_2SelExt( QWidget* parent, Qt::WindowFlags f )
562 : QWidget( parent, f )
563 {
564   setupUi( this );
565 }
566
567 DlgRef_2SelExt::~DlgRef_2SelExt()
568 {
569 }
570
571 //////////////////////////////////////////
572 // DlgRef_2Spin
573 //////////////////////////////////////////
574
575 DlgRef_2Spin::DlgRef_2Spin( QWidget* parent, Qt::WindowFlags f )
576 : QWidget( parent, f )
577 {
578   setupUi( this );
579 }
580
581 DlgRef_2Spin::~DlgRef_2Spin()
582 {
583 }
584
585 //////////////////////////////////////////
586 // DlgRef_3Check
587 //////////////////////////////////////////
588
589 DlgRef_3Check::DlgRef_3Check( QWidget* parent, Qt::WindowFlags f )
590 : QWidget( parent, f )
591 {
592   setupUi( this );
593 }
594
595 DlgRef_3Check::~DlgRef_3Check()
596 {
597 }
598
599 //////////////////////////////////////////
600 // DlgRef_3Radio
601 //////////////////////////////////////////
602
603 DlgRef_3Radio::DlgRef_3Radio( QWidget* parent, Qt::WindowFlags f )
604 : QWidget( parent, f )
605 {
606   setupUi( this );
607 }
608
609 DlgRef_3Radio::~DlgRef_3Radio()
610 {
611 }
612
613 //////////////////////////////////////////
614 // DlgRef_3Radio1Sel1Spin
615 //////////////////////////////////////////
616
617 DlgRef_3Radio1Sel1Spin::DlgRef_3Radio1Sel1Spin( QWidget* parent, Qt::WindowFlags f )
618 : QWidget( parent, f )
619 {
620   setupUi( this );
621 }
622
623 DlgRef_3Radio1Sel1Spin::~DlgRef_3Radio1Sel1Spin()
624 {
625 }
626
627 //////////////////////////////////////////
628 // DlgRef_3Sel1Check
629 //////////////////////////////////////////
630
631 DlgRef_3Sel1Check::DlgRef_3Sel1Check( QWidget* parent, Qt::WindowFlags f )
632 : QWidget( parent, f )
633 {
634   setupUi( this );
635 }
636
637 DlgRef_3Sel1Check::~DlgRef_3Sel1Check()
638 {
639 }
640
641 //////////////////////////////////////////
642 // DlgRef_3Sel1Spin
643 //////////////////////////////////////////
644
645 DlgRef_3Sel1Spin::DlgRef_3Sel1Spin( QWidget* parent, Qt::WindowFlags f )
646 : QWidget( parent, f )
647 {
648   setupUi( this );
649 }
650
651 DlgRef_3Sel1Spin::~DlgRef_3Sel1Spin()
652 {
653 }
654
655 //////////////////////////////////////////
656 // DlgRef_3Sel2Spin
657 //////////////////////////////////////////
658
659 DlgRef_3Sel2Spin::DlgRef_3Sel2Spin( QWidget* parent, Qt::WindowFlags f )
660 : QWidget( parent, f )
661 {
662   setupUi( this );
663 }
664
665 DlgRef_3Sel2Spin::~DlgRef_3Sel2Spin()
666 {
667 }
668
669 //////////////////////////////////////////
670 // DlgRef_3Sel3Spin1Check
671 //////////////////////////////////////////
672
673 DlgRef_3Sel3Spin1Check::DlgRef_3Sel3Spin1Check( QWidget* parent, Qt::WindowFlags f )
674 : QWidget( parent, f )
675 {
676   setupUi( this );
677 }
678
679 DlgRef_3Sel3Spin1Check::~DlgRef_3Sel3Spin1Check()
680 {
681 }
682
683 void DlgRef_3Sel3Spin1Check::ShowRows( int fromRow, int toRow, bool toShow )
684 {
685   const int maxRows = 7;
686   
687   if ( toRow >= fromRow && fromRow >= 0 && toRow <= maxRows ) {
688     int c = gridLayout1->count();
689     for ( int i = 0; i < c; i++ ) {
690       QWidget* w = gridLayout1->itemAt( i )->widget();
691       int row, col, rowspan, colspan;
692       gridLayout1->getItemPosition( i, &row, &col, &rowspan, &colspan );
693       if ( w && row >= fromRow && row <= toRow )
694         w->setVisible( toShow );
695     }
696   }
697 }
698
699 //////////////////////////////////////////
700 // DlgRef_3Sel2Check3Spin
701 //////////////////////////////////////////
702
703 DlgRef_3Sel2Check3Spin::DlgRef_3Sel2Check3Spin( QWidget* parent, Qt::WindowFlags f )
704 : QWidget( parent, f )
705 {
706   setupUi( this );
707 }
708
709 DlgRef_3Sel2Check3Spin::~DlgRef_3Sel2Check3Spin()
710 {
711 }
712
713 void DlgRef_3Sel2Check3Spin::ShowRows( int fromRow, int toRow, bool toShow )
714 {
715   const int maxRows = 8;
716   
717   if ( toRow >= fromRow && fromRow >= 0 && toRow <= maxRows ) {
718     int c = gridLayout1->count();
719     for ( int i = 0; i < c; i++ ) {
720       QWidget* w = gridLayout1->itemAt( i )->widget();
721       int row, col, rowspan, colspan;
722       gridLayout1->getItemPosition( i, &row, &col, &rowspan, &colspan );
723       if ( w && row >= fromRow && row <= toRow )
724         w->setVisible( toShow );
725     }
726   }
727 }
728
729 //////////////////////////////////////////
730 // DlgRef_3Sel3Spin2Check
731 //////////////////////////////////////////
732
733 DlgRef_3Sel3Spin2Check::DlgRef_3Sel3Spin2Check( QWidget* parent, Qt::WindowFlags f )
734 : QWidget( parent, f )
735 {
736   setupUi( this );
737 }
738
739 DlgRef_3Sel3Spin2Check::~DlgRef_3Sel3Spin2Check()
740 {
741 }
742
743 void DlgRef_3Sel3Spin2Check::ShowRows( int fromRow, int toRow, bool toShow )
744 {
745   const int maxRows = 8;
746   
747   if ( toRow >= fromRow && fromRow >= 0 && toRow <= maxRows ) {
748     int c = gridLayout1->count();
749     for ( int i = 0; i < c; i++ ) {
750       QWidget* w = gridLayout1->itemAt( i )->widget();
751       int row, col, rowspan, colspan;
752       gridLayout1->getItemPosition( i, &row, &col, &rowspan, &colspan );
753       if ( w && row >= fromRow && row <= toRow )
754         w->setVisible( toShow );
755     }
756   }
757 }
758
759 //////////////////////////////////////////
760 // DlgRef_3Sel4Spin2Check
761 //////////////////////////////////////////
762
763 DlgRef_3Sel4Spin2Check::DlgRef_3Sel4Spin2Check( QWidget* parent, Qt::WindowFlags f )
764 : QWidget( parent, f )
765 {
766   setupUi( this );
767 }
768
769 DlgRef_3Sel4Spin2Check::~DlgRef_3Sel4Spin2Check()
770 {
771 }
772
773 //////////////////////////////////////////
774 // DlgRef_3Sel
775 //////////////////////////////////////////
776
777 DlgRef_3Sel::DlgRef_3Sel( QWidget* parent, Qt::WindowFlags f )
778 : QWidget( parent, f )
779 {
780   setupUi( this );
781 }
782
783 DlgRef_3Sel::~DlgRef_3Sel()
784 {
785 }
786
787 //////////////////////////////////////////
788 // DlgRef_3Spin1Check
789 //////////////////////////////////////////
790
791 DlgRef_3Spin1Check::DlgRef_3Spin1Check( QWidget* parent, Qt::WindowFlags f )
792 : QWidget( parent, f )
793 {
794   setupUi( this );
795 }
796
797 DlgRef_3Spin1Check::~DlgRef_3Spin1Check()
798 {
799 }
800
801 //////////////////////////////////////////
802 // DlgRef_3Spin
803 //////////////////////////////////////////
804
805 DlgRef_3Spin::DlgRef_3Spin( QWidget* parent, Qt::WindowFlags f )
806 : QWidget( parent, f )
807 {
808   setupUi( this );
809 }
810
811 DlgRef_3Spin::~DlgRef_3Spin()
812 {
813 }
814
815 //////////////////////////////////////////
816 // DlgRef_4Spin
817 //////////////////////////////////////////
818
819 DlgRef_4Spin::DlgRef_4Spin( QWidget* parent, Qt::WindowFlags f )
820 : QWidget( parent, f )
821 {
822   setupUi( this );
823 }
824
825 DlgRef_4Spin::~DlgRef_4Spin()
826 {
827 }
828
829 //////////////////////////////////////////
830 // DlgRef_4Sel1List1Check
831 //////////////////////////////////////////
832
833 DlgRef_4Sel1List1Check::DlgRef_4Sel1List1Check( QWidget* parent, Qt::WindowFlags f )
834 : QWidget( parent, f )
835 {
836   setupUi( this );
837 }
838
839 DlgRef_4Sel1List1Check::~DlgRef_4Sel1List1Check()
840 {
841 }
842
843 //////////////////////////////////////////
844 // DlgRef_4Sel1List
845 //////////////////////////////////////////
846
847 DlgRef_4Sel1List::DlgRef_4Sel1List( QWidget* parent, Qt::WindowFlags f )
848 : QWidget( parent, f )
849 {
850   setupUi( this );
851 }
852
853 DlgRef_4Sel1List::~DlgRef_4Sel1List()
854 {
855 }
856
857 //////////////////////////////////////////
858 // DlgRef_4Sel1Spin2Check
859 //////////////////////////////////////////
860
861 DlgRef_4Sel1Spin2Check::DlgRef_4Sel1Spin2Check( QWidget* parent, Qt::WindowFlags f )
862 : QWidget( parent, f )
863 {
864   setupUi( this );
865 }
866
867 DlgRef_4Sel1Spin2Check::~DlgRef_4Sel1Spin2Check()
868 {
869 }
870
871 void DlgRef_4Sel1Spin2Check::ShowRows( int fromRow, int toRow, bool toShow )
872 {
873   const int maxRows = 6;
874   
875   if ( toRow >= fromRow && fromRow >= 0 && toRow <= maxRows ) {
876     int c = gridLayout1->count();
877     for ( int i = 0; i < c; i++ ) {
878       QWidget* w = gridLayout1->itemAt( i )->widget();
879       int row, col, rowspan, colspan;
880       gridLayout1->getItemPosition( i, &row, &col, &rowspan, &colspan );
881       if ( w && row >= fromRow && row <= toRow )
882         w->setVisible( toShow );
883     }
884   }
885 }
886
887 //////////////////////////////////////////
888 // DlgRef_4Sel1Spin3Check
889 //////////////////////////////////////////
890
891 DlgRef_4Sel1Spin3Check::DlgRef_4Sel1Spin3Check( QWidget* parent, Qt::WindowFlags f )
892 : QWidget( parent, f )
893 {
894   setupUi( this );
895 }
896
897 DlgRef_4Sel1Spin3Check::~DlgRef_4Sel1Spin3Check()
898 {
899 }
900
901 //////////////////////////////////////////
902 // DlgRef_6Sel
903 //////////////////////////////////////////
904
905 DlgRef_6Sel::DlgRef_6Sel( QWidget* parent, Qt::WindowFlags f )
906 : QWidget( parent, f )
907 {
908   setupUi( this );
909 }
910
911 DlgRef_6Sel::~DlgRef_6Sel()
912 {
913 }
914
915 //////////////////////////////////////////
916 // DlgRef_Skeleton
917 //////////////////////////////////////////
918
919 DlgRef_Skeleton::DlgRef_Skeleton( QWidget* parent, Qt::WindowFlags f )
920 : QWidget( parent, f )
921 {
922   setupUi( this );
923 }
924
925 DlgRef_Skeleton::~DlgRef_Skeleton()
926 {
927 }
928
929 //////////////////////////////////////////
930 // Utility functions
931 //////////////////////////////////////////
932
933 QString DlgRef::PrintDoubleValue( double theValue, int thePrecision )
934 {
935   const double prec = 1e-12;
936   
937   if ( qAbs(theValue) < prec )
938     return "0";
939
940   QString aRes = QLocale().toString( theValue, thePrecision >= 0 ? 'f' : 'g', qAbs( thePrecision ) );
941
942   if ( prec > 0 ) {
943     int p = 0;
944     while ( p < thePrecision ) {
945       QString aRes = QLocale().toString( theValue, thePrecision >= 0 ? 'f' : 'g', qAbs( p++ ) );
946       double v = aRes.toDouble();
947       double err = qAbs( theValue - v );
948       if ( err > 0 && err <= prec )
949         break;
950     }
951   }
952
953   // remove trailing zeroes
954
955   QRegExp expre( QString( "(%1|%2)[+-]?[0-9]+$" ).arg( QLocale().exponential().toLower(), 
956                                                        QLocale().exponential().toUpper() ) );
957
958   int idx = aRes.indexOf( expre );
959   QString aResExp = "";
960   if ( idx >= 0 ) {
961     aResExp = aRes.mid( idx );
962     aRes = aRes.left( idx );
963   }
964
965   if ( aRes.contains( QLocale().decimalPoint() ) )
966     aRes.remove( QRegExp( QString( "(\\%1|0)0*$" ).arg( QLocale().decimalPoint() ) ) );
967
968   return aRes == "-0" ? QString( "0" ) : aRes + aResExp;
969 }