videocollection/tsrc/stubs/inc/hbwidget.h
branchRCL_3
changeset 56 839377eedc2b
equal deleted inserted replaced
54:315810614048 56:839377eedc2b
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  stub hbwidget
       
    15 * 
       
    16 */
       
    17 
       
    18 #ifndef HBWIDGET_H
       
    19 #define HBWIDGET_H
       
    20 
       
    21 #include <QGraphicsWidget>
       
    22 #include <hbnamespace.h>
       
    23 #include <hbglobal.h>
       
    24 
       
    25  /**
       
    26  * counter to make sure alloc dealloc match
       
    27  */
       
    28 
       
    29 
       
    30 class HbWidget : public QGraphicsWidget
       
    31 {
       
    32     Q_OBJECT
       
    33 public:
       
    34     HbWidget(QGraphicsItem *parent = 0) : QGraphicsWidget(parent){initializeCount++;}
       
    35     
       
    36     virtual ~HbWidget(){initializeCount--;}
       
    37     
       
    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     }
       
    47     
       
    48     static int initializeCount;
       
    49 };
       
    50 
       
    51 #endif