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 LAUNCHERBUTTON_H 00021 #define LAUNCHERBUTTON_H 00022 00023 #include <MButton> 00024 #include "launcherbuttonmodel.h" 00025 #include "launcheraction.h" 00026 00031 class LauncherButton : public MButton 00032 { 00033 Q_OBJECT 00034 M_CONTROLLER(LauncherButton) 00035 00036 Q_PROPERTY(QString desktopEntryPath READ desktopEntry) 00037 Q_PROPERTY(LauncherButtonModel::State buttonState READ buttonState) 00038 Q_PROPERTY(int operationProgress READ operationProgress) 00039 00040 public: 00047 LauncherButton(const QString &desktopEntryPath = QString(), MWidget *parent = 0, 00048 LauncherButtonModel *model = new LauncherButtonModel); 00049 00053 virtual ~LauncherButton(); 00054 00059 QString desktopEntry() const; 00060 00065 LauncherButtonModel::State buttonState() const; 00066 00071 void updateFromDesktopEntry(const QString &desktopEntryPath); 00072 00079 void setState(LauncherButtonModel::State state, int progress); 00080 00085 int operationProgress() const; 00086 00091 void setPackageName(const QString& packageName); 00092 00097 QString packageName() const; 00098 00103 void setPackageRemovable(const bool removable); 00104 00109 bool packageRemovable() const; 00110 00111 protected: 00113 virtual void retranslateUi(); 00115 00116 private slots: 00120 void launch(); 00121 00125 void stopLaunchProgress(); 00126 00127 private: 00131 void init(); 00132 00134 LauncherAction action; 00135 00136 #ifdef UNIT_TEST 00137 friend class Ut_LauncherButton; 00138 #endif 00139 }; 00140 00141 #endif /* MLAUNCHAPPBUTTON_H */
Copyright © 2011 Nokia Corporation | Generated on Thu Jul 7 2011 22:14:50 Doxygen 1.7.1 |
MeeGo Touch |