MCPcopy Create free account
hub / github.com/Liniyous/ElaWidgetTools / setButtonMode

Method setButtonMode

ElaWidgetTools/ElaDoubleSpinBox.cpp:33–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31void ElaDoubleSpinBox::setButtonMode(ElaSpinBoxType::ButtonMode buttonMode)
32{
33 Q_D(ElaDoubleSpinBox);
34 if (minimumWidth() < 90)
35 {
36 setMinimumWidth(90);
37 }
38 d->_style->setButtonMode(buttonMode);
39 switch (buttonMode)
40 {
41 case ElaSpinBoxType::Inline:
42 {
43 lineEdit()->setAlignment(Qt::AlignLeft | Qt::AlignVCenter);
44 lineEdit()->setStyleSheet("background-color:transparent;padding-left:10px;padding-bottom:3px;");
45 break;
46 }
47 case ElaSpinBoxType::Compact:
48 case ElaSpinBoxType::Side:
49 case ElaSpinBoxType::PMSide:
50 {
51 lineEdit()->setAlignment(Qt::AlignCenter);
52 lineEdit()->setStyleSheet("background-color:transparent;padding-bottom:3px;");
53 break;
54 }
55 }
56 d->onThemeChanged(eTheme->getThemeMode());
57 setFrame(hasFrame());
58 Q_EMIT pButtonModeChanged();
59}
60
61ElaSpinBoxType::ButtonMode ElaDoubleSpinBox::getButtonMode() const
62{
63 Q_D(const ElaDoubleSpinBox);
64 return d->_style->getButtonMode();

Callers

nothing calls this directly

Calls 2

getThemeModeMethod · 0.80
onThemeChangedMethod · 0.45

Tested by

no test coverage detected