summaryrefslogtreecommitdiffstats
path: root/src/widget/wpushbutton.h
diff options
context:
space:
mode:
authorRJ Ryan <rryan@mixxx.org>2013-12-24 02:42:05 -0500
committerRJ Ryan <rryan@mixxx.org>2013-12-24 02:42:05 -0500
commit31910722ffab602bfed98333cd31a10fc0163475 (patch)
tree2294bfb3a12796056a546a2472726652d222a9f3 /src/widget/wpushbutton.h
parent8e069765f06b9d8fdc9a05d9b2c87fbbce8bdf3d (diff)
Get rid of manual reference counting in WPixmapStore and just use QSharedPointer.
Diffstat (limited to 'src/widget/wpushbutton.h')
-rw-r--r--src/widget/wpushbutton.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/widget/wpushbutton.h b/src/widget/wpushbutton.h
index 8b5242b626..2384372b37 100644
--- a/src/widget/wpushbutton.h
+++ b/src/widget/wpushbutton.h
@@ -27,21 +27,18 @@
#include <QTimer>
#include "widget/wwidget.h"
+#include "widget/wpixmapstore.h"
#include "controlpushbutton.h"
-/**
- *@author Tue & Ken Haste Andersen
- */
-
-class WPushButton : public WWidget
-{
+class WPushButton : public WWidget {
Q_OBJECT
public:
WPushButton(QWidget *parent=0);
// Used by WPushButtonTest.
WPushButton(QWidget *parent, ControlPushButton::ButtonMode leftButtonMode,
ControlPushButton::ButtonMode rightButtonMode);
- ~WPushButton();
+ virtual ~WPushButton();
+
void setup(QDomNode node);
// Sets the number of states associated with this button, and removes
@@ -72,9 +69,9 @@ class WPushButton : public WWidget
// Number of states associated with this button
int m_iNoStates;
// Array of associated pixmaps
- QPixmap** m_pPixmaps;
+ QPixmapPointer* m_pPixmaps;
// Associated background pixmap
- QPixmap* m_pPixmapBack;
+ QPixmapPointer m_pPixmapBack;
// short click toggle button long click push button
ControlPushButton::ButtonMode m_leftButtonMode;
ControlPushButton::ButtonMode m_rightButtonMode;