9 #ifndef UI_PQPRESETDIALOG_H 10 #define UI_PQPRESETDIALOG_H 12 #include <QtCore/QVariant> 13 #include <QtWidgets/QApplication> 14 #include <QtWidgets/QCheckBox> 15 #include <QtWidgets/QComboBox> 16 #include <QtWidgets/QFrame> 17 #include <QtWidgets/QGridLayout> 18 #include <QtWidgets/QHBoxLayout> 19 #include <QtWidgets/QHeaderView> 20 #include <QtWidgets/QLabel> 21 #include <QtWidgets/QLineEdit> 22 #include <QtWidgets/QPushButton> 23 #include <QtWidgets/QSpacerItem> 24 #include <QtWidgets/QTableView> 25 #include <QtWidgets/QVBoxLayout> 26 #include <QtWidgets/QWidget> 63 if (pqPresetDialog->objectName().isEmpty())
64 pqPresetDialog->setObjectName(QString::fromUtf8(
"pqPresetDialog"));
65 pqPresetDialog->resize(974, 551);
66 gridLayout =
new QGridLayout(pqPresetDialog);
67 gridLayout->setObjectName(QString::fromUtf8(
"gridLayout"));
68 gradients =
new QTableView(pqPresetDialog);
69 gradients->setObjectName(QString::fromUtf8(
"gradients"));
70 gradients->setMinimumSize(QSize(800, 0));
71 gradients->setEditTriggers(QAbstractItemView::AnyKeyPressed|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked);
72 gradients->setProperty(
"showDropIndicator", QVariant(
true));
73 gradients->setSelectionBehavior(QAbstractItemView::SelectRows);
74 gradients->setSortingEnabled(
false);
75 gradients->horizontalHeader()->setVisible(
true);
76 gradients->horizontalHeader()->setMinimumSectionSize(10);
77 gradients->horizontalHeader()->setStretchLastSection(
true);
78 gradients->verticalHeader()->setVisible(
false);
80 gridLayout->addWidget(gradients, 1, 0, 1, 1);
82 label =
new QLabel(pqPresetDialog);
83 label->setObjectName(QString::fromUtf8(
"label"));
85 gridLayout->addWidget(label, 2, 0, 1, 2);
87 verticalLayout =
new QVBoxLayout();
88 verticalLayout->setObjectName(QString::fromUtf8(
"verticalLayout"));
89 label_2 =
new QLabel(pqPresetDialog);
90 label_2->setObjectName(QString::fromUtf8(
"label_2"));
92 verticalLayout->addWidget(label_2);
94 line =
new QFrame(pqPresetDialog);
95 line->setObjectName(QString::fromUtf8(
"line"));
96 line->setFrameShape(QFrame::HLine);
97 line->setFrameShadow(QFrame::Sunken);
99 verticalLayout->addWidget(line);
101 colors =
new QCheckBox(pqPresetDialog);
102 colors->setObjectName(QString::fromUtf8(
"colors"));
103 colors->setChecked(
true);
105 verticalLayout->addWidget(colors);
107 opacities =
new QCheckBox(pqPresetDialog);
108 opacities->setObjectName(QString::fromUtf8(
"opacities"));
109 opacities->setEnabled(
false);
110 opacities->setChecked(
true);
112 verticalLayout->addWidget(opacities);
114 annotations =
new QCheckBox(pqPresetDialog);
115 annotations->setObjectName(QString::fromUtf8(
"annotations"));
116 annotations->setEnabled(
false);
117 annotations->setChecked(
true);
119 verticalLayout->addWidget(annotations);
121 useRegexp =
new QCheckBox(pqPresetDialog);
122 useRegexp->setObjectName(QString::fromUtf8(
"useRegexp"));
123 useRegexp->setEnabled(
false);
124 useRegexp->setChecked(
false);
125 useRegexp->setVisible(
false);
127 verticalLayout->addWidget(useRegexp);
129 regexpLine =
new QLineEdit(pqPresetDialog);
130 regexpLine->setObjectName(QString::fromUtf8(
"regexpLine"));
131 regexpLine->setVisible(
false);
133 verticalLayout->addWidget(regexpLine);
135 usePresetRange =
new QCheckBox(pqPresetDialog);
136 usePresetRange->setObjectName(QString::fromUtf8(
"usePresetRange"));
138 verticalLayout->addWidget(usePresetRange);
140 verticalSpacer_2 =
new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
142 verticalLayout->addItem(verticalSpacer_2);
144 label_3 =
new QLabel(pqPresetDialog);
145 label_3->setObjectName(QString::fromUtf8(
"label_3"));
147 verticalLayout->addWidget(label_3);
149 line_2 =
new QFrame(pqPresetDialog);
150 line_2->setObjectName(QString::fromUtf8(
"line_2"));
151 line_2->setFrameShape(QFrame::HLine);
152 line_2->setFrameShadow(QFrame::Sunken);
154 verticalLayout->addWidget(line_2);
156 showDefault =
new QCheckBox(pqPresetDialog);
157 showDefault->setObjectName(QString::fromUtf8(
"showDefault"));
159 verticalLayout->addWidget(showDefault);
161 verticalSpacer =
new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
163 verticalLayout->addItem(verticalSpacer);
165 apply =
new QPushButton(pqPresetDialog);
166 apply->setObjectName(QString::fromUtf8(
"apply"));
167 apply->setEnabled(
false);
169 verticalLayout->addWidget(apply);
171 importPresets =
new QPushButton(pqPresetDialog);
172 importPresets->setObjectName(QString::fromUtf8(
"importPresets"));
174 verticalLayout->addWidget(importPresets);
176 exportPresets =
new QPushButton(pqPresetDialog);
177 exportPresets->setObjectName(QString::fromUtf8(
"exportPresets"));
178 exportPresets->setEnabled(
false);
180 verticalLayout->addWidget(exportPresets);
182 remove =
new QPushButton(pqPresetDialog);
183 remove->setObjectName(QString::fromUtf8(
"remove"));
184 remove->setEnabled(
false);
186 verticalLayout->addWidget(
remove);
188 close =
new QPushButton(pqPresetDialog);
189 close->setObjectName(QString::fromUtf8(
"close"));
191 verticalLayout->addWidget(close);
194 gridLayout->addLayout(verticalLayout, 0, 1, 3, 1);
196 widget =
new QWidget(pqPresetDialog);
197 widget->setObjectName(QString::fromUtf8(
"widget"));
198 horizontalLayout =
new QHBoxLayout(widget);
199 horizontalLayout->setSpacing(4);
200 horizontalLayout->setObjectName(QString::fromUtf8(
"horizontalLayout"));
201 horizontalLayout->setContentsMargins(0, 0, 0, 0);
203 searchBox->setObjectName(QString::fromUtf8(
"searchBox"));
204 QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
205 sizePolicy.setHorizontalStretch(0);
206 sizePolicy.setVerticalStretch(0);
207 sizePolicy.setHeightForWidth(searchBox->sizePolicy().hasHeightForWidth());
208 searchBox->setSizePolicy(sizePolicy);
209 searchBox->setMinimumSize(QSize(0, 10));
210 searchBox->setProperty(
"settingKey", QVariant(QString::fromUtf8(
"")));
211 searchBox->setProperty(
"advancedSearchEnabled", QVariant(
false));
213 horizontalLayout->addWidget(searchBox);
215 groupChooser =
new QComboBox(widget);
216 groupChooser->setObjectName(QString::fromUtf8(
"groupChooser"));
218 horizontalLayout->addWidget(groupChooser);
221 gridLayout->addWidget(widget, 0, 0, 1, 1);
225 QObject::connect(close, SIGNAL(clicked()), pqPresetDialog, SLOT(
close()));
227 QMetaObject::connectSlotsByName(pqPresetDialog);
232 pqPresetDialog->setWindowTitle(QCoreApplication::translate(
"pqPresetDialog",
"Choose Preset",
nullptr));
233 label->setText(QCoreApplication::translate(
"pqPresetDialog",
"<html><head/><body><p><span style=\" font-weight:600;\">Tip: <click> to select, <double-click> to apply a preset.</span></p></body></html>",
nullptr));
234 label_2->setText(QCoreApplication::translate(
"pqPresetDialog",
"<html><head/><body><p><span style=\" font-weight:600;\">Options to load:</span></p></body></html>",
nullptr));
235 #if QT_CONFIG(tooltip) 236 colors->setToolTip(QCoreApplication::translate(
"pqPresetDialog",
"<html><head/><body><p>Uncheck to not load colors from the selected preset.</p></body></html>",
nullptr));
237 #endif // QT_CONFIG(tooltip) 238 colors->setText(QCoreApplication::translate(
"pqPresetDialog",
"Colors",
nullptr));
239 #if QT_CONFIG(tooltip) 240 opacities->setToolTip(QCoreApplication::translate(
"pqPresetDialog",
"<html><head/><body><p>Uncheck to not load opacities from the selected preset.</p></body></html>",
nullptr));
241 #endif // QT_CONFIG(tooltip) 242 opacities->setText(QCoreApplication::translate(
"pqPresetDialog",
"Opacities",
nullptr));
243 #if QT_CONFIG(tooltip) 244 annotations->setToolTip(QCoreApplication::translate(
"pqPresetDialog",
"<html><head/><body><p>Uncheck to not load annotations from the selected preset.</p></body></html>",
nullptr));
245 #endif // QT_CONFIG(tooltip) 246 annotations->setText(QCoreApplication::translate(
"pqPresetDialog",
"Annotations",
nullptr));
247 #if QT_CONFIG(tooltip) 248 useRegexp->setToolTip(QCoreApplication::translate(
"pqPresetDialog",
"Check to use following regexp when loading annotations from the selected preset.",
nullptr));
249 #endif // QT_CONFIG(tooltip) 250 useRegexp->setText(QCoreApplication::translate(
"pqPresetDialog",
"Use Regular Expression",
nullptr));
251 #if QT_CONFIG(tooltip) 252 regexpLine->setToolTip(QCoreApplication::translate(
"pqPresetDialog",
"<html><head/><body><p>This regexp will be applied to seriesName and preset value. If any, matching groups are used, otherwise whole matching. </p>\n" 253 " E.g. series name is `y1 \313\223custom\313\222`, preset have `y1 \313\223generic\313\222` and `z1 \313\223custom\313\222`. Then with the regexp `(.*) \313\223.*\313\222` the `y1 \313\223custom\313\222` series will match with `y1 \313\223generic\313\222`, whereas with `.* (\313\223custom\313\222)` it will match with `z1 \313\223custom\313\222`.\n" 254 " </p></body></html>\n" 256 #endif // QT_CONFIG(tooltip) 257 regexpLine->setText(QCoreApplication::translate(
"pqPresetDialog",
"(.*)",
nullptr));
258 #if QT_CONFIG(tooltip) 259 usePresetRange->setToolTip(QCoreApplication::translate(
"pqPresetDialog",
"<html><head/><body><p>Check to use data range specified in the preset.</p></body></html>",
nullptr));
260 #endif // QT_CONFIG(tooltip) 261 usePresetRange->setText(QCoreApplication::translate(
"pqPresetDialog",
"Use preset range",
nullptr));
262 label_3->setText(QCoreApplication::translate(
"pqPresetDialog",
"<html><head/><body><p><span style=\" font-weight:600;\">Actions on selected:</span></p></body></html>",
nullptr));
263 showDefault->setText(QCoreApplication::translate(
"pqPresetDialog",
"Show current preset\n" 264 "in default mode",
nullptr));
265 apply->setText(QCoreApplication::translate(
"pqPresetDialog",
"Apply",
nullptr));
266 #if QT_CONFIG(tooltip) 267 importPresets->setToolTip(QCoreApplication::translate(
"pqPresetDialog",
"Import a preset from a json file, imported preset will appear in italics",
nullptr));
268 #endif // QT_CONFIG(tooltip) 269 importPresets->setText(QCoreApplication::translate(
"pqPresetDialog",
"Import",
nullptr));
270 exportPresets->setText(QCoreApplication::translate(
"pqPresetDialog",
"Export",
nullptr));
271 remove->setText(QCoreApplication::translate(
"pqPresetDialog",
"Remove",
nullptr));
272 close->setText(QCoreApplication::translate(
"pqPresetDialog",
"Close",
nullptr));
283 #endif // UI_PQPRESETDIALOG_H
QCheckBox * usePresetRange
QHBoxLayout * horizontalLayout
pqPresetDialog is the dialog used by to show the user with a choice of color maps/opacity maps/preset...
QVBoxLayout * verticalLayout
pqSearchBox is a line edit and an advanced tool button in the same layout.
void retranslateUi(QWidget *pqPresetDialog)
QPushButton * exportPresets
void setupUi(QWidget *pqPresetDialog)
QSpacerItem * verticalSpacer
QSpacerItem * verticalSpacer_2
QPushButton * importPresets