9 #ifndef UI_PQCONFIGURECATEGORIESDIALOG_H 10 #define UI_PQCONFIGURECATEGORIESDIALOG_H 12 #include <QtCore/QVariant> 13 #include <QtGui/QIcon> 14 #include <QtWidgets/QApplication> 15 #include <QtWidgets/QCheckBox> 16 #include <QtWidgets/QDialog> 17 #include <QtWidgets/QDialogButtonBox> 18 #include <QtWidgets/QGridLayout> 19 #include <QtWidgets/QGroupBox> 20 #include <QtWidgets/QHeaderView> 21 #include <QtWidgets/QSpacerItem> 22 #include <QtWidgets/QToolButton> 23 #include <QtWidgets/QTreeWidget> 52 if (pqConfigureCategoriesDialog->objectName().isEmpty())
53 pqConfigureCategoriesDialog->setObjectName(QString::fromUtf8(
"pqConfigureCategoriesDialog"));
54 pqConfigureCategoriesDialog->resize(786, 485);
55 gridLayout =
new QGridLayout(pqConfigureCategoriesDialog);
56 gridLayout->setObjectName(QString::fromUtf8(
"gridLayout"));
57 filtersGroup =
new QGroupBox(pqConfigureCategoriesDialog);
58 filtersGroup->setObjectName(QString::fromUtf8(
"filtersGroup"));
59 QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
60 sizePolicy.setHorizontalStretch(0);
61 sizePolicy.setVerticalStretch(0);
62 sizePolicy.setHeightForWidth(filtersGroup->sizePolicy().hasHeightForWidth());
63 filtersGroup->setSizePolicy(sizePolicy);
64 gridLayout1 =
new QGridLayout(filtersGroup);
65 gridLayout1->setObjectName(QString::fromUtf8(
"gridLayout1"));
66 gridLayout1->setContentsMargins(0, -1, -1, -1);
68 searchBox->setObjectName(QString::fromUtf8(
"searchBox"));
69 searchBox->setProperty(
"settingKey", QVariant(QString::fromUtf8(
"showAdvancedProperties")));
70 searchBox->setProperty(
"advancedSearchEnabled", QVariant(
false));
72 gridLayout1->addWidget(searchBox, 0, 0, 1, 1);
74 defaultCategoriesTree =
new QTreeWidget(filtersGroup);
75 defaultCategoriesTree->setObjectName(QString::fromUtf8(
"defaultCategoriesTree"));
76 defaultCategoriesTree->setContextMenuPolicy(Qt::NoContextMenu);
77 defaultCategoriesTree->setAcceptDrops(
false);
78 defaultCategoriesTree->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
79 defaultCategoriesTree->setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContentsOnFirstShow);
80 defaultCategoriesTree->setDragEnabled(
true);
81 defaultCategoriesTree->setDragDropMode(QAbstractItemView::DragOnly);
82 defaultCategoriesTree->setDefaultDropAction(Qt::CopyAction);
83 defaultCategoriesTree->setAlternatingRowColors(
true);
84 defaultCategoriesTree->setSelectionMode(QAbstractItemView::SingleSelection);
85 defaultCategoriesTree->setRootIsDecorated(
false);
86 defaultCategoriesTree->setSortingEnabled(
true);
88 gridLayout1->addWidget(defaultCategoriesTree, 1, 0, 1, 1);
91 gridLayout->addWidget(filtersGroup, 0, 0, 4, 1);
93 buttonBox =
new QDialogButtonBox(pqConfigureCategoriesDialog);
94 buttonBox->setObjectName(QString::fromUtf8(
"buttonBox"));
95 buttonBox->setOrientation(Qt::Horizontal);
96 buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
98 gridLayout->addWidget(buttonBox, 5, 0, 1, 2);
100 customGroup =
new QGroupBox(pqConfigureCategoriesDialog);
101 customGroup->setObjectName(QString::fromUtf8(
"customGroup"));
102 gridLayout2 =
new QGridLayout(customGroup);
103 gridLayout2->setObjectName(QString::fromUtf8(
"gridLayout2"));
104 gridLayout2->setContentsMargins(-1, -1, 0, -1);
105 addFilter =
new QToolButton(customGroup);
106 addFilter->setObjectName(QString::fromUtf8(
"addFilter"));
108 icon.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqNavForward.svg"), QSize(), QIcon::Normal, QIcon::Off);
109 addFilter->setIcon(icon);
111 gridLayout2->addWidget(addFilter, 0, 0, 1, 1);
113 setIcon =
new QToolButton(customGroup);
114 setIcon->setObjectName(QString::fromUtf8(
"setIcon"));
116 icon1.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqChooseIcon.svg"), QSize(), QIcon::Normal, QIcon::Off);
117 setIcon->setIcon(icon1);
119 gridLayout2->addWidget(setIcon, 0, 1, 1, 1);
121 addCategory =
new QToolButton(customGroup);
122 addCategory->setObjectName(QString::fromUtf8(
"addCategory"));
124 icon2.addFile(QString::fromUtf8(
":/QtWidgets/Icons/pqPlus.svg"), QSize(), QIcon::Normal, QIcon::Off);
125 addCategory->setIcon(icon2);
127 gridLayout2->addWidget(addCategory, 0, 2, 1, 1);
129 addSubCategory =
new QToolButton(customGroup);
130 addSubCategory->setObjectName(QString::fromUtf8(
"addSubCategory"));
132 icon3.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqSubElement.svg"), QSize(), QIcon::Normal, QIcon::Off);
133 addSubCategory->setIcon(icon3);
135 gridLayout2->addWidget(addSubCategory, 0, 3, 1, 1);
137 useAsToolbar =
new QCheckBox(customGroup);
138 useAsToolbar->setObjectName(QString::fromUtf8(
"useAsToolbar"));
139 useAsToolbar->setEnabled(
false);
140 useAsToolbar->setChecked(
false);
142 gridLayout2->addWidget(useAsToolbar, 0, 4, 1, 1);
144 horizontalSpacer =
new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
146 gridLayout2->addItem(horizontalSpacer, 0, 5, 1, 1);
148 remove =
new QToolButton(customGroup);
149 remove->setObjectName(QString::fromUtf8(
"remove"));
151 icon4.addFile(QString::fromUtf8(
":/QtWidgets/Icons/pqMinus.svg"), QSize(), QIcon::Normal, QIcon::Off);
152 remove->setIcon(icon4);
154 gridLayout2->addWidget(
remove, 0, 6, 1, 1);
156 resetAll =
new QToolButton(customGroup);
157 resetAll->setObjectName(QString::fromUtf8(
"resetAll"));
159 icon5.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqReset.svg"), QSize(), QIcon::Normal, QIcon::Off);
160 resetAll->setIcon(icon5);
162 gridLayout2->addWidget(resetAll, 0, 7, 1, 1);
165 customCategoriesTree->setObjectName(QString::fromUtf8(
"customCategoriesTree"));
166 customCategoriesTree->setContextMenuPolicy(Qt::NoContextMenu);
167 customCategoriesTree->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
168 customCategoriesTree->setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContentsOnFirstShow);
169 customCategoriesTree->setDragEnabled(
true);
170 customCategoriesTree->setDragDropMode(QAbstractItemView::DragDrop);
171 customCategoriesTree->setDefaultDropAction(Qt::MoveAction);
172 customCategoriesTree->setAlternatingRowColors(
true);
173 customCategoriesTree->setSelectionMode(QAbstractItemView::SingleSelection);
174 customCategoriesTree->setRootIsDecorated(
true);
175 customCategoriesTree->header()->setStretchLastSection(
true);
177 gridLayout2->addWidget(customCategoriesTree, 1, 0, 3, 8);
180 gridLayout->addWidget(customGroup, 0, 1, 4, 1);
184 QObject::connect(buttonBox, SIGNAL(accepted()), pqConfigureCategoriesDialog, SLOT(accept()));
185 QObject::connect(buttonBox, SIGNAL(rejected()), pqConfigureCategoriesDialog, SLOT(reject()));
187 QMetaObject::connectSlotsByName(pqConfigureCategoriesDialog);
192 pqConfigureCategoriesDialog->setWindowTitle(QCoreApplication::translate(
"pqConfigureCategoriesDialog",
"Configure Categories",
nullptr));
193 filtersGroup->setTitle(QCoreApplication::translate(
"pqConfigureCategoriesDialog",
"Available Filters",
nullptr));
194 QTreeWidgetItem *___qtreewidgetitem = defaultCategoriesTree->headerItem();
195 ___qtreewidgetitem->setText(0, QCoreApplication::translate(
"pqConfigureCategoriesDialog",
"1",
nullptr));
196 customGroup->setTitle(QCoreApplication::translate(
"pqConfigureCategoriesDialog",
"Current Categories",
nullptr));
197 #if QT_CONFIG(tooltip) 198 addFilter->setToolTip(QCoreApplication::translate(
"pqConfigureCategoriesDialog",
"Add Filter to custom menu",
nullptr));
199 #endif // QT_CONFIG(tooltip) 200 addFilter->setText(QCoreApplication::translate(
"pqConfigureCategoriesDialog",
"...",
nullptr));
201 #if QT_CONFIG(tooltip) 202 setIcon->setToolTip(QCoreApplication::translate(
"pqConfigureCategoriesDialog",
"Set an icon for the current proxy",
nullptr));
203 #endif // QT_CONFIG(tooltip) 204 setIcon->setText(QCoreApplication::translate(
"pqConfigureCategoriesDialog",
"...",
nullptr));
205 #if QT_CONFIG(tooltip) 206 addCategory->setToolTip(QCoreApplication::translate(
"pqConfigureCategoriesDialog",
"Create a category",
nullptr));
207 #endif // QT_CONFIG(tooltip) 208 addCategory->setText(QCoreApplication::translate(
"pqConfigureCategoriesDialog",
"...",
nullptr));
209 #if QT_CONFIG(tooltip) 210 addSubCategory->setToolTip(QCoreApplication::translate(
"pqConfigureCategoriesDialog",
"Insert a subcategory",
nullptr));
211 #endif // QT_CONFIG(tooltip) 212 addSubCategory->setText(QCoreApplication::translate(
"pqConfigureCategoriesDialog",
"...",
nullptr));
213 useAsToolbar->setText(QCoreApplication::translate(
"pqConfigureCategoriesDialog",
"Toolbar",
nullptr));
214 #if QT_CONFIG(tooltip) 215 useAsToolbar->setToolTip(QCoreApplication::translate(
"pqConfigureCategoriesDialog",
"Add a toolbar for this category",
nullptr));
216 #endif // QT_CONFIG(tooltip) 217 #if QT_CONFIG(tooltip) 218 remove->setToolTip(QCoreApplication::translate(
"pqConfigureCategoriesDialog",
"Delete selected entry",
nullptr));
219 #endif // QT_CONFIG(tooltip) 220 remove->setText(QCoreApplication::translate(
"pqConfigureCategoriesDialog",
"...",
nullptr));
221 #if QT_CONFIG(tooltip) 222 resetAll->setToolTip(QCoreApplication::translate(
"pqConfigureCategoriesDialog",
"Reset categories",
nullptr));
223 #endif // QT_CONFIG(tooltip) 224 resetAll->setText(QCoreApplication::translate(
"pqConfigureCategoriesDialog",
"...",
nullptr));
225 QTreeWidgetItem *___qtreewidgetitem1 = customCategoriesTree->headerItem();
226 ___qtreewidgetitem1->setText(0, QCoreApplication::translate(
"pqConfigureCategoriesDialog",
"1",
nullptr));
237 #endif // UI_PQCONFIGURECATEGORIESDIALOG_H
pqSearchBox is a line edit and an advanced tool button in the same layout.