54 QString family =
"Arial";
56 QColor
color = QColor(255, 255, 255);
61 QString horizontalJustification =
"Left";
62 QString verticalJustification =
"Bottom";
65 int fontFamilyIndex()
const;
68 void setFontFamilyFromIndex(
int index);
82 QString fontFamily()
const;
83 int fontFamilyIndex()
const;
85 QColor fontColor()
const;
86 double fontOpacity()
const;
88 bool isItalic()
const;
89 bool hasShadow()
const;
90 QString horizontalJustification()
const;
91 QString verticalJustification()
const;
96 void setFontFamily(
const QString& family,
bool blockSignal =
false);
97 void setFontFamilyIndex(
int index,
bool blockSignal =
false);
98 void setFontSize(
int size,
bool blockSignal =
false);
99 void setFontColor(
const QColor&
color,
bool blockSignal =
false);
100 void setFontOpacity(
double opacity,
bool blockSignal =
false);
101 void setBold(
bool bold,
bool blockSignal =
false);
102 void setItalic(
bool italic,
bool blockSignal =
false);
103 void setShadow(
bool shadow,
bool blockSignal =
false);
104 void setHorizontalJustification(
const QString& justification,
105 bool blockSignal =
false);
106 void setVerticalJustification(
const QString& justification,
107 bool blockSignal =
false);
111 void setColorPickerVisible(
bool visible);
114 void setControlsEnabled(
bool enabled);
133 void onFontFamilyChanged(
int index);
134 void onFontSizeChanged(
int size);
135 void onFontColorClicked();
136 void onFontOpacityChanged(
double opacity);
137 void onBoldToggled(
bool checked);
138 void onItalicToggled(
bool checked);
139 void onShadowToggled(
bool checked);
140 void onHorizontalJustificationTriggered(QAction* action);
141 void onVerticalJustificationTriggered(QAction* action);
144 void resizeEvent(QResizeEvent*
event)
override;
147 void setupConnections();
148 void updateColorButtonAppearance();
149 void setupHorizontalJustificationButton();
150 void setupVerticalJustificationButton();
151 void updateJustificationButtonIcon(
const QString& justification,
152 QToolButton* button);
154 Ui::ecvFontPropertyWidget* ui;
160 QString m_horizontalJustification =
"Left";
161 QString m_verticalJustification =
"Bottom";
164 bool m_blockSignals =
false;