diff --git a/components/toggle.cpp b/components/toggle.cpp index bae481b..2005130 100644 --- a/components/toggle.cpp +++ b/components/toggle.cpp @@ -108,8 +108,8 @@ Toggle::Toggle(QWidget *parent) _thumb->installEventFilter(this); connect(_thumb, SIGNAL(clicked()), this, SLOT(toggle())); - connect(_thumb, SIGNAL(clicked()), this, SLOT(xx())); - connect(_thumb, SIGNAL(progressChanged(qreal)), this, SLOT(yy())); + connect(_thumb, SIGNAL(clicked()), this, SLOT(addRipple())); + connect(_thumb, SIGNAL(progressChanged(qreal)), this, SLOT(updateOverlayGeometry())); } Toggle::~Toggle() @@ -130,7 +130,7 @@ void Toggle::setOrientation(Qt::Orientation orientation) _orientation = orientation; } -void Toggle::xx() +void Toggle::addRipple() { if (Qt::Horizontal == _orientation) { const int d = height()/2; @@ -143,7 +143,7 @@ void Toggle::xx() } } -void Toggle::yy() +void Toggle::updateOverlayGeometry() { const int d = _thumb->offset(); diff --git a/components/toggle.h b/components/toggle.h index b82e782..32b633e 100644 --- a/components/toggle.h +++ b/components/toggle.h @@ -53,8 +53,8 @@ public: void setOrientation(Qt::Orientation orientation); protected slots: - void xx(); - void yy(); + void addRipple(); + void updateOverlayGeometry(); protected: bool event(QEvent *event) Q_DECL_OVERRIDE;