telutils/dialpad/inc/dialpadbutton.h
branchRCL_3
changeset 20 987c9837762f
parent 19 7d48bed6ce0c
child 21 0a6dd2dc9970
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
     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: Custom button
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef DIALPADBUTTON_H
       
    19 #define DIALPADBUTTON_H
       
    20 
       
    21 #include "hbpushbutton.h"
       
    22 
       
    23 class DialpadButton : public HbPushButton
       
    24 {
       
    25     Q_OBJECT
       
    26 
       
    27     Q_PROPERTY(DialpadButtonType buttonType READ buttonType WRITE setButtonType)
       
    28     Q_ENUMS(DialpadButtonType)
       
    29 
       
    30 public:
       
    31     enum DialpadButtonType {
       
    32         FunctionButton = 0x1, // Backspace
       
    33         CallButton = 0x2      // Dial button
       
    34     };
       
    35 
       
    36 public:
       
    37     explicit DialpadButton(QGraphicsItem *parent = 0 );
       
    38     virtual ~DialpadButton( );
       
    39 
       
    40     DialpadButtonType buttonType() const;
       
    41     void setButtonType(DialpadButtonType type);
       
    42 
       
    43 protected:
       
    44     bool sceneEvent(QEvent *event);
       
    45     void polish(HbStyleParameters& params);
       
    46 
       
    47     void updatePrimitives();
       
    48 
       
    49 private:
       
    50     DialpadButtonType mButtonType;
       
    51 };
       
    52 
       
    53 #endif // DIALPADBUTTON_H