104 lines
4.1 KiB
QML
104 lines
4.1 KiB
QML
/*
|
|
* Copyright 2012-2018 Morgan McMillian <gilag@monkeystew.com>
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
import bb.cascades 1.0
|
|
import "humane.js" as HumaneDate
|
|
|
|
SceneCover {
|
|
// SceneCover
|
|
property alias topList: topList
|
|
property bool empty
|
|
id: appCover
|
|
content: Container {
|
|
Container {
|
|
visible: empty ? false : true
|
|
ListView {
|
|
dataModel: ArrayDataModel {
|
|
id: topList
|
|
}
|
|
listItemComponents: [
|
|
ListItemComponent {
|
|
Container {
|
|
layout: StackLayout {
|
|
}
|
|
Container {
|
|
layout: DockLayout {
|
|
}
|
|
horizontalAlignment: HorizontalAlignment.Fill
|
|
leftPadding: 10.0
|
|
rightPadding: 10.0
|
|
topPadding: 10.0
|
|
Container {
|
|
layout: StackLayout {
|
|
orientation: LayoutOrientation.LeftToRight
|
|
}
|
|
Container {
|
|
minWidth: 50.0
|
|
Label {
|
|
text: ListItemData.priority
|
|
textStyle.fontSize: FontSize.Medium
|
|
textStyle.color: Color.Blue
|
|
}
|
|
}
|
|
}
|
|
Container {
|
|
layout: StackLayout {
|
|
}
|
|
leftPadding: 30.0
|
|
Container {
|
|
Label {
|
|
text: ListItemData.detail
|
|
multiline: true
|
|
textStyle.fontSize: FontSize.XSmall
|
|
textStyle.color: Color.Black
|
|
}
|
|
}
|
|
Container {
|
|
Label {
|
|
text: HumaneDate.humaneDate(ListItemData.dateCreated)
|
|
textStyle.fontSize: FontSize.XXSmall
|
|
textStyle.color: Color.Gray
|
|
}
|
|
}
|
|
}
|
|
}
|
|
Divider {
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
Container {
|
|
layout: DockLayout {
|
|
}
|
|
visible: empty
|
|
verticalAlignment: VerticalAlignment.Fill
|
|
horizontalAlignment: HorizontalAlignment.Fill
|
|
opacity: 1.0
|
|
Container {
|
|
verticalAlignment: VerticalAlignment.Center
|
|
horizontalAlignment: HorizontalAlignment.Center
|
|
topPadding: 100.0
|
|
Label {
|
|
text: "no tasks"
|
|
horizontalAlignment: HorizontalAlignment.Center
|
|
}
|
|
}
|
|
}
|
|
} // end content
|
|
}// end SceneCover
|