locationsystemui/locationsysui/possettings/poslocationservices/inc/locationservicescustomviewitem.h
branchRCL_3
changeset 44 2b4ea9893b66
equal deleted inserted replaced
42:02ba3f1733c6 44:2b4ea9893b66
       
     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:  This class to be used to create group items for location services
       
    15  *
       
    16  */
       
    17 #ifndef LOCATIONSERVICES_CUSTOMVIEWITEM_H
       
    18 #define LOCATIONSERVICES_CUSTOMVIEWITEM_H
       
    19 
       
    20 #include <hbdataformviewitem.h>
       
    21 #include <hbdataformmodelitem.h>
       
    22 #include <HbWidget>
       
    23 
       
    24 
       
    25 //dataItemType for Location services custom widget 
       
    26 const int LocationServicesCustomItem = HbDataFormModelItem::CustomItemBase
       
    27         + 15;
       
    28 
       
    29 class LocationServicesCustomViewItem : public HbDataFormViewItem
       
    30     {
       
    31 Q_OBJECT
       
    32 public:
       
    33     /**
       
    34      * Constructor
       
    35      */
       
    36     explicit LocationServicesCustomViewItem(QGraphicsItem *parent = 0);
       
    37     
       
    38     /**
       
    39      * Destructor
       
    40      */
       
    41     ~LocationServicesCustomViewItem();
       
    42 
       
    43 protected:
       
    44     
       
    45     /**
       
    46      * This method is used to create the Custom widget for location services
       
    47      * @returns - HbAbstractButton, instance of the custom widget
       
    48      */
       
    49     virtual HbWidget* createCustomWidget();
       
    50     
       
    51     /**
       
    52      * 
       
    53      */
       
    54     virtual HbAbstractViewItem* createItem();
       
    55     
       
    56     /**
       
    57      * 
       
    58      */
       
    59     virtual bool canSetModelIndex(const QModelIndex &index) const;
       
    60 public slots:
       
    61     virtual void restore();
       
    62     //virtual void save();
       
    63 private:
       
    64     /**
       
    65      * instance of HbAbstractButton
       
    66      */
       
    67     HbWidget *mPushWidget;
       
    68     };
       
    69 #endif