bluetoothengine/btui/btuidelegate/btdelegatepower.cpp
changeset 33 837dcc42fd6a
parent 19 43824b19ee35
child 40 997690c3397a
child 42 b72428996822
equal deleted inserted replaced
19:43824b19ee35 33:837dcc42fd6a
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 #include "btdelegatepower.h"
    19 #include "btdelegatepower.h"
    20 #include "btuimodel.h"
    20 #include <btsettingmodel.h>
       
    21 #include <btdevicemodel.h>
    21 #include <hbmessagebox.h>
    22 #include <hbmessagebox.h>
    22 #include <bluetoothuitrace.h>
    23 #include <bluetoothuitrace.h>
    23 #include <hbaction.h>
    24 #include <hbaction.h>
    24 
    25 
    25 /*!
    26 /*!
    26     Constructor.
    27     Constructor.
    27  */
    28  */
    28 BtDelegatePower::BtDelegatePower( BtuiModel& model, QObject *parent )
    29 BtDelegatePower::BtDelegatePower(            
    29     : BtAbstractDelegate( model, parent )
    30         BtSettingModel* settingModel, 
       
    31         BtDeviceModel* deviceModel, QObject *parent )
       
    32     : BtAbstractDelegate( settingModel, deviceModel, parent )
    30 {
    33 {
    31     TRAP_IGNORE( mBtengSettings = CBTEngSettings::NewL(this) );
    34     TRAP_IGNORE( mBtengSettings = CBTEngSettings::NewL(this) );
    32     Q_CHECK_PTR( mBtengSettings );
    35     Q_CHECK_PTR( mBtengSettings );
    33     
    36     
    34 }
    37 }
    65     if (checkOfflineMode(enabledInOffline)){
    68     if (checkOfflineMode(enabledInOffline)){
    66     //if (1){
    69     //if (1){
    67         if (enabledInOffline){
    70         if (enabledInOffline){
    68         //if (1){
    71         //if (1){
    69             // BT is allowed to be enabled in offline mode, show query.
    72             // BT is allowed to be enabled in offline mode, show query.
    70             HbMessageBox::question( tr("Turn Bluetooth on in offline mode?"),this, SLOT(btOnQuestionClose(HbAction*)));
    73             HbMessageBox::question( tr("Turn Bluetooth on in offline mode?"),this, 
       
    74 				SLOT(btOnQuestionClose(HbAction*)));
    71 
    75 
    72         }
    76         }
    73         else{
    77         else{
    74             //if BT is not allowed to be enabled in offline mode, show message and complete
    78             //if BT is not allowed to be enabled in offline mode, show message and complete
    75             HbMessageBox::warning(tr("Bluetooth not allowed to be turned on in offline mode"),this, SLOT(btOnWarningClose()));
    79             HbMessageBox::warning(tr("Bluetooth not allowed to be turned on in offline mode"),this, 
       
    80 				SLOT(btOnWarningClose()));
    76         }
    81         }
    77         
    82         
    78     }
    83     }
    79     else{
    84     else{
    80         //set BT on if the not in offline mode
    85         //set BT on if the not in offline mode