Verified Commit 318d23fb authored by SZPYRKA Jean-Luc's avatar SZPYRKA Jean-Luc
Browse files

class member step_enabled -> m_step_enabled

parent e7184b37
Pipeline #131393 passed with stage
in 0 seconds
......@@ -28,10 +28,10 @@ dtkWidgetsBaseSpinBox::dtkWidgetsBaseSpinBox(QWidget * parent)
dtkWidgetsBaseSpinBox::~ dtkWidgetsBaseSpinBox()
{
}
void dtkWidgetsBaseSpinBox::setNoScrollFocusFilter()
void dtkWidgetsBaseSpinBox::setNoScrollFocusFilter()
{
this->setFocusPolicy( Qt::StrongFocus ); // must click on spinbox to focus it (doesn't focus on hover only)
this->installEventFilter(this); // filter scroll events (see below)
......@@ -61,18 +61,18 @@ bool dtkWidgetsBaseSpinBox::eventFilter(QObject *o, QEvent *e)
QAbstractSpinBox::StepEnabled dtkWidgetsBaseSpinBox::stepEnabled(void) const
{
return step_enabled;
return m_step_enabled;
}
void dtkWidgetsBaseSpinBox::setStepEnabled(bool val)
{
step_enabled = (val? QAbstractSpinBox::StepUpEnabled | QAbstractSpinBox::StepDownEnabled : QAbstractSpinBox::StepNone);
m_step_enabled = (val? QAbstractSpinBox::StepUpEnabled | QAbstractSpinBox::StepDownEnabled : QAbstractSpinBox::StepNone);
}
void dtkWidgetsBaseSpinBox::focusInEvent(QFocusEvent*)
void dtkWidgetsBaseSpinBox::focusInEvent(QFocusEvent*)
{
this->setFocusPolicy( Qt::WheelFocus );
this->lineEdit()->setSelection(text().length(), text().length() + 1);
this->lineEdit()->setSelection(text().length(), text().length() + 1);
}
void dtkWidgetsBaseSpinBox::focusOutEvent(QFocusEvent*)
......@@ -80,4 +80,3 @@ void dtkWidgetsBaseSpinBox::focusOutEvent(QFocusEvent*)
this->setFocusPolicy( Qt::StrongFocus );
emit editingFinished();
}
......@@ -25,7 +25,7 @@ class dtkWidgetsBaseSpinBox : public QAbstractSpinBox
public:
dtkWidgetsBaseSpinBox(QWidget * parent = nullptr);
~dtkWidgetsBaseSpinBox(void);
protected:
bool eventFilter(QObject *o, QEvent *e) override;
......@@ -34,10 +34,8 @@ protected:
void setNoScrollFocusFilter();
protected:
QAbstractSpinBox::StepEnabled step_enabled;
QAbstractSpinBox::StepEnabled m_step_enabled;
QAbstractSpinBox::StepEnabled stepEnabled(void) const override;
public:
void setStepEnabled(bool);
};
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment