9 #ifndef UI_PQCOLORTOOLBAR_H 10 #define UI_PQCOLORTOOLBAR_H 12 #include <QtCore/QVariant> 13 #include <QtWidgets/QAction> 14 #include <QtWidgets/QApplication> 15 #include <QtWidgets/QToolBar> 32 if (variableToolbar->objectName().isEmpty())
33 variableToolbar->setObjectName(QString::fromUtf8(
"variableToolbar"));
34 variableToolbar->setOrientation(Qt::Horizontal);
35 actionScalarBarVisibility =
new QAction(variableToolbar);
36 actionScalarBarVisibility->setObjectName(QString::fromUtf8(
"actionScalarBarVisibility"));
37 actionScalarBarVisibility->setCheckable(
true);
38 actionScalarBarVisibility->setEnabled(
false);
39 const QIcon icon = QIcon(QString::fromUtf8(
":/pqWidgets/Icons/pqScalarBar.svg"));
40 actionScalarBarVisibility->setIcon(icon);
41 actionEditColorMap =
new QAction(variableToolbar);
42 actionEditColorMap->setObjectName(QString::fromUtf8(
"actionEditColorMap"));
43 actionEditColorMap->setEnabled(
false);
44 const QIcon icon1 = QIcon(QString::fromUtf8(
":/pqWidgets/Icons/pqEditColor.svg"));
45 actionEditColorMap->setIcon(icon1);
46 actionUseSeparateColorMap =
new QAction(variableToolbar);
47 actionUseSeparateColorMap->setObjectName(QString::fromUtf8(
"actionUseSeparateColorMap"));
48 actionUseSeparateColorMap->setEnabled(
false);
49 const QIcon icon2 = QIcon(QString::fromUtf8(
":/pqWidgets/Icons/pqSeparateColorMap.svg"));
50 actionUseSeparateColorMap->setIcon(icon2);
51 actionResetRange =
new QAction(variableToolbar);
52 actionResetRange->setObjectName(QString::fromUtf8(
"actionResetRange"));
53 actionResetRange->setEnabled(
false);
54 const QIcon icon3 = QIcon(QString::fromUtf8(
":/pqWidgets/Icons/pqResetRange.svg"));
55 actionResetRange->setIcon(icon3);
56 actionRescaleCustomRange =
new QAction(variableToolbar);
57 actionRescaleCustomRange->setObjectName(QString::fromUtf8(
"actionRescaleCustomRange"));
58 actionRescaleCustomRange->setEnabled(
false);
59 const QIcon icon4 = QIcon(QString::fromUtf8(
":/pqWidgets/Icons/pqResetRangeCustom.svg"));
60 actionRescaleCustomRange->setIcon(icon4);
61 actionRescaleTemporalRange =
new QAction(variableToolbar);
62 actionRescaleTemporalRange->setObjectName(QString::fromUtf8(
"actionRescaleTemporalRange"));
63 actionRescaleTemporalRange->setEnabled(
false);
65 icon5.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqResetRangeTemporal.svg"), QSize(), QIcon::Normal, QIcon::Off);
66 actionRescaleTemporalRange->setIcon(icon5);
67 actionRescaleVisibleRange =
new QAction(variableToolbar);
68 actionRescaleVisibleRange->setObjectName(QString::fromUtf8(
"actionRescaleVisibleRange"));
69 actionRescaleVisibleRange->setEnabled(
false);
70 const QIcon icon6 = QIcon(QString::fromUtf8(
":/pqWidgets/Icons/pqResetToVisibleRange.svg"));
71 actionRescaleVisibleRange->setIcon(icon6);
73 variableToolbar->addAction(actionScalarBarVisibility);
74 variableToolbar->addAction(actionEditColorMap);
75 variableToolbar->addAction(actionUseSeparateColorMap);
76 variableToolbar->addAction(actionResetRange);
77 variableToolbar->addAction(actionRescaleCustomRange);
78 variableToolbar->addAction(actionRescaleTemporalRange);
79 variableToolbar->addAction(actionRescaleVisibleRange);
83 QMetaObject::connectSlotsByName(variableToolbar);
88 variableToolbar->setWindowTitle(QCoreApplication::translate(
"pqColorToolbar",
"Active Variable Controls",
nullptr));
89 actionScalarBarVisibility->setText(QCoreApplication::translate(
"pqColorToolbar",
"Show Color Legend",
nullptr));
90 #if QT_CONFIG(tooltip) 91 actionScalarBarVisibility->setToolTip(QCoreApplication::translate(
"pqColorToolbar",
"Toggle Color Legend Visibility",
nullptr));
92 #endif // QT_CONFIG(tooltip) 93 #if QT_CONFIG(statustip) 94 actionScalarBarVisibility->setStatusTip(QCoreApplication::translate(
"pqColorToolbar",
"Toggle Color Legend Visibility",
nullptr));
95 #endif // QT_CONFIG(statustip) 96 actionEditColorMap->setText(QCoreApplication::translate(
"pqColorToolbar",
"Edit Color Map",
nullptr));
97 #if QT_CONFIG(statustip) 98 actionEditColorMap->setStatusTip(QCoreApplication::translate(
"pqColorToolbar",
"Edit Color Map",
nullptr));
99 #endif // QT_CONFIG(statustip) 100 actionUseSeparateColorMap->setText(QCoreApplication::translate(
"pqColorToolbar",
"Use Separate Color Map",
nullptr));
101 #if QT_CONFIG(statustip) 102 actionUseSeparateColorMap->setStatusTip(QCoreApplication::translate(
"pqColorToolbar",
"Use Separate Color Map",
nullptr));
103 #endif // QT_CONFIG(statustip) 104 actionResetRange->setText(QCoreApplication::translate(
"pqColorToolbar",
"Reset Range",
nullptr));
105 #if QT_CONFIG(tooltip) 106 actionResetRange->setToolTip(QCoreApplication::translate(
"pqColorToolbar",
"Rescale to Data Range",
nullptr));
107 #endif // QT_CONFIG(tooltip) 108 #if QT_CONFIG(statustip) 109 actionResetRange->setStatusTip(QCoreApplication::translate(
"pqColorToolbar",
"Rescale to Data Range",
nullptr));
110 #endif // QT_CONFIG(statustip) 111 actionRescaleCustomRange->setText(QCoreApplication::translate(
"pqColorToolbar",
"Rescale Custom Range",
nullptr));
112 #if QT_CONFIG(tooltip) 113 actionRescaleCustomRange->setToolTip(QCoreApplication::translate(
"pqColorToolbar",
"Rescale to Custom Data Range",
nullptr));
114 #endif // QT_CONFIG(tooltip) 115 #if QT_CONFIG(statustip) 116 actionRescaleCustomRange->setStatusTip(QCoreApplication::translate(
"pqColorToolbar",
"Rescale to Custom Data Range",
nullptr));
117 #endif // QT_CONFIG(statustip) 118 actionRescaleTemporalRange->setText(QCoreApplication::translate(
"pqColorToolbar",
"Rescale Temporal Range",
nullptr));
119 #if QT_CONFIG(tooltip) 120 actionRescaleTemporalRange->setToolTip(QCoreApplication::translate(
"pqColorToolbar",
"Rescale to data range over all timesteps",
nullptr));
121 #endif // QT_CONFIG(tooltip) 122 #if QT_CONFIG(statustip) 123 actionRescaleTemporalRange->setStatusTip(QCoreApplication::translate(
"pqColorToolbar",
"Rescale to data range over all timesteps",
nullptr));
124 #endif // QT_CONFIG(statustip) 125 actionRescaleVisibleRange->setText(QCoreApplication::translate(
"pqColorToolbar",
"Rescale Visible Range",
nullptr));
126 #if QT_CONFIG(tooltip) 127 actionRescaleVisibleRange->setToolTip(QCoreApplication::translate(
"pqColorToolbar",
"Rescale to Visible Data Range",
nullptr));
128 #endif // QT_CONFIG(tooltip) 129 #if QT_CONFIG(statustip) 130 actionRescaleVisibleRange->setStatusTip(QCoreApplication::translate(
"pqColorToolbar",
"Rescale to Visible Data Range",
nullptr));
131 #endif // QT_CONFIG(statustip) 142 #endif // UI_PQCOLORTOOLBAR_H