Debian Codegraph @

phoenix/qt/widget/label.cpp

raw
1 namespace phoenix {
2
3 Size pLabel::minimumSize() {
4 Size size = pFont::size(qtWidget->font(), label.state.text);
5 return {size.width, size.height};
6 }
7
8 void pLabel::setText(string text) {
9 qtLabel->setText(QString::fromUtf8(text));
10 }
11
12 void pLabel::constructor() {
13 qtWidget = qtLabel = new QLabel;
14
15 pWidget::synchronizeState();
16 setText(label.state.text);
17 }
18
19 void pLabel::destructor() {
20 delete qtLabel;
21 qtWidget = qtLabel = nullptr;
22 }
23
24 void pLabel::orphan() {
25 destructor();
26 constructor();
27 }
28
29 }