phoneuis/bubblemanager2/bubblecore/src/bubblecontainerwidget.h
changeset 21 92ab7f8d0eab
child 30 ebdbd102c78a
equal deleted inserted replaced
4:c84cf270c54f 21:92ab7f8d0eab
       
     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(const QString& stylePluginName,
       
    31                           QGraphicsItem* item=0);
       
    32     virtual ~BubbleContainerWidget();
       
    33 
       
    34 signals:
       
    35     void clicked();
       
    36 
       
    37 private:
       
    38     void createPrimitives();
       
    39     void updatePrimitives();
       
    40 
       
    41     void mousePressEvent( QGraphicsSceneMouseEvent * event );
       
    42     void mouseMoveEvent( QGraphicsSceneMouseEvent *event );
       
    43     void mouseReleaseEvent( QGraphicsSceneMouseEvent * event );
       
    44 
       
    45     void paint(
       
    46         QPainter *painter,
       
    47         const QStyleOptionGraphicsItem *option,
       
    48         QWidget *widget = 0);
       
    49 
       
    50 private:
       
    51     QString mStylePluginName;
       
    52     HbFrameItem* mBackground;
       
    53     bool mPressed;
       
    54 };
       
    55 
       
    56 #endif // BUBBLECONTAINERWIDGET_H