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 LAUNCHERBUTTONVIEW_H_ 00021 #define LAUNCHERBUTTONVIEW_H_ 00022 00023 #include <QTimer> 00024 #include <QTimeLine> 00025 #include <QRectF> 00026 #include <mbuttoniconview.h> 00027 #include "launcherbuttonmodel.h" 00028 #include "launcherbuttonstyle.h" 00029 #include <QFileSystemWatcher> 00030 00031 class LauncherButton; 00032 class LauncherButtonProgressIndicator; 00033 00037 class LauncherButtonView : public MButtonIconView 00038 { 00039 Q_OBJECT 00040 M_VIEW(LauncherButtonModel, LauncherButtonStyle) 00041 00042 public: 00048 LauncherButtonView(LauncherButton *controller); 00049 00053 virtual ~LauncherButtonView(); 00054 00055 protected: 00057 virtual void setupModel(); 00058 virtual void applyStyle(); 00060 00061 protected slots: 00063 virtual void updateData(const QList<const char *>& modifications); 00065 00067 void updateUnavailableIcon(const QString& dirPath); 00068 00069 private: 00071 LauncherButtonProgressIndicator *createProgressIndicator(); 00072 00074 void resetProgressIndicator(); 00075 00077 void updateButtonIcon(); 00078 00080 void setIconFromDesktopEntry(); 00081 00083 static QFileSystemWatcher iconWatcher; 00084 00086 LauncherButton *controller; 00087 00089 QRectF progressIndicatorRect; 00090 00092 LauncherButtonProgressIndicator *progressIndicator; 00093 00095 QString unavailableIconPath; 00096 00098 QTimer launchStateResetTimer; 00099 00100 #ifdef UNIT_TEST 00101 friend class Ut_LauncherButtonView; 00102 #endif 00103 }; 00104 00105 #endif /* LAUNCHERBUTTONVIEW_H_ */
Copyright © 2011 Nokia Corporation | Generated on Thu Jul 7 2011 22:14:50 Doxygen 1.7.1 |
MeeGo Touch |