dashboard + few tipitem fix + shortcuts

This commit is contained in:
marcin 2014-07-09 16:18:48 +02:00
parent 202da4caf9
commit 92c594ca8c
24 changed files with 494 additions and 39 deletions

View file

@ -33,6 +33,7 @@ Rectangle {
text: qsTr("Locked balance")
anchors.left: parent.left
anchors.leftMargin: 50
tipText: qsTr("Test tip 1<br/><br/>line 2")
}
Row {
@ -66,6 +67,7 @@ Rectangle {
text: qsTr("Unlocked")
anchors.left: parent.left
anchors.leftMargin: 50
tipText: qsTr("Test tip 2<br/><br/>line 2")
}
Text {

View file

@ -6,7 +6,7 @@ Rectangle {
states: [
State {
name: "Dashboard"
// PropertyChanges { target: loader; source: "pages/Dashboard.qml" }
PropertyChanges { target: loader; source: "pages/Dashboard.qml" }
}, State {
name: "History"
PropertyChanges { target: loader; source: "pages/History.qml" }

View file

@ -165,11 +165,12 @@ Rectangle {
Tab { title: "About" }
style: TabViewStyle {
frameOverlap: 2
frameOverlap: 0
tabOverlap: 0
tab: Rectangle {
implicitHeight: 31
implicitWidth: 68
implicitWidth: styleData.index === tabView.count - 1 ? tabView.width - (tabView.count - 1) * 68 : 68
Text {
anchors.verticalCenter: parent.verticalCenter
@ -197,6 +198,7 @@ Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.bottomMargin: -1
height: 1
color: styleData.selected ? "#FFFFFF" : "#DBDBDB"
}
@ -209,7 +211,7 @@ Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.topMargin: 1
//anchors.topMargin: 1
height: 1
color: "#DBDBDB"
}

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.1.2, 2014-07-07T10:49:29. -->
<!-- Written by QtCreator 3.1.2, 2014-07-09T16:18:07. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>

View file

@ -0,0 +1,98 @@
import QtQuick 2.0
ListView {
id: listView
clip: true
boundsBehavior: ListView.StopAtBounds
delegate: Rectangle {
id: delegate
height: 64
width: listView.width
color: index % 2 ? "#F8F8F8" : "#FFFFFF"
StandardButton {
id: goToTransferButton
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
width: 37
anchors.leftMargin: 3
shadowColor: "#FF4304"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
icon: "../images/goToTransferIcon.png"
}
StandardButton {
id: removeButton
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
width: 37
anchors.rightMargin: 3
shadowColor: "#DBDBDB"
releasedColor: "#F0EEEE"
pressedColor: "#DBDBDB"
icon: "../images/deleteIcon.png"
}
Row {
anchors.left: goToTransferButton.right
anchors.right: removeButton.left
anchors.leftMargin: 12
anchors.top: goToTransferButton.top
anchors.topMargin: -2
Text {
id: paymentIdText
anchors.top: parent.top
width: text.length ? 122 : 0
font.family: "Arial"
font.bold: true
font.pixelSize: 19
color: "#444444"
elide: Text.ElideRight
text: paymentId
}
Item { //separator
width: paymentIdText.width ? 12 : 0
height: 14
}
Text {
anchors.bottom: paymentIdText.bottom
width: parent.width - x - 12
elide: Text.ElideRight
font.family: "Arial"
font.pixelSize: 14
color: "#545454"
text: description
}
}
Text {
anchors.top: description.length === 0 && paymentId.length === 0 ? goToTransferButton.top : undefined
anchors.bottom: description.length === 0 && paymentId.length === 0 ? undefined : goToTransferButton.bottom
anchors.topMargin: -2
anchors.bottomMargin: -2
anchors.left: goToTransferButton.right
anchors.right: removeButton.left
anchors.rightMargin: 12
anchors.leftMargin: 12
elide: Text.ElideRight
font.family: "Arial"
font.pixelSize: 14
color: "#545454"
text: address
}
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
height: 1
color: "#DBDBDB"
}
}
}

View file

@ -59,7 +59,7 @@ ListView {
font.family: "Arial"
font.pixelSize: 14
color: "#545454"
text: address
text: description.length > 0 ? description : address
}
}

View file

@ -1,8 +1,10 @@
import QtQuick 2.0
Item {
id: item
property alias text: label.text
property alias color: label.color
property string tipText: ""
property int fontSize: 12
width: icon.x + icon.width
height: icon.height
@ -25,4 +27,24 @@ Item {
source: "../images/whatIsIcon.png"
visible: appWindow.whatIsEnable
}
MouseArea {
anchors.fill: icon
enabled: appWindow.whatIsEnable
hoverEnabled: true
onEntered: {
icon.visible = false
var pos = rootItem.mapFromItem(icon, 0, -15)
tipItem.text = item.tipText
tipItem.x = pos.x
if(tipItem.height > 30)
pos.y -= tipItem.height - 28
tipItem.y = pos.y
tipItem.visible = true
}
onExited: {
icon.visible = true
tipItem.visible = false
}
}
}

View file

@ -22,7 +22,7 @@ Item {
Input {
id: input
anchors.fill: parent
anchors.leftMargin: 11
anchors.rightMargin: 11
anchors.leftMargin: 4
anchors.rightMargin: 4
}
}

29
components/Scroll.qml Normal file
View file

@ -0,0 +1,29 @@
import QtQuick 2.0
Rectangle {
property var flickable
property int yPos: 0
function flickableContentYChanged() {
if(flickable === undefined)
return
var t = flickable.height - height
y = (flickable.contentY / (flickable.contentHeight - flickable.height)) * t + yPos
}
width: 12
height: {
var t = (flickable.height * flickable.height) / flickable.contentHeight
return t < 20 ? 20 : t
}
z: 1; y: yPos
color: "#DBDBDB"
anchors.right: flickable.right
opacity: flickable.moving ? 0.5 : 0
visible: flickable.contentHeight > flickable.height
Behavior on opacity {
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
}
}

View file

@ -47,6 +47,19 @@ Item {
anchors.right: button.left
width: 154
function hide() { droplist.height = 0 }
function containsPoint(px, py) {
if(px < 0)
return false
if(px > width)
return false
if(py < 0)
return false
if(py > height + droplist.height)
return false
return true
}
Row {
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
@ -81,7 +94,14 @@ Item {
MouseArea {
anchors.fill: parent
onClicked: droplist.height = droplist.height === 0 ? dropcolumn.height : 0
onClicked: {
if(droplist.height === 0) {
appWindow.currentItem = dropdown
droplist.height = dropcolumn.height
} else {
droplist.height = 0
}
}
}
}

View file

@ -5,6 +5,7 @@ Item {
property string shadowColor
property string pressedColor
property string releasedColor
property string icon: ""
property string textColor: "#FFFFFF"
property alias text: label.text
signal clicked()
@ -36,6 +37,13 @@ Item {
elide: Text.ElideRight
font.pixelSize: 12
color: parent.textColor
visible: parent.icon === ""
}
Image {
anchors.centerIn: parent
visible: parent.icon !== ""
source: parent.icon
}
MouseArea {

View file

@ -4,25 +4,40 @@ Item {
id: dropdown
property bool expanded: false
signal collapsed()
signal optionClicked(int index)
width: 72
height: 37
onExpandedChanged: if(expanded) appWindow.currentItem = dropdown
function hide() { dropdown.expanded = false }
function containsPoint(px, py) {
if(px < 0)
return false
if(px > width)
return false
if(py < 0)
return false
if(py > height + dropArea.height)
return false
return true
}
Item {
id: head
anchors.fill: parent
Rectangle {
anchors.fill: parent
anchors.topMargin: dropdown.expanded ? 0 : 1
anchors.topMargin: dropdown.expanded || dropArea.height > 0 ? 0 : 1
radius: 3
color: dropdown.expanded ? "#888888" : "#DBDBDB"
color: dropdown.expanded || dropArea.height > 0 ? "#888888" : "#DBDBDB"
}
Rectangle {
anchors.fill: parent
anchors.bottomMargin: dropdown.expanded ? 0 : 1
anchors.bottomMargin: dropdown.expanded || dropArea.height > 0 ? 0 : 1
radius: 3
color: dropdown.expanded ? "#DBDBDB" : "#F0EEEE"
color: dropdown.expanded || dropArea.height > 0 ? "#DBDBDB" : "#F0EEEE"
}
Image {
@ -37,7 +52,7 @@ Item {
anchors.horizontalCenterOffset: 1
height: 23
width: 1
color: dropdown.expanded ? "#FFFFFF" : "#DBDBDB"
color: dropdown.expanded || dropArea.height > 0 ? "#FFFFFF" : "#DBDBDB"
}
Image {
@ -54,6 +69,7 @@ Item {
}
Item {
id: dropArea
anchors.left: parent.left
anchors.right: parent.right
anchors.top: head.bottom
@ -73,9 +89,9 @@ Item {
ListModel {
id: dataModel
ListElement { name: "<b>text 1</b>"; icon: "../images/dropdownOption1.png" }
ListElement { name: "<b>longer text 2</b>"; icon: "../images/dropdownSend.png" }
ListElement { name: "<b>text3</b><br/><br/>lorem ipsum asdasd asdasd"; icon: "../images/dropdownSearch.png" }
ListElement { name: "<b>Add to adress book</b>"; icon: "../images/dropdownOption1.png" }
ListElement { name: "<b>Send to same destination</b>"; icon: "../images/dropdownSend.png" }
ListElement { name: "<b>Find similar transactions</b>"; icon: "../images/dropdownSearch.png" }
}
Repeater {
@ -127,6 +143,11 @@ Item {
tipItem.visible = true
}
onExited: tipItem.visible = false
onClicked: {
dropdown.optionClicked(index)
tipItem.visible = false
dropdown.expanded = false
}
}
}
}

View file

@ -3,6 +3,7 @@ import QtQuick 2.0
Rectangle {
id: header
signal sortRequest(bool desc, int column)
property alias dataModel: columnsRepeater.model
property int activeSortColumn: -1
height: 31
@ -16,13 +17,6 @@ Rectangle {
color: "#DBDBDB"
}
ListModel {
id: columnsModel
ListElement { columnName: "Date"; columnWidth: 92 }
ListElement { columnName: "Amount"; columnWidth: 158 }
ListElement { columnName: "Balance"; columnWidth: 168 }
}
Row {
anchors.horizontalCenter: parent.horizontalCenter
@ -34,7 +28,6 @@ Rectangle {
Repeater {
id: columnsRepeater
model: columnsModel
delegate: Rectangle {
id: delegate
property bool desc: false

View file

@ -10,7 +10,7 @@ Rectangle {
Image {
anchors.top: parent.bottom
anchors.left: parent.left
anchors.leftMargin: 8
anchors.leftMargin: 5
source: "../images/tip.png"
}
@ -21,6 +21,7 @@ Rectangle {
lineHeight: 0.7
font.family: "Arial"
font.pixelSize: 12
font.letterSpacing: -1
color: "#FFFFFF"
}
}

View file

@ -1,5 +1,6 @@
#include "filter.h"
#include <QKeyEvent>
#include <QDebug>
filter::filter(QObject *parent) :
QObject(parent)
@ -14,6 +15,10 @@ bool filter::eventFilter(QObject *obj, QEvent *ev) {
if(ke->key() == Qt::Key_Control) {
emit ctrlPressed();
m_ctrlPressed = true;
} else {
QKeySequence ks(ke->modifiers() + ke->key());
QString sks = ks.toString();
emit sequencePressed(sks);
}
} break;
case QEvent::KeyRelease: {
@ -23,6 +28,16 @@ bool filter::eventFilter(QObject *obj, QEvent *ev) {
m_ctrlPressed = false;
}
} break;
case QEvent::MouseButtonPress: {
QMouseEvent *me = static_cast<QMouseEvent*>(ev);
emit mousePressed(QVariant::fromValue<QObject*>(obj), me->x(), me->y());
m_mousePressed = true;
} break;
case QEvent::MouseButtonRelease: {
QMouseEvent *me = static_cast<QMouseEvent*>(ev);
emit mouseReleased(QVariant::fromValue<QObject*>(obj), me->x(), me->y());
m_mousePressed = false;
} break;
default: break;
}

View file

@ -9,6 +9,7 @@ class filter : public QObject
private:
bool m_ctrlPressed;
bool m_mousePressed;
public:
explicit filter(QObject *parent = 0);
@ -19,6 +20,9 @@ protected:
signals:
void ctrlPressed();
void ctrlReleased();
void sequencePressed(const QVariant &seq);
void mousePressed(const QVariant &o, const QVariant &x, const QVariant &y);
void mouseReleased(const QVariant &o, const QVariant &x, const QVariant &y);
};
#endif // FILTER_H

BIN
images/deleteIcon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 B

BIN
images/goToTransferIcon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 B

View file

@ -15,6 +15,9 @@ int main(int argc, char *argv[])
QObject::connect(eventFilter, SIGNAL(ctrlPressed()), rootObject, SLOT(ctrlKeyPressed()));
QObject::connect(eventFilter, SIGNAL(ctrlReleased()), rootObject, SLOT(ctrlKeyReleased()));
QObject::connect(eventFilter, SIGNAL(sequencePressed(QVariant)), rootObject, SLOT(sequencePressed(QVariant)));
QObject::connect(eventFilter, SIGNAL(mousePressed(QVariant,QVariant,QVariant)), rootObject, SLOT(mousePressed(QVariant,QVariant,QVariant)));
QObject::connect(eventFilter, SIGNAL(mouseReleased(QVariant,QVariant,QVariant)), rootObject, SLOT(mouseReleased(QVariant,QVariant,QVariant)));
return app.exec();
}

View file

@ -6,14 +6,50 @@ import "components"
ApplicationWindow {
id: appWindow
objectName: "appWindow"
property var currentItem
property bool whatIsEnable: false
property bool ctrlPressed: false
function ctrlKeyPressed() { ctrlPressed = true; }
function ctrlKeyReleased() { ctrlPressed = false; }
function sequencePressed(seq) {
if(seq === undefined)
return
if(seq === "Ctrl+D") middlePanel.state = "Dashboard"
else if(seq === "Ctrl+H") middlePanel.state = "History"
else if(seq === "Ctrl+T") middlePanel.state = "Transfer"
else if(seq === "Ctrl+B") middlePanel.state = "AddressBook"
else if(seq === "Ctrl+M") middlePanel.state = "Minning"
else if(seq === "Ctrl+S") middlePanel.state = "Settings"
}
function mousePressed(obj, mouseX, mouseY) {
if(obj.objectName === "appWindow")
obj = rootItem
var tmp = rootItem.mapFromItem(obj, mouseX, mouseY)
if(tmp !== undefined) {
mouseX = tmp.x
mouseY = tmp.y
}
if(currentItem !== undefined) {
var tmp_x = rootItem.mapToItem(currentItem, mouseX, mouseY).x
var tmp_y = rootItem.mapToItem(currentItem, mouseX, mouseY).y
if(!currentItem.containsPoint(tmp_x, tmp_y)) {
currentItem.hide()
currentItem = undefined
}
}
}
function mouseReleased(obj, mouseX, mouseY) {
}
visible: true
width: 1269
height: 932
height: 900
color: "#FFFFFF"
x: (Screen.width - width) / 2
y: (Screen.height - height) / 2

View file

@ -1,5 +1,171 @@
import QtQuick 2.0
import "../components"
Rectangle {
color: "#000000"
color: "#F0EEEE"
// Text {
// id: newEntryText
// anchors.left: parent.left
// anchors.right: parent.right
// anchors.top: parent.top
// anchors.leftMargin: 17
// anchors.topMargin: 17
// elide: Text.ElideRight
// font.family: "Arial"
// font.pixelSize: 18
// color: "#4A4949"
// text: qsTr("Add new entry")
// }
// Label {
// id: addressLabel
// anchors.left: parent.left
// anchors.top: newEntryText.bottom
// anchors.leftMargin: 17
// anchors.topMargin: 17
// text: qsTr("Address")
// fontSize: 14
// tipText: qsTr("<b>Tip tekst test</b>")
// }
// LineEdit {
// id: addressLine
// anchors.left: parent.left
// anchors.right: parent.right
// anchors.top: addressLabel.bottom
// anchors.leftMargin: 17
// anchors.rightMargin: 17
// anchors.topMargin: 5
// }
// Label {
// id: paymentIdLabel
// anchors.left: parent.left
// anchors.top: addressLine.bottom
// anchors.leftMargin: 17
// anchors.topMargin: 17
// text: qsTr("Payment ID <font size='2'>(Optional)</font>")
// fontSize: 14
// tipText: qsTr("<b>Payment ID</b><br/><br/>A unique user name used in<br/>the address book. It is not a<br/>transfer of information sent<br/>during thevtransfer")
// width: 156
// }
// Label {
// id: descriptionLabel
// anchors.left: paymentIdLabel.right
// anchors.top: addressLine.bottom
// anchors.leftMargin: 17
// anchors.topMargin: 17
// text: qsTr("Description <font size='2'>(Local database)</font>")
// fontSize: 14
// tipText: qsTr("<b>Tip tekst test</b><br/><br/>test line 2")
// width: 156
// }
// LineEdit {
// id: paymentIdLine
// anchors.left: parent.left
// anchors.top: paymentIdLabel.bottom
// anchors.leftMargin: 17
// anchors.topMargin: 5
// width: 156
// }
// LineEdit {
// id: descriptionLine
// anchors.left: paymentIdLine.right
// anchors.right: addButton.left
// anchors.top: paymentIdLabel.bottom
// anchors.leftMargin: 17
// anchors.rightMargin: 17
// anchors.topMargin: 5
// }
// StandardButton {
// id: addButton
// anchors.right: parent.right
// anchors.top: paymentIdLabel.bottom
// anchors.rightMargin: 17
// anchors.topMargin: 5
// width: 60
// shadowColor: "#8C0B00"
// pressedColor: "#C60F00"
// releasedColor: "#FF4F41"
// text: qsTr("ADD")
// }
// Rectangle {
// anchors.left: parent.left
// anchors.right: parent.right
// anchors.bottom: parent.bottom
// anchors.top: paymentIdLine.bottom
// anchors.topMargin: 17
// color: "#FFFFFF"
// Rectangle {
// anchors.left: parent.left
// anchors.right: parent.right
// anchors.top: parent.top
// height: 1
// color: "#DBDBDB"
// }
// ListModel {
// id: columnsModel
// ListElement { columnName: "Payment ID"; columnWidth: 148 }
// ListElement { columnName: "Description"; columnWidth: 420 }
// }
// TableHeader {
// id: header
// anchors.left: parent.left
// anchors.right: parent.right
// anchors.top: parent.top
// anchors.topMargin: 17
// anchors.leftMargin: 14
// anchors.rightMargin: 14
// dataModel: columnsModel
// onSortRequest: console.log("column: " + column + " desc: " + desc)
// }
// ListModel {
// id: testModel
// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
// ListElement { paymentId: ""; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "" }
// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
// ListElement { paymentId: ""; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "" }
// }
// Scroll {
// id: flickableScroll
// anchors.rightMargin: -14
// flickable: table
// yPos: table.y
// }
// AddressBookTable {
// id: table
// anchors.left: parent.left
// anchors.right: parent.right
// anchors.top: header.bottom
// anchors.bottom: parent.bottom
// anchors.leftMargin: 14
// anchors.rightMargin: 14
// onContentYChanged: flickableScroll.flickableContentYChanged()
// model: testModel
// }
// }
}

View file

@ -67,7 +67,11 @@ Rectangle {
font.family: "Arial"
font.pixelSize: 12
color: "#545454"
text: qsTr("lookng for security level and address book? go to <font size='4' color='#FF6C3C'>Transfer</font> tab")
textFormat: Text.RichText
text: qsTr("<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style>\
lookng for security level and address book? go to <a href='#'>Transfer</a> tab")
font.underline: false
onLinkActivated: console.log("link activated")
}
}
@ -87,6 +91,13 @@ Rectangle {
color: "#DBDBDB"
}
ListModel {
id: columnsModel
ListElement { columnName: "Date"; columnWidth: 92 }
ListElement { columnName: "Amount"; columnWidth: 158 }
ListElement { columnName: "Balance"; columnWidth: 168 }
}
TableHeader {
id: header
anchors.left: parent.left
@ -95,30 +106,40 @@ Rectangle {
anchors.topMargin: 17
anchors.leftMargin: 14
anchors.rightMargin: 14
dataModel: columnsModel
onSortRequest: console.log("column: " + column + " desc: " + desc)
}
ListModel {
id: testModel
ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; date: "Jan 12, 2014 12:23 <font size='2'>AM</font>"; amount: "19301.<font size='2'>870709159241</font>"; balance: "0.<font size='2'>000709159241</font>"; out: false }
ListElement { paymentId: "Martin"; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; date: "Jan 12, 2014 12:23 <font size='2'>AM</font>"; amount: "19301.<font size='2'>870709159241</font>"; balance: "0.<font size='2'>000709159241</font>"; out: true }
ListElement { paymentId: "Martin"; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; date: "Jan 12, 2014 12:23 <font size='2'>AM</font>"; amount: "19301.<font size='2'>870709159241</font>"; balance: "0.<font size='2'>000709159241</font>"; out: true }
ListElement { paymentId: ""; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; date: "Jan 12, 2014 12:23 <font size='2'>AM</font>"; amount: "19301.<font size='2'>870709159241</font>"; balance: "0.<font size='2'>000709159241</font>"; out: false }
ListElement { paymentId: ""; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; date: "Jan 12, 2014 12:23 <font size='2'>AM</font>"; amount: "19301.<font size='2'>870709159241</font>"; balance: "0.<font size='2'>000709159241</font>"; out: false }
ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; date: "Jan 12, 2014 12:23 <font size='2'>AM</font>"; amount: "19301.<font size='2'>870709159241</font>"; balance: "0.<font size='2'>000709159241</font>"; out: false }
ListElement { paymentId: ""; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; date: "Jan 12, 2014 12:23 <font size='2'>AM</font>"; amount: "19301.<font size='2'>870709159241</font>"; balance: "0.<font size='2'>000709159241</font>"; out: false }
ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; date: "Jan 12, 2014 12:23 <font size='2'>AM</font>"; amount: "19301.<font size='2'>870709159241</font>"; balance: "0.<font size='2'>000709159241</font>"; out: false }
ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; date: "Jan 12, 2014 12:23 <font size='2'>AM</font>"; amount: "19301.<font size='2'>870709159241</font>"; balance: "0.<font size='2'>000709159241</font>"; out: false }
ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; date: "Jan 12, 2014 12:23 <font size='2'>AM</font>"; amount: "19301.<font size='2'>870709159241</font>"; balance: "0.<font size='2'>000709159241</font>"; out: false }
ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; date: "Jan 12, 2014 12:23 <font size='2'>AM</font>"; amount: "19301.<font size='2'>870709159241</font>"; balance: "0.<font size='2'>000709159241</font>"; description: "Client from Australia"; out: false }
ListElement { paymentId: "Martin"; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; date: "Jan 12, 2014 12:23 <font size='2'>AM</font>"; amount: "19301.<font size='2'>870709159241</font>"; balance: "0.<font size='2'>000709159241</font>"; description: ""; out: true }
ListElement { paymentId: "Martin"; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; date: "Jan 12, 2014 12:23 <font size='2'>AM</font>"; amount: "19301.<font size='2'>870709159241</font>"; balance: "0.<font size='2'>000709159241</font>"; description: ""; out: true }
ListElement { paymentId: ""; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; date: "Jan 12, 2014 12:23 <font size='2'>AM</font>"; amount: "19301.<font size='2'>870709159241</font>"; balance: "0.<font size='2'>000709159241</font>"; description: ""; out: false }
ListElement { paymentId: ""; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; date: "Jan 12, 2014 12:23 <font size='2'>AM</font>"; amount: "19301.<font size='2'>870709159241</font>"; balance: "0.<font size='2'>000709159241</font>"; description: "Client from Australia"; out: false }
ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; date: "Jan 12, 2014 12:23 <font size='2'>AM</font>"; amount: "19301.<font size='2'>870709159241</font>"; balance: "0.<font size='2'>000709159241</font>"; description: ""; out: false }
ListElement { paymentId: ""; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; date: "Jan 12, 2014 12:23 <font size='2'>AM</font>"; amount: "19301.<font size='2'>870709159241</font>"; balance: "0.<font size='2'>000709159241</font>"; description: ""; out: false }
ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; date: "Jan 12, 2014 12:23 <font size='2'>AM</font>"; amount: "19301.<font size='2'>870709159241</font>"; balance: "0.<font size='2'>000709159241</font>"; description: ""; out: false }
ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; date: "Jan 12, 2014 12:23 <font size='2'>AM</font>"; amount: "19301.<font size='2'>870709159241</font>"; balance: "0.<font size='2'>000709159241</font>"; description: "Client from Australia"; out: false }
ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; date: "Jan 12, 2014 12:23 <font size='2'>AM</font>"; amount: "19301.<font size='2'>870709159241</font>"; balance: "0.<font size='2'>000709159241</font>"; description: ""; out: false }
}
Scroll {
id: flickableScroll
anchors.rightMargin: -14
flickable: table
yPos: table.y
}
DashboardTable {
id: table
anchors.left: parent.left
anchors.right: parent.right
anchors.top: header.bottom
anchors.bottom: parent.bottom
anchors.leftMargin: 14
anchors.rightMargin: 14
onContentYChanged: flickableScroll.flickableContentYChanged()
model: testModel
}
}

View file

@ -53,5 +53,9 @@
<file>tabs/Twitter.qml</file>
<file>tabs/tweetSearch.js</file>
<file>tabs/TweetsModel.qml</file>
<file>components/Scroll.qml</file>
<file>components/AddressBookTable.qml</file>
<file>images/goToTransferIcon.png</file>
<file>images/deleteIcon.png</file>
</qresource>
</RCC>

View file

@ -1,9 +1,11 @@
import QtQuick 2.2
import QtQuick.Controls 1.2
import "tweetSearch.js" as Helper
import "../components"
Item {
id: tab
ListModel {
id: testModel
ListElement { head: "Monero || #xmr"; foot: "<b>@btcplanet</b> Duis turpis arcu, varius nec rutrum in, adipiscing at enim. Donec quis consequat ipsum," }
@ -72,12 +74,20 @@ Item {
}
}
Scroll {
id: flickableScroll
anchors.rightMargin: -14
flickable: listView
yPos: listView.y
}
ListView {
id: listView
model: ListModel { id: finalModel }
anchors.fill: parent
clip: true
boundsBehavior: ListView.StopAtBounds
onContentYChanged: flickableScroll.flickableContentYChanged()
function add(obj) { model.insert(0, obj) }
delegate: Rectangle {