bluetoothengine/btui/btuidelegate/btabstractdelegate.h
changeset 19 43824b19ee35
child 31 a0ea99b6fa53
equal deleted inserted replaced
17:f05641c183ff 19:43824b19ee35
       
     1 /*
       
     2 * Copyright (c) 2010 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 BTABSTRACTDELEGATE_H
       
    19 #define BTABSTRACTDELEGATE_H
       
    20 
       
    21 #include <QObject>
       
    22 #include <QVariant>
       
    23 
       
    24 class BtuiModel;
       
    25 
       
    26 #ifdef BUILD_BTUIDELEGATE
       
    27 #define BTUIDELEGATE_IMEXPORT Q_DECL_EXPORT
       
    28 #else
       
    29 #define BTUIDELEGATE_IMEXPORT Q_DECL_IMPORT
       
    30 #endif
       
    31 
       
    32 
       
    33 /*!
       
    34     \class BtAbstractDelegate
       
    35     \brief the base class for handling user requests from BT application.
       
    36 
       
    37 
       
    38     \\sa btuidelegate
       
    39  */
       
    40 class BTUIDELEGATE_IMEXPORT BtAbstractDelegate : public QObject
       
    41 {
       
    42     Q_OBJECT
       
    43 
       
    44 public:
       
    45     explicit BtAbstractDelegate( BtuiModel& model, QObject *parent = 0 );
       
    46     
       
    47     virtual ~BtAbstractDelegate();
       
    48 
       
    49     virtual void exec( const QVariant &params ) = 0;
       
    50 
       
    51 signals:
       
    52     void commandCompleted(int status, QVariant params = QVariant() );
       
    53     
       
    54 protected:
       
    55     
       
    56     BtuiModel &model();
       
    57     
       
    58 public slots:
       
    59 
       
    60 private:
       
    61     
       
    62     BtuiModel& mModel;
       
    63 
       
    64     Q_DISABLE_COPY(BtAbstractDelegate)
       
    65 
       
    66 };
       
    67 
       
    68 #endif // BTABSTRACTDELEGATE_H