phoneuis/bubblemanager2/bubblecore/src/bubblehandler.h
changeset 21 92ab7f8d0eab
child 22 6bb1b21d2484
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:  Base class for bubble handlers.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef BUBBLEHANDLER_H_
       
    19 #define BUBBLEHANDLER_H_
       
    20 
       
    21 #include <QObject>
       
    22 #include "bubblewidgetmanager.h"
       
    23 
       
    24 class BubbleHeader;
       
    25 class HbAction;
       
    26 class QGraphicsWidget;
       
    27 
       
    28 class BubbleHandler : public QObject
       
    29     {
       
    30     Q_OBJECT
       
    31 
       
    32 public:
       
    33     explicit BubbleHandler(
       
    34         BubbleWidgetManager& widgetManager,
       
    35         BubbleWidgetManager::View view,
       
    36         BubbleWidgetManager::Container container,
       
    37         QObject* parent = 0);
       
    38 
       
    39     virtual ~BubbleHandler();
       
    40 
       
    41     virtual void reset() = 0;
       
    42     virtual void readBubbleHeader( const BubbleHeader& header ) = 0;
       
    43     virtual QGraphicsWidget* graphicsWidgetForAction(
       
    44         HbAction* action ) const = 0;
       
    45     virtual void updateTimerDisplayNow() = 0;
       
    46 
       
    47 protected:
       
    48     QGraphicsWidget* widget(BubbleWidgetManager::Widget widget) const;
       
    49 
       
    50 signals:
       
    51     void headerSelected(int bubbleId);
       
    52 
       
    53 private:
       
    54     BubbleWidgetManager& mWidgetManager;
       
    55     BubbleWidgetManager::View mView;
       
    56     BubbleWidgetManager::Container mContainer;    
       
    57     };
       
    58 
       
    59 #endif /* BUBBLEHANDLER_H_ */