1 // Copyright (C) 2014-2015 CEA/DEN, EDF R&D, OPEN CASCADE
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, or (at your option) any later version.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // GEOM GEOMGUI : GUI for Geometry component
21 // File : GEOMBase_DlgSkeleton.cxx
22 // Author : Roman NIKOLAEV, Open CASCADE S.A.S.
24 #include "GEOMBase_DlgSkeleton.h"
27 #include <QGridLayout>
29 #include <QRadioButton>
33 #include <QPushButton>
39 GEOMBase_DlgSkeleton::GEOMBase_DlgSkeleton( QWidget* parent, Qt::WindowFlags flags ) :
48 GEOMBase_DlgSkeleton::~GEOMBase_DlgSkeleton( ) {
55 void GEOMBase_DlgSkeleton::init( ) {
57 gridLayout = new QGridLayout(this);
60 GroupConstructors = new QGroupBox(this);
61 GroupConstructors->setObjectName(QString::fromUtf8("GroupConstructors"));
62 QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
63 sizePolicy.setHorizontalStretch(0);
64 sizePolicy.setVerticalStretch(0);
65 sizePolicy.setHeightForWidth(GroupConstructors->sizePolicy().hasHeightForWidth());
66 GroupConstructors->setSizePolicy(sizePolicy);
67 hboxLayout = new QHBoxLayout(GroupConstructors);
69 RadioButton1 = new QRadioButton(GroupConstructors);
70 hboxLayout->addWidget(RadioButton1);
72 RadioButton2 = new QRadioButton(GroupConstructors);
73 hboxLayout->addWidget(RadioButton2);
75 RadioButton3 = new QRadioButton(GroupConstructors);
76 hboxLayout->addWidget(RadioButton3);
78 RadioButton4 = new QRadioButton(GroupConstructors);
79 hboxLayout->addWidget(RadioButton4);
81 RadioButton5 = new QRadioButton(GroupConstructors);
82 hboxLayout->addWidget(RadioButton5);
83 gridLayout->addWidget(GroupConstructors, 0, 0, 1, 1);
86 GroupBoxName = new QGroupBox(this);
87 sizePolicy.setHeightForWidth(GroupBoxName->sizePolicy().hasHeightForWidth());
88 GroupBoxName->setSizePolicy(sizePolicy);
89 hboxLayout1 = new QHBoxLayout(GroupBoxName);
90 hboxLayout1->setContentsMargins(9, 9, 9, 9);
92 NameLabel = new QLabel(GroupBoxName);
93 NameLabel->setWordWrap(false);
94 hboxLayout1->addWidget(NameLabel);
96 ResultName = new QLineEdit(GroupBoxName);
97 hboxLayout1->addWidget(ResultName);
98 gridLayout->addWidget(GroupBoxName, 1, 0, 1, 1);
100 //Group box with the check-boxes
101 GroupMedium = new QWidget(this);
102 QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Expanding);
103 sizePolicy1.setHorizontalStretch(0);
104 sizePolicy1.setVerticalStretch(0);
105 sizePolicy1.setHeightForWidth(GroupMedium->sizePolicy().hasHeightForWidth());
106 GroupMedium->setSizePolicy(sizePolicy1);
108 gridLayout->addWidget(GroupMedium, 2, 0, 1, 1);
109 GroupBoxPublish = new QGroupBox(this);
110 vboxLayout = new QVBoxLayout(GroupBoxPublish);
112 CheckBoxRestoreSS = new QCheckBox(GroupBoxPublish);
113 vboxLayout->addWidget(CheckBoxRestoreSS);
115 CheckBoxAddPrefix = new QCheckBox(GroupBoxPublish);
116 vboxLayout->addWidget(CheckBoxAddPrefix);
118 CheckBoxPreview = new QCheckBox(GroupBoxPublish);
119 vboxLayout->addWidget(CheckBoxPreview);
120 gridLayout->addWidget(GroupBoxPublish, 3, 0, 1, 1);
123 GroupButtons = new QGroupBox(this);
125 QSizePolicy sizePolicy2(QSizePolicy::Expanding, QSizePolicy::Fixed);
126 sizePolicy2.setHorizontalStretch(0);
127 sizePolicy2.setVerticalStretch(0);
128 sizePolicy2.setHeightForWidth(GroupButtons->sizePolicy().hasHeightForWidth());
129 GroupButtons->setSizePolicy(sizePolicy2);
131 hboxLayout2 = new QHBoxLayout(GroupButtons);
132 hboxLayout2->setContentsMargins(9, 9, 9, 9);
133 buttonOk = new QPushButton(GroupButtons);
134 hboxLayout2->addWidget(buttonOk);
136 buttonApply = new QPushButton(GroupButtons);
137 hboxLayout2->addWidget(buttonApply);
139 QSpacerItem* spacerItem = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum);
140 hboxLayout2->addItem(spacerItem);
142 buttonCancel = new QPushButton(GroupButtons);
143 hboxLayout2->addWidget(buttonCancel);
145 buttonHelp = new QPushButton(GroupButtons);
147 hboxLayout2->addWidget(buttonHelp);
149 gridLayout->addWidget(GroupButtons, 4, 0, 1, 1);
151 setTabOrder(CheckBoxRestoreSS, CheckBoxAddPrefix);
152 setTabOrder(CheckBoxAddPrefix, CheckBoxPreview);
153 setTabOrder(CheckBoxPreview, buttonOk);
154 setTabOrder(buttonOk, buttonApply);
155 setTabOrder(buttonApply, buttonCancel);
156 setTabOrder(buttonCancel, buttonHelp);
157 setTabOrder(buttonHelp, RadioButton1);
158 setTabOrder(RadioButton1, RadioButton2);
159 setTabOrder(RadioButton2, RadioButton3);
160 setTabOrder(RadioButton3, RadioButton4);
161 setTabOrder(RadioButton4, RadioButton5);
162 setTabOrder(RadioButton5, ResultName);
164 buttonOk->setText(tr("A&pply and Close"));
165 buttonApply->setText("&Apply");
166 buttonCancel->setText("&Close");
167 buttonHelp->setText("&Help");