bluetoothengine/btui/btuidelegate/btabstractdelegate.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 14 May 2010 16:01:46 +0300
changeset 19 43824b19ee35
child 31 a0ea99b6fa53
permissions -rw-r--r--
Revision: 201017 Kit: 201019

/*
* Copyright (c) 2010 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: 
*
*/

#ifndef BTABSTRACTDELEGATE_H
#define BTABSTRACTDELEGATE_H

#include <QObject>
#include <QVariant>

class BtuiModel;

#ifdef BUILD_BTUIDELEGATE
#define BTUIDELEGATE_IMEXPORT Q_DECL_EXPORT
#else
#define BTUIDELEGATE_IMEXPORT Q_DECL_IMPORT
#endif


/*!
    \class BtAbstractDelegate
    \brief the base class for handling user requests from BT application.


    \\sa btuidelegate
 */
class BTUIDELEGATE_IMEXPORT BtAbstractDelegate : public QObject
{
    Q_OBJECT

public:
    explicit BtAbstractDelegate( BtuiModel& model, QObject *parent = 0 );
    
    virtual ~BtAbstractDelegate();

    virtual void exec( const QVariant &params ) = 0;

signals:
    void commandCompleted(int status, QVariant params = QVariant() );
    
protected:
    
    BtuiModel &model();
    
public slots:

private:
    
    BtuiModel& mModel;

    Q_DISABLE_COPY(BtAbstractDelegate)

};

#endif // BTABSTRACTDELEGATE_H