bluetoothengine/btui/btcpplugin/btcpuidevicedetail.h
changeset 41 0b2439c3e397
child 47 9e2a905b887f
equal deleted inserted replaced
40:997690c3397a 41:0b2439c3e397
       
     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 BTCPUIDEVICEDETAIL_H
       
    19 #define BTCPUIDEVICEDETAIL_H
       
    20 
       
    21 #include <qobject.h>
       
    22 #include <btdevsettinginterface.h>
       
    23 #include <HbView>
       
    24 
       
    25 class BtCpUiDeviceView;
       
    26 class BtCpUiDeviceDetailsView;
       
    27 
       
    28 class BtDeviceDetails
       
    29 {
       
    30 public:
       
    31     BtAbstractDevSetting *mSetting;
       
    32     bool mSettingAvailable;
       
    33     HbDataForm *mSettingForm;
       
    34 };
       
    35 
       
    36 
       
    37 class BtCpUiDeviceDetail : public QObject
       
    38 {
       
    39     Q_OBJECT
       
    40     
       
    41 public:
       
    42     explicit BtCpUiDeviceDetail( QObject *parent = 0 );
       
    43     
       
    44     virtual ~BtCpUiDeviceDetail();
       
    45     
       
    46     void loadDeviceDetailPlugins(QString deviceAddress, QString deviceName);
       
    47         
       
    48     void loadDeviceDetailsView();
       
    49         
       
    50 signals:
       
    51     void deviceSettingsChanged(bool settingAvailable);
       
    52     
       
    53 public slots:
       
    54     void handleSettingChange(BtAbstractDevSetting *setting, bool available);
       
    55     void handleDeviceDetailViewClose();
       
    56     
       
    57 private:
       
    58     enum NotifyType {
       
    59         AboutToShow,
       
    60         AboutToHide,
       
    61         AboutToClose,
       
    62     };
       
    63 
       
    64     void appendDeviceToList(BtAbstractDevSetting *devSetting);
       
    65     void clearDeviceDetailList();
       
    66     void notifyDeviceDetailStatus();
       
    67     void createDeviceDetailsView(QString deviceName);
       
    68     void notifyViewStatusToPlugins(BtCpUiDeviceDetail::NotifyType type);
       
    69     
       
    70 private:
       
    71     
       
    72     HbMainWindow* mMainWindow;
       
    73     QList<BtDeviceDetails> mDeviceDetailList;
       
    74     BtCpUiDeviceDetailsView* mDeviceDetailView;
       
    75     HbView *mPreviousView;
       
    76     
       
    77 };
       
    78 
       
    79 
       
    80 #endif /* BTCPUIDEVICEDETAIL_H */