locationsystemui/locationsysui/possettings/poslocationservices/inc/locationserviceswidget.h
changeset 25 73f6c2762ffe
equal deleted inserted replaced
22:4c4ed41530db 25:73f6c2762ffe
       
     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 header file is for creating the custom widget for location services 
       
    15  *              for Advanced view of Positioning settings 
       
    16  *
       
    17  */
       
    18 
       
    19 #ifndef LOCATIONSERVICESWIDGET_H
       
    20 #define LOCATIONSERVICESWIDGET_H
       
    21 
       
    22 #include <QObject>
       
    23 #include <hbabstractbutton.h>
       
    24 
       
    25 class HbTextItem;
       
    26 
       
    27 class LocationServicesWidget : public HbAbstractButton
       
    28     {
       
    29 Q_OBJECT
       
    30 
       
    31 // It is possible to set initial value to properties from the application designer.
       
    32 Q_PROPERTY(QString primarytext READ primaryText WRITE setPrimaryText)
       
    33 Q_PROPERTY(QString sectext READ secText WRITE setSecText)
       
    34 Q_PROPERTY(QString sec2text READ sec2Text WRITE setSec2Text)
       
    35 
       
    36 public:
       
    37     /**
       
    38      * Constructor
       
    39      */
       
    40     LocationServicesWidget(QGraphicsItem *parent = 0);
       
    41     
       
    42     /**
       
    43      * Destructor
       
    44      */
       
    45     ~LocationServicesWidget();
       
    46 
       
    47 public:
       
    48     
       
    49     /**
       
    50      * Sets the primary text for the widget
       
    51      * @param [in] - primaryText, primary text for the widget
       
    52      */
       
    53     void setPrimaryText(const QString &primaryText);
       
    54     
       
    55     /**
       
    56      * Gets the primary text for the widget
       
    57      * @returns - QString containing the primary text
       
    58      */
       
    59     QString primaryText() const;
       
    60     
       
    61     /**
       
    62      * Sets the primary text for the widget
       
    63      * @param [in] - secText, secondry(second line) text for the widget
       
    64      */
       
    65     void setSecText(const QString &secText);
       
    66     
       
    67     /**
       
    68      * Gets the primary text for the widget
       
    69      * @returns - QString containing the secondry text
       
    70      */
       
    71     QString secText() const;
       
    72     
       
    73     /**
       
    74      * Sets the primary text for the widget
       
    75      * @param [in] - secText, secondry(third line) text for the widget
       
    76      */
       
    77     void setSec2Text(const QString &secText);
       
    78     
       
    79     /**
       
    80      * Gets the primary text for the widget
       
    81      * @returns - QString containing the secondry2 text
       
    82      */
       
    83     QString sec2Text() const;
       
    84 
       
    85 private:
       
    86     
       
    87     /**
       
    88      * Primary Text item
       
    89      * Does not own
       
    90      */
       
    91     HbTextItem* mPrimaryTextItem;
       
    92     
       
    93     /**
       
    94      * Secondry Text item
       
    95      * Does not own
       
    96      */
       
    97     HbTextItem* mSecondryTextItem;
       
    98     
       
    99     /**
       
   100      * Secondry (third item) Text item
       
   101      * Does not own
       
   102      */
       
   103     HbTextItem* mSecondry2TextItem;
       
   104     };
       
   105 
       
   106 #endif // LOCATIONSERVICESWIDGET_H