bluetoothengine/btnotif/btdevicedialogplugin/inc/btdevicedialognotifwidget.h
author hgs
Fri, 03 Sep 2010 16:17:59 +0300
changeset 57 5ebadcda06cb
parent 42 b72428996822
child 71 083fd884d7dd
permissions -rw-r--r--
201035_7

/*
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  BtDeviceDialogWidget class declaration.
*
*/


#ifndef BTDEVICEDIALOGNOTIFWIDGET_H
#define BTDEVICEDIALOGNOTIFWIDGET_H

#include <QVariantMap>

#include <hbpopup.h>
#include <hbdevicedialoginterface.h>
#include <hbdevicedialog.h>
#include <hbnotificationdialog.h>

/*!
    \class BtDeviceDialogNotifWidget
    \brief Widget class with properties setting. 

    BtDeviceDialogNotifWidget, inherited from HbDeviceDialogInterface, 
    uses HbNotificationDialog. 
    
 */
class BtDeviceDialogNotifWidget :
    public QObject, public HbDeviceDialogInterface
{
    Q_OBJECT
    
public:
    BtDeviceDialogNotifWidget(const QVariantMap &parameters);
    ~BtDeviceDialogNotifWidget();
    
    // From base class HbDeviceDialogInterface
    virtual bool setDeviceDialogParameters(const QVariantMap &parameters);
    virtual int deviceDialogError() const;
    virtual void closeDeviceDialog(bool byClient);
    HbPopup *deviceDialogWidget() const;
    virtual QObject *signalSender() const;

signals: 
    // Required by the framework
    void deviceDialogClosed();
    void deviceDialogData(QVariantMap data);
    
private:
    
    void processParam(const QVariantMap &parameters);
    bool constructNotifDialog(const QVariantMap &parameters);
    void resetProperties();
        
public slots:
    void NotifClosed(HbAction *action);
    
private:
    Q_DISABLE_COPY(BtDeviceDialogNotifWidget)

    int mLastError;
    int mSendAction;
    bool mShowEventReceived;
    HbNotificationDialog* mNotificationDialog;
};

#endif // BTDEVICEDIALOGNOTIFWIDGET_H