homescreenapp/examples/localisedhellowidgetplugin/localisedhellowidgetplugin/inc/localisedhellowidget.h
changeset 51 4785f57bf3d4
parent 46 23b5d6a29cce
child 55 03646e8da489
equal deleted inserted replaced
46:23b5d6a29cce 51:4785f57bf3d4
     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:  Example of home screen widget
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef HELLOWORLDWIDGET_H
       
    19 #define HELLOWORLDWIDGET_H
       
    20 
       
    21 #include <HbWidget>
       
    22 
       
    23 
       
    24 class HbPushButton;
       
    25 class QGraphicsPixmapItem;
       
    26 class HbIconItem;
       
    27 
       
    28 class LocalisedHelloWidget : public HbWidget
       
    29 {
       
    30     Q_OBJECT
       
    31     Q_PROPERTY(QString rootPath READ rootPath WRITE setRootPath)
       
    32 public:
       
    33     LocalisedHelloWidget(QGraphicsItem *parent = 0, Qt::WindowFlags flags = 0);
       
    34     ~LocalisedHelloWidget();
       
    35 
       
    36 public:
       
    37     QRectF boundingRect() const;
       
    38     QPainterPath shape() const;
       
    39 
       
    40     QString rootPath()const;
       
    41     void setRootPath(const QString &rootPath);
       
    42 public slots:
       
    43     void onInitialize();
       
    44     void onShow();
       
    45     void onHide();
       
    46 private slots:
       
    47     void onButtonPressed();
       
    48   
       
    49 private:
       
    50     Q_DISABLE_COPY(LocalisedHelloWidget)
       
    51    
       
    52     HbPushButton *mButton;
       
    53     QString mText;
       
    54     QString mRootPath;
       
    55     HbIconItem *mIcon;
       
    56 };
       
    57 
       
    58 #endif // HELLOWORLDWIDGET_H