--- a/homescreenapp/serviceproviders/hsmenuserviceprovider/src/hsmenuservice.cpp Fri Mar 19 09:27:44 2010 +0200
+++ b/homescreenapp/serviceproviders/hsmenuserviceprovider/src/hsmenuservice.cpp Fri Apr 16 14:54:01 2010 +0300
@@ -17,6 +17,7 @@
#include <QDebug>
#include <QStandardItem>
+#include <qvaluespacepublisher.h>
#include "hsapp_defs.h"
#include "hsmenuservice.h"
@@ -26,6 +27,8 @@
#include "hsmenuitemmodel.h"
#include "hsmenucollectionsitemmodel.h"
+QTM_USE_NAMESPACE
+
// ======== MEMBER FUNCTIONS ========
// Initialization of a static member variable.
@@ -47,6 +50,7 @@
query.addEntryTypeName(applicationTypeName());
query.addEntryTypeName(urlTypeName());
query.addEntryTypeName(widgetTypeName());
+ query.addEntryTypeName(templatedApplicationTypeName());
query.setFlagsOn(VisibleEntryFlag);
query.setFlagsOff(MissingEntryFlag);
query.setSort(HsMenuServiceUtils::sortBy(sortAttribute),
@@ -168,6 +172,26 @@
}
/*!
+ Launch task switcher
+ \retval boolean launching status
+ */
+bool HsMenuService::launchTaskSwitcher()
+{
+ qDebug() << "HsMenuService::launchTS";
+ QScopedPointer<CaEntry> tsEntry(new CaEntry);
+ tsEntry->setEntryTypeName(applicationTypeName());
+ tsEntry->setAttribute(
+ applicationUidEntryKey(), QString::number(taskSwitcherUid));
+ int retval = CaService::instance()->executeCommand(*tsEntry,
+ openActionIdentifier());
+ if(retval) {
+ QValueSpacePublisher publisher("/TaskSwitcher");
+ publisher.setValue("Activation", taskSwitcherPropertyValue);
+ }
+ return retval;
+}
+
+/*!
Adds new collection
\param name of the collection
\retval entryId of new collection