phoneuis/bubblemanager2/bubblecore/src/bubblehandler.h
changeset 37 ba76fc04e6c2
child 51 f39ed5e045e0
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:  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     virtual void conferenceMemberRemoved(int bubbleId);
       
    47     virtual void conferenceRemoved();
       
    48 
       
    49 protected:
       
    50     QGraphicsWidget* widget(BubbleWidgetManager::Widget widget) const;
       
    51 
       
    52 signals:
       
    53     void headerSelected(int bubbleId);
       
    54 
       
    55 private:
       
    56     BubbleWidgetManager& mWidgetManager;
       
    57     BubbleWidgetManager::View mView;
       
    58     BubbleWidgetManager::Container mContainer;    
       
    59     };
       
    60 
       
    61 #endif /* BUBBLEHANDLER_H_ */