Home · All Namespaces · All Classes |
00001 /*************************************************************************** 00002 ** 00003 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 00004 ** All rights reserved. 00005 ** Contact: Nokia Corporation (directui@nokia.com) 00006 ** 00007 ** This file is part of mhome. 00008 ** 00009 ** If you have questions regarding the use of this file, please contact 00010 ** Nokia at directui@nokia.com. 00011 ** 00012 ** This library is free software; you can redistribute it and/or 00013 ** modify it under the terms of the GNU Lesser General Public 00014 ** License version 2.1 as published by the Free Software Foundation 00015 ** and appearing in the file LICENSE.LGPL included in the packaging 00016 ** of this file. 00017 ** 00018 ****************************************************************************/ 00019 #ifndef PANNINGWATCHER_H 00020 #define PANNINGWATCHER_H 00021 00022 #include <QTimer> 00023 #include <QPointF> 00024 00025 class MPannableWidget; 00026 00031 class PanningWatcher : public QObject 00032 { 00033 Q_OBJECT 00034 00035 public: 00039 PanningWatcher(MPannableWidget &widget, QObject *parent = 0); 00040 00042 virtual bool isPanning(); 00043 00044 private slots: 00046 void enablePanningIfPositionChanged(); 00047 00049 void disablePanningIfPositionNotChanged(); 00050 00051 signals: 00054 void panningStateChanged(bool panning); 00055 00056 private: 00058 MPannableWidget &pannableWidget; 00059 00061 QTimer movementDetectorTimer; 00062 00064 QPointF oldViewportPos; 00065 00067 bool panning; 00068 00069 #ifdef UNIT_TEST 00070 friend class Ut_PanningWatcher; 00071 #endif 00072 }; 00073 00074 #endif
Copyright © 2011 Nokia Corporation | Generated on Thu Jul 7 2011 22:14:50 Doxygen 1.7.1 |
MeeGo Touch |