taskswitcherapp/tsdevicedialogplugin/inc/tsdevicedialogplugin.h
branchGCC_SURGE
changeset 68 4c11ecddf6b2
parent 53 f75922b9e380
parent 61 2b1b11a301d2
equal deleted inserted replaced
53:f75922b9e380 68:4c11ecddf6b2
     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 TSDEVICEDIALOGPLUGIN_H
       
    19 #define TSDEVICEDIALOGPLUGIN_H
       
    20 
       
    21 #include <hbdevicedialogplugin.h>
       
    22 
       
    23 #include <QObject>
       
    24 #include <QVariantMap>
       
    25 #include <QSharedPointer>
       
    26 #include <qabstractitemmodel.h>
       
    27 
       
    28 #include "tsdocumentloader.h"
       
    29 
       
    30 class CaService;
       
    31 class TsDeviceDialogPlugin : public HbDeviceDialogPlugin
       
    32 {
       
    33     Q_OBJECT
       
    34 
       
    35 public:
       
    36     TsDeviceDialogPlugin();
       
    37     ~TsDeviceDialogPlugin();
       
    38 
       
    39     bool accessAllowed(const QString &deviceDialogType, const QVariantMap &parameters, const QVariantMap &securityInfo) const;
       
    40     HbDeviceDialogInterface *createDeviceDialog(const QString &deviceDialogType, const QVariantMap &parameters);
       
    41     bool deviceDialogInfo(const QString &deviceDialogType, const QVariantMap &parameters, DeviceDialogInfo *info) const;
       
    42     QStringList deviceDialogTypes() const;
       
    43     PluginFlags pluginFlags() const;
       
    44     int error() const;
       
    45 
       
    46 private slots:
       
    47     void activated(QModelIndex index);
       
    48     void pressed();
       
    49     void longPressed();
       
    50 
       
    51 signals:
       
    52     void activate(QModelIndex);
       
    53 
       
    54 private:
       
    55     int mError;
       
    56     TsDocumentLoader mLoader;
       
    57     QAbstractListModel *mModel;
       
    58     QSharedPointer<CaService> mStorage;
       
    59     bool mLongPressed;
       
    60 
       
    61     Q_DISABLE_COPY(TsDeviceDialogPlugin)
       
    62 };
       
    63 
       
    64 #endif // TSDEVICEDIALOGPLUGIN_H