From 31910722ffab602bfed98333cd31a10fc0163475 Mon Sep 17 00:00:00 2001 From: RJ Ryan Date: Tue, 24 Dec 2013 02:42:05 -0500 Subject: Get rid of manual reference counting in WPixmapStore and just use QSharedPointer. --- src/widget/wpushbutton.h | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'src/widget/wpushbutton.h') 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 #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; -- cgit v1.2.3