9 #ifndef UI_PQCOLOROPACITYEDITORWIDGET_H 10 #define UI_PQCOLOROPACITYEDITORWIDGET_H 12 #include <QtCore/QVariant> 13 #include <QtGui/QIcon> 14 #include <QtWidgets/QApplication> 15 #include <QtWidgets/QCheckBox> 16 #include <QtWidgets/QComboBox> 17 #include <QtWidgets/QFrame> 18 #include <QtWidgets/QHBoxLayout> 19 #include <QtWidgets/QHeaderView> 20 #include <QtWidgets/QLabel> 21 #include <QtWidgets/QSpacerItem> 22 #include <QtWidgets/QToolButton> 23 #include <QtWidgets/QVBoxLayout> 24 #include <QtWidgets/QWidget> 74 void setupUi(QWidget *ColorOpacityEditorWidget)
76 if (ColorOpacityEditorWidget->objectName().isEmpty())
77 ColorOpacityEditorWidget->setObjectName(QString::fromUtf8(
"ColorOpacityEditorWidget"));
78 ColorOpacityEditorWidget->resize(472, 925);
79 ColorOpacityEditorWidget->setMinimumSize(QSize(0, 80));
80 mainLayout =
new QVBoxLayout(ColorOpacityEditorWidget);
81 mainLayout->setSpacing(6);
82 mainLayout->setObjectName(QString::fromUtf8(
"mainLayout"));
83 ShowDataHistogram =
new QCheckBox(ColorOpacityEditorWidget);
84 ShowDataHistogram->setObjectName(QString::fromUtf8(
"ShowDataHistogram"));
86 mainLayout->addWidget(ShowDataHistogram);
88 AutomaticDataHistogramComputation =
new QCheckBox(ColorOpacityEditorWidget);
89 AutomaticDataHistogramComputation->setObjectName(QString::fromUtf8(
"AutomaticDataHistogramComputation"));
91 mainLayout->addWidget(AutomaticDataHistogramComputation);
93 horizontalLayout1 =
new QHBoxLayout();
94 horizontalLayout1->setObjectName(QString::fromUtf8(
"horizontalLayout1"));
95 NumBinsLabel =
new QLabel(ColorOpacityEditorWidget);
96 NumBinsLabel->setObjectName(QString::fromUtf8(
"NumBinsLabel"));
98 horizontalLayout1->addWidget(NumBinsLabel);
101 DataHistogramNumberOfBins->setObjectName(QString::fromUtf8(
"DataHistogramNumberOfBins"));
102 QSizePolicy sizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
103 sizePolicy.setHorizontalStretch(0);
104 sizePolicy.setVerticalStretch(0);
105 sizePolicy.setHeightForWidth(DataHistogramNumberOfBins->sizePolicy().hasHeightForWidth());
106 DataHistogramNumberOfBins->setSizePolicy(sizePolicy);
107 DataHistogramNumberOfBins->setProperty(
"minimum", QVariant(1));
108 DataHistogramNumberOfBins->setProperty(
"maximum", QVariant(256));
110 horizontalLayout1->addWidget(DataHistogramNumberOfBins);
112 horizontalLayout1->setStretch(1, 1);
114 mainLayout->addLayout(horizontalLayout1);
116 line_2 =
new QFrame(ColorOpacityEditorWidget);
117 line_2->setObjectName(QString::fromUtf8(
"line_2"));
118 line_2->setFrameShape(QFrame::HLine);
119 line_2->setFrameShadow(QFrame::Sunken);
121 mainLayout->addWidget(line_2);
123 DefaultPresetsComboBox =
new QComboBox(ColorOpacityEditorWidget);
124 DefaultPresetsComboBox->setObjectName(QString::fromUtf8(
"DefaultPresetsComboBox"));
126 mainLayout->addWidget(DefaultPresetsComboBox);
128 horizontalLayout =
new QHBoxLayout();
129 horizontalLayout->setObjectName(QString::fromUtf8(
"horizontalLayout"));
130 CurrentDataLabel =
new QLabel(ColorOpacityEditorWidget);
131 CurrentDataLabel->setObjectName(QString::fromUtf8(
"CurrentDataLabel"));
133 horizontalLayout->addWidget(CurrentDataLabel);
136 CurrentDataValue->setObjectName(QString::fromUtf8(
"CurrentDataValue"));
137 sizePolicy.setHeightForWidth(CurrentDataValue->sizePolicy().hasHeightForWidth());
138 CurrentDataValue->setSizePolicy(sizePolicy);
140 horizontalLayout->addWidget(CurrentDataValue);
142 horizontalLayout->setStretch(1, 1);
144 mainLayout->addLayout(horizontalLayout);
146 horizontalLayout_2 =
new QHBoxLayout();
147 horizontalLayout_2->setSpacing(0);
148 horizontalLayout_2->setObjectName(QString::fromUtf8(
"horizontalLayout_2"));
149 horizontalLayout_2->setSizeConstraint(QLayout::SetDefaultConstraint);
150 verticalLayout =
new QVBoxLayout();
151 verticalLayout->setSpacing(0);
152 verticalLayout->setObjectName(QString::fromUtf8(
"verticalLayout"));
153 verticalLayout->setSizeConstraint(QLayout::SetMinimumSize);
155 OpacityEditor->setObjectName(QString::fromUtf8(
"OpacityEditor"));
156 QSizePolicy sizePolicy1(QSizePolicy::Preferred, QSizePolicy::Preferred);
157 sizePolicy1.setHorizontalStretch(0);
158 sizePolicy1.setVerticalStretch(0);
159 sizePolicy1.setHeightForWidth(OpacityEditor->sizePolicy().hasHeightForWidth());
160 OpacityEditor->setSizePolicy(sizePolicy1);
161 OpacityEditor->setMinimumSize(QSize(0, 240));
163 verticalLayout->addWidget(OpacityEditor);
165 UseOpacityControlPointsFreehandDrawing =
new QCheckBox(ColorOpacityEditorWidget);
166 UseOpacityControlPointsFreehandDrawing->setObjectName(QString::fromUtf8(
"UseOpacityControlPointsFreehandDrawing"));
168 verticalLayout->addWidget(UseOpacityControlPointsFreehandDrawing);
170 EnableOpacityMapping =
new QCheckBox(ColorOpacityEditorWidget);
171 EnableOpacityMapping->setObjectName(QString::fromUtf8(
"EnableOpacityMapping"));
173 verticalLayout->addWidget(EnableOpacityMapping);
175 UseLogScaleOpacity =
new QCheckBox(ColorOpacityEditorWidget);
176 UseLogScaleOpacity->setObjectName(QString::fromUtf8(
"UseLogScaleOpacity"));
177 UseLogScaleOpacity->setEnabled(
false);
179 verticalLayout->addWidget(UseLogScaleOpacity);
181 OpacityLabel =
new QLabel(ColorOpacityEditorWidget);
182 OpacityLabel->setObjectName(QString::fromUtf8(
"OpacityLabel"));
184 verticalLayout->addWidget(OpacityLabel);
187 OpacityTable->setObjectName(QString::fromUtf8(
"OpacityTable"));
188 OpacityTable->setEditTriggers(QAbstractItemView::DoubleClicked);
189 OpacityTable->setAlternatingRowColors(
true);
190 OpacityTable->setSelectionBehavior(QAbstractItemView::SelectRows);
191 OpacityTable->setProperty(
"maximumRowCountBeforeScrolling", QVariant(10));
193 verticalLayout->addWidget(OpacityTable);
196 ColorEditor->setObjectName(QString::fromUtf8(
"ColorEditor"));
197 QSizePolicy sizePolicy2(QSizePolicy::Preferred, QSizePolicy::Fixed);
198 sizePolicy2.setHorizontalStretch(0);
199 sizePolicy2.setVerticalStretch(0);
200 sizePolicy2.setHeightForWidth(ColorEditor->sizePolicy().hasHeightForWidth());
201 ColorEditor->setSizePolicy(sizePolicy2);
202 ColorEditor->setMinimumSize(QSize(40, 40));
203 ColorEditor->setMaximumSize(QSize(16777215, 40));
205 verticalLayout->addWidget(ColorEditor);
207 UseLogScale =
new QCheckBox(ColorOpacityEditorWidget);
208 UseLogScale->setObjectName(QString::fromUtf8(
"UseLogScale"));
210 verticalLayout->addWidget(UseLogScale);
212 ColorLabel =
new QLabel(ColorOpacityEditorWidget);
213 ColorLabel->setObjectName(QString::fromUtf8(
"ColorLabel"));
214 sizePolicy1.setHeightForWidth(ColorLabel->sizePolicy().hasHeightForWidth());
215 ColorLabel->setSizePolicy(sizePolicy1);
217 verticalLayout->addWidget(ColorLabel);
220 ColorTable->setObjectName(QString::fromUtf8(
"ColorTable"));
221 ColorTable->setEditTriggers(QAbstractItemView::DoubleClicked);
222 ColorTable->setAlternatingRowColors(
true);
223 ColorTable->setSelectionBehavior(QAbstractItemView::SelectRows);
224 ColorTable->setProperty(
"maximumRowCountBeforeScrolling", QVariant(10));
226 verticalLayout->addWidget(ColorTable);
229 Transfer2DEditor->setObjectName(QString::fromUtf8(
"Transfer2DEditor"));
230 Transfer2DEditor->setMinimumSize(QSize(100, 400));
231 Transfer2DEditor->setVisible(
false);
232 Transfer2DEditor->setStyleSheet(QString::fromUtf8(
"gridline-color: rgb(46, 95, 255);\n" 233 "background-image: url(:/pqWidgets/Icons/pqEdgeCenterData.svg);"));
235 verticalLayout->addWidget(Transfer2DEditor);
237 verticalLayout->setStretch(0, 1);
238 verticalLayout->setStretch(6, 1);
239 verticalLayout->setStretch(10, 1);
241 horizontalLayout_2->addLayout(verticalLayout);
243 verticalLayout_2 =
new QVBoxLayout();
244 verticalLayout_2->setSpacing(1);
245 verticalLayout_2->setObjectName(QString::fromUtf8(
"verticalLayout_2"));
246 ResetRangeToData =
new QToolButton(ColorOpacityEditorWidget);
247 ResetRangeToData->setObjectName(QString::fromUtf8(
"ResetRangeToData"));
249 icon.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqResetRange.svg"), QSize(), QIcon::Normal, QIcon::Off);
250 ResetRangeToData->setIcon(icon);
252 verticalLayout_2->addWidget(ResetRangeToData);
254 ResetRangeToCustom =
new QToolButton(ColorOpacityEditorWidget);
255 ResetRangeToCustom->setObjectName(QString::fromUtf8(
"ResetRangeToCustom"));
257 icon1.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqResetRangeCustom.svg"), QSize(), QIcon::Normal, QIcon::Off);
258 ResetRangeToCustom->setIcon(icon1);
260 verticalLayout_2->addWidget(ResetRangeToCustom);
262 ResetRangeToDataOverTime =
new QToolButton(ColorOpacityEditorWidget);
263 ResetRangeToDataOverTime->setObjectName(QString::fromUtf8(
"ResetRangeToDataOverTime"));
265 icon2.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqResetRangeTemporal.svg"), QSize(), QIcon::Normal, QIcon::Off);
266 ResetRangeToDataOverTime->setIcon(icon2);
268 verticalLayout_2->addWidget(ResetRangeToDataOverTime);
270 ResetRangeToVisibleData =
new QToolButton(ColorOpacityEditorWidget);
271 ResetRangeToVisibleData->setObjectName(QString::fromUtf8(
"ResetRangeToVisibleData"));
273 icon3.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqResetToVisibleRange.svg"), QSize(), QIcon::Normal, QIcon::Off);
274 ResetRangeToVisibleData->setIcon(icon3);
276 verticalLayout_2->addWidget(ResetRangeToVisibleData);
278 InvertTransferFunctions =
new QToolButton(ColorOpacityEditorWidget);
279 InvertTransferFunctions->setObjectName(QString::fromUtf8(
"InvertTransferFunctions"));
281 icon4.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqInvert.svg"), QSize(), QIcon::Normal, QIcon::Off);
282 InvertTransferFunctions->setIcon(icon4);
284 verticalLayout_2->addWidget(InvertTransferFunctions);
286 ChoosePreset =
new QToolButton(ColorOpacityEditorWidget);
287 ChoosePreset->setObjectName(QString::fromUtf8(
"ChoosePreset"));
289 icon5.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqFavorites.svg"), QSize(), QIcon::Normal, QIcon::Off);
290 ChoosePreset->setIcon(icon5);
292 verticalLayout_2->addWidget(ChoosePreset);
294 SaveAsPreset =
new QToolButton(ColorOpacityEditorWidget);
295 SaveAsPreset->setObjectName(QString::fromUtf8(
"SaveAsPreset"));
297 icon6.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqSave.svg"), QSize(), QIcon::Normal, QIcon::Off);
298 SaveAsPreset->setIcon(icon6);
300 verticalLayout_2->addWidget(SaveAsPreset);
302 ChooseBoxColor =
new QToolButton(ColorOpacityEditorWidget);
303 ChooseBoxColor->setObjectName(QString::fromUtf8(
"ChooseBoxColor"));
305 icon7.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqBoxColorAlpha.svg"), QSize(), QIcon::Normal, QIcon::Off);
306 ChooseBoxColor->setIcon(icon7);
308 verticalLayout_2->addWidget(ChooseBoxColor);
311 ComputeDataHistogram->setObjectName(QString::fromUtf8(
"ComputeDataHistogram"));
313 icon8.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqHistogramReload24.png"), QSize(), QIcon::Normal, QIcon::Off);
314 ComputeDataHistogram->setIcon(icon8);
316 verticalLayout_2->addWidget(ComputeDataHistogram);
318 verticalSpacer_2 =
new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
320 verticalLayout_2->addItem(verticalSpacer_2);
323 horizontalLayout_2->addLayout(verticalLayout_2);
325 horizontalLayout_2->setStretch(0, 1);
327 mainLayout->addLayout(horizontalLayout_2);
329 line_3 =
new QFrame(ColorOpacityEditorWidget);
330 line_3->setObjectName(QString::fromUtf8(
"line_3"));
331 line_3->setFrameShape(QFrame::HLine);
332 line_3->setFrameShadow(QFrame::Sunken);
334 mainLayout->addWidget(line_3);
339 QMetaObject::connectSlotsByName(ColorOpacityEditorWidget);
344 ColorOpacityEditorWidget->setWindowTitle(QCoreApplication::translate(
"ColorOpacityEditorWidget",
"Form",
nullptr));
345 #if QT_CONFIG(tooltip) 346 ShowDataHistogram->setToolTip(QCoreApplication::translate(
"ColorOpacityEditorWidget",
"When checked, a data histogram will be shown below the opacity function. Please update it by clicking on its dedicated button when needed.",
nullptr));
347 #endif // QT_CONFIG(tooltip) 348 ShowDataHistogram->setText(QCoreApplication::translate(
"ColorOpacityEditorWidget",
"Display Data Histogram",
nullptr));
349 #if QT_CONFIG(tooltip) 350 AutomaticDataHistogramComputation->setToolTip(QCoreApplication::translate(
"ColorOpacityEditorWidget",
"When checked, the data histogram will be automatically recomputed when needed instead of needing to click on the compute data histogram button.",
nullptr));
351 #endif // QT_CONFIG(tooltip) 352 AutomaticDataHistogramComputation->setText(QCoreApplication::translate(
"ColorOpacityEditorWidget",
"Automatically recompute data histogram",
nullptr));
353 NumBinsLabel->setText(QCoreApplication::translate(
"ColorOpacityEditorWidget",
"Number of Bins:",
nullptr));
354 #if QT_CONFIG(tooltip) 355 DefaultPresetsComboBox->setToolTip(QCoreApplication::translate(
"ColorOpacityEditorWidget",
"Select a color map from default presets",
nullptr));
356 #endif // QT_CONFIG(tooltip) 357 CurrentDataLabel->setText(QCoreApplication::translate(
"ColorOpacityEditorWidget",
"Data:",
nullptr));
358 #if QT_CONFIG(tooltip) 359 CurrentDataValue->setToolTip(QCoreApplication::translate(
"ColorOpacityEditorWidget",
"Set the data value for the selected control point",
nullptr));
360 #endif // QT_CONFIG(tooltip) 361 #if QT_CONFIG(tooltip) 362 UseOpacityControlPointsFreehandDrawing->setToolTip(QCoreApplication::translate(
"ColorOpacityEditorWidget",
"When checked, the control point of the opacity transfer fonction can be \"drawn\" instead of being placed one by one.",
nullptr));
363 #endif // QT_CONFIG(tooltip) 364 UseOpacityControlPointsFreehandDrawing->setText(QCoreApplication::translate(
"ColorOpacityEditorWidget",
"Enable Freehand Drawing Of Opacity Transfer Function",
nullptr));
365 EnableOpacityMapping->setText(QCoreApplication::translate(
"ColorOpacityEditorWidget",
"Enable Opacity Mapping For Surfaces",
nullptr));
366 UseLogScaleOpacity->setText(QCoreApplication::translate(
"ColorOpacityEditorWidget",
"Use Log Scale When Mapping Data To Opacity",
nullptr));
367 OpacityLabel->setText(QCoreApplication::translate(
"ColorOpacityEditorWidget",
"Opacity transfer function values",
nullptr));
368 #if QT_CONFIG(tooltip) 369 ColorEditor->setToolTip(QCoreApplication::translate(
"ColorOpacityEditorWidget",
"Select control point and press \"Enter\" or \"Return\" to change colors",
nullptr));
370 #endif // QT_CONFIG(tooltip) 371 #if QT_CONFIG(tooltip) 372 UseLogScale->setToolTip(QCoreApplication::translate(
"ColorOpacityEditorWidget",
"When checked, the mapping from data to colors is done using a log-scale. Note that this does not affect the mapping of data to opacity.",
nullptr));
373 #endif // QT_CONFIG(tooltip) 374 UseLogScale->setText(QCoreApplication::translate(
"ColorOpacityEditorWidget",
"Use Log Scale When Mapping Data To Colors",
nullptr));
375 ColorLabel->setText(QCoreApplication::translate(
"ColorOpacityEditorWidget",
"Color transfer function values",
nullptr));
376 #if QT_CONFIG(tooltip) 377 ResetRangeToData->setToolTip(QCoreApplication::translate(
"ColorOpacityEditorWidget",
"Rescale to data range",
nullptr));
378 #endif // QT_CONFIG(tooltip) 379 ResetRangeToData->setText(QString());
380 #if QT_CONFIG(tooltip) 381 ResetRangeToCustom->setToolTip(QCoreApplication::translate(
"ColorOpacityEditorWidget",
"Rescale to custom range",
nullptr));
382 #endif // QT_CONFIG(tooltip) 383 ResetRangeToCustom->setText(QString());
384 #if QT_CONFIG(tooltip) 385 ResetRangeToDataOverTime->setToolTip(QCoreApplication::translate(
"ColorOpacityEditorWidget",
"Rescale to data range over all timesteps",
nullptr));
386 #endif // QT_CONFIG(tooltip) 387 ResetRangeToDataOverTime->setText(QString());
388 #if QT_CONFIG(tooltip) 389 ResetRangeToVisibleData->setToolTip(QCoreApplication::translate(
"ColorOpacityEditorWidget",
"Rescale to visible range",
nullptr));
390 #endif // QT_CONFIG(tooltip) 391 ResetRangeToVisibleData->setText(QString());
392 #if QT_CONFIG(tooltip) 393 InvertTransferFunctions->setToolTip(QCoreApplication::translate(
"ColorOpacityEditorWidget",
"Invert the transfer functions",
nullptr));
394 #endif // QT_CONFIG(tooltip) 395 InvertTransferFunctions->setText(QString());
396 #if QT_CONFIG(tooltip) 397 ChoosePreset->setToolTip(QCoreApplication::translate(
"ColorOpacityEditorWidget",
"Choose preset",
nullptr));
398 #endif // QT_CONFIG(tooltip) 399 ChoosePreset->setText(QString());
400 #if QT_CONFIG(tooltip) 401 SaveAsPreset->setToolTip(QCoreApplication::translate(
"ColorOpacityEditorWidget",
"Save to preset",
nullptr));
402 #endif // QT_CONFIG(tooltip) 403 SaveAsPreset->setText(QString());
404 #if QT_CONFIG(tooltip) 405 ChooseBoxColor->setToolTip(QCoreApplication::translate(
"ColorOpacityEditorWidget",
"Choose box color and alpha",
nullptr));
406 #endif // QT_CONFIG(tooltip) 407 ChooseBoxColor->setText(QString());
408 #if QT_CONFIG(tooltip) 409 ComputeDataHistogram->setToolTip(QCoreApplication::translate(
"ColorOpacityEditorWidget",
"Compute data histogram",
nullptr));
410 #endif // QT_CONFIG(tooltip) 411 ComputeDataHistogram->setText(QString());
422 #endif // UI_PQCOLOROPACITYEDITORWIDGET_H
pqLineEdit subclass that supports a low precision view when inactive
pqExpandableTableView extends pqTableView to add support for the following features: ...