mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-28 18:56:32 +02:00
fixes + addressbook v1 + transfer v1
This commit is contained in:
parent
9256e5dfac
commit
f4279a9800
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 3.1.2, 2014-07-09T16:18:07. -->
|
||||
<!-- Written by QtCreator 3.1.2, 2014-07-10T20:07:14. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
233
components/StandardDropdown.qml
Normal file
233
components/StandardDropdown.qml
Normal file
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -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: "<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" }
|
||||
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: "<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" }
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
14
filter.cpp
14
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<QKeyEvent*>(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<QKeyEvent*>(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: {
|
||||
|
6
filter.h
6
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);
|
||||
|
BIN
images/moneroIcon.png
Normal file
BIN
images/moneroIcon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 462 B |
BIN
images/whiteDropIndicator.png
Normal file
BIN
images/whiteDropIndicator.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 254 B |
4
main.cpp
4
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)));
|
||||
|
18
main.qml
18
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) {
|
||||
|
@ -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("<b>Tip tekst test</b>")
|
||||
// }
|
||||
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
|
||||
// }
|
||||
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: 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
|
||||
// }
|
||||
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: 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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
3
qml.qrc
3
qml.qrc
@ -57,5 +57,8 @@
|
||||
<file>components/AddressBookTable.qml</file>
|
||||
<file>images/goToTransferIcon.png</file>
|
||||
<file>images/deleteIcon.png</file>
|
||||
<file>images/moneroIcon.png</file>
|
||||
<file>components/StandardDropdown.qml</file>
|
||||
<file>images/whiteDropIndicator.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user