check if value has changed in setters
This commit is contained in:
parent
e6fd12d8bf
commit
8a1fe99fd3
|
@ -17,7 +17,6 @@ Frame::Frame(QWidget *parent)
|
|||
|
||||
_edit->setTextInteractionFlags(Qt::TextBrowserInteraction);
|
||||
_edit->setFont(font);
|
||||
_edit->setWordWrapMode(QTextOption::NoWrap);
|
||||
_layout->addWidget(_edit);
|
||||
|
||||
_layout->setStretch(0, 1);
|
||||
|
|
|
@ -20,24 +20,6 @@ Ripple::~Ripple()
|
|||
{
|
||||
}
|
||||
|
||||
void Ripple::setRadius(qreal radius)
|
||||
{
|
||||
if (radius == _radius)
|
||||
return;
|
||||
|
||||
_radius = radius;
|
||||
emit valueChanged();
|
||||
}
|
||||
|
||||
void Ripple::setOpacity(qreal opacity)
|
||||
{
|
||||
if (opacity == _opacity)
|
||||
return;
|
||||
|
||||
_opacity = opacity;
|
||||
emit valueChanged();
|
||||
}
|
||||
|
||||
QPropertyAnimation *Ripple::animate(const QByteArray &property)
|
||||
{
|
||||
QPropertyAnimation *animation = new QPropertyAnimation;
|
||||
|
|
|
@ -17,10 +17,10 @@ public:
|
|||
explicit Ripple(const QPoint ¢er, QObject *parent = 0);
|
||||
~Ripple();
|
||||
|
||||
void setRadius(qreal radius);
|
||||
inline void setRadius(qreal radius) { _radius = radius; emit valueChanged(); }
|
||||
inline qreal radius() const { return _radius; }
|
||||
|
||||
void setOpacity(qreal opacity);
|
||||
inline void setOpacity(qreal opacity) { _opacity = opacity; emit valueChanged(); }
|
||||
inline qreal opacity() const { return _opacity; }
|
||||
|
||||
inline const QPoint ¢er() const { return _center; }
|
||||
|
|
Loading…
Reference in New Issue