Star/unstar playlist with doubleclick
This commit is contained in:
parent
75a0b924c3
commit
8718a16889
|
@ -70,9 +70,7 @@ void FavoriteWidget::paintEvent(QPaintEvent *e) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FavoriteWidget::mouseReleaseEvent(QMouseEvent *e) {
|
void FavoriteWidget::mouseDoubleClickEvent(QMouseEvent *e) {
|
||||||
|
|
||||||
Q_UNUSED(e);
|
|
||||||
|
|
||||||
favorite_ = !favorite_;
|
favorite_ = !favorite_;
|
||||||
update();
|
update();
|
||||||
|
|
|
@ -46,7 +46,7 @@ class FavoriteWidget : public QWidget {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void paintEvent(QPaintEvent *e) override;
|
void paintEvent(QPaintEvent *e) override;
|
||||||
void mouseReleaseEvent(QMouseEvent *e) override;
|
void mouseDoubleClickEvent(QMouseEvent*) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int kStarSize;
|
static const int kStarSize;
|
||||||
|
|
Loading…
Reference in New Issue