phoneplugins/hsdialerwidgetplugin/inc/hsdialerwidget.h
branchGCC_SURGE
changeset 51 f39ed5e045e0
parent 40 bab96b7ed1a4
parent 46 bc5a64e5bc3c
equal deleted inserted replaced
40:bab96b7ed1a4 51:f39ed5e045e0
     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:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef HSDIALERWIDGET_H
       
    19 #define HSDIALERWIDGET_H
       
    20 
       
    21 #include <HbWidget>
       
    22 #ifdef Q_OS_SYMBIAN
       
    23 #include <xqsettingsmanager.h>
       
    24 #else
       
    25 class XQSettingsManager;
       
    26 class XQSettingsKey;
       
    27 #endif
       
    28 
       
    29 #ifndef HOMESCREEN_TEST
       
    30     #define HOMESCREEN_TEST_CLASS(aClassName)
       
    31     #define HOMESCREEN_TEST_FRIEND_CLASS(aClassName)
       
    32 #else
       
    33     #define HOMESCREEN_TEST_CLASS(aClassName) class aClassName;
       
    34     #define HOMESCREEN_TEST_FRIEND_CLASS(aClassName) friend class aClassName;
       
    35 #endif //HOMESCREEN_TEST
       
    36 
       
    37 HOMESCREEN_TEST_CLASS(TestDialerWidgetPlugin)
       
    38 
       
    39 class XQCallInfo;
       
    40 class HbFrameItem;
       
    41 class HsDialerWidget : public HbWidget
       
    42 {
       
    43     Q_OBJECT
       
    44 
       
    45 public:
       
    46     HsDialerWidget(QGraphicsItem* parent = 0, Qt::WindowFlags flags = 0);
       
    47     ~HsDialerWidget();
       
    48     
       
    49     void paint ( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0 );
       
    50 
       
    51 private:
       
    52     void setItemPositions();
       
    53     
       
    54 public slots:
       
    55     void startDialer();
       
    56     void updateMissedCallBadge(const XQSettingsKey &key, const QVariant &value);
       
    57 
       
    58     void onShow();
       
    59     void onHide();
       
    60 
       
    61 protected:
       
    62     void mousePressEvent(QGraphicsSceneMouseEvent *event) { Q_UNUSED(event) }
       
    63     void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
       
    64     
       
    65 
       
    66 
       
    67 private:
       
    68     XQCallInfo *mXQCallInfo;
       
    69     HbFrameItem *m_shortcutBadge;
       
    70     HbFrameItem *m_backgroud;
       
    71     XQSettingsManager * m_setManager;
       
    72     int m_missedCalls;
       
    73     HOMESCREEN_TEST_FRIEND_CLASS(TestDialerWidgetPlugin)
       
    74 };
       
    75 
       
    76 #endif