1 # -*- coding: utf-8 -*-
2 # Copyright (C) 2010-2014 CEA/DEN, EDF R&D, OPEN CASCADE
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, or (at your option) any later version.
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.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 # Author : Renaud Nédélec (OpenCascade S.A.S)
23 from qtsalome import *
25 from t_shape_dialog_ui import Ui_Dialog
28 class TShapeDialog(QDialog):
30 QDialog.__init__(self, None, Qt.Tool)
31 # Set up the user interface from Designer.
36 self.ui.dsb_solidThickness.setEnabled(False)
37 self.ui.label_5.setEnabled(False)
38 self.ui.dsb_bigRadius.setValue(50.0)
39 self.ui.dsb_smallRadius.setValue(40.0)
40 self.ui.dsb_bigHeight.setValue(80.0)
41 self.ui.dsb_smallHeight.setValue(80.0)
48 r1 = self.ui.dsb_bigRadius.value()
49 r2 = self.ui.dsb_smallRadius.value()
50 h1 = self.ui.dsb_bigHeight.value()
51 h2 = self.ui.dsb_smallHeight.value()
53 if self.ui.cb_buildSolid.isChecked():
54 thickness = self.ui.dsb_solidThickness.value()
56 return r1, r2, h1, h2, thickness
72 app = QApplication(sys.argv)
73 Dialog = TShapeDialog()
79 if __name__=="__main__":