bluetoothengine/btui/btcpplugin/btcpuibaseview.h
changeset 33 837dcc42fd6a
parent 19 43824b19ee35
child 40 997690c3397a
child 42 b72428996822
equal deleted inserted replaced
19:43824b19ee35 33:837dcc42fd6a
    24 #define BTCPUIBASEVIEW_H
    24 #define BTCPUIBASEVIEW_H
    25 
    25 
    26 #include <hbview.h>
    26 #include <hbview.h>
    27 #include <qglobal.h>
    27 #include <qglobal.h>
    28 #include <cpbasesettingview.h>
    28 #include <cpbasesettingview.h>
    29 #include <btuimodel.h>
    29 #include <btsettingmodel.h>
       
    30 #include <btdevicemodel.h>
    30 
    31 
    31 /*!
    32 /*!
    32     \class BtUiBaseView
    33     \class BtUiBaseView
    33     \brief the class is the base class for all views in btapplication.
    34     \brief the class is the base class for all views in btapplication.
    34 
    35 
    40 public:
    41 public:
    41     
    42     
    42     virtual ~BtCpUiBaseView();
    43     virtual ~BtCpUiBaseView();
    43     virtual void activateView( const QVariant& value, int cmdId ) = 0;
    44     virtual void activateView( const QVariant& value, int cmdId ) = 0;
    44     virtual void deactivateView() = 0;    
    45     virtual void deactivateView() = 0;    
    45 
    46     virtual void switchToPreviousView() = 0;
       
    47     
    46 signals:
    48 signals:
    47 
    49 
    48 protected:   
    50 protected:
    49     explicit BtCpUiBaseView( BtuiModel &model, QGraphicsItem *parent = 0);
    51     explicit BtCpUiBaseView( 
       
    52             BtSettingModel &settingModel, 
       
    53             BtDeviceModel &deviceModel, 
       
    54             QGraphicsItem *parent = 0);
       
    55     
    50     virtual void setSoftkeyBack() = 0;
    56     virtual void setSoftkeyBack() = 0;
    51     virtual void switchToPreviousView() = 0;
    57 
       
    58     BtSettingModel &getSettingModel();
       
    59     BtDeviceModel &getDeviceModel();
    52     
    60     
    53 protected:
    61 protected:
    54     
    62     
    55     //Does not own this model.
    63     // do not owned
    56     BtuiModel &mModel;
    64     BtSettingModel *mSettingModel;
    57 
    65     
       
    66     //do not owned
       
    67     BtDeviceModel *mDeviceModel;
       
    68     
    58     QGraphicsItem *mParent;
    69     QGraphicsItem *mParent;
    59     int mPreviousViewId;
    70     int mPreviousViewId;
    60     
    71     
    61     Q_DISABLE_COPY(BtCpUiBaseView)
    72     Q_DISABLE_COPY(BtCpUiBaseView)
    62 };
    73 };