9 #ifndef UI_PQFONTPROPERTYWIDGET_H 10 #define UI_PQFONTPROPERTYWIDGET_H 12 #include <QtCore/QVariant> 13 #include <QtGui/QIcon> 14 #include <QtWidgets/QApplication> 15 #include <QtWidgets/QComboBox> 16 #include <QtWidgets/QDoubleSpinBox> 17 #include <QtWidgets/QHBoxLayout> 18 #include <QtWidgets/QSpinBox> 19 #include <QtWidgets/QToolButton> 20 #include <QtWidgets/QVBoxLayout> 21 #include <QtWidgets/QWidget> 45 if (FontPropertyWidget->objectName().isEmpty())
46 FontPropertyWidget->setObjectName(QString::fromUtf8(
"FontPropertyWidget"));
47 FontPropertyWidget->resize(404, 55);
48 verticalLayout =
new QVBoxLayout(FontPropertyWidget);
49 verticalLayout->setSpacing(2);
50 verticalLayout->setObjectName(QString::fromUtf8(
"verticalLayout"));
51 verticalLayout->setContentsMargins(0, 0, 0, 0);
52 mainLayout =
new QHBoxLayout();
53 mainLayout->setSpacing(2);
54 mainLayout->setObjectName(QString::fromUtf8(
"mainLayout"));
55 FontFamily =
new QComboBox(FontPropertyWidget);
56 FontFamily->setObjectName(QString::fromUtf8(
"FontFamily"));
57 FontFamily->setSizeAdjustPolicy(QComboBox::AdjustToContents);
58 FontFamily->setMinimumContentsLength(2);
60 mainLayout->addWidget(FontFamily);
62 FontSize =
new QSpinBox(FontPropertyWidget);
63 FontSize->setObjectName(QString::fromUtf8(
"FontSize"));
64 FontSize->setMinimum(1);
66 mainLayout->addWidget(FontSize);
69 FontColor->setObjectName(QString::fromUtf8(
"FontColor"));
71 mainLayout->addWidget(FontColor);
73 Opacity =
new QDoubleSpinBox(FontPropertyWidget);
74 Opacity->setObjectName(QString::fromUtf8(
"Opacity"));
75 Opacity->setMaximum(1.000000000000000);
76 Opacity->setSingleStep(0.100000000000000);
78 mainLayout->addWidget(Opacity);
80 Bold =
new QToolButton(FontPropertyWidget);
81 Bold->setObjectName(QString::fromUtf8(
"Bold"));
83 icon.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqBold24.png"), QSize(), QIcon::Normal, QIcon::Off);
85 Bold->setCheckable(
true);
87 mainLayout->addWidget(Bold);
89 Italics =
new QToolButton(FontPropertyWidget);
90 Italics->setObjectName(QString::fromUtf8(
"Italics"));
92 icon1.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqItalics24.png"), QSize(), QIcon::Normal, QIcon::Off);
93 Italics->setIcon(icon1);
94 Italics->setCheckable(
true);
96 mainLayout->addWidget(Italics);
98 Shadow =
new QToolButton(FontPropertyWidget);
99 Shadow->setObjectName(QString::fromUtf8(
"Shadow"));
101 icon2.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqShadow24.png"), QSize(), QIcon::Normal, QIcon::Off);
102 Shadow->setIcon(icon2);
103 Shadow->setCheckable(
true);
105 mainLayout->addWidget(Shadow);
107 HorizontalJustification =
new QToolButton(FontPropertyWidget);
108 HorizontalJustification->setObjectName(QString::fromUtf8(
"HorizontalJustification"));
109 HorizontalJustification->setPopupMode(QToolButton::InstantPopup);
111 mainLayout->addWidget(HorizontalJustification);
113 VerticalJustification =
new QToolButton(FontPropertyWidget);
114 VerticalJustification->setObjectName(QString::fromUtf8(
"VerticalJustification"));
115 VerticalJustification->setPopupMode(QToolButton::InstantPopup);
117 mainLayout->addWidget(VerticalJustification);
119 mainLayout->setStretch(0, 1);
121 verticalLayout->addLayout(mainLayout);
124 FontFile->setObjectName(QString::fromUtf8(
"FontFile"));
125 QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
126 sizePolicy.setHorizontalStretch(1);
127 sizePolicy.setVerticalStretch(0);
128 sizePolicy.setHeightForWidth(FontFile->sizePolicy().hasHeightForWidth());
129 FontFile->setSizePolicy(sizePolicy);
131 verticalLayout->addWidget(FontFile);
136 QMetaObject::connectSlotsByName(FontPropertyWidget);
141 FontPropertyWidget->setWindowTitle(QCoreApplication::translate(
"FontPropertyWidget",
"Form",
nullptr));
142 #if QT_CONFIG(tooltip) 143 FontFamily->setToolTip(QCoreApplication::translate(
"FontPropertyWidget",
"Select font",
nullptr));
144 #endif // QT_CONFIG(tooltip) 145 #if QT_CONFIG(tooltip) 146 FontSize->setToolTip(QCoreApplication::translate(
"FontPropertyWidget",
"Set font size",
nullptr));
147 #endif // QT_CONFIG(tooltip) 148 #if QT_CONFIG(tooltip) 149 FontColor->setToolTip(QCoreApplication::translate(
"FontPropertyWidget",
"Set font color",
nullptr));
150 #endif // QT_CONFIG(tooltip) 151 FontColor->setText(QString());
152 #if QT_CONFIG(tooltip) 153 Opacity->setToolTip(QCoreApplication::translate(
"FontPropertyWidget",
"Set font opacity",
nullptr));
154 #endif // QT_CONFIG(tooltip) 155 #if QT_CONFIG(tooltip) 156 Bold->setToolTip(QCoreApplication::translate(
"FontPropertyWidget",
"Bold",
nullptr));
157 #endif // QT_CONFIG(tooltip) 158 Bold->setText(QCoreApplication::translate(
"FontPropertyWidget",
"...",
nullptr));
159 #if QT_CONFIG(tooltip) 160 Italics->setToolTip(QCoreApplication::translate(
"FontPropertyWidget",
"Italics",
nullptr));
161 #endif // QT_CONFIG(tooltip) 162 Italics->setText(QCoreApplication::translate(
"FontPropertyWidget",
"...",
nullptr));
163 #if QT_CONFIG(tooltip) 164 Shadow->setToolTip(QCoreApplication::translate(
"FontPropertyWidget",
"Shadow",
nullptr));
165 #endif // QT_CONFIG(tooltip) 166 Shadow->setText(QCoreApplication::translate(
"FontPropertyWidget",
"...",
nullptr));
167 HorizontalJustification->setText(QCoreApplication::translate(
"FontPropertyWidget",
"...",
nullptr));
168 #if QT_CONFIG(tooltip) 169 FontFile->setToolTip(QCoreApplication::translate(
"FontPropertyWidget",
"Specify the path to a TTF file here.",
nullptr));
170 #endif // QT_CONFIG(tooltip) 181 #endif // UI_PQFONTPROPERTYWIDGET_H