9 #ifndef UI_PQCUSTOMIZESHORTCUTSDIALOG_H 10 #define UI_PQCUSTOMIZESHORTCUTSDIALOG_H 12 #include <QtCore/QVariant> 13 #include <QtWidgets/QApplication> 14 #include <QtWidgets/QDialog> 15 #include <QtWidgets/QDialogButtonBox> 16 #include <QtWidgets/QGridLayout> 17 #include <QtWidgets/QHeaderView> 18 #include <QtWidgets/QKeySequenceEdit> 19 #include <QtWidgets/QPushButton> 20 #include <QtWidgets/QTreeView> 21 #include <QtWidgets/QVBoxLayout> 22 #include <QtWidgets/QWidget> 44 if (pqCustomizeShortcutsDialog->objectName().isEmpty())
45 pqCustomizeShortcutsDialog->setObjectName(QString::fromUtf8(
"pqCustomizeShortcutsDialog"));
46 pqCustomizeShortcutsDialog->resize(400, 300);
47 QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
48 sizePolicy.setHorizontalStretch(0);
49 sizePolicy.setVerticalStretch(0);
50 sizePolicy.setHeightForWidth(pqCustomizeShortcutsDialog->sizePolicy().hasHeightForWidth());
51 pqCustomizeShortcutsDialog->setSizePolicy(sizePolicy);
52 verticalLayout =
new QVBoxLayout(pqCustomizeShortcutsDialog);
53 verticalLayout->setObjectName(QString::fromUtf8(
"verticalLayout"));
54 searchBox =
new pqSearchBox(pqCustomizeShortcutsDialog);
55 searchBox->setObjectName(QString::fromUtf8(
"searchBox"));
57 verticalLayout->addWidget(searchBox);
59 treeView =
new QTreeView(pqCustomizeShortcutsDialog);
60 treeView->setObjectName(QString::fromUtf8(
"treeView"));
61 treeView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
62 treeView->setSizeAdjustPolicy(QAbstractScrollArea::AdjustIgnored);
63 treeView->setProperty(
"showDropIndicator", QVariant(
false));
64 treeView->setAutoExpandDelay(0);
66 verticalLayout->addWidget(treeView);
68 widget =
new QWidget(pqCustomizeShortcutsDialog);
69 widget->setObjectName(QString::fromUtf8(
"widget"));
70 gridLayout =
new QGridLayout(widget);
71 gridLayout->setSpacing(6);
72 gridLayout->setObjectName(QString::fromUtf8(
"gridLayout"));
73 gridLayout->setContentsMargins(0, 0, 0, 0);
74 keySequenceEdit =
new QKeySequenceEdit(widget);
75 keySequenceEdit->setObjectName(QString::fromUtf8(
"keySequenceEdit"));
76 QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Fixed);
77 sizePolicy1.setHorizontalStretch(1);
78 sizePolicy1.setVerticalStretch(0);
79 sizePolicy1.setHeightForWidth(keySequenceEdit->sizePolicy().hasHeightForWidth());
80 keySequenceEdit->setSizePolicy(sizePolicy1);
82 gridLayout->addWidget(keySequenceEdit, 0, 0, 1, 1);
84 recordButton =
new QPushButton(widget);
85 recordButton->setObjectName(QString::fromUtf8(
"recordButton"));
87 gridLayout->addWidget(recordButton, 0, 1, 1, 1);
89 clearButton =
new QPushButton(widget);
90 clearButton->setObjectName(QString::fromUtf8(
"clearButton"));
91 QSizePolicy sizePolicy2(QSizePolicy::Minimum, QSizePolicy::Fixed);
92 sizePolicy2.setHorizontalStretch(0);
93 sizePolicy2.setVerticalStretch(0);
94 sizePolicy2.setHeightForWidth(clearButton->sizePolicy().hasHeightForWidth());
95 clearButton->setSizePolicy(sizePolicy2);
97 gridLayout->addWidget(clearButton, 0, 2, 1, 1);
99 resetButton =
new QPushButton(widget);
100 resetButton->setObjectName(QString::fromUtf8(
"resetButton"));
102 gridLayout->addWidget(resetButton, 0, 3, 1, 1);
104 buttonBox =
new QDialogButtonBox(widget);
105 buttonBox->setObjectName(QString::fromUtf8(
"buttonBox"));
106 buttonBox->setOrientation(Qt::Horizontal);
107 buttonBox->setStandardButtons(QDialogButtonBox::Ok);
109 gridLayout->addWidget(buttonBox, 1, 3, 1, 1);
111 resetAllButton =
new QPushButton(widget);
112 resetAllButton->setObjectName(QString::fromUtf8(
"resetAllButton"));
114 gridLayout->addWidget(resetAllButton, 1, 0, 1, 1);
117 verticalLayout->addWidget(widget);
121 QObject::connect(buttonBox, SIGNAL(accepted()), pqCustomizeShortcutsDialog, SLOT(accept()));
122 QObject::connect(buttonBox, SIGNAL(rejected()), pqCustomizeShortcutsDialog, SLOT(reject()));
124 QMetaObject::connectSlotsByName(pqCustomizeShortcutsDialog);
129 pqCustomizeShortcutsDialog->setWindowTitle(QCoreApplication::translate(
"pqCustomizeShortcutsDialog",
"Dialog",
nullptr));
130 #if QT_CONFIG(tooltip) 131 recordButton->setToolTip(QCoreApplication::translate(
"pqCustomizeShortcutsDialog",
"To set the shortcut for the selected action, press this then enter the shortcut.",
nullptr));
132 #endif // QT_CONFIG(tooltip) 133 recordButton->setText(QCoreApplication::translate(
"pqCustomizeShortcutsDialog",
"Record",
nullptr));
134 #if QT_CONFIG(tooltip) 135 clearButton->setToolTip(QCoreApplication::translate(
"pqCustomizeShortcutsDialog",
"Remove the shortcut for the selected action.",
nullptr));
136 #endif // QT_CONFIG(tooltip) 137 clearButton->setText(QCoreApplication::translate(
"pqCustomizeShortcutsDialog",
"Clear",
nullptr));
138 #if QT_CONFIG(tooltip) 139 resetButton->setToolTip(QCoreApplication::translate(
"pqCustomizeShortcutsDialog",
"Restore the default shortcut for the selected action.",
nullptr));
140 #endif // QT_CONFIG(tooltip) 141 resetButton->setText(QCoreApplication::translate(
"pqCustomizeShortcutsDialog",
"Reset",
nullptr));
142 #if QT_CONFIG(tooltip) 143 resetAllButton->setToolTip(QCoreApplication::translate(
"pqCustomizeShortcutsDialog",
"Resets the shortcuts for all actions to the default or clears the shortcut if there is no default.",
nullptr));
144 #endif // QT_CONFIG(tooltip) 145 resetAllButton->setText(QCoreApplication::translate(
"pqCustomizeShortcutsDialog",
"Reset All",
nullptr));
156 #endif // UI_PQCUSTOMIZESHORTCUTSDIALOG_H
QPushButton * resetAllButton
pqSearchBox is a line edit and an advanced tool button in the same layout.
QPushButton * resetButton
void retranslateUi(QDialog *pqCustomizeShortcutsDialog)
QPushButton * clearButton
QVBoxLayout * verticalLayout
void setupUi(QDialog *pqCustomizeShortcutsDialog)
QKeySequenceEdit * keySequenceEdit
QDialogButtonBox * buttonBox
QPushButton * recordButton