bluetoothengine/btnotif/btdevicedialogplugin/inc/btdevicedialognotifwidget.h
branchRCL_3
changeset 23 9386f31cc85b
parent 22 613943a21004
child 24 269724087bed
equal deleted inserted replaced
22:613943a21004 23:9386f31cc85b
     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:  BtDeviceDialogWidget class declaration.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef BTDEVICEDIALOGNOTIFWIDGET_H
       
    20 #define BTDEVICEDIALOGNOTIFWIDGET_H
       
    21 
       
    22 #include <QVariantMap>
       
    23 
       
    24 #include <hbpopup.h>
       
    25 #include <hbdevicedialoginterface.h>
       
    26 #include <hbdevicedialog.h>
       
    27 #include <hbnotificationdialog.h>
       
    28 
       
    29 /*!
       
    30     \class BtDeviceDialogNotifWidget
       
    31     \brief Widget class with properties setting. 
       
    32 
       
    33     BtDeviceDialogQueryWidget, inherited from HbNotificationDialog, 
       
    34     implements interface HbDeviceDialogInterface. The Q_Properties
       
    35     here are interfaces for caller of HbDeviceDialog to configue
       
    36     what to be shown in the widget. 
       
    37     
       
    38  */
       
    39 class BtDeviceDialogNotifWidget :
       
    40     public QObject, public HbDeviceDialogInterface
       
    41 {
       
    42     Q_OBJECT
       
    43     
       
    44 public:
       
    45     BtDeviceDialogNotifWidget(const QVariantMap &parameters);
       
    46     ~BtDeviceDialogNotifWidget();
       
    47     
       
    48     // From base class HbDeviceDialogInterface
       
    49     virtual bool setDeviceDialogParameters(const QVariantMap &parameters);
       
    50     virtual int deviceDialogError() const;
       
    51     virtual void closeDeviceDialog(bool byClient);
       
    52     HbPopup *deviceDialogWidget() const;
       
    53     virtual QObject *signalSender() const;
       
    54 
       
    55 signals: 
       
    56     // Required by the framework
       
    57     void deviceDialogClosed();
       
    58     void deviceDialogData(QVariantMap data);
       
    59     
       
    60 private:
       
    61     
       
    62     void processParam(const QVariantMap &parameters);
       
    63     bool constructNotifDialog(const QVariantMap &parameters);
       
    64     void resetProperties();
       
    65         
       
    66 public slots:
       
    67     void NotifClosed(HbAction *action);
       
    68     
       
    69 private:
       
    70     Q_DISABLE_COPY(BtDeviceDialogNotifWidget)
       
    71 
       
    72     int mLastError;
       
    73     int mSendAction;
       
    74     bool mShowEventReceived;
       
    75     HbNotificationDialog* mNotificationDialog;
       
    76 };
       
    77 
       
    78 #endif // BTDEVICEDIALOGNOTIFWIDGET_H