1 // GEOM GEOMGUI : GUI for Geometry component
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
24 // File : DlgRef_4Sel1Spin2Check.cxx
25 // Author : Damien COQUERET
29 #include "DlgRef_4Sel1Spin2Check.h"
32 #include <qpushbutton.h>
33 #include <qlineedit.h>
34 #include <qcheckbox.h>
37 #include <qgroupbox.h>
40 * Constructs a DlgRef_4Sel1Spin2Check which is a child of 'parent', with the
41 * name 'name' and widget flags set to 'f'
43 DlgRef_4Sel1Spin2Check::DlgRef_4Sel1Spin2Check(QWidget* parent, const char* name, WFlags fl)
44 :DlgRef_4Sel1Spin2Check_QTD(parent, name, fl)
46 SpinBox1->close(TRUE);
47 SpinBox_DX = new DlgRef_SpinBox(GroupBox1, "SpinBox_DX");
48 Layout1->addWidget(SpinBox_DX, 4, 2);
53 * Destroys the object and frees any allocated resources
55 DlgRef_4Sel1Spin2Check::~DlgRef_4Sel1Spin2Check()
57 // no need to delete child widgets, Qt does it all for us
60 void DlgRef_4Sel1Spin2Check::ShowRows(int fromRow, int toRow, bool toShow)
62 typedef void (QWidget::* ShowFun)();
66 pShowFun = &QWidget::show;
68 pShowFun = &QWidget::hide;
70 if (fromRow >= 0 && toRow >= 0 && toRow >= fromRow)
74 (TextLabel1->*pShowFun)();
75 (PushButton1->*pShowFun)();
76 (LineEdit1->*pShowFun)();
78 if ( fromRow <= 1 && 1 <= toRow)
80 (TextLabel2->*pShowFun)();
81 (PushButton2->*pShowFun)();
82 (LineEdit2->*pShowFun)();
84 if ( fromRow <= 2 && 2 <= toRow)
86 (TextLabel4->*pShowFun)();
87 (PushButton4->*pShowFun)();
88 (LineEdit4->*pShowFun)();
90 if ( fromRow <= 3 && 3 <= toRow)
92 (TextLabel5->*pShowFun)();
93 (PushButton5->*pShowFun)();
94 (LineEdit5->*pShowFun)();
96 if ( fromRow <= 4 && 4 <= toRow)
98 (TextLabel3->*pShowFun)();
99 (SpinBox_DX->*pShowFun)();
100 (CheckButton2->*pShowFun)();
102 if ( fromRow <= 5 && 5 <= toRow)
103 (CheckButton1->*pShowFun)();