9 #ifndef UI_PQSETTINGSDIALOG_H 10 #define UI_PQSETTINGSDIALOG_H 12 #include <QtCore/QVariant> 13 #include <QtWidgets/QApplication> 14 #include <QtWidgets/QDialog> 15 #include <QtWidgets/QDialogButtonBox> 16 #include <QtWidgets/QHBoxLayout> 17 #include <QtWidgets/QLabel> 18 #include <QtWidgets/QStackedWidget> 19 #include <QtWidgets/QTabBar> 20 #include <QtWidgets/QVBoxLayout> 21 #include <QtWidgets/QWidget> 41 if (SettingsDialog->objectName().isEmpty())
42 SettingsDialog->setObjectName(QString::fromUtf8(
"SettingsDialog"));
43 SettingsDialog->resize(540, 645);
44 SettingsDialog->setSizeGripEnabled(
true);
45 verticalLayout =
new QVBoxLayout(SettingsDialog);
46 verticalLayout->setObjectName(QString::fromUtf8(
"verticalLayout"));
47 tabBar =
new QTabBar(SettingsDialog);
48 tabBar->setObjectName(QString::fromUtf8(
"tabBar"));
49 QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
50 sizePolicy.setHorizontalStretch(0);
51 sizePolicy.setVerticalStretch(0);
52 sizePolicy.setHeightForWidth(tabBar->sizePolicy().hasHeightForWidth());
53 tabBar->setSizePolicy(sizePolicy);
55 verticalLayout->addWidget(tabBar);
57 SearchBoxLayout =
new QHBoxLayout();
58 SearchBoxLayout->setSpacing(2);
59 SearchBoxLayout->setObjectName(QString::fromUtf8(
"SearchBoxLayout"));
61 SearchBox->setObjectName(QString::fromUtf8(
"SearchBox"));
62 SearchBox->setProperty(
"settingKey", QVariant(QString::fromUtf8(
"pqSettingsDialog/showAdvancedProperties")));
63 SearchBox->setProperty(
"advancedSearchEnabled", QVariant(
true));
65 SearchBoxLayout->addWidget(SearchBox);
68 verticalLayout->addLayout(SearchBoxLayout);
70 stackedWidget =
new QStackedWidget(SettingsDialog);
71 stackedWidget->setObjectName(QString::fromUtf8(
"stackedWidget"));
72 stackedWidget->setFrameShape(QFrame::NoFrame);
74 page->setObjectName(QString::fromUtf8(
"page"));
75 stackedWidget->addWidget(page);
76 page_2 =
new QWidget();
77 page_2->setObjectName(QString::fromUtf8(
"page_2"));
78 stackedWidget->addWidget(page_2);
80 verticalLayout->addWidget(stackedWidget);
82 restartRequiredLabel =
new QLabel(SettingsDialog);
83 restartRequiredLabel->setObjectName(QString::fromUtf8(
"restartRequiredLabel"));
87 restartRequiredLabel->setFont(font);
88 restartRequiredLabel->setWordWrap(
true);
90 verticalLayout->addWidget(restartRequiredLabel);
92 buttonBox =
new QDialogButtonBox(SettingsDialog);
93 buttonBox->setObjectName(QString::fromUtf8(
"buttonBox"));
94 buttonBox->setOrientation(Qt::Horizontal);
95 buttonBox->setStandardButtons(QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Reset|QDialogButtonBox::RestoreDefaults);
96 buttonBox->setCenterButtons(
false);
98 verticalLayout->addWidget(buttonBox);
102 QObject::connect(buttonBox, SIGNAL(accepted()), SettingsDialog, SLOT(accept()));
103 QObject::connect(buttonBox, SIGNAL(rejected()), SettingsDialog, SLOT(reject()));
105 stackedWidget->setCurrentIndex(0);
108 QMetaObject::connectSlotsByName(SettingsDialog);
113 SettingsDialog->setWindowTitle(QCoreApplication::translate(
"SettingsDialog",
"Settings",
nullptr));
114 restartRequiredLabel->setText(QCoreApplication::translate(
"SettingsDialog",
"* Restart required for some settings to take effect",
nullptr));
125 #endif // UI_PQSETTINGSDIALOG_H QVBoxLayout * verticalLayout
pqSearchBox is a line edit and an advanced tool button in the same layout.
QDialogButtonBox * buttonBox
void retranslateUi(QDialog *SettingsDialog)
QStackedWidget * stackedWidget
void setupUi(QDialog *SettingsDialog)
QHBoxLayout * SearchBoxLayout
QLabel * restartRequiredLabel