9 #ifndef UI_PQBOXPROPERTYWIDGET_H 10 #define UI_PQBOXPROPERTYWIDGET_H 12 #include <QtCore/QVariant> 13 #include <QtWidgets/QApplication> 14 #include <QtWidgets/QCheckBox> 15 #include <QtWidgets/QFrame> 16 #include <QtWidgets/QGridLayout> 17 #include <QtWidgets/QLabel> 18 #include <QtWidgets/QPushButton> 19 #include <QtWidgets/QSpacerItem> 20 #include <QtWidgets/QVBoxLayout> 21 #include <QtWidgets/QWidget> 68 if (BoxPropertyWidget->objectName().isEmpty())
69 BoxPropertyWidget->setObjectName(QString::fromUtf8(
"BoxPropertyWidget"));
70 BoxPropertyWidget->resize(230, 329);
71 vboxLayout =
new QVBoxLayout(BoxPropertyWidget);
72 vboxLayout->setSpacing(2);
73 vboxLayout->setObjectName(QString::fromUtf8(
"vboxLayout"));
74 vboxLayout->setContentsMargins(0, 0, 0, 0);
75 show3DWidget =
new QCheckBox(BoxPropertyWidget);
76 show3DWidget->setObjectName(QString::fromUtf8(
"show3DWidget"));
77 show3DWidget->setChecked(
true);
79 vboxLayout->addWidget(show3DWidget);
81 gridLayout =
new QGridLayout();
82 gridLayout->setSpacing(2);
83 gridLayout->setObjectName(QString::fromUtf8(
"gridLayout"));
84 gridLayout->setContentsMargins(0, 0, 0, 0);
85 labelRotate =
new QLabel(BoxPropertyWidget);
86 labelRotate->setObjectName(QString::fromUtf8(
"labelRotate"));
88 gridLayout->addWidget(labelRotate, 1, 0, 1, 1);
91 rotateX->setObjectName(QString::fromUtf8(
"rotateX"));
93 gridLayout->addWidget(rotateX, 1, 1, 1, 1);
95 labelTranslate =
new QLabel(BoxPropertyWidget);
96 labelTranslate->setObjectName(QString::fromUtf8(
"labelTranslate"));
98 gridLayout->addWidget(labelTranslate, 0, 0, 1, 1);
101 rotateZ->setObjectName(QString::fromUtf8(
"rotateZ"));
103 gridLayout->addWidget(rotateZ, 1, 3, 1, 1);
106 translateZ->setObjectName(QString::fromUtf8(
"translateZ"));
108 gridLayout->addWidget(translateZ, 0, 3, 1, 1);
111 translateY->setObjectName(QString::fromUtf8(
"translateY"));
113 gridLayout->addWidget(translateY, 0, 2, 1, 1);
116 rotateY->setObjectName(QString::fromUtf8(
"rotateY"));
118 gridLayout->addWidget(rotateY, 1, 2, 1, 1);
121 translateX->setObjectName(QString::fromUtf8(
"translateX"));
123 gridLayout->addWidget(translateX, 0, 1, 1, 1);
126 scaleY->setObjectName(QString::fromUtf8(
"scaleY"));
128 gridLayout->addWidget(scaleY, 2, 2, 1, 1);
131 scaleX->setObjectName(QString::fromUtf8(
"scaleX"));
133 gridLayout->addWidget(scaleX, 2, 1, 1, 1);
136 scaleZ->setObjectName(QString::fromUtf8(
"scaleZ"));
138 gridLayout->addWidget(scaleZ, 2, 3, 1, 1);
140 labelScale =
new QLabel(BoxPropertyWidget);
141 labelScale->setObjectName(QString::fromUtf8(
"labelScale"));
143 gridLayout->addWidget(labelScale, 2, 0, 1, 1);
146 vboxLayout->addLayout(gridLayout);
148 verticalLayout_2 =
new QVBoxLayout();
149 verticalLayout_2->setSpacing(0);
150 verticalLayout_2->setObjectName(QString::fromUtf8(
"verticalLayout_2"));
151 referenceBoundsLabel =
new QLabel(BoxPropertyWidget);
152 referenceBoundsLabel->setObjectName(QString::fromUtf8(
"referenceBoundsLabel"));
154 verticalLayout_2->addWidget(referenceBoundsLabel);
156 referenceBoundsHLine =
new QFrame(BoxPropertyWidget);
157 referenceBoundsHLine->setObjectName(QString::fromUtf8(
"referenceBoundsHLine"));
158 referenceBoundsHLine->setFrameShape(QFrame::HLine);
159 referenceBoundsHLine->setFrameShadow(QFrame::Sunken);
161 verticalLayout_2->addWidget(referenceBoundsHLine);
164 vboxLayout->addLayout(verticalLayout_2);
166 useReferenceBounds =
new QCheckBox(BoxPropertyWidget);
167 useReferenceBounds->setObjectName(QString::fromUtf8(
"useReferenceBounds"));
168 useReferenceBounds->setChecked(
true);
170 vboxLayout->addWidget(useReferenceBounds);
172 gridLayout2 =
new QGridLayout();
173 gridLayout2->setObjectName(QString::fromUtf8(
"gridLayout2"));
175 xmin->setObjectName(QString::fromUtf8(
"xmin"));
177 gridLayout2->addWidget(xmin, 0, 0, 1, 1);
180 xmax->setObjectName(QString::fromUtf8(
"xmax"));
182 gridLayout2->addWidget(xmax, 0, 1, 1, 1);
185 ymin->setObjectName(QString::fromUtf8(
"ymin"));
187 gridLayout2->addWidget(ymin, 1, 0, 1, 1);
190 ymax->setObjectName(QString::fromUtf8(
"ymax"));
192 gridLayout2->addWidget(ymax, 1, 1, 1, 1);
195 zmin->setObjectName(QString::fromUtf8(
"zmin"));
197 gridLayout2->addWidget(zmin, 2, 0, 1, 1);
200 zmax->setObjectName(QString::fromUtf8(
"zmax"));
202 gridLayout2->addWidget(zmax, 2, 1, 1, 1);
205 vboxLayout->addLayout(gridLayout2);
207 verticalLayout =
new QVBoxLayout();
208 verticalLayout->setSpacing(0);
209 verticalLayout->setObjectName(QString::fromUtf8(
"verticalLayout"));
210 label =
new QLabel(BoxPropertyWidget);
211 label->setObjectName(QString::fromUtf8(
"label"));
213 verticalLayout->addWidget(label);
215 line_2 =
new QFrame(BoxPropertyWidget);
216 line_2->setObjectName(QString::fromUtf8(
"line_2"));
217 line_2->setFrameShape(QFrame::HLine);
218 line_2->setFrameShadow(QFrame::Sunken);
220 verticalLayout->addWidget(line_2);
223 vboxLayout->addLayout(verticalLayout);
225 gridLayout1 =
new QGridLayout();
226 gridLayout1->setObjectName(QString::fromUtf8(
"gridLayout1"));
227 enableRotation =
new QCheckBox(BoxPropertyWidget);
228 enableRotation->setObjectName(QString::fromUtf8(
"enableRotation"));
230 gridLayout1->addWidget(enableRotation, 3, 0, 1, 1);
232 enableTranslation =
new QCheckBox(BoxPropertyWidget);
233 enableTranslation->setObjectName(QString::fromUtf8(
"enableTranslation"));
235 gridLayout1->addWidget(enableTranslation, 1, 0, 1, 1);
237 enableScaling =
new QCheckBox(BoxPropertyWidget);
238 enableScaling->setObjectName(QString::fromUtf8(
"enableScaling"));
240 gridLayout1->addWidget(enableScaling, 1, 1, 1, 1);
242 enableMoveFaces =
new QCheckBox(BoxPropertyWidget);
243 enableMoveFaces->setObjectName(QString::fromUtf8(
"enableMoveFaces"));
245 gridLayout1->addWidget(enableMoveFaces, 3, 1, 1, 1);
248 vboxLayout->addLayout(gridLayout1);
250 resetBounds =
new QPushButton(BoxPropertyWidget);
251 resetBounds->setObjectName(QString::fromUtf8(
"resetBounds"));
253 vboxLayout->addWidget(resetBounds);
255 verticalSpacer =
new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
257 vboxLayout->addItem(verticalSpacer);
259 QWidget::setTabOrder(show3DWidget, translateX);
260 QWidget::setTabOrder(translateX, translateY);
261 QWidget::setTabOrder(translateY, translateZ);
262 QWidget::setTabOrder(translateZ, rotateX);
263 QWidget::setTabOrder(rotateX, rotateY);
264 QWidget::setTabOrder(rotateY, rotateZ);
265 QWidget::setTabOrder(rotateZ, scaleX);
266 QWidget::setTabOrder(scaleX, scaleY);
267 QWidget::setTabOrder(scaleY, scaleZ);
268 QWidget::setTabOrder(scaleZ, enableTranslation);
269 QWidget::setTabOrder(enableTranslation, enableScaling);
270 QWidget::setTabOrder(enableScaling, enableRotation);
271 QWidget::setTabOrder(enableRotation, enableMoveFaces);
272 QWidget::setTabOrder(enableMoveFaces, useReferenceBounds);
273 QWidget::setTabOrder(useReferenceBounds, xmin);
274 QWidget::setTabOrder(xmin, xmax);
275 QWidget::setTabOrder(xmax, ymin);
276 QWidget::setTabOrder(ymin, ymax);
277 QWidget::setTabOrder(ymax, zmin);
278 QWidget::setTabOrder(zmin, zmax);
279 QWidget::setTabOrder(zmax, resetBounds);
282 QObject::connect(useReferenceBounds, SIGNAL(toggled(
bool)), xmin, SLOT(setVisible(
bool)));
283 QObject::connect(useReferenceBounds, SIGNAL(toggled(
bool)), xmax, SLOT(setVisible(
bool)));
284 QObject::connect(useReferenceBounds, SIGNAL(toggled(
bool)), ymin, SLOT(setVisible(
bool)));
285 QObject::connect(useReferenceBounds, SIGNAL(toggled(
bool)), ymax, SLOT(setVisible(
bool)));
286 QObject::connect(useReferenceBounds, SIGNAL(toggled(
bool)), zmax, SLOT(setVisible(
bool)));
287 QObject::connect(useReferenceBounds, SIGNAL(toggled(
bool)), zmin, SLOT(setVisible(
bool)));
289 QMetaObject::connectSlotsByName(BoxPropertyWidget);
294 BoxPropertyWidget->setWindowTitle(QCoreApplication::translate(
"BoxPropertyWidget",
"Form",
nullptr));
295 #if QT_CONFIG(tooltip) 296 show3DWidget->setToolTip(QCoreApplication::translate(
"BoxPropertyWidget",
"Show the interactive box widget in the 3d scene.",
nullptr));
297 #endif // QT_CONFIG(tooltip) 298 show3DWidget->setText(QCoreApplication::translate(
"BoxPropertyWidget",
"Show Box",
nullptr));
299 labelRotate->setText(QCoreApplication::translate(
"BoxPropertyWidget",
"Rotate",
nullptr));
300 labelTranslate->setText(QCoreApplication::translate(
"BoxPropertyWidget",
"Translate",
nullptr));
301 labelScale->setText(QCoreApplication::translate(
"BoxPropertyWidget",
"Scale",
nullptr));
302 referenceBoundsLabel->setText(QCoreApplication::translate(
"BoxPropertyWidget",
"<html><head/><body><p><span style=\" font-weight:600;\">Reference Bounds</span></p></body></html>",
nullptr));
303 #if QT_CONFIG(tooltip) 304 useReferenceBounds->setToolTip(QCoreApplication::translate(
"BoxPropertyWidget",
"<html><head/><body><p>Use reference bounding box. When checked, <span style=\" font-weight:600;\">Position</span>, <span style=\" font-weight:600;\">Rotation</span>, and <span style=\" font-weight:600;\">Scale</span> are specified relative to the explicitly provided reference bounding box.</p></body></html>",
nullptr));
305 #endif // QT_CONFIG(tooltip) 306 useReferenceBounds->setText(QCoreApplication::translate(
"BoxPropertyWidget",
"Use Reference Bounds",
nullptr));
307 #if QT_CONFIG(tooltip) 308 xmin->setToolTip(QCoreApplication::translate(
"BoxPropertyWidget",
"Minimum X",
nullptr));
309 #endif // QT_CONFIG(tooltip) 310 #if QT_CONFIG(tooltip) 311 xmax->setToolTip(QCoreApplication::translate(
"BoxPropertyWidget",
"Maximum X",
nullptr));
312 #endif // QT_CONFIG(tooltip) 313 #if QT_CONFIG(tooltip) 314 ymin->setToolTip(QCoreApplication::translate(
"BoxPropertyWidget",
"Minimum Y",
nullptr));
315 #endif // QT_CONFIG(tooltip) 316 #if QT_CONFIG(tooltip) 317 ymax->setToolTip(QCoreApplication::translate(
"BoxPropertyWidget",
"Maximum Y",
nullptr));
318 #endif // QT_CONFIG(tooltip) 319 #if QT_CONFIG(tooltip) 320 zmin->setToolTip(QCoreApplication::translate(
"BoxPropertyWidget",
"Minimum Z",
nullptr));
321 #endif // QT_CONFIG(tooltip) 322 #if QT_CONFIG(tooltip) 323 zmax->setToolTip(QCoreApplication::translate(
"BoxPropertyWidget",
"Maximum Z",
nullptr));
324 #endif // QT_CONFIG(tooltip) 325 label->setText(QCoreApplication::translate(
"BoxPropertyWidget",
"<html><head/><body><p><span style=\" font-weight:600;\">Interactivity Controls</span></p></body></html>",
nullptr));
326 #if QT_CONFIG(tooltip) 327 enableRotation->setToolTip(QCoreApplication::translate(
"BoxPropertyWidget",
"Enable rotation of the 3d box widget.",
nullptr));
328 #endif // QT_CONFIG(tooltip) 329 enableRotation->setText(QCoreApplication::translate(
"BoxPropertyWidget",
"Rotation",
nullptr));
330 #if QT_CONFIG(tooltip) 331 enableTranslation->setToolTip(QCoreApplication::translate(
"BoxPropertyWidget",
"Enable translation of the 3d box widget.",
nullptr));
332 #endif // QT_CONFIG(tooltip) 333 enableTranslation->setText(QCoreApplication::translate(
"BoxPropertyWidget",
"Translation",
nullptr));
334 #if QT_CONFIG(tooltip) 335 enableScaling->setToolTip(QCoreApplication::translate(
"BoxPropertyWidget",
"Enable scaling of the 3d box widget.",
nullptr));
336 #endif // QT_CONFIG(tooltip) 337 enableScaling->setText(QCoreApplication::translate(
"BoxPropertyWidget",
"Scaling",
nullptr));
338 #if QT_CONFIG(tooltip) 339 enableMoveFaces->setToolTip(QCoreApplication::translate(
"BoxPropertyWidget",
"Enable moving faces of the 3d box widget.",
nullptr));
340 #endif // QT_CONFIG(tooltip) 341 enableMoveFaces->setText(QCoreApplication::translate(
"BoxPropertyWidget",
"Face Movement",
nullptr));
342 #if QT_CONFIG(tooltip) 343 resetBounds->setToolTip(QCoreApplication::translate(
"BoxPropertyWidget",
"Reset box using current data bounds",
nullptr));
344 #endif // QT_CONFIG(tooltip) 345 resetBounds->setText(QCoreApplication::translate(
"BoxPropertyWidget",
"Reset Bounds",
nullptr));
356 #endif // UI_PQBOXPROPERTYWIDGET_H
pqLineEdit subclass that supports a low precision view when inactive