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

class member read_only -> m_readonly

parent 89419f38
Pipeline #131387 passed with stage
in 0 seconds
......@@ -25,7 +25,7 @@ dtkWidgetsParameter::dtkWidgetsParameter(QWidget *p) : QWidget(p)
bool dtkWidgetsParameter::isReadOnly(void)
{
return read_only;
return m_readonly;
}
void dtkWidgetsParameter::setReadOnly(bool)
......
......@@ -41,7 +41,7 @@ public:
virtual void setReadOnly(bool);
protected:
bool read_only = false;
bool m_readonly = false;
};
Q_DECLARE_METATYPE(dtkWidgetsParameter *);
......
......@@ -47,9 +47,9 @@ dtkWidgetsParameterBoolCheckBox::~dtkWidgetsParameterBoolCheckBox(void)
void dtkWidgetsParameterBoolCheckBox::setReadOnly(bool val)
{
this->dtkWidgetsParameter::read_only = val;
d->check_box->setEnabled(!this->dtkWidgetsParameter::read_only);
d->check_box->setFocusPolicy((this->dtkWidgetsParameter::read_only? Qt::NoFocus : Qt::WheelFocus));
this->dtkWidgetsParameter::m_readonly = val;
d->check_box->setEnabled(!this->dtkWidgetsParameter::m_readonly);
d->check_box->setFocusPolicy((this->dtkWidgetsParameter::m_readonly? Qt::NoFocus : Qt::WheelFocus));
};
bool dtkWidgetsParameterBoolCheckBox::connect(dtkCoreParameter *p)
......
......@@ -49,9 +49,9 @@ dtkWidgetsParameterBoolPushButton::~dtkWidgetsParameterBoolPushButton(void)
void dtkWidgetsParameterBoolPushButton::setReadOnly(bool val)
{
this->dtkWidgetsParameter::read_only = val;
d->push_button->setEnabled(!this->dtkWidgetsParameter::read_only);
d->push_button->setFocusPolicy((this->dtkWidgetsParameter::read_only? Qt::NoFocus : Qt::WheelFocus));
this->dtkWidgetsParameter::m_readonly = val;
d->push_button->setEnabled(!this->dtkWidgetsParameter::m_readonly);
d->push_button->setFocusPolicy((this->dtkWidgetsParameter::m_readonly? Qt::NoFocus : Qt::WheelFocus));
};
bool dtkWidgetsParameterBoolPushButton::connect(dtkCoreParameter *p)
......
......@@ -75,11 +75,11 @@ dtkWidgetsParameterDoubleSlider::~dtkWidgetsParameterDoubleSlider(void)
void dtkWidgetsParameterDoubleSlider::setReadOnly(bool val)
{
this->dtkWidgetsParameter::read_only = val;
d->slider->setEnabled(!this->dtkWidgetsParameter::read_only);
d->slider->setFocusPolicy((this->dtkWidgetsParameter::read_only? Qt::NoFocus : Qt::StrongFocus));
d->val->setReadOnly(this->dtkWidgetsParameter::read_only);
d->val->setFocusPolicy((this->dtkWidgetsParameter::read_only? Qt::NoFocus : Qt::StrongFocus));
this->dtkWidgetsParameter::m_readonly = val;
d->slider->setEnabled(!this->dtkWidgetsParameter::m_readonly);
d->slider->setFocusPolicy((this->dtkWidgetsParameter::m_readonly? Qt::NoFocus : Qt::StrongFocus));
d->val->setReadOnly(this->dtkWidgetsParameter::m_readonly);
d->val->setFocusPolicy((this->dtkWidgetsParameter::m_readonly? Qt::NoFocus : Qt::StrongFocus));
}
void dtkWidgetsParameterDoubleSlider::resizeEvent(QResizeEvent* event)
......
......@@ -50,10 +50,10 @@ dtkWidgetsParameterDoubleSpinBox::~dtkWidgetsParameterDoubleSpinBox(void)
void dtkWidgetsParameterDoubleSpinBox::setReadOnly(bool val)
{
this->dtkWidgetsParameter::read_only = val;
d->spin_box->setReadOnly(this->dtkWidgetsParameter::read_only);
d->spin_box->setStepEnabled(!this->dtkWidgetsParameter::read_only);
d->spin_box->setFocusPolicy((this->dtkWidgetsParameter::read_only? Qt::NoFocus : Qt::StrongFocus));
this->dtkWidgetsParameter::m_readonly = val;
d->spin_box->setReadOnly(this->dtkWidgetsParameter::m_readonly);
d->spin_box->setStepEnabled(!this->dtkWidgetsParameter::m_readonly);
d->spin_box->setFocusPolicy((this->dtkWidgetsParameter::m_readonly? Qt::NoFocus : Qt::StrongFocus));
};
......
......@@ -47,9 +47,9 @@ dtkWidgetsParameterFileBrowse::~dtkWidgetsParameterFileBrowse(void)
void dtkWidgetsParameterFileBrowse::setReadOnly(bool val)
{
this->dtkWidgetsParameter::read_only = val;
d->push_button->setEnabled(!this->dtkWidgetsParameter::read_only);
d->push_button->setFocusPolicy((this->dtkWidgetsParameter::read_only? Qt::NoFocus : Qt::WheelFocus));
this->dtkWidgetsParameter::m_readonly = val;
d->push_button->setEnabled(!this->dtkWidgetsParameter::m_readonly);
d->push_button->setFocusPolicy((this->dtkWidgetsParameter::m_readonly? Qt::NoFocus : Qt::WheelFocus));
}
bool dtkWidgetsParameterFileBrowse::connect(dtkCoreParameter *p)
......
......@@ -89,9 +89,9 @@ dtkWidgetsParameterIntSlider::~dtkWidgetsParameterIntSlider(void)
void dtkWidgetsParameterIntSlider::setReadOnly(bool val)
{
this->dtkWidgetsParameter::read_only = val;
d->setEnabled(!this->dtkWidgetsParameter::read_only);
d->setFocusPolicy((this->dtkWidgetsParameter::read_only? Qt::NoFocus : Qt::StrongFocus));
this->dtkWidgetsParameter::m_readonly = val;
d->setEnabled(!this->dtkWidgetsParameter::m_readonly);
d->setFocusPolicy((this->dtkWidgetsParameter::m_readonly? Qt::NoFocus : Qt::StrongFocus));
}
bool dtkWidgetsParameterIntSlider::connect(dtkCoreParameter *p)
......
......@@ -49,10 +49,10 @@ dtkWidgetsParameterIntSpinBox::~dtkWidgetsParameterIntSpinBox(void)
void dtkWidgetsParameterIntSpinBox::setReadOnly(bool val)
{
this->dtkWidgetsParameter::read_only = val;
d->spin_box->setReadOnly(this->dtkWidgetsParameter::read_only);
d->spin_box->setStepEnabled(!this->dtkWidgetsParameter::read_only);
d->spin_box->setFocusPolicy((this->dtkWidgetsParameter::read_only? Qt::NoFocus : Qt::StrongFocus));
this->dtkWidgetsParameter::m_readonly = val;
d->spin_box->setReadOnly(this->dtkWidgetsParameter::m_readonly);
d->spin_box->setStepEnabled(!this->dtkWidgetsParameter::m_readonly);
d->spin_box->setFocusPolicy((this->dtkWidgetsParameter::m_readonly? Qt::NoFocus : Qt::StrongFocus));
};
bool dtkWidgetsParameterIntSpinBox::connect(dtkCoreParameter *p)
......
......@@ -49,10 +49,10 @@ dtkWidgetsParameterLongLongSpinBox::~dtkWidgetsParameterLongLongSpinBox(void)
void dtkWidgetsParameterLongLongSpinBox::setReadOnly(bool val)
{
this->dtkWidgetsParameter::read_only = val;
d->spin_box->setReadOnly(this->dtkWidgetsParameter::read_only);
d->spin_box->setStepEnabled(!this->dtkWidgetsParameter::read_only);
d->spin_box->setFocusPolicy((this->dtkWidgetsParameter::read_only? Qt::NoFocus : Qt::StrongFocus));
this->dtkWidgetsParameter::m_readonly = val;
d->spin_box->setReadOnly(this->dtkWidgetsParameter::m_readonly);
d->spin_box->setStepEnabled(!this->dtkWidgetsParameter::m_readonly);
d->spin_box->setFocusPolicy((this->dtkWidgetsParameter::m_readonly? Qt::NoFocus : Qt::StrongFocus));
};
bool dtkWidgetsParameterLongLongSpinBox::connect(dtkCoreParameter *p)
......
......@@ -49,10 +49,10 @@ dtkWidgetsParameterScientificSpinBox::~dtkWidgetsParameterScientificSpinBox(void
void dtkWidgetsParameterScientificSpinBox::setReadOnly(bool val)
{
this->dtkWidgetsParameter::read_only = val;
d->spin_box->setReadOnly(this->dtkWidgetsParameter::read_only);
d->spin_box->setStepEnabled(!this->dtkWidgetsParameter::read_only);
d->spin_box->setFocusPolicy((this->dtkWidgetsParameter::read_only? Qt::NoFocus : Qt::StrongFocus));
this->dtkWidgetsParameter::m_readonly = val;
d->spin_box->setReadOnly(this->dtkWidgetsParameter::m_readonly);
d->spin_box->setStepEnabled(!this->dtkWidgetsParameter::m_readonly);
d->spin_box->setFocusPolicy((this->dtkWidgetsParameter::m_readonly? Qt::NoFocus : Qt::StrongFocus));
};
bool dtkWidgetsParameterScientificSpinBox::connect(dtkCoreParameter *p)
......
......@@ -76,16 +76,16 @@ bool dtkWidgetsParameterStringLineEdit::connect(dtkCoreParameter *p)
m_parameter->shareValue(QVariant::fromValue(v));
});
d->line_edit->setReadOnly(this->dtkWidgetsParameter::read_only);
d->line_edit->setReadOnly(this->dtkWidgetsParameter::m_readonly);
return true;
}
void dtkWidgetsParameterStringLineEdit::setReadOnly(bool read_only)
void dtkWidgetsParameterStringLineEdit::setReadOnly(bool readonly)
{
d->line_edit->setReadOnly(read_only);
d->line_edit->setReadOnly(readonly);
this->dtkWidgetsParameter::read_only = read_only;
this->dtkWidgetsParameter::m_readonly = readonly;
}
//
......
......@@ -26,7 +26,7 @@
class dtkWidgetsBaseComboBox : public QComboBox
{
public:
public:
dtkWidgetsBaseComboBox(QWidget* parent = 0);
~dtkWidgetsBaseComboBox(void);
......@@ -88,8 +88,8 @@ dtkWidgetsParameterStringListComboBox::~dtkWidgetsParameterStringListComboBox(vo
void dtkWidgetsParameterStringListComboBox::setReadOnly(bool val)
{
this->dtkWidgetsParameter::read_only = val;
d->combo_box->setEnabled(!this->dtkWidgetsParameter::read_only);
this->dtkWidgetsParameter::m_readonly = val;
d->combo_box->setEnabled(!this->dtkWidgetsParameter::m_readonly);
}
bool dtkWidgetsParameterStringListComboBox::connect(dtkCoreParameter *p)
......
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