homescreenapp/examples/pannablewidgetplugin/inc/pannablewidget.h
changeset 61 2b1b11a301d2
parent 60 30f14686fb04
child 68 4c11ecddf6b2
child 74 4ee17755d2a9
child 77 4b195f3bea29
equal deleted inserted replaced
60:30f14686fb04 61:2b1b11a301d2
     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 PANNABLEWIDGET_H
       
    19 #define PANNABLEWIDGET_H
       
    20 
       
    21 #include <HbWidget>
       
    22 
       
    23 class PannableWidget : public HbWidget
       
    24 {
       
    25     Q_OBJECT
       
    26 
       
    27 public:
       
    28     PannableWidget(QGraphicsItem *parent = 0, Qt::WindowFlags flags = 0);
       
    29     ~PannableWidget();
       
    30 
       
    31     Q_INVOKABLE bool isPannable(QGraphicsSceneMouseEvent *event);
       
    32 public slots:
       
    33     void onShow();
       
    34     void onHide();
       
    35 private:
       
    36     QGraphicsItem *findChildItemByName(QGraphicsItem *item, const QString &name);
       
    37 private:
       
    38     Q_DISABLE_COPY(PannableWidget)
       
    39 };
       
    40 
       
    41 #endif // PANNABLEWIDGET_H