9 #ifndef UI_PQCOLORMAPEDITOR_H 10 #define UI_PQCOLORMAPEDITOR_H 12 #include <QtCore/QVariant> 13 #include <QtGui/QIcon> 14 #include <QtWidgets/QApplication> 15 #include <QtWidgets/QComboBox> 16 #include <QtWidgets/QFrame> 17 #include <QtWidgets/QGridLayout> 18 #include <QtWidgets/QHBoxLayout> 19 #include <QtWidgets/QLabel> 20 #include <QtWidgets/QPushButton> 21 #include <QtWidgets/QScrollArea> 22 #include <QtWidgets/QSpacerItem> 23 #include <QtWidgets/QToolButton> 24 #include <QtWidgets/QVBoxLayout> 25 #include <QtWidgets/QWidget> 68 if (ColorMapEditor->objectName().isEmpty())
69 ColorMapEditor->setObjectName(QString::fromUtf8(
"ColorMapEditor"));
70 ColorMapEditor->resize(390, 149);
71 QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
72 sizePolicy.setHorizontalStretch(0);
73 sizePolicy.setVerticalStretch(0);
74 sizePolicy.setHeightForWidth(ColorMapEditor->sizePolicy().hasHeightForWidth());
75 ColorMapEditor->setSizePolicy(sizePolicy);
76 ColorMapEditor->setMinimumSize(QSize(390, 0));
77 verticalLayout =
new QVBoxLayout(ColorMapEditor);
78 verticalLayout->setObjectName(QString::fromUtf8(
"verticalLayout"));
79 SearchBoxLayout =
new QHBoxLayout();
80 SearchBoxLayout->setSpacing(2);
81 SearchBoxLayout->setObjectName(QString::fromUtf8(
"SearchBoxLayout"));
83 SearchBox->setObjectName(QString::fromUtf8(
"SearchBox"));
84 SearchBox->setProperty(
"advancedSearchEnabled", QVariant(
true));
85 SearchBox->setProperty(
"settingKey", QVariant(QString::fromUtf8(
"showAdvancedPropertiesColorMapEditor")));
87 SearchBoxLayout->addWidget(SearchBox);
89 ShowScalarBar =
new QToolButton(ColorMapEditor);
90 ShowScalarBar->setObjectName(QString::fromUtf8(
"ShowScalarBar"));
92 icon.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqScalarBar.svg"), QSize(), QIcon::Normal, QIcon::Off);
93 ShowScalarBar->setIcon(icon);
94 ShowScalarBar->setCheckable(
true);
96 SearchBoxLayout->addWidget(ShowScalarBar);
98 EditScalarBar =
new QToolButton(ColorMapEditor);
99 EditScalarBar->setObjectName(QString::fromUtf8(
"EditScalarBar"));
101 icon1.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqEditScalarBar.svg"), QSize(), QIcon::Normal, QIcon::Off);
102 EditScalarBar->setIcon(icon1);
104 SearchBoxLayout->addWidget(EditScalarBar);
107 verticalLayout->addLayout(SearchBoxLayout);
109 scrollArea =
new QScrollArea(ColorMapEditor);
110 scrollArea->setObjectName(QString::fromUtf8(
"scrollArea"));
111 scrollArea->setFrameShape(QFrame::NoFrame);
112 scrollArea->setFrameShadow(QFrame::Plain);
113 scrollArea->setWidgetResizable(
true);
114 scrollAreaWidgetContents =
new QWidget();
115 scrollAreaWidgetContents->setObjectName(QString::fromUtf8(
"scrollAreaWidgetContents"));
116 scrollAreaWidgetContents->setGeometry(QRect(0, 0, 372, 76));
117 ScrollAreaLayout =
new QVBoxLayout(scrollAreaWidgetContents);
118 ScrollAreaLayout->setObjectName(QString::fromUtf8(
"ScrollAreaLayout"));
119 gridLayout =
new QGridLayout();
120 gridLayout->setObjectName(QString::fromUtf8(
"gridLayout"));
121 SelectedPropertiesText =
new QLabel(scrollAreaWidgetContents);
122 SelectedPropertiesText->setObjectName(QString::fromUtf8(
"SelectedPropertiesText"));
124 gridLayout->addWidget(SelectedPropertiesText, 0, 1, 1, 1);
126 ColorLabel =
new QLabel(scrollAreaWidgetContents);
127 ColorLabel->setObjectName(QString::fromUtf8(
"ColorLabel"));
129 gridLayout->addWidget(ColorLabel, 1, 1, 1, 1);
131 Color2Label =
new QLabel(scrollAreaWidgetContents);
132 Color2Label->setObjectName(QString::fromUtf8(
"Color2Label"));
134 gridLayout->addWidget(Color2Label, 2, 1, 1, 1);
136 OpacityLabel =
new QLabel(scrollAreaWidgetContents);
137 OpacityLabel->setObjectName(QString::fromUtf8(
"OpacityLabel"));
139 gridLayout->addWidget(OpacityLabel, 3, 1, 1, 1);
141 UseSeparateColorArray =
new QToolButton(scrollAreaWidgetContents);
142 UseSeparateColorArray->setObjectName(QString::fromUtf8(
"UseSeparateColorArray"));
144 icon2.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqSeparateColorMap.svg"), QSize(), QIcon::Normal, QIcon::Off);
145 UseSeparateColorArray->setIcon(icon2);
146 UseSeparateColorArray->setIconSize(QSize(20, 20));
147 UseSeparateColorArray->setCheckable(
true);
149 gridLayout->addWidget(UseSeparateColorArray, 1, 0, 1, 1);
151 Use2DTransferFunction =
new QToolButton(scrollAreaWidgetContents);
152 Use2DTransferFunction->setObjectName(QString::fromUtf8(
"Use2DTransferFunction"));
154 icon3.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pq2DTransferFunction.svg"), QSize(), QIcon::Normal, QIcon::Off);
155 Use2DTransferFunction->setIcon(icon3);
156 Use2DTransferFunction->setIconSize(QSize(20, 20));
157 Use2DTransferFunction->setCheckable(
true);
159 gridLayout->addWidget(Use2DTransferFunction, 2, 0, 1, 1);
161 UseSeparateOpacityArray =
new QToolButton(scrollAreaWidgetContents);
162 UseSeparateOpacityArray->setObjectName(QString::fromUtf8(
"UseSeparateOpacityArray"));
164 icon4.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqOpacityTransferFunction.svg"), QSize(), QIcon::Normal, QIcon::Off);
165 UseSeparateOpacityArray->setIcon(icon4);
166 UseSeparateOpacityArray->setIconSize(QSize(20, 20));
167 UseSeparateOpacityArray->setCheckable(
true);
169 gridLayout->addWidget(UseSeparateOpacityArray, 3, 0, 1, 1);
171 SelectedPropertiesComboBox =
new QComboBox(scrollAreaWidgetContents);
172 SelectedPropertiesComboBox->setObjectName(QString::fromUtf8(
"SelectedPropertiesComboBox"));
173 sizePolicy.setHeightForWidth(SelectedPropertiesComboBox->sizePolicy().hasHeightForWidth());
174 SelectedPropertiesComboBox->setSizePolicy(sizePolicy);
176 gridLayout->addWidget(SelectedPropertiesComboBox, 0, 2, 1, 2);
179 DisplayColorWidget->setObjectName(QString::fromUtf8(
"DisplayColorWidget"));
181 gridLayout->addWidget(DisplayColorWidget, 1, 2, 1, 2);
184 DisplayColor2Widget->setObjectName(QString::fromUtf8(
"DisplayColor2Widget"));
186 gridLayout->addWidget(DisplayColor2Widget, 2, 2, 1, 2);
189 DisplayOpacityWidget->setObjectName(QString::fromUtf8(
"DisplayOpacityWidget"));
191 gridLayout->addWidget(DisplayOpacityWidget, 3, 2, 1, 2);
194 ScrollAreaLayout->addLayout(gridLayout);
196 PropertiesFrame =
new QFrame(scrollAreaWidgetContents);
197 PropertiesFrame->setObjectName(QString::fromUtf8(
"PropertiesFrame"));
198 sizePolicy.setHeightForWidth(PropertiesFrame->sizePolicy().hasHeightForWidth());
199 PropertiesFrame->setSizePolicy(sizePolicy);
200 PropertiesFrame->setFrameShape(QFrame::NoFrame);
201 PropertiesFrame->setFrameShadow(QFrame::Plain);
203 ScrollAreaLayout->addWidget(PropertiesFrame);
205 horizontalLayout =
new QHBoxLayout();
206 horizontalLayout->setSpacing(2);
207 horizontalLayout->setObjectName(QString::fromUtf8(
"horizontalLayout"));
208 RestoreDefaults =
new QPushButton(scrollAreaWidgetContents);
209 RestoreDefaults->setObjectName(QString::fromUtf8(
"RestoreDefaults"));
210 RestoreDefaults->setEnabled(
false);
212 icon5.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqReset.svg"), QSize(), QIcon::Normal, QIcon::Off);
213 RestoreDefaults->setIcon(icon5);
215 horizontalLayout->addWidget(RestoreDefaults);
217 SaveAsArrayDefaults =
new QPushButton(scrollAreaWidgetContents);
218 SaveAsArrayDefaults->setObjectName(QString::fromUtf8(
"SaveAsArrayDefaults"));
219 SaveAsArrayDefaults->setEnabled(
false);
221 icon6.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqSaveArray16.png"), QSize(), QIcon::Normal, QIcon::Off);
222 SaveAsArrayDefaults->setIcon(icon6);
224 horizontalLayout->addWidget(SaveAsArrayDefaults);
226 SaveAsDefaults =
new QPushButton(scrollAreaWidgetContents);
227 SaveAsDefaults->setObjectName(QString::fromUtf8(
"SaveAsDefaults"));
228 SaveAsDefaults->setEnabled(
false);
230 icon7.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqSave.svg"), QSize(), QIcon::Normal, QIcon::Off);
231 SaveAsDefaults->setIcon(icon7);
233 horizontalLayout->addWidget(SaveAsDefaults);
235 horizontalSpacer =
new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
237 horizontalLayout->addItem(horizontalSpacer);
239 Update =
new QPushButton(scrollAreaWidgetContents);
240 Update->setObjectName(QString::fromUtf8(
"Update"));
242 icon8.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqApply.svg"), QSize(), QIcon::Normal, QIcon::Off);
243 Update->setIcon(icon8);
245 horizontalLayout->addWidget(Update);
247 AutoUpdate =
new QPushButton(scrollAreaWidgetContents);
248 AutoUpdate->setObjectName(QString::fromUtf8(
"AutoUpdate"));
250 icon9.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqAutoApply.svg"), QSize(), QIcon::Normal, QIcon::Off);
251 AutoUpdate->setIcon(icon9);
252 AutoUpdate->setCheckable(
true);
254 horizontalLayout->addWidget(AutoUpdate);
257 ScrollAreaLayout->addLayout(horizontalLayout);
259 verticalSpacer =
new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
261 ScrollAreaLayout->addItem(verticalSpacer);
263 ScrollAreaLayout->setStretch(3, 1);
264 scrollArea->setWidget(scrollAreaWidgetContents);
266 verticalLayout->addWidget(scrollArea);
270 QObject::connect(AutoUpdate, SIGNAL(toggled(
bool)), Update, SLOT(setDisabled(
bool)));
272 Update->setDefault(
true);
273 AutoUpdate->setDefault(
false);
276 QMetaObject::connectSlotsByName(ColorMapEditor);
281 ColorMapEditor->setWindowTitle(QCoreApplication::translate(
"ColorMapEditor",
"Form",
nullptr));
282 #if QT_CONFIG(tooltip) 283 ShowScalarBar->setToolTip(QCoreApplication::translate(
"ColorMapEditor",
"Show/hide color legend",
nullptr));
284 #endif // QT_CONFIG(tooltip) 285 ShowScalarBar->setText(QString());
286 #if QT_CONFIG(tooltip) 287 EditScalarBar->setToolTip(QCoreApplication::translate(
"ColorMapEditor",
"Edit color legend properties",
nullptr));
288 #endif // QT_CONFIG(tooltip) 289 EditScalarBar->setText(QCoreApplication::translate(
"ColorMapEditor",
"...",
nullptr));
290 SelectedPropertiesText->setText(QCoreApplication::translate(
"ColorMapEditor",
"Selected Properties",
nullptr));
291 ColorLabel->setText(QCoreApplication::translate(
"ColorMapEditor",
"Color",
nullptr));
292 Color2Label->setText(QCoreApplication::translate(
"ColorMapEditor",
"Color Y",
nullptr));
293 OpacityLabel->setText(QCoreApplication::translate(
"ColorMapEditor",
"Opacity",
nullptr));
294 #if QT_CONFIG(tooltip) 295 UseSeparateColorArray->setToolTip(QCoreApplication::translate(
"ColorMapEditor",
"Use separate color map",
nullptr));
296 #endif // QT_CONFIG(tooltip) 297 UseSeparateColorArray->setText(QString());
298 #if QT_CONFIG(tooltip) 299 Use2DTransferFunction->setToolTip(QCoreApplication::translate(
"ColorMapEditor",
"Use a 2D transfer function. Available only for volume rendering.",
nullptr));
300 #endif // QT_CONFIG(tooltip) 301 #if QT_CONFIG(tooltip) 302 UseSeparateOpacityArray->setToolTip(QCoreApplication::translate(
"ColorMapEditor",
"Use a separate array to map opacity. Available only for volume rendering.",
nullptr));
303 #endif // QT_CONFIG(tooltip) 304 UseSeparateOpacityArray->setText(QCoreApplication::translate(
"ColorMapEditor",
"...",
nullptr));
305 #if QT_CONFIG(tooltip) 306 DisplayColorWidget->setToolTip(QCoreApplication::translate(
"ColorMapEditor",
"Select array used to map color.",
nullptr));
307 #endif // QT_CONFIG(tooltip) 308 #if QT_CONFIG(tooltip) 309 DisplayColor2Widget->setToolTip(QCoreApplication::translate(
"ColorMapEditor",
"Select array used to map to the Y-Axis of a 2D transfer function.",
nullptr));
310 #endif // QT_CONFIG(tooltip) 311 #if QT_CONFIG(tooltip) 312 DisplayOpacityWidget->setToolTip(QCoreApplication::translate(
"ColorMapEditor",
"Select array used to map opacity.",
nullptr));
313 #endif // QT_CONFIG(tooltip) 314 #if QT_CONFIG(tooltip) 315 RestoreDefaults->setToolTip(QCoreApplication::translate(
"ColorMapEditor",
"Restore application default setting values for color map",
nullptr));
316 #endif // QT_CONFIG(tooltip) 317 RestoreDefaults->setText(QString());
318 #if QT_CONFIG(tooltip) 319 SaveAsArrayDefaults->setToolTip(QCoreApplication::translate(
"ColorMapEditor",
"Save current color map settings values as default for arrays of this name",
nullptr));
320 #endif // QT_CONFIG(tooltip) 321 SaveAsArrayDefaults->setText(QString());
322 #if QT_CONFIG(tooltip) 323 SaveAsDefaults->setToolTip(QCoreApplication::translate(
"ColorMapEditor",
"Save current color map settings values as default for all arrays",
nullptr));
324 #endif // QT_CONFIG(tooltip) 325 SaveAsDefaults->setText(QString());
326 #if QT_CONFIG(tooltip) 327 Update->setToolTip(QCoreApplication::translate(
"ColorMapEditor",
"Update views.",
nullptr));
328 #endif // QT_CONFIG(tooltip) 329 Update->setText(QCoreApplication::translate(
"ColorMapEditor",
"Render Views",
nullptr));
330 #if QT_CONFIG(tooltip) 331 AutoUpdate->setToolTip(QCoreApplication::translate(
"ColorMapEditor",
"Render view(s) automatically.",
nullptr));
332 #endif // QT_CONFIG(tooltip) 333 AutoUpdate->setText(QString());
344 #endif // UI_PQCOLORMAPEDITOR_H QToolButton * UseSeparateColorArray
QPushButton * RestoreDefaults
void retranslateUi(QWidget *ColorMapEditor)
QToolButton * ShowScalarBar
QVBoxLayout * ScrollAreaLayout
QWidget * scrollAreaWidgetContents
pqSearchBox is a line edit and an advanced tool button in the same layout.
pqDisplayColor2Widget * DisplayColor2Widget
QSpacerItem * horizontalSpacer
pqDisplayColorWidget * DisplayColorWidget
QToolButton * EditScalarBar
QLabel * SelectedPropertiesText
QPushButton * SaveAsArrayDefaults
QSpacerItem * verticalSpacer
pqDisplayOpacityWidget * DisplayOpacityWidget
QPushButton * SaveAsDefaults
QToolButton * UseSeparateOpacityArray
QToolButton * Use2DTransferFunction
QComboBox * SelectedPropertiesComboBox
QHBoxLayout * SearchBoxLayout
QHBoxLayout * horizontalLayout
void setupUi(QWidget *ColorMapEditor)
QVBoxLayout * verticalLayout