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