Commit 7769de96 authored by Stephen Kelly's avatar Stephen Kelly

Add the ReorderList

svn path=/trunk/KDE/kdepim/mobile/; revision=1158378
parent 9f73dd30
......@@ -52,6 +52,8 @@ install(FILES
Action.qml
FakeAction.qml
ActionList.qml
ReorderList.qml
ReorderListContainer.qml
ActionListItem.qml
ActionMenuContainer.qml
AttachmentList.qml
......
/*
Copyright (C) 2010 Klarälvdalens Datakonsult AB,
a KDAB Group company, info@kdab.net,
author Stephen Kelly <stephen@kdab.com>
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
import Qt 4.7 as QML
import org.kde.pim.mobileui 4.5 as KPIM
QML.Item {
id : reorderList_top
width : parent.width
//property alias listElementContent : _listElementContent.data
//property alias listContent : _listContent.data
property string category
property alias name : nameItem.buttonText
property alias totalWidth : _listContent.width
property alias columnHeight : _listContent.height
property alias depth : _listContent.bottomMargin
/*
property alias actionItemSpacing : _listContent.actionItemSpacing
property alias actionItemHeight : _listContent.actionItemHeight
*/
property alias model : _listContent.model
property alias delegate : _listContent.delegate
property alias showChildren : _listContent.visible
signal triggered(string triggeredName)
KPIM.Button {
id : nameItem
height : parent.height
width : parent.width
onClicked : {
reorderList_top.triggered(buttonText)
showChildren = true
}
}
KPIM.ReorderListContainer {
id : _listContent
anchors.left : nameItem.right
anchors.bottom : nameItem.top
property int bottomMargin
onBottomMarginChanged : {
console.log("CH" + bottomMargin)
}
anchors.bottomMargin : bottomMargin
visible : false
onTriggered : {
console.log ("INNER NAME" + triggeredName + " " + nameItem.name)
actionList_top.triggered(triggeredName)
}
}
}
/*
Copyright (C) 2010 Klarälvdalens Datakonsult AB,
a KDAB Group company, info@kdab.net,
author Stephen Kelly <stephen@kdab.com>
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
import Qt 4.7
import org.kde.pim.mobileui 4.5 as KPIM
Rectangle {
id : _topLevel
color : "blue"
property int actionItemHeight
property int actionItemWidth
property int actionItemSpacing : 0
property int bottomMargin
anchors.bottomMargin : bottomMargin
property alias model : myList.model
property alias delegate : myList.delegate
property string upAction
property string downAction
property string deleteAction
signal triggered(string triggeredName)
ListView {
id : myList
anchors.fill : parent
}
Rectangle {
id : actionColumn
color : "yellow"
width : 100
anchors.top : parent.top
anchors.bottom : parent.bottom
anchors.right : parent.right
// visible : false
}
onActionItemSpacingChanged : {
myColumn.refresh();
}
onActionItemHeightChanged : {
myColumn.refresh();
}
}
\ No newline at end of file
......@@ -2,6 +2,8 @@ Button 4.5 Button.qml
Button2 4.5 Button2.qml
Action 4.5 Action.qml
ActionList 4.5 ActionList.qml
ReorderList 4.5 ReorderList.qml
ReorderListContainer 4.5 ReorderListContainer.qml
ActionListItem 4.5 ActionListItem.qml
AttachmentList 4.5 AttachmentList.qml
CompletionSlider 4.5 CompletionSlider.qml
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment