[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/work/soc-plasma-sff/kdebase/workspace/plasma/applets/kickoff
From:       Marijn Kruisselbrink <m.kruisselbrink () student ! tue ! nl>
Date:       2008-08-13 11:09:51
Message-ID: 1218625791.934672.32764.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 846340 by mkruisselbrink:

replace touchurlitemview with a slightly more generic aproach that should make it \
easy to add kinetic scrolling to any QAbstractScrollArea


 M  +1 -1      CMakeLists.txt  
 M  +1 -1      sffapplet/applicationsmodel.cpp  
 A             sffapplet/kineticscroller.cpp   [License: LGPL (v2+)]
 A             sffapplet/kineticscroller.h   [License: LGPL (v2+)]
 M  +10 -4     sffapplet/menuwidget.cpp  
 D             sffapplet/touchurlitemview.cpp  
 D             sffapplet/touchurlitemview.h  


--- branches/work/soc-plasma-sff/kdebase/workspace/plasma/applets/kickoff/CMakeLists.txt \
#846339:846340 @@ -75,7 +75,7 @@
 install(FILES simpleapplet/plasma-applet-simplelauncher.desktop DESTINATION \
${SERVICES_INSTALL_DIR})  
 # Small form factor Plasma
-set ( SffApplet_SRCS ${Kickoff_SRCS} sffapplet/menuwidget.cpp \
sffapplet/sffapplet.cpp sffapplet/groupsmodel.cpp sffapplet/applicationsmodel.cpp \
sffapplet/touchurlitemview.cpp ) +set ( SffApplet_SRCS ${Kickoff_SRCS} \
sffapplet/menuwidget.cpp sffapplet/sffapplet.cpp sffapplet/groupsmodel.cpp \
sffapplet/applicationsmodel.cpp sffapplet/kineticscroller.cpp )  \
kde4_add_plugin(plasma_applet_sffmenu ${SffApplet_SRCS})  \
target_link_libraries(plasma_applet_sffmenu plasma ${Kickoff_LIBS})  install(TARGETS \
                plasma_applet_sffmenu DESTINATION ${PLUGIN_INSTALL_DIR})
--- branches/work/soc-plasma-sff/kdebase/workspace/plasma/applets/kickoff/sffapplet/applicationsmodel.cpp \
#846339:846340 @@ -73,7 +73,7 @@
             QString appName = service->name();
             QString genericName = service->genericName();
             QString desktopEntry = service->entryPath();
-            kDebug() << desktopEntry;
+            //kDebug() << desktopEntry;
             urls.insert(desktopEntry);
 
             QStandardItem* item = new QStandardItem(KIcon(icon), \
                genericName.isEmpty() ? appName : genericName);
--- branches/work/soc-plasma-sff/kdebase/workspace/plasma/applets/kickoff/sffapplet/menuwidget.cpp \
#846339:846340 @@ -31,7 +31,8 @@
 #include "core/urlitemlauncher.h"
 #include "core/itemhandlers.h"
 #include "ui/itemdelegate.h"
-#include "touchurlitemview.h"
+#include "ui/urlitemview.h"
+#include "kineticscroller.h"
 #include "groupsmodel.h"
 #include "applicationsmodel.h"
 
@@ -40,7 +41,8 @@
 {
     QGridLayout* layout = new QGridLayout;
 
-    Kickoff::UrlItemView* view = new TouchUrlItemView(this);
+    Kickoff::UrlItemView* view = new Kickoff::UrlItemView(this);
+    new KineticScroller(view);
     view->setModel(m_groups = new GroupsModel(this));
     Kickoff::ItemDelegate *delegate = new Kickoff::ItemDelegate(this);
     delegate->setRoleMapping(Plasma::Delegate::SubTitleRole, Kickoff::SubTitleRole);
@@ -51,7 +53,8 @@
     connect(view->selectionModel(), SIGNAL(currentRowChanged(QModelIndex, \
QModelIndex)), this, SLOT(groupChanged(QModelIndex, QModelIndex)));  m_groupsView = \
view;  
-    view = new TouchUrlItemView(this);
+    view = new Kickoff::UrlItemView(this);
+    new KineticScroller(view);
     view->setModel(m_applications = new ApplicationsModel(this));
     delegate = new Kickoff::ItemDelegate(this);
     delegate->setRoleMapping(Plasma::Delegate::SubTitleRole, Kickoff::SubTitleRole);
@@ -87,6 +90,7 @@
     if (m_wideLayout) {
         QGridLayout* layout = new QGridLayout;
         Kickoff::UrlItemView* view = new Kickoff::UrlItemView(this);
+        new KineticScroller(view);
         view->setModel(m_groups);
         Kickoff::ItemDelegate *delegate = new Kickoff::ItemDelegate(this);
         delegate->setRoleMapping(Plasma::Delegate::SubTitleRole, \
Kickoff::SubTitleRole); @@ -105,7 +109,9 @@
         QComboBox* view = new QComboBox(this);
         view->setIconSize(QSize(KIconLoader::SizeMedium, KIconLoader::SizeMedium));
         view->setModel(m_groups);
-        view->setView(new TouchUrlItemView(view));
+        Kickoff::UrlItemView* itemView = new Kickoff::UrlItemView(view);
+        view->setView(itemView);
+        new KineticScroller(itemView);
         Kickoff::ItemDelegate *delegate = new Kickoff::ItemDelegate(this);
         delegate->setRoleMapping(Plasma::Delegate::SubTitleRole, \
                Kickoff::SubTitleRole);
         delegate->setRoleMapping(Plasma::Delegate::SubTitleMandatoryRole, \
Kickoff::SubTitleMandatoryRole);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic