phoneuis/bubblemanager2/bubblecore/src/bubblebutton.h
changeset 30 ebdbd102c78a
equal deleted inserted replaced
27:2f8f8080a020 30:ebdbd102c78a
       
     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 BUBBLEBUTTON_H
       
    19 #define BUBBLEBUTTON_H
       
    20 
       
    21 #include "hbpushbutton.h"
       
    22 
       
    23 class BubbleButton : public HbPushButton
       
    24 {
       
    25     Q_OBJECT
       
    26 
       
    27     Q_PROPERTY(BubbleButtonType buttonType READ buttonType WRITE setButtonType)
       
    28     Q_ENUMS(BubbleButtonType)
       
    29 
       
    30 public:
       
    31     enum BubbleButtonType {
       
    32         DefaultButton = 0x1,
       
    33         GreenButton   = 0x2,
       
    34         RedButton     = 0x3  
       
    35     };
       
    36 
       
    37 public:
       
    38     explicit BubbleButton(QGraphicsItem *parent = 0 );
       
    39     virtual ~BubbleButton( );
       
    40 
       
    41     BubbleButtonType buttonType() const;
       
    42     void setButtonType(BubbleButtonType type);
       
    43 
       
    44     void updatePrimitives();
       
    45 
       
    46 protected:
       
    47     bool sceneEvent(QEvent *event);
       
    48 
       
    49 private:
       
    50     BubbleButtonType mButtonType;
       
    51 };
       
    52 
       
    53 #endif // BUBBLEBUTTON_H