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

List:       kde-commits
Subject:    KDE/kdepim/mobile
From:       Tobias Koenig <tokoe () kde ! org>
Date:       2010-12-08 11:53:55
Message-ID: 20101208115355.D0434AC8A5 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1204606 by tokoe:

Port filter editor to ReorderList


 M  +1 -0      lib/ReorderList.qml  
 M  +1 -0      lib/ReorderListContainer.qml  
 M  +0 -1      mail/CMakeLists.txt  
 M  +18 -53    mail/FilterEditor.qml  
 D             mail/FilterList.qml  
 M  +3 -1      mail/KMailActions.qml  
 M  +2 -0      pics/CMakeLists.txt  
 AM            pics/movedown-button.png  
 AM            pics/moveup-button.png  


--- trunk/KDE/kdepim/mobile/lib/ReorderList.qml #1204605:1204606
@@ -40,6 +40,7 @@
   property alias actionItemWidth : _listContent.actionItemWidth
 
   property alias model : _listContent.model
+  property alias delegate : _listContent.delegate
   property alias showChildren : _listContent.visible
 
   default property alias content : _listContent.content
--- trunk/KDE/kdepim/mobile/lib/ReorderListContainer.qml #1204605:1204606
@@ -47,6 +47,7 @@
     anchors.left : _topLevel.left
     anchors.right : actionColumn.left
     interactive: count * actionItemHeight > height
+    focus: true
 
     delegate : ReorderListDelegate {
         height: _topLevel.actionItemHeight
--- trunk/KDE/kdepim/mobile/mail/CMakeLists.txt #1204605:1204606
@@ -107,7 +107,6 @@
   BulkActionComponent.qml
   ConfigDialog.qml
   FilterEditor.qml
-  FilterList.qml
   ForwardOptionsPage.qml
   HeaderView.qml
   MarkAsPage.qml
--- trunk/KDE/kdepim/mobile/mail/FilterEditor.qml #1204605:1204606
@@ -23,30 +23,8 @@
 import org.kde 4.5
 import org.kde.pim.mobileui 4.5 as KPIM
 
-QML.Rectangle {
-  id : _topLevel
-  color : "#00000000"
-  property int actionItemHeight : 70
-  property int actionItemWidth : 200
-  property int actionItemSpacing : 0
-  property int bottomMargin
-  anchors.bottomMargin : bottomMargin
+KPIM.ReorderList {
 
-  property alias model : filterView.model
-
-  property alias customActions : actionColumn.content
-
-  signal triggered(string triggeredName)
-  signal doCollapse()
-
-  KPIM.DecoratedListView {
-    id: filterView
-    anchors { top: parent.top; bottom: parent.bottom; left: parent.left }
-    width: parent.width - actionColumn.width
-    model: filterModel
-    focus: true
-    clip: true
-
     delegate: QML.Item {
       id: filterDelegate
       clip: true
@@ -73,43 +51,30 @@
       }
     }
 
-    onCurrentIndexChanged : {
-      filterEditor.setRowSelected( currentIndex )
+  KPIM.ActionButton {
+    icon : KDE.locate( "data", "mobileui/add-button.png" )
+    actionName : "filtereditor_add"
     }
+
+  KPIM.ActionButton {
+    icon : KDE.locate( "data", "mobileui/edit-button.png" )
+    actionName : "filtereditor_edit"
   }
 
-  QML.Text {
-    anchors.fill: filterView
-    visible: filterView.count == 0
-    text: KDE.i18n( "No filters available" )
-    font.bold: true
-    horizontalAlignment: QML.Text.AlignHCenter
-    verticalAlignment: QML.Text.AlignVCenter
+  KPIM.ActionButton {
+    icon : KDE.locate( "data", "mobileui/delete-button.png" )
+    actionName : "filtereditor_delete"
   }
 
-  KPIM.ActionMenuContainer {
-    id : actionColumn
-    width : _topLevel.actionItemWidth
-    anchors.top : parent.top
-    anchors.bottom : parent.bottom
-    anchors.right : parent.right
-    actionItemWidth : width
-    actionItemHeight : _topLevel.actionItemHeight
-
-    content : [
-      KPIM.ActionListItem { name : "filtereditor_add" },
-      KPIM.ActionListItem { name : "filtereditor_edit" },
-      KPIM.ActionListItem { name : "filtereditor_delete" },
-      KPIM.ActionListItem { name : "filtereditor_moveup" },
-      KPIM.ActionListItem { name : "filtereditor_movedown" }
-    ]
+  KPIM.ActionButton {
+    icon : KDE.locate( "data", "mobileui/moveup-button.png" )
+    actionName : "filtereditor_moveup"
   }
 
-  onActionItemSpacingChanged : {
-    actionColumn.refresh();
+  KPIM.ActionButton {
+    icon : KDE.locate( "data", "mobileui/movedown-button.png" )
+    actionName : "filtereditor_movedown"
   }
 
-  onActionItemHeightChanged : {
-    actionColumn.refresh();
+  onCurrentIndexChanged : { filterEditor.setRowSelected( index ) }
   }
-}
--- trunk/KDE/kdepim/mobile/mail/KMailActions.qml #1204605:1204606
@@ -60,10 +60,12 @@
     model : agentInstanceList
   }
 
-  FilterList {
+  FilterEditor {
     category : "home"
     name : "filter_menu"
     text : KDE.i18n( "Filter" )
+
+    model: filterModel
   }
 
   ActionListItem {
--- trunk/KDE/kdepim/mobile/pics/CMakeLists.txt #1204605:1204606
@@ -3,6 +3,8 @@
         back-to-list-button.png
         delete-button.png
         edit-button.png
+        movedown-button.png
+        moveup-button.png
         top.png
         splashscreenstatic.png
         DESTINATION ${DATA_INSTALL_DIR}/mobileui)
[prev in list] [next in list] [prev in thread] [next in thread] 

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