forked from Public/monero-gui
fixes + addressbook v1 + transfer v1
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE QtCreatorProject>
|
<!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>
|
<qtcreator>
|
||||||
<data>
|
<data>
|
||||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ Rectangle {
|
|||||||
font.pixelSize: 11
|
font.pixelSize: 11
|
||||||
font.bold: true
|
font.bold: true
|
||||||
color: button.checked || buttonArea.containsMouse ? "#FFFFFF" : dot.color
|
color: button.checked || buttonArea.containsMouse ? "#FFFFFF" : dot.color
|
||||||
visible: appWindow.ctrlPressed
|
visible: appWindow.altPressed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,14 +8,14 @@ Item {
|
|||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: "#DBDBDB"
|
color: "#DBDBDB"
|
||||||
radius: 10
|
radius: 4
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.topMargin: 1
|
anchors.topMargin: 1
|
||||||
color: "#FFFFFF"
|
color: "#FFFFFF"
|
||||||
radius: 10
|
radius: 4
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
anchors.top: parent.top
|
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
|
anchors.rightMargin: 10
|
||||||
source: "../images/dropIndicator.png"
|
source: "../images/dropIndicator.png"
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
onPressed: dropdown.expanded = !dropdown.expanded
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
MouseArea {
|
||||||
id: dropArea
|
anchors.left: head.left
|
||||||
anchors.left: parent.left
|
anchors.right: head.right
|
||||||
anchors.right: parent.right
|
anchors.top: head.top
|
||||||
anchors.top: head.bottom
|
height: head.height + dropArea.height
|
||||||
height: dropdown.expanded ? column.height : 0
|
hoverEnabled: true
|
||||||
onHeightChanged: if(height === 0) dropdown.collapsed()
|
onEntered: dropdown.expanded = true
|
||||||
clip: true
|
onExited: dropdown.expanded = false
|
||||||
|
|
||||||
Behavior on height {
|
Item {
|
||||||
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
|
id: dropArea
|
||||||
}
|
|
||||||
|
|
||||||
Column {
|
|
||||||
id: column
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
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 {
|
Behavior on height {
|
||||||
id: dataModel
|
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
|
||||||
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 {
|
Column {
|
||||||
id: repeater
|
id: column
|
||||||
model: dataModel
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.top: parent.top
|
||||||
|
|
||||||
delegate: Rectangle {
|
ListModel {
|
||||||
id: delegate
|
id: dataModel
|
||||||
anchors.left: parent.left
|
ListElement { name: "<b>Add to adress book</b>"; icon: "../images/dropdownOption1.png" }
|
||||||
anchors.right: parent.right
|
ListElement { name: "<b>Send to same destination</b>"; icon: "../images/dropdownSend.png" }
|
||||||
height: 30
|
ListElement { name: "<b>Find similar transactions</b>"; icon: "../images/dropdownSearch.png" }
|
||||||
color: delegateArea.containsMouse ? "#F0EEEE" : "#DBDBDB"
|
}
|
||||||
radius: index === repeater.count - 1 ? 5 : 0
|
|
||||||
|
|
||||||
Rectangle {
|
Repeater {
|
||||||
|
id: repeater
|
||||||
|
model: dataModel
|
||||||
|
|
||||||
|
delegate: Rectangle {
|
||||||
|
id: delegate
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.top: parent.top
|
|
||||||
width: 5
|
|
||||||
height: 5
|
|
||||||
color: delegate.color
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.top: parent.top
|
height: 30
|
||||||
width: 5
|
color: delegateArea.containsMouse ? "#F0EEEE" : "#DBDBDB"
|
||||||
height: 5
|
radius: index === repeater.count - 1 ? 5 : 0
|
||||||
color: delegate.color
|
|
||||||
}
|
|
||||||
|
|
||||||
Image {
|
Rectangle {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.left: parent.left
|
||||||
anchors.left: parent.left
|
anchors.top: parent.top
|
||||||
anchors.leftMargin: 10
|
width: 5
|
||||||
source: icon
|
height: 5
|
||||||
}
|
color: delegate.color
|
||||||
|
|
||||||
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
|
|
||||||
}
|
}
|
||||||
onExited: tipItem.visible = false
|
|
||||||
onClicked: {
|
Rectangle {
|
||||||
dropdown.optionClicked(index)
|
anchors.right: parent.right
|
||||||
tipItem.visible = false
|
anchors.top: parent.top
|
||||||
dropdown.expanded = false
|
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) :
|
filter::filter(QObject *parent) :
|
||||||
QObject(parent)
|
QObject(parent)
|
||||||
{
|
{
|
||||||
m_ctrlPressed = true;
|
m_altPressed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool filter::eventFilter(QObject *obj, QEvent *ev) {
|
bool filter::eventFilter(QObject *obj, QEvent *ev) {
|
||||||
switch(ev->type()) {
|
switch(ev->type()) {
|
||||||
case QEvent::KeyPress: {
|
case QEvent::KeyPress: {
|
||||||
QKeyEvent *ke = static_cast<QKeyEvent*>(ev);
|
QKeyEvent *ke = static_cast<QKeyEvent*>(ev);
|
||||||
if(ke->key() == Qt::Key_Control) {
|
if(ke->key() == Qt::Key_Alt) {
|
||||||
emit ctrlPressed();
|
emit altPressed();
|
||||||
m_ctrlPressed = true;
|
m_altPressed = true;
|
||||||
} else {
|
} else {
|
||||||
QKeySequence ks(ke->modifiers() + ke->key());
|
QKeySequence ks(ke->modifiers() + ke->key());
|
||||||
QString sks = ks.toString();
|
QString sks = ks.toString();
|
||||||
@@ -23,9 +23,9 @@ bool filter::eventFilter(QObject *obj, QEvent *ev) {
|
|||||||
} break;
|
} break;
|
||||||
case QEvent::KeyRelease: {
|
case QEvent::KeyRelease: {
|
||||||
QKeyEvent *ke = static_cast<QKeyEvent*>(ev);
|
QKeyEvent *ke = static_cast<QKeyEvent*>(ev);
|
||||||
if(ke->key() == Qt::Key_Control) {
|
if(ke->key() == Qt::Key_Alt) {
|
||||||
emit ctrlReleased();
|
emit altReleased();
|
||||||
m_ctrlPressed = false;
|
m_altPressed = false;
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
case QEvent::MouseButtonPress: {
|
case QEvent::MouseButtonPress: {
|
||||||
|
|||||||
6
filter.h
6
filter.h
@@ -8,7 +8,7 @@ class filter : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_ctrlPressed;
|
bool m_altPressed;
|
||||||
bool m_mousePressed;
|
bool m_mousePressed;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -18,8 +18,8 @@ protected:
|
|||||||
bool eventFilter(QObject *obj, QEvent *ev);
|
bool eventFilter(QObject *obj, QEvent *ev);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void ctrlPressed();
|
void altPressed();
|
||||||
void ctrlReleased();
|
void altReleased();
|
||||||
void sequencePressed(const QVariant &seq);
|
void sequencePressed(const QVariant &seq);
|
||||||
void mousePressed(const QVariant &o, const QVariant &x, const QVariant &y);
|
void mousePressed(const QVariant &o, const QVariant &x, const QVariant &y);
|
||||||
void mouseReleased(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")));
|
engine.load(QUrl(QStringLiteral("qrc:///main.qml")));
|
||||||
QObject *rootObject = engine.rootObjects().first();
|
QObject *rootObject = engine.rootObjects().first();
|
||||||
|
|
||||||
QObject::connect(eventFilter, SIGNAL(ctrlPressed()), rootObject, SLOT(ctrlKeyPressed()));
|
QObject::connect(eventFilter, SIGNAL(altPressed()), rootObject, SLOT(altKeyPressed()));
|
||||||
QObject::connect(eventFilter, SIGNAL(ctrlReleased()), rootObject, SLOT(ctrlKeyReleased()));
|
QObject::connect(eventFilter, SIGNAL(altReleased()), rootObject, SLOT(altKeyReleased()));
|
||||||
QObject::connect(eventFilter, SIGNAL(sequencePressed(QVariant)), rootObject, SLOT(sequencePressed(QVariant)));
|
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(mousePressed(QVariant,QVariant,QVariant)), rootObject, SLOT(mousePressed(QVariant,QVariant,QVariant)));
|
||||||
QObject::connect(eventFilter, SIGNAL(mouseReleased(QVariant,QVariant,QVariant)), rootObject, SLOT(mouseReleased(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"
|
objectName: "appWindow"
|
||||||
property var currentItem
|
property var currentItem
|
||||||
property bool whatIsEnable: false
|
property bool whatIsEnable: false
|
||||||
property bool ctrlPressed: false
|
property bool altPressed: false
|
||||||
function ctrlKeyPressed() { ctrlPressed = true; }
|
function altKeyPressed() { altPressed = true; }
|
||||||
function ctrlKeyReleased() { ctrlPressed = false; }
|
function altKeyReleased() { altPressed = false; }
|
||||||
function sequencePressed(seq) {
|
function sequencePressed(seq) {
|
||||||
if(seq === undefined)
|
if(seq === undefined)
|
||||||
return
|
return
|
||||||
if(seq === "Ctrl+D") middlePanel.state = "Dashboard"
|
if(seq === "Alt+D") middlePanel.state = "Dashboard"
|
||||||
else if(seq === "Ctrl+H") middlePanel.state = "History"
|
else if(seq === "Alt+H") middlePanel.state = "History"
|
||||||
else if(seq === "Ctrl+T") middlePanel.state = "Transfer"
|
else if(seq === "Alt+T") middlePanel.state = "Transfer"
|
||||||
else if(seq === "Ctrl+B") middlePanel.state = "AddressBook"
|
else if(seq === "Alt+B") middlePanel.state = "AddressBook"
|
||||||
else if(seq === "Ctrl+M") middlePanel.state = "Minning"
|
else if(seq === "Alt+M") middlePanel.state = "Minning"
|
||||||
else if(seq === "Ctrl+S") middlePanel.state = "Settings"
|
else if(seq === "Alt+S") middlePanel.state = "Settings"
|
||||||
leftPanel.selectItem(middlePanel.state)
|
leftPanel.selectItem(middlePanel.state)
|
||||||
}
|
}
|
||||||
function mousePressed(obj, mouseX, mouseY) {
|
function mousePressed(obj, mouseX, mouseY) {
|
||||||
|
|||||||
@@ -4,169 +4,169 @@ import "../components"
|
|||||||
Rectangle {
|
Rectangle {
|
||||||
color: "#F0EEEE"
|
color: "#F0EEEE"
|
||||||
|
|
||||||
// Text {
|
Text {
|
||||||
// id: newEntryText
|
id: newEntryText
|
||||||
// anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
// anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
// anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
// anchors.leftMargin: 17
|
anchors.leftMargin: 17
|
||||||
// anchors.topMargin: 17
|
anchors.topMargin: 17
|
||||||
|
|
||||||
// elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
// font.family: "Arial"
|
font.family: "Arial"
|
||||||
// font.pixelSize: 18
|
font.pixelSize: 18
|
||||||
// color: "#4A4949"
|
color: "#4A4949"
|
||||||
// text: qsTr("Add new entry")
|
text: qsTr("Add new entry")
|
||||||
// }
|
}
|
||||||
|
|
||||||
// Label {
|
Label {
|
||||||
// id: addressLabel
|
id: addressLabel
|
||||||
// anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
// anchors.top: newEntryText.bottom
|
anchors.top: newEntryText.bottom
|
||||||
// anchors.leftMargin: 17
|
anchors.leftMargin: 17
|
||||||
// anchors.topMargin: 17
|
anchors.topMargin: 17
|
||||||
// text: qsTr("Address")
|
text: qsTr("Address")
|
||||||
// fontSize: 14
|
fontSize: 14
|
||||||
// tipText: qsTr("<b>Tip tekst test</b>")
|
tipText: qsTr("<b>Tip tekst test</b>")
|
||||||
// }
|
}
|
||||||
|
|
||||||
// LineEdit {
|
LineEdit {
|
||||||
// id: addressLine
|
id: addressLine
|
||||||
// anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
// anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
// anchors.top: addressLabel.bottom
|
anchors.top: addressLabel.bottom
|
||||||
// anchors.leftMargin: 17
|
anchors.leftMargin: 17
|
||||||
// anchors.rightMargin: 17
|
anchors.rightMargin: 17
|
||||||
// anchors.topMargin: 5
|
anchors.topMargin: 5
|
||||||
// }
|
}
|
||||||
|
|
||||||
// Label {
|
Label {
|
||||||
// id: paymentIdLabel
|
id: paymentIdLabel
|
||||||
// anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
// anchors.top: addressLine.bottom
|
anchors.top: addressLine.bottom
|
||||||
// anchors.leftMargin: 17
|
anchors.leftMargin: 17
|
||||||
// anchors.topMargin: 17
|
anchors.topMargin: 17
|
||||||
// text: qsTr("Payment ID <font size='2'>(Optional)</font>")
|
text: qsTr("Payment ID <font size='2'>(Optional)</font>")
|
||||||
// fontSize: 14
|
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")
|
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
|
width: 156
|
||||||
// }
|
}
|
||||||
|
|
||||||
// Label {
|
Label {
|
||||||
// id: descriptionLabel
|
id: descriptionLabel
|
||||||
// anchors.left: paymentIdLabel.right
|
anchors.left: paymentIdLabel.right
|
||||||
// anchors.top: addressLine.bottom
|
anchors.top: addressLine.bottom
|
||||||
// anchors.leftMargin: 17
|
anchors.leftMargin: 17
|
||||||
// anchors.topMargin: 17
|
anchors.topMargin: 17
|
||||||
// text: qsTr("Description <font size='2'>(Local database)</font>")
|
text: qsTr("Description <font size='2'>(Local database)</font>")
|
||||||
// fontSize: 14
|
fontSize: 14
|
||||||
// tipText: qsTr("<b>Tip tekst test</b><br/><br/>test line 2")
|
tipText: qsTr("<b>Tip tekst test</b><br/><br/>test line 2")
|
||||||
// width: 156
|
width: 156
|
||||||
// }
|
}
|
||||||
|
|
||||||
// LineEdit {
|
LineEdit {
|
||||||
// id: paymentIdLine
|
id: paymentIdLine
|
||||||
// anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
// anchors.top: paymentIdLabel.bottom
|
anchors.top: paymentIdLabel.bottom
|
||||||
// anchors.leftMargin: 17
|
anchors.leftMargin: 17
|
||||||
// anchors.topMargin: 5
|
anchors.topMargin: 5
|
||||||
// width: 156
|
width: 156
|
||||||
// }
|
}
|
||||||
|
|
||||||
// LineEdit {
|
LineEdit {
|
||||||
// id: descriptionLine
|
id: descriptionLine
|
||||||
// anchors.left: paymentIdLine.right
|
anchors.left: paymentIdLine.right
|
||||||
// anchors.right: addButton.left
|
anchors.right: addButton.left
|
||||||
// anchors.top: paymentIdLabel.bottom
|
anchors.top: paymentIdLabel.bottom
|
||||||
// anchors.leftMargin: 17
|
anchors.leftMargin: 17
|
||||||
// anchors.rightMargin: 17
|
anchors.rightMargin: 17
|
||||||
// anchors.topMargin: 5
|
anchors.topMargin: 5
|
||||||
// }
|
}
|
||||||
|
|
||||||
// StandardButton {
|
StandardButton {
|
||||||
// id: addButton
|
id: addButton
|
||||||
// anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
// anchors.top: paymentIdLabel.bottom
|
anchors.top: paymentIdLabel.bottom
|
||||||
// anchors.rightMargin: 17
|
anchors.rightMargin: 17
|
||||||
// anchors.topMargin: 5
|
anchors.topMargin: 5
|
||||||
// width: 60
|
width: 60
|
||||||
|
|
||||||
// shadowReleasedColor: "#FF4304"
|
shadowReleasedColor: "#FF4304"
|
||||||
// shadowPressedColor: "#B32D00"
|
shadowPressedColor: "#B32D00"
|
||||||
// releasedColor: "#FF6C3C"
|
releasedColor: "#FF6C3C"
|
||||||
// pressedColor: "#FF4304"
|
pressedColor: "#FF4304"
|
||||||
// text: qsTr("ADD")
|
text: qsTr("ADD")
|
||||||
// }
|
}
|
||||||
|
|
||||||
// Rectangle {
|
Rectangle {
|
||||||
// anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
// anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
// anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
// anchors.top: paymentIdLine.bottom
|
anchors.top: paymentIdLine.bottom
|
||||||
// anchors.topMargin: 17
|
anchors.topMargin: 17
|
||||||
// color: "#FFFFFF"
|
color: "#FFFFFF"
|
||||||
|
|
||||||
// Rectangle {
|
Rectangle {
|
||||||
// anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
// anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
// anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
// height: 1
|
height: 1
|
||||||
// color: "#DBDBDB"
|
color: "#DBDBDB"
|
||||||
// }
|
}
|
||||||
|
|
||||||
// ListModel {
|
ListModel {
|
||||||
// id: columnsModel
|
id: columnsModel
|
||||||
// ListElement { columnName: "Payment ID"; columnWidth: 148 }
|
ListElement { columnName: "Payment ID"; columnWidth: 148 }
|
||||||
// ListElement { columnName: "Description"; columnWidth: 420 }
|
ListElement { columnName: "Description"; columnWidth: 420 }
|
||||||
// }
|
}
|
||||||
|
|
||||||
// TableHeader {
|
TableHeader {
|
||||||
// id: header
|
id: header
|
||||||
// anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
// anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
// anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
// anchors.topMargin: 17
|
anchors.topMargin: 17
|
||||||
// anchors.leftMargin: 14
|
anchors.leftMargin: 14
|
||||||
// anchors.rightMargin: 14
|
anchors.rightMargin: 14
|
||||||
// dataModel: columnsModel
|
dataModel: columnsModel
|
||||||
// onSortRequest: console.log("column: " + column + " desc: " + desc)
|
onSortRequest: console.log("column: " + column + " desc: " + desc)
|
||||||
// }
|
}
|
||||||
|
|
||||||
// ListModel {
|
ListModel {
|
||||||
// id: testModel
|
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: "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: ""; 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: "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: "" }
|
ListElement { paymentId: ""; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "" }
|
||||||
// }
|
}
|
||||||
|
|
||||||
// Scroll {
|
Scroll {
|
||||||
// id: flickableScroll
|
id: flickableScroll
|
||||||
// anchors.rightMargin: -14
|
anchors.rightMargin: -14
|
||||||
// flickable: table
|
flickable: table
|
||||||
// yPos: table.y
|
yPos: table.y
|
||||||
// }
|
}
|
||||||
|
|
||||||
// AddressBookTable {
|
AddressBookTable {
|
||||||
// id: table
|
id: table
|
||||||
// anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
// anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
// anchors.top: header.bottom
|
anchors.top: header.bottom
|
||||||
// anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
// anchors.leftMargin: 14
|
anchors.leftMargin: 14
|
||||||
// anchors.rightMargin: 14
|
anchors.rightMargin: 14
|
||||||
// onContentYChanged: flickableScroll.flickableContentYChanged()
|
onContentYChanged: flickableScroll.flickableContentYChanged()
|
||||||
// model: testModel
|
model: testModel
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,55 @@
|
|||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
|
import "../components"
|
||||||
|
|
||||||
Rectangle {
|
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>components/AddressBookTable.qml</file>
|
||||||
<file>images/goToTransferIcon.png</file>
|
<file>images/goToTransferIcon.png</file>
|
||||||
<file>images/deleteIcon.png</file>
|
<file>images/deleteIcon.png</file>
|
||||||
|
<file>images/moneroIcon.png</file>
|
||||||
|
<file>components/StandardDropdown.qml</file>
|
||||||
|
<file>images/whiteDropIndicator.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
@@ -69,7 +69,6 @@ Item {
|
|||||||
"id": id,
|
"id": id,
|
||||||
"uri": Helper.insertLinks(item.user.url, item.user.entities),
|
"uri": Helper.insertLinks(item.user.url, item.user.entities),
|
||||||
"published": item.created_at });
|
"published": item.created_at });
|
||||||
console.log(item.created_at)
|
|
||||||
ids.push(id)
|
ids.push(id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user