videocollection/tsrc/stubs/inc/hbaction.h
changeset 34 bbb98528c666
child 35 3738fe97f027
equal deleted inserted replaced
33:48e74db5d516 34:bbb98528c666
       
     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 hbaction 
       
    15 * 
       
    16 */
       
    17 
       
    18 #ifndef HBACTION_H
       
    19 #define HBACTION_H
       
    20 
       
    21 #include <QObject>
       
    22 #include <QString>
       
    23 #include <qpointer.h>
       
    24 #include <qaction.h>
       
    25 #include "hbnamespace.h"
       
    26 #include "hbicon.h"
       
    27 #include "hbmenu.h"
       
    28 
       
    29 class  HbAction : public QAction
       
    30 {
       
    31     Q_OBJECT
       
    32 public:
       
    33     
       
    34     /**
       
    35      * Constructor
       
    36      */
       
    37     explicit HbAction(QObject *parent = 0) : QAction(parent)
       
    38     {
       
    39         Q_UNUSED(parent);
       
    40         initializeCount++;
       
    41     }
       
    42     
       
    43     /**
       
    44      * Contructor.
       
    45      */       
       
    46     explicit HbAction(const QString &txt, QObject *parent = 0) : mTxt(txt), QAction(parent) 
       
    47     {
       
    48         Q_UNUSED(parent);
       
    49         initializeCount++;
       
    50     }
       
    51     
       
    52     /**
       
    53      * Contructor.
       
    54      */ 
       
    55     explicit HbAction(Hb::SoftKeyAction actType, QObject *parent = 0) : mTxt(""), QAction(parent) 
       
    56     {
       
    57         Q_UNUSED(parent);
       
    58         Q_UNUSED(actType);
       
    59         initializeCount++;
       
    60     }
       
    61     
       
    62     explicit HbAction(Hb::NavigationAction action, QObject* parent = 0) : mTxt(""), QAction(parent)
       
    63     {
       
    64         Q_UNUSED(parent);
       
    65         Q_UNUSED(action);
       
    66         initializeCount++;
       
    67     }
       
    68     
       
    69     /**
       
    70      * destructor
       
    71      */
       
    72    virtual ~HbAction(){initializeCount--;}
       
    73     
       
    74     /**
       
    75      * sets mDisable;
       
    76      */
       
    77     void setDisabled(bool disable){mDisable = disable;}
       
    78     
       
    79     /**
       
    80      * sets mVisible;
       
    81      */
       
    82     void setVisible(bool visible){mVisible = visible;}
       
    83     
       
    84     /**
       
    85      * not stubbed yet.
       
    86      */
       
    87     void setIcon(const HbIcon &icon) { Q_UNUSED(icon); }
       
    88     
       
    89     /**
       
    90      * not stubbed yet.
       
    91      */
       
    92     HbIcon icon() const { return HbIcon(); }
       
    93     
       
    94     /**
       
    95      * not stubbed yet.
       
    96      */
       
    97     HbMenu *menu() const { return 0; }
       
    98     
       
    99     /**
       
   100      * dummy member 
       
   101      */
       
   102     bool mDisable;
       
   103     
       
   104     /**
       
   105      * dummy member
       
   106      */
       
   107     bool mVisible;
       
   108     
       
   109     /**
       
   110      * text setted
       
   111      */
       
   112     QString mTxt;
       
   113     
       
   114     /**
       
   115      * counter to make sure alloc dealloc match
       
   116      */
       
   117     static int initializeCount;
       
   118     
       
   119 signals:
       
   120     
       
   121     /**
       
   122      * dummy triggered
       
   123      */
       
   124     void triggered();
       
   125         
       
   126 };
       
   127 
       
   128 #endif