RadioButton moved to md.
This commit is contained in:
parent
1c07c06d85
commit
5651ee3ed2
|
@ -5,24 +5,27 @@
|
|||
#include <QPropertyAnimation>
|
||||
#include <QColor>
|
||||
#include "lib/qtmaterialcheckable_internal.h"
|
||||
namespace md
|
||||
{
|
||||
|
||||
|
||||
/*!
|
||||
* \class QtMaterialRadioButtonPrivate
|
||||
* \internal
|
||||
*/
|
||||
|
||||
QtMaterialRadioButtonPrivate::QtMaterialRadioButtonPrivate(QtMaterialRadioButton *q)
|
||||
: QtMaterialCheckablePrivate(q)
|
||||
RadioButtonPrivate::RadioButtonPrivate(RadioButton *q)
|
||||
: CheckablePrivate(q)
|
||||
{
|
||||
}
|
||||
|
||||
QtMaterialRadioButtonPrivate::~QtMaterialRadioButtonPrivate()
|
||||
RadioButtonPrivate::~RadioButtonPrivate()
|
||||
{
|
||||
}
|
||||
|
||||
void QtMaterialRadioButtonPrivate::init()
|
||||
void RadioButtonPrivate::init()
|
||||
{
|
||||
Q_Q(QtMaterialRadioButton);
|
||||
Q_Q(RadioButton);
|
||||
|
||||
q->setAutoExclusive(true);
|
||||
|
||||
|
@ -78,23 +81,24 @@ void QtMaterialRadioButtonPrivate::init()
|
|||
* \class QtMaterialRadioButton
|
||||
*/
|
||||
|
||||
QtMaterialRadioButton::QtMaterialRadioButton(QWidget *parent)
|
||||
: QtMaterialCheckable(*new QtMaterialRadioButtonPrivate(this), parent)
|
||||
RadioButton::RadioButton(QWidget *parent)
|
||||
: Checkable(*new RadioButtonPrivate(this), parent)
|
||||
{
|
||||
d_func()->init();
|
||||
}
|
||||
|
||||
QtMaterialRadioButton::~QtMaterialRadioButton()
|
||||
RadioButton::~RadioButton()
|
||||
{
|
||||
}
|
||||
|
||||
void QtMaterialRadioButton::setupProperties()
|
||||
void RadioButton::setupProperties()
|
||||
{
|
||||
QtMaterialCheckable::setupProperties();
|
||||
Checkable::setupProperties();
|
||||
|
||||
Q_D(QtMaterialRadioButton);
|
||||
Q_D(RadioButton);
|
||||
|
||||
d->checkedState->assignProperty(d->checkedIcon, "color", checkedColor());
|
||||
d->checkedState->assignProperty(d->uncheckedIcon, "color", uncheckedColor());
|
||||
d->uncheckedState->assignProperty(d->uncheckedIcon, "color", uncheckedColor());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,23 +2,25 @@
|
|||
#define QTMATERIALRADIOBUTTON_H
|
||||
|
||||
#include "lib/qtmaterialcheckable.h"
|
||||
namespace md
|
||||
{
|
||||
|
||||
class QtMaterialRadioButtonPrivate;
|
||||
class RadioButtonPrivate;
|
||||
|
||||
class QtMaterialRadioButton : public QtMaterialCheckable
|
||||
class RadioButton : public Checkable
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QtMaterialRadioButton(QWidget *parent = 0);
|
||||
~QtMaterialRadioButton();
|
||||
explicit RadioButton(QWidget *parent = 0);
|
||||
~RadioButton();
|
||||
|
||||
protected:
|
||||
void setupProperties();
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY(QtMaterialRadioButton)
|
||||
Q_DECLARE_PRIVATE(QtMaterialRadioButton)
|
||||
Q_DISABLE_COPY(RadioButton)
|
||||
Q_DECLARE_PRIVATE(RadioButton)
|
||||
};
|
||||
|
||||
}
|
||||
#endif // QTMATERIALRADIOBUTTON_H
|
||||
|
|
|
@ -2,19 +2,21 @@
|
|||
#define QTMATERIALRADIOBUTTON_P_H
|
||||
|
||||
#include "lib/qtmaterialcheckable_p.h"
|
||||
|
||||
class QtMaterialRadioButton;
|
||||
|
||||
class QtMaterialRadioButtonPrivate : public QtMaterialCheckablePrivate
|
||||
namespace md
|
||||
{
|
||||
Q_DISABLE_COPY(QtMaterialRadioButtonPrivate)
|
||||
Q_DECLARE_PUBLIC(QtMaterialRadioButton)
|
||||
|
||||
class RadioButton;
|
||||
|
||||
class RadioButtonPrivate : public CheckablePrivate
|
||||
{
|
||||
Q_DISABLE_COPY(RadioButtonPrivate)
|
||||
Q_DECLARE_PUBLIC(RadioButton)
|
||||
|
||||
public:
|
||||
QtMaterialRadioButtonPrivate(QtMaterialRadioButton *q);
|
||||
~QtMaterialRadioButtonPrivate();
|
||||
RadioButtonPrivate(RadioButton *q);
|
||||
~RadioButtonPrivate();
|
||||
|
||||
void init();
|
||||
};
|
||||
|
||||
}
|
||||
#endif // QTMATERIALRADIOBUTTON_P_H
|
||||
|
|
Loading…
Reference in New Issue