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 QUICKLAUNCHBAR_H 00021 #define QUICKLAUNCHBAR_H 00022 00023 #include <MWidgetController> 00024 #include "quicklaunchbarmodel.h" 00025 00026 class LauncherDataStore; 00027 class LauncherButton; 00028 class ApplicationPackageMonitorListener; 00029 00033 class QuickLaunchBar : public MWidgetController 00034 { 00035 Q_OBJECT 00036 M_CONTROLLER(QuickLaunchBar) 00037 00038 public: 00040 class Placement { 00041 public: 00042 Placement(const QString &placement); 00043 00044 int position; 00045 }; 00046 00054 explicit QuickLaunchBar(QGraphicsItem *parent = NULL); 00055 00059 virtual ~QuickLaunchBar(); 00060 00066 void setLauncherDataStore(LauncherDataStore *dataStore); 00067 00074 void setApplicationPackageMonitorListener(ApplicationPackageMonitorListener *packageMonitorListener); 00075 00076 signals: 00080 void toggleLauncherButtonClicked(); 00081 00085 void launcherButtonClicked(); 00086 00087 public slots: 00097 void updateButtonState(const QString &desktopEntryPath, const QString &packageName, LauncherButtonModel::State state, int progress, bool packageRemovable); 00098 00099 private slots: 00103 void updateButtons(); 00104 00105 private: 00112 LauncherButton *createLauncherButton(const QString &desktopEntryPath); 00113 00122 QMap<QuickLaunchBar::Placement, QString> createPlacementMap(const QHash<QString, QVariant> &desktopEntryPlacements); 00123 00125 static const QString LOCATION_IDENTIFIER; 00126 00128 static const char SECTION_SEPARATOR; 00129 00131 LauncherDataStore *dataStore; 00132 00134 ApplicationPackageMonitorListener *packageMonitorListener; 00135 00136 #ifdef UNIT_TEST 00137 friend class Ut_QuickLaunchBar; 00138 #endif 00139 }; 00140 00141 #endif
Copyright © 2011 Nokia Corporation | Generated on Thu Jul 7 2011 22:14:50 Doxygen 1.7.1 |
MeeGo Touch |