bluetoothengine/btui/btuimodel/btlocalsetting.h
changeset 31 a0ea99b6fa53
parent 29 48ae3789ce00
child 40 997690c3397a
equal deleted inserted replaced
30:df7a93ede42e 31:a0ea99b6fa53
    22 */
    22 */
    23 
    23 
    24 #ifndef BTLOCALSETTING_H
    24 #ifndef BTLOCALSETTING_H
    25 #define BTLOCALSETTING_H
    25 #define BTLOCALSETTING_H
    26 
    26 
    27 #include <qglobal.h>
    27 #include "btsettingmodel.h"
       
    28 
    28 #include <e32base.h>
    29 #include <e32base.h>
    29 #include <e32property.h>
    30 #include <e32property.h>
    30 #include <btengsettings.h>
    31 #include <btengsettings.h>
    31 #include <btservices/btsimpleactive.h>
    32 #include <btservices/btsimpleactive.h>
    32 
       
    33 #include "btuimodel.h"
       
    34 
    33 
    35 /*!
    34 /*!
    36     \class BtuimSettings
    35     \class BtuimSettings
    37     \brief class for handling local Bluetooth setting updates.
    36     \brief class for handling local Bluetooth setting updates.
    38 
    37 
    46                       public MBtSimpleActiveObserver
    45                       public MBtSimpleActiveObserver
    47 {
    46 {
    48     Q_OBJECT
    47     Q_OBJECT
    49 
    48 
    50 public:
    49 public:
    51     explicit BtLocalSetting( BtuiModel& model, QObject *parent = 0 );
    50     explicit BtLocalSetting( BtSettingModel& model, QObject *parent = 0 );
    52     
    51     
    53     virtual ~BtLocalSetting();
    52     virtual ~BtLocalSetting();
    54     
    53     
    55     bool isValid( int col) const;
    54     bool isValid( int row, int col ) const;
    56     
    55     
    57     int itemCount() const;
    56     int rowCount() const;
       
    57     
       
    58     int columnCount() const;
    58         
    59         
    59     void data(QVariant& val, int col, int role ) const;
    60     void data(QVariant& val, int row, int col, int role ) const;
    60     
    61     
    61     BtuiModelDataItem itemData( int col ) const;
    62     BtuiModelDataItem itemData( int row, int col ) const;
    62 
       
    63 signals:
       
    64 
       
    65     void settingDataChanged( int row, int column, void *parent );    
       
    66     
    63     
    67 private:
    64 private:
    68     // from MBTEngSettingsObserver
    65     // from MBTEngSettingsObserver
    69     
    66     
    70     void PowerStateChanged( TBTPowerStateValue state );
    67     void PowerStateChanged( TBTPowerStateValue state );
    77 
    74 
    78     void CancelRequest( TInt requestId );
    75     void CancelRequest( TInt requestId );
    79 
    76 
    80     void HandleError( CBtSimpleActive* active, TInt error );
    77     void HandleError( CBtSimpleActive* active, TInt error );
    81     
    78     
    82 
       
    83     
    79     
    84 public slots:
    80 public slots:
    85     //void activeRequestCompleted( int status, int id );
    81     //void activeRequestCompleted( int status, int id );
    86 
    82 
    87 private:
    83 private:
    95     //void setBtConnectionsSetting( int connections );
    91     //void setBtConnectionsSetting( int connections );
    96     
    92     
    97     void getNameFromRegistry( QString &name );
    93     void getNameFromRegistry( QString &name );
    98 
    94 
    99 private:
    95 private:
       
    96     
   100     BtuiModelDataSource mData;
    97     BtuiModelDataSource mData;
   101     
    98     
   102     BtuiModel& mModel;
    99     BtSettingModel& mModel;
   103     
   100     
   104     CBTEngSettings *mBtengSetting;
   101     CBTEngSettings *mBtengSetting;
   105     
   102     
   106     // For monitoring local device name change
   103     // For monitoring local device name change
   107     RProperty mLocalDeviceKey;
   104     RProperty mLocalDeviceKey;