1 // Copyright (C) 2011-2024 CEA, EDF
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 #ifndef MON_CREATELISTGROUPCAO_H
21 #define MON_CREATELISTGROUPCAO_H
23 #include "SMESH_SMESHGUI.hxx"
25 #include <SALOMEconfig.h>
26 #include <SalomeApp_Module.h>
28 //#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
29 #include CORBA_CLIENT_HEADER(SMESH_Homard)
32 #include <QtCore/QVariant>
33 #include <QtWidgets/QApplication>
34 #include <QtWidgets/QDialog>
35 #include <QtWidgets/QGridLayout>
36 #include <QtWidgets/QGroupBox>
37 #include <QtWidgets/QHeaderView>
38 #include <QtWidgets/QPushButton>
39 #include <QtWidgets/QTableWidget>
41 class SMESH_CreateBoundaryCAO;
42 class SMESH_CreateBoundaryDi;
47 class SMESH_Ui_CreateListGroup
50 QGridLayout *gridLayout;
52 QGridLayout *gridLayout1;
53 QPushButton *buttonHelp;
54 QPushButton *buttonCancel;
55 QPushButton *buttonApply;
56 QPushButton *buttonOk;
58 QGridLayout *gridLayout2;
59 QTableWidget *TWGroupe;
61 void setupUi(QDialog *CreateListGroup)
63 if (CreateListGroup->objectName().isEmpty())
64 CreateListGroup->setObjectName(QString::fromUtf8("CreateListGroup"));
65 CreateListGroup->resize(717, 600);
66 QSizePolicy sizePolicy(static_cast<QSizePolicy::Policy>(0), static_cast<QSizePolicy::Policy>(0));
67 sizePolicy.setHorizontalStretch(0);
68 sizePolicy.setVerticalStretch(0);
69 sizePolicy.setHeightForWidth(CreateListGroup->sizePolicy().hasHeightForWidth());
70 CreateListGroup->setSizePolicy(sizePolicy);
71 CreateListGroup->setAutoFillBackground(true);
72 CreateListGroup->setSizeGripEnabled(true);
73 gridLayout = new QGridLayout(CreateListGroup);
75 gridLayout->setSpacing(6);
78 gridLayout->setContentsMargins(9, 9, 9, 9);
80 gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
81 GBButtons = new QGroupBox(CreateListGroup);
82 GBButtons->setObjectName(QString::fromUtf8("GBButtons"));
83 gridLayout1 = new QGridLayout(GBButtons);
85 gridLayout1->setSpacing(6);
88 gridLayout1->setContentsMargins(9, 9, 9, 9);
90 gridLayout1->setObjectName(QString::fromUtf8("gridLayout1"));
91 buttonHelp = new QPushButton(GBButtons);
92 buttonHelp->setObjectName(QString::fromUtf8("buttonHelp"));
94 gridLayout1->addWidget(buttonHelp, 0, 3, 1, 1);
96 buttonCancel = new QPushButton(GBButtons);
97 buttonCancel->setObjectName(QString::fromUtf8("buttonCancel"));
99 gridLayout1->addWidget(buttonCancel, 0, 2, 1, 1);
101 buttonApply = new QPushButton(GBButtons);
102 buttonApply->setObjectName(QString::fromUtf8("buttonApply"));
104 gridLayout1->addWidget(buttonApply, 0, 1, 1, 1);
106 buttonOk = new QPushButton(GBButtons);
107 buttonOk->setObjectName(QString::fromUtf8("buttonOk"));
109 gridLayout1->addWidget(buttonOk, 0, 0, 1, 1);
112 gridLayout->addWidget(GBButtons, 1, 0, 1, 1);
114 GBOptions = new QGroupBox(CreateListGroup);
115 GBOptions->setObjectName(QString::fromUtf8("GBOptions"));
116 gridLayout2 = new QGridLayout(GBOptions);
118 gridLayout2->setSpacing(6);
121 gridLayout2->setContentsMargins(9, 9, 9, 9);
123 gridLayout2->setObjectName(QString::fromUtf8("gridLayout2"));
124 TWGroupe = new QTableWidget(GBOptions);
125 if (TWGroupe->columnCount() < 2)
126 TWGroupe->setColumnCount(2);
127 QTableWidgetItem *__qtablewidgetitem = new QTableWidgetItem();
128 TWGroupe->setHorizontalHeaderItem(0, __qtablewidgetitem);
129 QTableWidgetItem *__qtablewidgetitem1 = new QTableWidgetItem();
130 TWGroupe->setHorizontalHeaderItem(1, __qtablewidgetitem1);
131 TWGroupe->setObjectName(QString::fromUtf8("TWGroupe"));
132 TWGroupe->setShowGrid(true);
133 TWGroupe->setRowCount(0);
134 TWGroupe->setColumnCount(2);
136 gridLayout2->addWidget(TWGroupe, 0, 0, 1, 1);
139 gridLayout->addWidget(GBOptions, 0, 0, 1, 1);
142 retranslateUi(CreateListGroup);
144 QMetaObject::connectSlotsByName(CreateListGroup);
147 void retranslateUi(QDialog *CreateListGroup)
149 CreateListGroup->setWindowTitle(QApplication::translate("CreateListGroup", "Selection of groups", nullptr));
150 GBButtons->setTitle(QString());
151 buttonHelp->setText(QApplication::translate("CreateListGroup", "Help", nullptr));
152 buttonCancel->setText(QApplication::translate("CreateListGroup", "Cancel", nullptr));
153 buttonApply->setText(QApplication::translate("CreateListGroup", "Apply", nullptr));
154 buttonOk->setText(QApplication::translate("CreateListGroup", "OK", nullptr));
155 GBOptions->setTitle(QApplication::translate("CreateListGroup", "Selected groups", nullptr));
156 QTableWidgetItem *___qtablewidgetitem = TWGroupe->horizontalHeaderItem(0);
157 ___qtablewidgetitem->setText(QApplication::translate("CreateListGroup", "Selection", nullptr));
158 QTableWidgetItem *___qtablewidgetitem1 = TWGroupe->horizontalHeaderItem(1);
159 ___qtablewidgetitem1->setText(QApplication::translate("CreateListGroup", "Group", nullptr));
165 class CreateListGroup: public SMESH_Ui_CreateListGroup {};
170 class SMESHGUI_EXPORT SMESH_CreateListGroupCAO : public QDialog, public SMESH_Ui_CreateListGroup
175 SMESH_CreateListGroupCAO( SMESH_CreateBoundaryCAO* parentBound, bool modal, SMESHHOMARD::HOMARD_Gen_var myHomardGen, QString aCaseName, QStringList listeGroupesHypo);
176 SMESH_CreateListGroupCAO( SMESH_CreateBoundaryCAO* parentBound, SMESHHOMARD::HOMARD_Gen_var myHomardGen, QString aCaseName, QStringList listeGroupesHypo);
177 virtual ~SMESH_CreateListGroupCAO();
181 SMESHHOMARD::HOMARD_Gen_var myHomardGen;
183 SMESH_CreateBoundaryCAO * _parentBound;
185 QStringList _listeGroupesHypo;
187 virtual void InitConnect();
188 virtual void InitGroupes();
191 virtual void PushOnOK();
192 virtual bool PushOnApply();
193 virtual void PushOnHelp();
197 class SMESHGUI_EXPORT SMESH_CreateListGroup : public QDialog, public SMESH_Ui_CreateListGroup
202 SMESH_CreateListGroup( SMESH_CreateBoundaryDi* parentBound, bool modal, SMESHHOMARD::HOMARD_Gen_var myHomardGen, QString aCaseName, QStringList listeGroupesHypo);
203 SMESH_CreateListGroup( SMESH_CreateBoundaryDi* parentBound, SMESHHOMARD::HOMARD_Gen_var myHomardGen, QString aCaseName, QStringList listeGroupesHypo);
204 virtual ~SMESH_CreateListGroup();
208 SMESHHOMARD::HOMARD_Gen_var myHomardGen;
210 SMESH_CreateBoundaryDi * _parentBound;
212 QStringList _listeGroupesHypo;
214 virtual void InitConnect();
215 virtual void InitGroupes();
218 virtual void PushOnOK();
219 virtual bool PushOnApply();
220 virtual void PushOnHelp();
224 class SMESHGUI_EXPORT SMESH_EditListGroupCAO : public SMESH_CreateListGroupCAO
229 SMESH_EditListGroupCAO( SMESH_CreateBoundaryCAO* parentBound, bool modal, SMESHHOMARD::HOMARD_Gen_var myHomardGen, QString aCaseName, QStringList listeGroupesHypo);
230 virtual ~SMESH_EditListGroupCAO();
234 virtual void InitGroupes();
238 class SMESHGUI_EXPORT SMESH_EditListGroup : public SMESH_CreateListGroup
243 SMESH_EditListGroup( SMESH_CreateBoundaryDi* parentBound, bool modal,
244 SMESHHOMARD::HOMARD_Gen_var myHomardGen,
245 QString aCaseName, QStringList listeGroupesHypo);
246 virtual ~SMESH_EditListGroup();
250 virtual void InitGroupes();
254 #endif // MON_CREATELISTGROUPCAO_H