9 #ifndef UI_PQEDITMACROSDIALOG_H 10 #define UI_PQEDITMACROSDIALOG_H 12 #include <QtCore/QVariant> 13 #include <QtGui/QIcon> 14 #include <QtWidgets/QApplication> 15 #include <QtWidgets/QDialog> 16 #include <QtWidgets/QDialogButtonBox> 17 #include <QtWidgets/QGridLayout> 18 #include <QtWidgets/QGroupBox> 19 #include <QtWidgets/QHeaderView> 20 #include <QtWidgets/QSpacerItem> 21 #include <QtWidgets/QToolButton> 22 #include <QtWidgets/QTreeView> 23 #include <QtWidgets/QVBoxLayout> 47 if (pqEditMacrosDialog->objectName().isEmpty())
48 pqEditMacrosDialog->setObjectName(QString::fromUtf8(
"pqEditMacrosDialog"));
49 pqEditMacrosDialog->resize(786, 485);
50 gridLayout =
new QGridLayout(pqEditMacrosDialog);
51 gridLayout->setObjectName(QString::fromUtf8(
"gridLayout"));
52 buttonBox =
new QDialogButtonBox(pqEditMacrosDialog);
53 buttonBox->setObjectName(QString::fromUtf8(
"buttonBox"));
54 buttonBox->setOrientation(Qt::Horizontal);
55 buttonBox->setStandardButtons(QDialogButtonBox::Ok);
57 gridLayout->addWidget(buttonBox, 3, 0, 1, 2);
59 macrosGroup =
new QGroupBox(pqEditMacrosDialog);
60 macrosGroup->setObjectName(QString::fromUtf8(
"macrosGroup"));
61 QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
62 sizePolicy.setHorizontalStretch(0);
63 sizePolicy.setVerticalStretch(0);
64 sizePolicy.setHeightForWidth(macrosGroup->sizePolicy().hasHeightForWidth());
65 macrosGroup->setSizePolicy(sizePolicy);
66 gridLayout1 =
new QGridLayout(macrosGroup);
67 gridLayout1->setObjectName(QString::fromUtf8(
"gridLayout1"));
68 gridLayout1->setContentsMargins(0, -1, -1, -1);
69 macrosTree =
new QTreeView(macrosGroup);
70 macrosTree->setObjectName(QString::fromUtf8(
"macrosTree"));
71 macrosTree->setContextMenuPolicy(Qt::NoContextMenu);
72 macrosTree->setAcceptDrops(
false);
73 macrosTree->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
74 macrosTree->setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContentsOnFirstShow);
75 macrosTree->setDragEnabled(
true);
76 macrosTree->setDragDropMode(QAbstractItemView::DragOnly);
77 macrosTree->setDefaultDropAction(Qt::CopyAction);
78 macrosTree->setAlternatingRowColors(
true);
79 macrosTree->setSelectionBehavior(QAbstractItemView::SelectRows);
80 macrosTree->setSelectionMode(QAbstractItemView::ExtendedSelection);
81 macrosTree->setRootIsDecorated(
false);
82 macrosTree->setSortingEnabled(
true);
84 gridLayout1->addWidget(macrosTree, 9, 0, 1, 1);
87 searchBox->setObjectName(QString::fromUtf8(
"searchBox"));
88 searchBox->setProperty(
"settingKey", QVariant(QString::fromUtf8(
"showAdvancedProperties")));
89 searchBox->setProperty(
"advancedSearchEnabled", QVariant(
false));
91 gridLayout1->addWidget(searchBox, 0, 0, 1, 1);
93 verticalLayout =
new QVBoxLayout();
94 verticalLayout->setObjectName(QString::fromUtf8(
"verticalLayout"));
95 add =
new QToolButton(macrosGroup);
96 add->setObjectName(QString::fromUtf8(
"add"));
98 icon.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqOpen.svg"), QSize(), QIcon::Normal, QIcon::Off);
101 verticalLayout->addWidget(add);
103 remove =
new QToolButton(macrosGroup);
104 remove->setObjectName(QString::fromUtf8(
"remove"));
106 icon1.addFile(QString::fromUtf8(
":/QtWidgets/Icons/pqMinus.svg"), QSize(), QIcon::Normal, QIcon::Off);
107 remove->setIcon(icon1);
109 verticalLayout->addWidget(
remove);
111 edit =
new QToolButton(macrosGroup);
112 edit->setObjectName(QString::fromUtf8(
"edit"));
114 icon2.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqWrench.svg"), QSize(), QIcon::Normal, QIcon::Off);
115 edit->setIcon(icon2);
117 verticalLayout->addWidget(edit);
119 setIcon =
new QToolButton(macrosGroup);
120 setIcon->setObjectName(QString::fromUtf8(
"setIcon"));
122 icon3.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqChooseIcon.svg"), QSize(), QIcon::Normal, QIcon::Off);
123 setIcon->setIcon(icon3);
125 verticalLayout->addWidget(setIcon);
127 verticalSpacer =
new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
129 verticalLayout->addItem(verticalSpacer);
131 removeAll =
new QToolButton(macrosGroup);
132 removeAll->setObjectName(QString::fromUtf8(
"removeAll"));
134 icon4.addFile(QString::fromUtf8(
":/QtWidgets/Icons/pqDelete.svg"), QSize(), QIcon::Normal, QIcon::Off);
135 removeAll->setIcon(icon4);
137 verticalLayout->addWidget(removeAll);
140 gridLayout1->addLayout(verticalLayout, 9, 1, 1, 1);
143 gridLayout->addWidget(macrosGroup, 0, 0, 2, 2);
147 QObject::connect(buttonBox, SIGNAL(accepted()), pqEditMacrosDialog, SLOT(accept()));
148 QObject::connect(buttonBox, SIGNAL(rejected()), pqEditMacrosDialog, SLOT(reject()));
150 QMetaObject::connectSlotsByName(pqEditMacrosDialog);
155 pqEditMacrosDialog->setWindowTitle(QCoreApplication::translate(
"pqEditMacrosDialog",
"Edit Macros",
nullptr));
156 macrosGroup->setTitle(QString());
157 #if QT_CONFIG(tooltip) 158 add->setToolTip(QCoreApplication::translate(
"pqEditMacrosDialog",
"Import new macro",
nullptr));
159 #endif // QT_CONFIG(tooltip) 160 add->setText(QCoreApplication::translate(
"pqEditMacrosDialog",
"...",
nullptr));
161 #if QT_CONFIG(tooltip) 162 remove->setToolTip(QCoreApplication::translate(
"pqEditMacrosDialog",
"Remove selected macros",
nullptr));
163 #endif // QT_CONFIG(tooltip) 164 remove->setText(QCoreApplication::translate(
"pqEditMacrosDialog",
"...",
nullptr));
165 #if QT_CONFIG(tooltip) 166 edit->setToolTip(QCoreApplication::translate(
"pqEditMacrosDialog",
"Open macro in a new tab",
nullptr));
167 #endif // QT_CONFIG(tooltip) 168 edit->setText(QCoreApplication::translate(
"pqEditMacrosDialog",
"...",
nullptr));
169 #if QT_CONFIG(tooltip) 170 setIcon->setToolTip(QCoreApplication::translate(
"pqEditMacrosDialog",
"Set an icon to the macro",
nullptr));
171 #endif // QT_CONFIG(tooltip) 172 setIcon->setText(QCoreApplication::translate(
"pqEditMacrosDialog",
"...",
nullptr));
173 #if QT_CONFIG(tooltip) 174 removeAll->setToolTip(QCoreApplication::translate(
"pqEditMacrosDialog",
"Remove all macros",
nullptr));
175 #endif // QT_CONFIG(tooltip) 176 removeAll->setText(QCoreApplication::translate(
"pqEditMacrosDialog",
"...",
nullptr));
187 #endif // UI_PQEDITMACROSDIALOG_H
QGridLayout * gridLayout1
QSpacerItem * verticalSpacer
pqSearchBox is a line edit and an advanced tool button in the same layout.
void setupUi(QDialog *pqEditMacrosDialog)
QVBoxLayout * verticalLayout
pqEditMacrosDialog is the Edit Macros dialog used by ParaView.
void retranslateUi(QDialog *pqEditMacrosDialog)
QDialogButtonBox * buttonBox