bluetoothengine/btui/btcpplugin/btcpuibaseview.h
branchRCL_3
changeset 56 9386f31cc85b
parent 55 613943a21004
child 61 269724087bed
equal deleted inserted replaced
55:613943a21004 56:9386f31cc85b
     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 BTCPUIBASEVIEW_H
       
    19 #define BTCPUIBASEVIEW_H
       
    20 
       
    21 #include <hbview.h>
       
    22 #include <qglobal.h>
       
    23 #include <cpbasesettingview.h>
       
    24 #include <btsettingmodel.h>
       
    25 #include <btdevicemodel.h>
       
    26 
       
    27 /*!
       
    28     \class BtUiBaseView
       
    29     \brief the class is the base class for all views in btapplication.
       
    30 
       
    31  */
       
    32 class BtCpUiBaseView : public CpBaseSettingView
       
    33 {
       
    34     Q_OBJECT
       
    35 
       
    36 public:
       
    37     
       
    38     virtual ~BtCpUiBaseView();
       
    39     virtual void activateView( const QVariant& value, bool fromBackButton ) = 0;
       
    40     virtual void deactivateView() = 0;    
       
    41     virtual void switchToPreviousView() = 0;
       
    42     
       
    43 signals:
       
    44 
       
    45 protected:
       
    46     explicit BtCpUiBaseView(QGraphicsItem *parent = 0);
       
    47     
       
    48     explicit BtCpUiBaseView( 
       
    49             BtSettingModel &settingModel, 
       
    50             BtDeviceModel &deviceModel, 
       
    51             QGraphicsItem *parent = 0);
       
    52     
       
    53     virtual void setSoftkeyBack() = 0;
       
    54 
       
    55     BtSettingModel &getSettingModel();
       
    56     BtDeviceModel &getDeviceModel();
       
    57     
       
    58 protected:
       
    59     
       
    60     // owned
       
    61     BtSettingModel *mSettingModel;
       
    62     
       
    63     // owned
       
    64     BtDeviceModel *mDeviceModel;
       
    65     
       
    66     QGraphicsItem *mParent;
       
    67     int mPreviousViewId;
       
    68     
       
    69     Q_DISABLE_COPY(BtCpUiBaseView)
       
    70 };
       
    71 
       
    72 #endif // BTCPUIBASEVIEW_H