hswidgetmodel/examples/helloworldwidgetprovider/helloworldwidget/inc/helloworldwidget.h
changeset 86 e492551a0d54
parent 85 7feec50967db
child 87 9d806967057c
equal deleted inserted replaced
85:7feec50967db 86:e492551a0d54
     1 /*
       
     2 * Copyright (c) 2009 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 <hswidget.h>
       
    22 
       
    23 class QPushButton;
       
    24 
       
    25 class HelloWorldWidget : public HsWidget
       
    26 {
       
    27     Q_OBJECT
       
    28 
       
    29 public:
       
    30     HelloWorldWidget(QGraphicsItem *parent = 0, Qt::WindowFlags flags = 0);
       
    31     ~HelloWorldWidget();
       
    32 
       
    33 public:
       
    34     QRectF boundingRect() const;
       
    35     QPainterPath shape() const;
       
    36 
       
    37 protected:
       
    38     StartResult onStart();
       
    39     StopResult onStop();
       
    40     SuspendResult onSuspend();
       
    41     ResumeResult onResume();
       
    42 
       
    43 private:
       
    44     Q_DISABLE_COPY(HelloWorldWidget)
       
    45     QPushButton *mButton;
       
    46 };
       
    47 
       
    48 
       
    49 #endif // HELLOWORLDWIDGET_H