homescreenapp/serviceproviders/hsmenuserviceprovider/src/hsmenuitemmodel.cpp
changeset 85 35368b604b28
parent 77 4b195f3bea29
--- a/homescreenapp/serviceproviders/hsmenuserviceprovider/src/hsmenuitemmodel.cpp	Wed Aug 18 09:40:07 2010 +0300
+++ b/homescreenapp/serviceproviders/hsmenuserviceprovider/src/hsmenuitemmodel.cpp	Thu Sep 02 20:17:27 2010 +0300
@@ -16,6 +16,8 @@
  */
 
 #include <hbnamespace.h>
+#include <HbInstance>
+#include <HbStyle>
 #include <cauninstallnotifier.h>
 #include <casoftwareregistry.h>
 
@@ -24,7 +26,7 @@
 #include "hsiconsidleloader.h"
 
 // Constants
-const QSize smallIconSize(55, 55);
+const QSizeF smallIconSize(55, 55);
 
 /*!
  Constructor
@@ -35,7 +37,13 @@
     CaItemModel(query, parent),
     mIconsIdleLoader(NULL)
 {
-    setIconSize(smallIconSize);
+    qreal size;
+    if (hbInstance->style()->parameter(
+            QString("hb-param-graphic-size-primary-large"), size)) {
+        setIconSize(QSizeF(size, size));
+    } else {
+        setIconSize(smallIconSize);
+    }    
     mComponentId = 0;
     mUninstallNotifier = 
         CaSoftwareRegistry::create()->createUninstallNotifier();
@@ -57,7 +65,7 @@
  Sets sort order in the model
  */
 void HsMenuItemModel::setSort(
-    HsSortAttribute sortAttribute)
+    Hs::HsSortAttribute sortAttribute)
 {
     HSMENUTEST_FUNC_ENTRY("HsMenuItemModel::setSort");
     CaItemModel::setSort(HsMenuServiceUtils::sortBy(sortAttribute),
@@ -82,7 +90,7 @@
         QList<QVariant> icons;
 
         icons << CaItemModel::data(index, role);
-        icons << HbIcon(newIconId());
+        icons << HbIcon(Hs::newIconId);
 
         variant = QVariant(icons);
     } else if (role == Hb::IndexFeedbackRole){
@@ -111,7 +119,7 @@
     bool result = false;
     if (root().isValid()
             && (!(entry(index)->flags() & UsedEntryFlag))
-            && entry(root())->entryTypeName() == collectionDownloadedTypeName()) {
+            && entry(root())->entryTypeName() == Hs::collectionDownloadedTypeName) {
         result = true;
     }
     HSMENUTEST_FUNC_EXIT("HsMenuItemModel::newIconNeeded");