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 00020 #ifndef LAUNCHERBUTTONPROGRESSINDICATORVIEW_H 00021 #define LAUNCHERBUTTONPROGRESSINDICATORVIEW_H 00022 00023 #include <MWidgetView> 00024 #include "launcherbuttonprogressindicator.h" 00025 #include "launcherbuttonprogressindicatorstyle.h" 00026 #include "launcherbuttonstyle.h" 00027 00028 class QPropertyAnimation; 00029 00030 class LauncherButtonProgressIndicatorView : public MWidgetView 00031 { 00032 Q_OBJECT 00033 M_VIEW(LauncherButtonProgressIndicatorModel, LauncherButtonProgressIndicatorStyle) 00034 00035 00036 Q_PROPERTY(int currentFrame READ currentFrame WRITE setCurrentFrame) 00038 00039 public: 00040 LauncherButtonProgressIndicatorView(LauncherButtonProgressIndicator *controller); 00041 00042 virtual ~LauncherButtonProgressIndicatorView(); 00043 00045 int currentFrame() const; 00047 void setCurrentFrame(int newCurrentFrame); 00048 00049 protected: 00051 void setupModel(); 00052 void updateData(const QList<const char *>& modifications); 00053 void applyStyle(); 00054 void drawContents(QPainter *painter, const QStyleOptionGraphicsItem *option) const; 00056 00057 public slots: 00059 void resumeAnimation(); 00061 void pauseAnimation(); 00063 void pauseOrResumeAnimation(); 00064 00065 private: 00067 void updateStyleMode(); 00068 00070 void reloadFrames(); 00071 00073 void releaseUsedPixmaps(); 00074 00076 int frameFromValue(const int &value) const; 00077 00079 QScopedPointer<QPropertyAnimation> positionAnimation; 00080 00082 int currentFrameIndex; 00084 QList<const QPixmap *> animationPixmaps; 00086 LauncherButtonProgressIndicator *controller; 00087 00088 00089 #ifdef UNIT_TEST 00090 friend class Ut_LauncherButtonProgressIndicatorView; 00091 #endif 00092 }; 00093 00094 #endif
Copyright © 2011 Nokia Corporation | Generated on Thu Jul 7 2011 22:14:50 Doxygen 1.7.1 |
MeeGo Touch |