9 #ifndef UI_PQVIEWRESOLUTIONPROPERTYWIDGET_H 10 #define UI_PQVIEWRESOLUTIONPROPERTYWIDGET_H 12 #include <QtCore/QVariant> 13 #include <QtGui/QIcon> 14 #include <QtWidgets/QApplication> 15 #include <QtWidgets/QHBoxLayout> 16 #include <QtWidgets/QLabel> 17 #include <QtWidgets/QToolButton> 18 #include <QtWidgets/QWidget> 38 void setupUi(QWidget *ViewResolutionPropertyWidget)
40 if (ViewResolutionPropertyWidget->objectName().isEmpty())
41 ViewResolutionPropertyWidget->setObjectName(QString::fromUtf8(
"ViewResolutionPropertyWidget"));
42 ViewResolutionPropertyWidget->resize(277, 27);
43 horizontalLayout =
new QHBoxLayout(ViewResolutionPropertyWidget);
44 horizontalLayout->setSpacing(2);
45 horizontalLayout->setContentsMargins(0, 0, 0, 0);
46 horizontalLayout->setObjectName(QString::fromUtf8(
"horizontalLayout"));
47 width =
new pqLineEdit(ViewResolutionPropertyWidget);
48 width->setObjectName(QString::fromUtf8(
"width"));
50 horizontalLayout->addWidget(width);
52 label =
new QLabel(ViewResolutionPropertyWidget);
53 label->setObjectName(QString::fromUtf8(
"label"));
55 horizontalLayout->addWidget(label);
57 height =
new pqLineEdit(ViewResolutionPropertyWidget);
58 height->setObjectName(QString::fromUtf8(
"height"));
60 horizontalLayout->addWidget(height);
62 presetResolution =
new QToolButton(ViewResolutionPropertyWidget);
63 presetResolution->setObjectName(QString::fromUtf8(
"presetResolution"));
65 icon.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqCaptureScreenshot.svg"), QSize(), QIcon::Normal, QIcon::Off);
66 presetResolution->setIcon(icon);
68 horizontalLayout->addWidget(presetResolution);
70 recentResolution =
new QToolButton(ViewResolutionPropertyWidget);
71 recentResolution->setObjectName(QString::fromUtf8(
"recentResolution"));
73 icon1.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqRecentFile.svg"), QSize(), QIcon::Normal, QIcon::Off);
74 recentResolution->setIcon(icon1);
75 recentResolution->setIconSize(QSize(16, 16));
77 horizontalLayout->addWidget(recentResolution);
80 scaleBy->setObjectName(QString::fromUtf8(
"scaleBy"));
82 horizontalLayout->addWidget(scaleBy);
84 lockAspectRatio =
new QToolButton(ViewResolutionPropertyWidget);
85 lockAspectRatio->setObjectName(QString::fromUtf8(
"lockAspectRatio"));
87 icon2.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqLock24.png"), QSize(), QIcon::Normal, QIcon::Off);
88 lockAspectRatio->setIcon(icon2);
89 lockAspectRatio->setCheckable(
true);
90 lockAspectRatio->setChecked(
false);
92 horizontalLayout->addWidget(lockAspectRatio);
95 reset->setObjectName(QString::fromUtf8(
"reset"));
97 icon3.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqReset.svg"), QSize(), QIcon::Normal, QIcon::Off);
98 reset->setIcon(icon3);
100 horizontalLayout->addWidget(reset);
102 horizontalLayout->setStretch(0, 1);
103 horizontalLayout->setStretch(2, 1);
107 QMetaObject::connectSlotsByName(ViewResolutionPropertyWidget);
112 ViewResolutionPropertyWidget->setWindowTitle(QCoreApplication::translate(
"ViewResolutionPropertyWidget",
"Form",
nullptr));
113 width->setPlaceholderText(QCoreApplication::translate(
"ViewResolutionPropertyWidget",
"width",
nullptr));
114 label->setText(QCoreApplication::translate(
"ViewResolutionPropertyWidget",
"x",
nullptr));
115 height->setPlaceholderText(QCoreApplication::translate(
"ViewResolutionPropertyWidget",
"height",
nullptr));
116 #if QT_CONFIG(tooltip) 117 presetResolution->setToolTip(QCoreApplication::translate(
"ViewResolutionPropertyWidget",
"Select resolution from presets",
nullptr));
118 #endif // QT_CONFIG(tooltip) 119 presetResolution->setText(QCoreApplication::translate(
"ViewResolutionPropertyWidget",
"Presets",
nullptr));
120 #if QT_CONFIG(tooltip) 121 recentResolution->setToolTip(QCoreApplication::translate(
"ViewResolutionPropertyWidget",
"Use previous resolution",
nullptr));
122 #endif // QT_CONFIG(tooltip) 123 recentResolution->setText(QString());
124 #if QT_CONFIG(tooltip) 125 lockAspectRatio->setToolTip(QCoreApplication::translate(
"ViewResolutionPropertyWidget",
"Lock aspect ratio",
nullptr));
126 #endif // QT_CONFIG(tooltip) 127 lockAspectRatio->setText(QString());
128 #if QT_CONFIG(tooltip) 129 reset->setToolTip(QCoreApplication::translate(
"ViewResolutionPropertyWidget",
"Reset to default based on current values",
nullptr));
130 #endif // QT_CONFIG(tooltip) 131 reset->setText(QString());
142 #endif // UI_PQVIEWRESOLUTIONPROPERTYWIDGET_H
pqLineEdit is a specialization of QLineEdit which provide a new property 'text2'. ...