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);
65 FontSize->setMaximum(999);
67 mainLayout->addWidget(FontSize);
70 FontColor->setObjectName(QString::fromUtf8(
"FontColor"));
72 mainLayout->addWidget(FontColor);
74 Opacity =
new QDoubleSpinBox(FontPropertyWidget);
75 Opacity->setObjectName(QString::fromUtf8(
"Opacity"));
76 Opacity->setMaximum(1.000000000000000);
77 Opacity->setSingleStep(0.100000000000000);
79 mainLayout->addWidget(Opacity);
81 Bold =
new QToolButton(FontPropertyWidget);
82 Bold->setObjectName(QString::fromUtf8(
"Bold"));
84 icon.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqBold24.png"), QSize(), QIcon::Normal, QIcon::Off);
86 Bold->setCheckable(
true);
88 mainLayout->addWidget(Bold);
90 Italics =
new QToolButton(FontPropertyWidget);
91 Italics->setObjectName(QString::fromUtf8(
"Italics"));
93 icon1.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqItalics24.png"), QSize(), QIcon::Normal, QIcon::Off);
94 Italics->setIcon(icon1);
95 Italics->setCheckable(
true);
97 mainLayout->addWidget(Italics);
99 Shadow =
new QToolButton(FontPropertyWidget);
100 Shadow->setObjectName(QString::fromUtf8(
"Shadow"));
102 icon2.addFile(QString::fromUtf8(
":/pqWidgets/Icons/pqShadow24.png"), QSize(), QIcon::Normal, QIcon::Off);
103 Shadow->setIcon(icon2);
104 Shadow->setCheckable(
true);
106 mainLayout->addWidget(Shadow);
108 HorizontalJustification =
new QToolButton(FontPropertyWidget);
109 HorizontalJustification->setObjectName(QString::fromUtf8(
"HorizontalJustification"));
110 HorizontalJustification->setPopupMode(QToolButton::InstantPopup);
112 mainLayout->addWidget(HorizontalJustification);
114 VerticalJustification =
new QToolButton(FontPropertyWidget);
115 VerticalJustification->setObjectName(QString::fromUtf8(
"VerticalJustification"));
116 VerticalJustification->setPopupMode(QToolButton::InstantPopup);
118 mainLayout->addWidget(VerticalJustification);
120 mainLayout->setStretch(0, 1);
122 verticalLayout->addLayout(mainLayout);
125 FontFile->setObjectName(QString::fromUtf8(
"FontFile"));
126 QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
127 sizePolicy.setHorizontalStretch(1);
128 sizePolicy.setVerticalStretch(0);
129 sizePolicy.setHeightForWidth(FontFile->sizePolicy().hasHeightForWidth());
130 FontFile->setSizePolicy(sizePolicy);
132 verticalLayout->addWidget(FontFile);
137 QMetaObject::connectSlotsByName(FontPropertyWidget);
142 FontPropertyWidget->setWindowTitle(QCoreApplication::translate(
"FontPropertyWidget",
"Form",
nullptr));
143 #if QT_CONFIG(tooltip) 144 FontFamily->setToolTip(QCoreApplication::translate(
"FontPropertyWidget",
"Select font",
nullptr));
145 #endif // QT_CONFIG(tooltip) 146 #if QT_CONFIG(tooltip) 147 FontSize->setToolTip(QCoreApplication::translate(
"FontPropertyWidget",
"Set font size",
nullptr));
148 #endif // QT_CONFIG(tooltip) 149 #if QT_CONFIG(tooltip) 150 FontColor->setToolTip(QCoreApplication::translate(
"FontPropertyWidget",
"Set font color",
nullptr));
151 #endif // QT_CONFIG(tooltip) 152 FontColor->setText(QString());
153 #if QT_CONFIG(tooltip) 154 Opacity->setToolTip(QCoreApplication::translate(
"FontPropertyWidget",
"Set font opacity",
nullptr));
155 #endif // QT_CONFIG(tooltip) 156 #if QT_CONFIG(tooltip) 157 Bold->setToolTip(QCoreApplication::translate(
"FontPropertyWidget",
"Bold",
nullptr));
158 #endif // QT_CONFIG(tooltip) 159 Bold->setText(QCoreApplication::translate(
"FontPropertyWidget",
"...",
nullptr));
160 #if QT_CONFIG(tooltip) 161 Italics->setToolTip(QCoreApplication::translate(
"FontPropertyWidget",
"Italics",
nullptr));
162 #endif // QT_CONFIG(tooltip) 163 Italics->setText(QCoreApplication::translate(
"FontPropertyWidget",
"...",
nullptr));
164 #if QT_CONFIG(tooltip) 165 Shadow->setToolTip(QCoreApplication::translate(
"FontPropertyWidget",
"Shadow",
nullptr));
166 #endif // QT_CONFIG(tooltip) 167 Shadow->setText(QCoreApplication::translate(
"FontPropertyWidget",
"...",
nullptr));
168 HorizontalJustification->setText(QCoreApplication::translate(
"FontPropertyWidget",
"...",
nullptr));
169 #if QT_CONFIG(tooltip) 170 FontFile->setToolTip(QCoreApplication::translate(
"FontPropertyWidget",
"Specify the path to a TTF file here.",
nullptr));
171 #endif // QT_CONFIG(tooltip) 182 #endif // UI_PQFONTPROPERTYWIDGET_H