equal
deleted
inserted
replaced
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #ifndef HBWIDGET_H |
18 #ifndef HBWIDGET_H |
19 #define HBWIDGET_H |
19 #define HBWIDGET_H |
|
20 |
20 #include <QGraphicsWidget> |
21 #include <QGraphicsWidget> |
21 #include <hbnamespace.h> |
22 #include <hbnamespace.h> |
|
23 #include <hbglobal.h> |
22 |
24 |
23 /** |
25 /** |
24 * counter to make sure alloc dealloc match |
26 * counter to make sure alloc dealloc match |
25 */ |
27 */ |
26 |
28 |
31 public: |
33 public: |
32 HbWidget(QGraphicsItem *parent = 0) : QGraphicsWidget(parent){initializeCount++;} |
34 HbWidget(QGraphicsItem *parent = 0) : QGraphicsWidget(parent){initializeCount++;} |
33 |
35 |
34 virtual ~HbWidget(){initializeCount--;} |
36 virtual ~HbWidget(){initializeCount--;} |
35 |
37 |
36 void clearActions() {} |
38 void clearActions() |
|
39 { |
|
40 // Note actions().clear() does not work as actions() returns a copy of the actions list. |
|
41 QList<QAction*> act = actions(); |
|
42 QAction* temp; |
|
43 foreach(temp, act) { |
|
44 this->removeAction(temp); |
|
45 } |
|
46 } |
37 |
47 |
38 static int initializeCount; |
48 static int initializeCount; |
39 }; |
49 }; |
40 |
50 |
41 #endif |
51 #endif |