#include <KisAngleSelector.h>
|
| void | errorWhileParsing (const QString &expr) const |
| | signal emitted when the last parsed expression is not valid.
|
| |
| void | noMoreParsingError () const |
| | signal emitted when the last parsed expression is valid and the expression before was not valid.
|
| |
Definition at line 27 of file KisAngleSelector.h.
◆ KisAngleSelectorSpinBox()
| KisAngleSelectorSpinBox::KisAngleSelectorSpinBox |
( |
QWidget * | parent = 0 | ) |
|
Definition at line 52 of file KisAngleSelector.cpp.
55{
58 m_d->hasFocus =
false;
59 m_d->isHovered =
false;
60 m_d->updateStyleSheet();
61}
const QScopedPointer< Private > m_d
KisDoubleParseSpinBox(QWidget *parent=0)
References m_d.
◆ ~KisAngleSelectorSpinBox()
| KisAngleSelectorSpinBox::~KisAngleSelectorSpinBox |
( |
| ) |
|
|
override |
◆ enterEvent()
| void KisAngleSelectorSpinBox::enterEvent |
( |
QEnterEvent * | e | ) |
|
|
overrideprotected |
Definition at line 91 of file KisAngleSelector.cpp.
93{
94 m_d->isHovered =
true;
95 m_d->updateStyleSheet();
96 KisDoubleParseSpinBox::enterEvent(e);
97}
◆ focusInEvent()
| void KisAngleSelectorSpinBox::focusInEvent |
( |
QFocusEvent * | e | ) |
|
|
overrideprotected |
Definition at line 106 of file KisAngleSelector.cpp.
107{
108 m_d->hasFocus =
true;
109 m_d->updateStyleSheet();
110 KisDoubleParseSpinBox::focusInEvent(e);
111}
References m_d.
◆ focusOutEvent()
| void KisAngleSelectorSpinBox::focusOutEvent |
( |
QFocusEvent * | e | ) |
|
|
overrideprotected |
Definition at line 113 of file KisAngleSelector.cpp.
114{
115 m_d->hasFocus =
false;
116 m_d->updateStyleSheet();
117 KisDoubleParseSpinBox::focusOutEvent(e);
118}
References m_d.
◆ isFlat()
| bool KisAngleSelectorSpinBox::isFlat |
( |
| ) |
const |
◆ leaveEvent()
| void KisAngleSelectorSpinBox::leaveEvent |
( |
QEvent * | e | ) |
|
|
overrideprotected |
Definition at line 99 of file KisAngleSelector.cpp.
100{
101 m_d->isHovered =
false;
102 m_d->updateStyleSheet();
103 KisDoubleParseSpinBox::leaveEvent(e);
104}
References m_d.
◆ minimumSizeHint()
| QSize KisAngleSelectorSpinBox::minimumSizeHint |
( |
| ) |
const |
|
override |
Definition at line 120 of file KisAngleSelector.cpp.
121{
122 if (
m_d->cachedSizeHint.isEmpty()) {
123 ensurePolished();
124
125 const QFontMetrics fm(fontMetrics());
126 int h = lineEdit()->minimumSizeHint().height();
128
129 QString s;
130 QString fixedContent = prefix() + suffix() + QLatin1Char(' ');
132 s.truncate(18);
133 s += fixedContent;
134 w = qMax(w, fm.horizontalAdvance(s));
136 s.truncate(18);
137 s += fixedContent;
138 w = qMax(w, fm.horizontalAdvance(s));
139
141
142 QStyleOptionSpinBox option;
143 initStyleOption(&option);
144
145 QSize hint(w, h);
146
148 m_d->cachedSizeHint = style()->sizeFromContents(QStyle::CT_SpinBox, &option, hint, &
tmp);
149 }
150
151 return m_d->cachedSizeHint;
152}
The KisDoubleParseSpinBox class is a cleverer doubleSpinBox, able to parse arithmetic expressions.
QString textFromValue(double value) const override
References m_d, and KisDoubleParseSpinBox::textFromValue().
◆ refreshStyle()
| void KisAngleSelectorSpinBox::refreshStyle |
( |
| ) |
|
Definition at line 159 of file KisAngleSelector.cpp.
160{
161 m_d->cachedSizeHint = QSize();
162 updateGeometry();
163 m_d->updateStyleSheet();
164}
References m_d.
◆ setFlat()
| void KisAngleSelectorSpinBox::setFlat |
( |
bool | newFlat | ) |
|
◆ setRange()
| void KisAngleSelectorSpinBox::setRange |
( |
double | min, |
|
|
double | max ) |
Definition at line 66 of file KisAngleSelector.cpp.
67{
68 m_d->cachedSizeHint = QSize();
69 KisDoubleParseSpinBox::setRange(min, max);
70}
References m_d.
◆ sizeHint()
| QSize KisAngleSelectorSpinBox::sizeHint |
( |
| ) |
const |
|
override |
◆ valueFromText()
| double KisAngleSelectorSpinBox::valueFromText |
( |
const QString & | text | ) |
const |
|
override |
◆ m_d
| const QScopedPointer<Private> KisAngleSelectorSpinBox::m_d |
|
private |
The documentation for this class was generated from the following files: