9 #ifndef UI_PQAXESTOOLBAR_H 10 #define UI_PQAXESTOOLBAR_H 12 #include <QtCore/QVariant> 13 #include <QtWidgets/QAction> 14 #include <QtWidgets/QApplication> 15 #include <QtWidgets/QToolBar> 29 if (axesToolbar->objectName().isEmpty())
30 axesToolbar->setObjectName(QString::fromUtf8(
"axesToolbar"));
31 axesToolbar->setEnabled(
true);
32 axesToolbar->setOrientation(Qt::Horizontal);
33 actionShowOrientationAxes =
new QAction(axesToolbar);
34 actionShowOrientationAxes->setObjectName(QString::fromUtf8(
"actionShowOrientationAxes"));
35 actionShowOrientationAxes->setCheckable(
true);
36 actionShowOrientationAxes->setEnabled(
false);
37 const QIcon icon = QIcon(QString::fromUtf8(
":/pqWidgets/Icons/pqShowOrientationAxes.svg"));
38 actionShowOrientationAxes->setIcon(icon);
39 actionShowCenterAxes =
new QAction(axesToolbar);
40 actionShowCenterAxes->setObjectName(QString::fromUtf8(
"actionShowCenterAxes"));
41 actionShowCenterAxes->setCheckable(
true);
42 actionShowCenterAxes->setEnabled(
false);
43 const QIcon icon1 = QIcon(QString::fromUtf8(
":/pqWidgets/Icons/pqShowCenterAxes.svg"));
44 actionShowCenterAxes->setIcon(icon1);
45 actionPickCenter =
new QAction(axesToolbar);
46 actionPickCenter->setObjectName(QString::fromUtf8(
"actionPickCenter"));
47 actionPickCenter->setCheckable(
true);
48 actionPickCenter->setEnabled(
false);
49 const QIcon icon2 = QIcon(QString::fromUtf8(
":/pqWidgets/Icons/pqPickCenter.svg"));
50 actionPickCenter->setIcon(icon2);
51 actionResetCenter =
new QAction(axesToolbar);
52 actionResetCenter->setObjectName(QString::fromUtf8(
"actionResetCenter"));
53 actionResetCenter->setEnabled(
false);
54 const QIcon icon3 = QIcon(QString::fromUtf8(
":/pqWidgets/Icons/pqResetCenter.svg"));
55 actionResetCenter->setIcon(icon3);
57 axesToolbar->addAction(actionShowOrientationAxes);
58 axesToolbar->addAction(actionShowCenterAxes);
59 axesToolbar->addAction(actionResetCenter);
60 axesToolbar->addAction(actionPickCenter);
64 QMetaObject::connectSlotsByName(axesToolbar);
69 axesToolbar->setWindowTitle(QCoreApplication::translate(
"pqAxesToolbar",
"Center Axes Controls",
nullptr));
70 actionShowOrientationAxes->setText(QCoreApplication::translate(
"pqAxesToolbar",
"Show Orientation Axes",
nullptr));
71 #if QT_CONFIG(statustip) 72 actionShowOrientationAxes->setStatusTip(QCoreApplication::translate(
"pqAxesToolbar",
"Show/Hide orientation axes",
nullptr));
73 #endif // QT_CONFIG(statustip) 74 actionShowCenterAxes->setText(QCoreApplication::translate(
"pqAxesToolbar",
"Show Center",
nullptr));
75 #if QT_CONFIG(statustip) 76 actionShowCenterAxes->setStatusTip(QCoreApplication::translate(
"pqAxesToolbar",
"Show/Hide center of rotation",
nullptr));
77 #endif // QT_CONFIG(statustip) 78 actionPickCenter->setText(QCoreApplication::translate(
"pqAxesToolbar",
"Pick Center",
nullptr));
79 actionPickCenter->setIconText(QCoreApplication::translate(
"pqAxesToolbar",
"Pick Center",
nullptr));
80 #if QT_CONFIG(tooltip) 81 actionPickCenter->setToolTip(QCoreApplication::translate(
"pqAxesToolbar",
"Pick Center",
nullptr));
82 #endif // QT_CONFIG(tooltip) 83 #if QT_CONFIG(statustip) 84 actionPickCenter->setStatusTip(QCoreApplication::translate(
"pqAxesToolbar",
"Mouse press to pick center of rotation",
nullptr));
85 #endif // QT_CONFIG(statustip) 86 actionResetCenter->setText(QCoreApplication::translate(
"pqAxesToolbar",
"Reset Center",
nullptr));
87 #if QT_CONFIG(statustip) 88 actionResetCenter->setStatusTip(QCoreApplication::translate(
"pqAxesToolbar",
"Reset center of rotation",
nullptr));
89 #endif // QT_CONFIG(statustip) 100 #endif // UI_PQAXESTOOLBAR_H