diff --git a/bitmonero.pro.user b/bitmonero.pro.user index 014561a5..2edad78d 100644 --- a/bitmonero.pro.user +++ b/bitmonero.pro.user @@ -1,6 +1,6 @@ - + ProjectExplorer.Project.ActiveTarget diff --git a/components/MenuButton.qml b/components/MenuButton.qml index 38e63c92..80384d0f 100644 --- a/components/MenuButton.qml +++ b/components/MenuButton.qml @@ -40,7 +40,7 @@ Rectangle { font.pixelSize: 11 font.bold: true color: button.checked || buttonArea.containsMouse ? "#FFFFFF" : dot.color - visible: appWindow.ctrlPressed + visible: appWindow.altPressed } } diff --git a/components/SearchInput.qml b/components/SearchInput.qml index 4c1b6666..26747ca9 100644 --- a/components/SearchInput.qml +++ b/components/SearchInput.qml @@ -8,14 +8,14 @@ Item { Rectangle { anchors.fill: parent color: "#DBDBDB" - radius: 10 + radius: 4 } Rectangle { anchors.fill: parent anchors.topMargin: 1 color: "#FFFFFF" - radius: 10 + radius: 4 Item { anchors.top: parent.top diff --git a/components/StandardDropdown.qml b/components/StandardDropdown.qml new file mode 100644 index 00000000..5a490c10 --- /dev/null +++ b/components/StandardDropdown.qml @@ -0,0 +1,233 @@ +import QtQuick 2.0 + +Item { + id: dropdown + property string shadowPressedColor + property string shadowReleasedColor + property string pressedColor + property string releasedColor + property string textColor: "#FFFFFF" + property alias currentIndex: column.currentIndex + property bool expanded: false + 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 + droplist.height) + return false + return true + } + + Item { + id: head + anchors.left: parent.left + anchors.right: parent.right + anchors.top: parent.top + height: 37 + + Rectangle { + anchors.left: parent.left + anchors.right: parent.right + height: parent.height - 1 + y: dropdown.expanded || droplist.height > 0 ? 0 : 1 + color: dropdown.expanded || droplist.height > 0 ? dropdown.shadowPressedColor : dropdown.shadowReleasedColor + radius: 4 + } + + Rectangle { + anchors.left: parent.left + anchors.right: parent.right + height: parent.height - 1 + y: dropdown.expanded || droplist.height > 0 ? 1 : 0 + color: dropdown.expanded || droplist.height > 0 ? dropdown.pressedColor : dropdown.releasedColor + radius: 4 + } + + Rectangle { + anchors.left: parent.left + anchors.bottom: parent.bottom + height: 3 + width: 3 + color: dropdown.pressedColor + visible: dropdown.expanded || droplist.height > 0 + } + + Rectangle { + anchors.right: parent.right + anchors.bottom: parent.bottom + height: 3 + width: 3 + color: dropdown.pressedColor + visible: dropdown.expanded || droplist.height > 0 + } + + Text { + id: firstColText + anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left + anchors.leftMargin: 12 + elide: Text.ElideRight + font.family: "Arial" + font.bold: true + font.pixelSize: 12 + color: "#FFFFFF" + text: repeater.model.get(column.currentIndex).column1 + } + + Text { + id: secondColText + anchors.verticalCenter: parent.verticalCenter + anchors.right: separator.left + anchors.rightMargin: 12 + width: dropdown.expanded ? w : (separator.x - 12) - (firstColText.x + firstColText.width + 5) + font.family: "Arial" + font.pixelSize: 12 + color: "#FFFFFF" + text: repeater.model.get(column.currentIndex).column2 + + property int w: 0 + Component.onCompleted: w = implicitWidth + } + + Rectangle { + id: separator + anchors.right: dropIndicator.left + anchors.verticalCenter: parent.verticalCenter + height: 18 + width: 1 + color: "#FFFFFF" + } + + Item { + id: dropIndicator + anchors.top: parent.top + anchors.bottom: parent.bottom + anchors.right: parent.right + width: 32 + + Image { + anchors.centerIn: parent + source: "../images/whiteDropIndicator.png" + rotation: dropdown.expanded ? 180 : 0 + } + } + + MouseArea { + id: dropArea + anchors.fill: parent + onClicked: dropdown.expanded = !dropdown.expanded + } + } + + Rectangle { + id: droplist + anchors.left: parent.left + anchors.right: parent.right + anchors.top: head.bottom + clip: true + height: dropdown.expanded ? column.height : 0 + color: dropdown.pressedColor + radius: 4 + + Rectangle { + anchors.left: parent.left + anchors.top: parent.top + width: 3; height: 3 + color: dropdown.pressedColor + } + + Rectangle { + anchors.right: parent.right + anchors.top: parent.top + width: 3; height: 3 + color: dropdown.pressedColor + } + + Behavior on height { + NumberAnimation { duration: 100; easing.type: Easing.InQuad } + } + + ListModel { + id: testModel + ListElement { column1: "LOW"; column2: "( fee: 0.0002 )" } + ListElement { column1: "MEDIUM"; column2: "( fee: 0.0004 )" } + ListElement { column1: "HIGH"; column2: "( fee: 0.0008 )" } + } + + Column { + id: column + anchors.left: parent.left + anchors.right: parent.right + anchors.top: parent.top + property int currentIndex: 0 + + Repeater { + id: repeater + model: testModel + + delegate: Rectangle { + anchors.left: parent.left + anchors.right: parent.right + height: 30 + radius: index === repeater.count - 1 ? 4 : 0 + color: itemArea.containsMouse || index === column.currentIndex || itemArea.containsMouse ? dropdown.releasedColor : dropdown.pressedColor + + Text { + anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left + anchors.right: col2Text.left + anchors.leftMargin: 12 + anchors.rightMargin: column2.length > 0 ? 12 : 0 + font.family: "Arial" + font.bold: true + font.pixelSize: 12 + color: "#FFFFFF" + text: column1 + } + + Text { + id: col2Text + anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.right + anchors.rightMargin: 45 + font.family: "Arial" + font.pixelSize: 12 + color: "#FFFFFF" + text: column2 + } + + Rectangle { + anchors.left: parent.left + anchors.top: parent.top + width: 3; height: 3 + color: parent.color + } + + Rectangle { + anchors.right: parent.right + anchors.top: parent.top + width: 3; height: 3 + color: parent.color + } + + MouseArea { + id: itemArea + anchors.fill: parent + hoverEnabled: true + onClicked: { + dropdown.expanded = false + column.currentIndex = index + } + } + } + } + } + } +} diff --git a/components/TableDropdown.qml b/components/TableDropdown.qml index 89cec3de..fb248d19 100644 --- a/components/TableDropdown.qml +++ b/components/TableDropdown.qml @@ -83,92 +83,98 @@ Item { anchors.rightMargin: 10 source: "../images/dropIndicator.png" } - - MouseArea { - anchors.fill: parent - onPressed: dropdown.expanded = !dropdown.expanded - } } - Item { - id: dropArea - anchors.left: parent.left - anchors.right: parent.right - anchors.top: head.bottom - height: dropdown.expanded ? column.height : 0 - onHeightChanged: if(height === 0) dropdown.collapsed() - clip: true + MouseArea { + anchors.left: head.left + anchors.right: head.right + anchors.top: head.top + height: head.height + dropArea.height + hoverEnabled: true + onEntered: dropdown.expanded = true + onExited: dropdown.expanded = false - Behavior on height { - NumberAnimation { duration: 100; easing.type: Easing.InQuad } - } - - Column { - id: column + Item { + id: dropArea anchors.left: parent.left anchors.right: parent.right - anchors.top: parent.top + y: head.height + height: dropdown.expanded ? column.height : 0 + onHeightChanged: if(height === 0) dropdown.collapsed() + clip: true - ListModel { - id: dataModel - ListElement { name: "Add to adress book"; icon: "../images/dropdownOption1.png" } - ListElement { name: "Send to same destination"; icon: "../images/dropdownSend.png" } - ListElement { name: "Find similar transactions"; icon: "../images/dropdownSearch.png" } + Behavior on height { + NumberAnimation { duration: 100; easing.type: Easing.InQuad } } - Repeater { - id: repeater - model: dataModel + Column { + id: column + anchors.left: parent.left + anchors.right: parent.right + anchors.top: parent.top - delegate: Rectangle { - id: delegate - anchors.left: parent.left - anchors.right: parent.right - height: 30 - color: delegateArea.containsMouse ? "#F0EEEE" : "#DBDBDB" - radius: index === repeater.count - 1 ? 5 : 0 + ListModel { + id: dataModel + ListElement { name: "Add to adress book"; icon: "../images/dropdownOption1.png" } + ListElement { name: "Send to same destination"; icon: "../images/dropdownSend.png" } + ListElement { name: "Find similar transactions"; icon: "../images/dropdownSearch.png" } + } - Rectangle { + Repeater { + id: repeater + model: dataModel + + delegate: Rectangle { + id: delegate anchors.left: parent.left - anchors.top: parent.top - width: 5 - height: 5 - color: delegate.color - } - - Rectangle { anchors.right: parent.right - anchors.top: parent.top - width: 5 - height: 5 - color: delegate.color - } + height: 30 + color: delegateArea.containsMouse ? "#F0EEEE" : "#DBDBDB" + radius: index === repeater.count - 1 ? 5 : 0 - Image { - anchors.verticalCenter: parent.verticalCenter - anchors.left: parent.left - anchors.leftMargin: 10 - source: icon - } - - MouseArea { - id: delegateArea - hoverEnabled: true - anchors.fill: parent - onEntered: { - var pos = rootItem.mapFromItem(delegate, 30, -20) - tipItem.text = name - tipItem.x = pos.x - if(tipItem.height > 30) - pos.y -= tipItem.height - 30 - tipItem.y = pos.y - tipItem.visible = true + Rectangle { + anchors.left: parent.left + anchors.top: parent.top + width: 5 + height: 5 + color: delegate.color } - onExited: tipItem.visible = false - onClicked: { - dropdown.optionClicked(index) - tipItem.visible = false - dropdown.expanded = false + + Rectangle { + anchors.right: parent.right + anchors.top: parent.top + width: 5 + height: 5 + color: delegate.color + } + + Image { + anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left + anchors.leftMargin: 10 + source: icon + } + + MouseArea { + id: delegateArea + hoverEnabled: true + anchors.fill: parent + propagateComposedEvents: true + onEntered: { + var pos = rootItem.mapFromItem(delegate, 30, -20) + tipItem.text = name + tipItem.x = pos.x + if(tipItem.height > 30) + pos.y -= tipItem.height - 30 + tipItem.y = pos.y + tipItem.visible = true + } + onExited: tipItem.visible = false + onClicked: { + dropdown.optionClicked(index) + tipItem.visible = false + dropdown.expanded = false + } } } } diff --git a/filter.cpp b/filter.cpp index 814afb13..3e838ef6 100644 --- a/filter.cpp +++ b/filter.cpp @@ -5,16 +5,16 @@ filter::filter(QObject *parent) : QObject(parent) { - m_ctrlPressed = true; + m_altPressed = true; } bool filter::eventFilter(QObject *obj, QEvent *ev) { switch(ev->type()) { case QEvent::KeyPress: { QKeyEvent *ke = static_cast(ev); - if(ke->key() == Qt::Key_Control) { - emit ctrlPressed(); - m_ctrlPressed = true; + if(ke->key() == Qt::Key_Alt) { + emit altPressed(); + m_altPressed = true; } else { QKeySequence ks(ke->modifiers() + ke->key()); QString sks = ks.toString(); @@ -23,9 +23,9 @@ bool filter::eventFilter(QObject *obj, QEvent *ev) { } break; case QEvent::KeyRelease: { QKeyEvent *ke = static_cast(ev); - if(ke->key() == Qt::Key_Control) { - emit ctrlReleased(); - m_ctrlPressed = false; + if(ke->key() == Qt::Key_Alt) { + emit altReleased(); + m_altPressed = false; } } break; case QEvent::MouseButtonPress: { diff --git a/filter.h b/filter.h index c57ad0e4..51a2afd2 100644 --- a/filter.h +++ b/filter.h @@ -8,7 +8,7 @@ class filter : public QObject Q_OBJECT private: - bool m_ctrlPressed; + bool m_altPressed; bool m_mousePressed; public: @@ -18,8 +18,8 @@ protected: bool eventFilter(QObject *obj, QEvent *ev); signals: - void ctrlPressed(); - void ctrlReleased(); + void altPressed(); + void altReleased(); 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); diff --git a/images/moneroIcon.png b/images/moneroIcon.png new file mode 100644 index 00000000..bd018979 Binary files /dev/null and b/images/moneroIcon.png differ diff --git a/images/whiteDropIndicator.png b/images/whiteDropIndicator.png new file mode 100644 index 00000000..615da2a0 Binary files /dev/null and b/images/whiteDropIndicator.png differ diff --git a/main.cpp b/main.cpp index 3e886e3a..e5b937e5 100644 --- a/main.cpp +++ b/main.cpp @@ -13,8 +13,8 @@ int main(int argc, char *argv[]) engine.load(QUrl(QStringLiteral("qrc:///main.qml"))); QObject *rootObject = engine.rootObjects().first(); - QObject::connect(eventFilter, SIGNAL(ctrlPressed()), rootObject, SLOT(ctrlKeyPressed())); - QObject::connect(eventFilter, SIGNAL(ctrlReleased()), rootObject, SLOT(ctrlKeyReleased())); + QObject::connect(eventFilter, SIGNAL(altPressed()), rootObject, SLOT(altKeyPressed())); + QObject::connect(eventFilter, SIGNAL(altReleased()), rootObject, SLOT(altKeyReleased())); 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))); diff --git a/main.qml b/main.qml index f9ecc6a9..ec6f3e29 100644 --- a/main.qml +++ b/main.qml @@ -9,18 +9,18 @@ ApplicationWindow { objectName: "appWindow" property var currentItem property bool whatIsEnable: false - property bool ctrlPressed: false - function ctrlKeyPressed() { ctrlPressed = true; } - function ctrlKeyReleased() { ctrlPressed = false; } + property bool altPressed: false + function altKeyPressed() { altPressed = true; } + function altKeyReleased() { altPressed = 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" + if(seq === "Alt+D") middlePanel.state = "Dashboard" + else if(seq === "Alt+H") middlePanel.state = "History" + else if(seq === "Alt+T") middlePanel.state = "Transfer" + else if(seq === "Alt+B") middlePanel.state = "AddressBook" + else if(seq === "Alt+M") middlePanel.state = "Minning" + else if(seq === "Alt+S") middlePanel.state = "Settings" leftPanel.selectItem(middlePanel.state) } function mousePressed(obj, mouseX, mouseY) { diff --git a/pages/AddressBook.qml b/pages/AddressBook.qml index d333710c..8f965e8c 100644 --- a/pages/AddressBook.qml +++ b/pages/AddressBook.qml @@ -4,169 +4,169 @@ import "../components" Rectangle { color: "#F0EEEE" -// Text { -// id: newEntryText -// anchors.left: parent.left -// anchors.right: parent.right -// anchors.top: parent.top -// anchors.leftMargin: 17 -// anchors.topMargin: 17 + 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") -// } + 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("Tip tekst test") -// } + Label { + id: addressLabel + anchors.left: parent.left + anchors.top: newEntryText.bottom + anchors.leftMargin: 17 + anchors.topMargin: 17 + text: qsTr("Address") + fontSize: 14 + tipText: qsTr("Tip tekst test") + } -// LineEdit { -// id: addressLine -// anchors.left: parent.left -// anchors.right: parent.right -// anchors.top: addressLabel.bottom -// anchors.leftMargin: 17 -// anchors.rightMargin: 17 -// anchors.topMargin: 5 -// } + 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 (Optional)") -// fontSize: 14 -// tipText: qsTr("Payment ID

A unique user name used in
the address book. It is not a
transfer of information sent
during thevtransfer") -// width: 156 -// } + Label { + id: paymentIdLabel + anchors.left: parent.left + anchors.top: addressLine.bottom + anchors.leftMargin: 17 + anchors.topMargin: 17 + text: qsTr("Payment ID (Optional)") + fontSize: 14 + tipText: qsTr("Payment ID

A unique user name used in
the address book. It is not a
transfer of information sent
during thevtransfer") + width: 156 + } -// Label { -// id: descriptionLabel -// anchors.left: paymentIdLabel.right -// anchors.top: addressLine.bottom -// anchors.leftMargin: 17 -// anchors.topMargin: 17 -// text: qsTr("Description (Local database)") -// fontSize: 14 -// tipText: qsTr("Tip tekst test

test line 2") -// width: 156 -// } + Label { + id: descriptionLabel + anchors.left: paymentIdLabel.right + anchors.top: addressLine.bottom + anchors.leftMargin: 17 + anchors.topMargin: 17 + text: qsTr("Description (Local database)") + fontSize: 14 + tipText: qsTr("Tip tekst test

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: 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 -// } + 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 + StandardButton { + id: addButton + anchors.right: parent.right + anchors.top: paymentIdLabel.bottom + anchors.rightMargin: 17 + anchors.topMargin: 5 + width: 60 -// shadowReleasedColor: "#FF4304" -// shadowPressedColor: "#B32D00" -// releasedColor: "#FF6C3C" -// pressedColor: "#FF4304" -// text: qsTr("ADD") -// } + shadowReleasedColor: "#FF4304" + shadowPressedColor: "#B32D00" + releasedColor: "#FF6C3C" + pressedColor: "#FF4304" + 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.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" -// } + 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 } -// } + 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) -// } + 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: "" } -// } + 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 -// } + 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 -// } -// } + 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 + } + } } diff --git a/pages/Transfer.qml b/pages/Transfer.qml index eaf59bad..3aa47c46 100644 --- a/pages/Transfer.qml +++ b/pages/Transfer.qml @@ -1,5 +1,55 @@ import QtQuick 2.0 +import "../components" Rectangle { - color: "#0000FF" + color: "#F0EEEE" + + Label { + id: amountLabel + anchors.left: parent.left + anchors.top: parent.top + anchors.margins: 17 + text: qsTr("Amount") + } + + Label { + id: transactionPriority + anchors.top: parent.top + anchors.topMargin: 17 + x: (parent.width - 17) / 2 + 17 + text: qsTr("Transaction prority") + } + + Row { + anchors.top: amountLabel.bottom + anchors.topMargin: 17 + width: (parent.width - 17) / 2 + Item { + width: 37 + height: 37 + + Image { + anchors.centerIn: parent + source: "../images/moneroIcon.png" + } + } + + LineEdit { + placeholderText: qsTr("Amount...") + width: parent.width - 37 - 17 + } + } + + StandardDropdown { + anchors.top: transactionPriority.bottom + anchors.right: parent.right + anchors.rightMargin: 17 + anchors.topMargin: 17 + anchors.left: transactionPriority.left + shadowReleasedColor: "#FF4304" + shadowPressedColor: "#B32D00" + releasedColor: "#FF6C3C" + pressedColor: "#FF4304" + z: 1 + } } diff --git a/qml.qrc b/qml.qrc index 6060274a..33a68b66 100644 --- a/qml.qrc +++ b/qml.qrc @@ -57,5 +57,8 @@ components/AddressBookTable.qml images/goToTransferIcon.png images/deleteIcon.png + images/moneroIcon.png + components/StandardDropdown.qml + images/whiteDropIndicator.png diff --git a/tabs/Twitter.qml b/tabs/Twitter.qml index 0e814dfa..b8b55760 100644 --- a/tabs/Twitter.qml +++ b/tabs/Twitter.qml @@ -69,7 +69,6 @@ Item { "id": id, "uri": Helper.insertLinks(item.user.url, item.user.entities), "published": item.created_at }); - console.log(item.created_at) ids.push(id) } }