bluetoothengine/btui/btuidelegate/btdelegatepower.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 BTDELEGATEPOWER_H
       
    19 #define BTDELEGATEPOWER_H
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <btengsettings.h>
       
    23 #include "btabstractdelegate.h"
       
    24 
       
    25 class BtuiModel;
       
    26 class HbAction;
       
    27 
       
    28 /*!
       
    29     \class BtDelegatePower
       
    30     \brief the base class for handling Bluetooth power management.
       
    31 
       
    32     \\sa btuidelegate
       
    33  */
       
    34 class BtDelegatePower : public BtAbstractDelegate, public MBTEngSettingsObserver
       
    35 {
       
    36     Q_OBJECT
       
    37 
       
    38 public:
       
    39     explicit BtDelegatePower( BtuiModel& model, QObject *parent = 0 );
       
    40     
       
    41     virtual ~BtDelegatePower();
       
    42 
       
    43     virtual void exec( const QVariant &params );
       
    44     
       
    45     virtual void PowerStateChanged( TBTPowerStateValue aState );
       
    46 
       
    47     virtual void VisibilityModeChanged( TBTVisibilityMode aState );
       
    48     
       
    49 public slots:
       
    50     void btOnQuestionClose(HbAction *action);
       
    51     
       
    52     void btOnWarningClose();
       
    53     
       
    54     void btOffDialogClose(HbAction *action);
       
    55     
       
    56 private:
       
    57     void switchBTOn();
       
    58     
       
    59     void switchBTOff();
       
    60     
       
    61     bool checkOfflineMode(TBTEnabledInOfflineMode& aEnabledInOffline);
       
    62     
       
    63 public slots:
       
    64 
       
    65 private:
       
    66     CBTEngSettings* mBtengSettings;
       
    67 
       
    68 private:
       
    69 
       
    70     Q_DISABLE_COPY(BtDelegatePower)
       
    71 
       
    72 };
       
    73 
       
    74 #endif // BTDELEGATEPOWER_H