phoneuis/bubblemanager2/bubblecore/src/bubblecontainerwidget.h
changeset 37 ba76fc04e6c2
child 46 bc5a64e5bc3c
equal deleted inserted replaced
36:2eacb6118286 37:ba76fc04e6c2
       
     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: Bubble container
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef BUBBLECONTAINERWIDGET_H
       
    19 #define BUBBLECONTAINERWIDGET_H
       
    20 
       
    21 #include <hbwidget.h>
       
    22 
       
    23 class HbFrameItem;
       
    24 
       
    25 class BubbleContainerWidget : public HbWidget
       
    26 {
       
    27     Q_OBJECT
       
    28 
       
    29 public:
       
    30     BubbleContainerWidget(QGraphicsItem* item=0);
       
    31     virtual ~BubbleContainerWidget();
       
    32 
       
    33 signals:
       
    34     void clicked();
       
    35 
       
    36 private:
       
    37     void createPrimitives();
       
    38     void updatePrimitives();
       
    39 
       
    40     void mousePressEvent( QGraphicsSceneMouseEvent * event );
       
    41     void mouseMoveEvent( QGraphicsSceneMouseEvent *event );
       
    42     void mouseReleaseEvent( QGraphicsSceneMouseEvent * event );
       
    43 
       
    44     void paint(
       
    45         QPainter *painter,
       
    46         const QStyleOptionGraphicsItem *option,
       
    47         QWidget *widget = 0);
       
    48 
       
    49     void showEvent(QShowEvent *event);
       
    50 
       
    51 private:
       
    52     HbFrameItem* mBackground;
       
    53     bool mPressed;
       
    54 };
       
    55 
       
    56 #endif // BUBBLECONTAINERWIDGET_H