aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcin <z.krzysztoff7@gmail.com>2014-07-13 14:27:50 +0200
committermarcin <z.krzysztoff7@gmail.com>2014-07-13 14:27:50 +0200
commit49bb4516f2b32f926f33a7600657222619b73381 (patch)
tree38532ce5daf4676668a54a1ade0e0975832932e3
parent5085aa3a64bae93de50f98a53f28d95c27496a1a (diff)
downloadmonzero-gui-49bb4516f2b32f926f33a7600657222619b73381.tar.gz
monzero-gui-49bb4516f2b32f926f33a7600657222619b73381.tar.xz
monzero-gui-49bb4516f2b32f926f33a7600657222619b73381.zip
shortcuts fix + ctrl+tab/ctrl+shift+tab functionality + heperlinks fix
-rw-r--r--LeftPanel.qml2
-rw-r--r--RightPanel.qml139
-rw-r--r--bitmonero.pro.user2
-rw-r--r--components/DatePicker.qml333
-rw-r--r--components/Label.qml2
-rw-r--r--components/MenuButton.qml2
-rw-r--r--components/PrivacyLevel.qml17
-rw-r--r--components/TableDropdown.qml2
-rw-r--r--components/TitleBar.qml137
-rw-r--r--filter.cpp33
-rw-r--r--filter.h9
-rw-r--r--images/datePicker.pngbin0 -> 268 bytes
-rw-r--r--images/nextMonth.pngbin0 -> 304 bytes
-rw-r--r--images/prevMonth.pngbin0 -> 296 bytes
-rw-r--r--main.cpp5
-rw-r--r--main.qml52
-rw-r--r--pages/AddressBook.qml298
-rw-r--r--pages/Dashboard.qml2
-rw-r--r--pages/History.qml56
-rw-r--r--pages/Transfer.qml2
-rw-r--r--qml.qrc5
21 files changed, 771 insertions, 327 deletions
diff --git a/LeftPanel.qml b/LeftPanel.qml
index 201db550..74e2cadb 100644
--- a/LeftPanel.qml
+++ b/LeftPanel.qml
@@ -16,7 +16,7 @@ Rectangle {
else if(pos === "History") menuColumn.previousButton = historyButton
else if(pos === "Transfer") menuColumn.previousButton = transferButton
else if(pos === "AddressBook") menuColumn.previousButton = addressBookButton
- else if(pos === "Minning") menuColumn.previousButton = miningButton
+ else if(pos === "Mining") menuColumn.previousButton = miningButton
else if(pos === "Settings") menuColumn.previousButton = settingsButton
menuColumn.previousButton.checked = true
}
diff --git a/RightPanel.qml b/RightPanel.qml
index d07e94cb..fc05ab8f 100644
--- a/RightPanel.qml
+++ b/RightPanel.qml
@@ -1,152 +1,17 @@
import QtQuick 2.2
-import QtQuick.Window 2.0
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.2
import "tabs"
+import "components"
Rectangle {
width: 330
- Row {
+ TitleBar {
anchors.top: parent.top
anchors.right: parent.right
anchors.topMargin: 5
anchors.rightMargin: 5
-
- Rectangle {
- width: 25
- height: 25
- radius: 5
- clip: true
- color: helpArea.containsMouse ? "#DBDBDB" : "#FFFFFF"
-
- Rectangle {
- width: 25
- height: 25
- radius: 5
- color: "#FFFFFF"
- visible: helpArea.containsMouse
- x: 1; y: 2
- }
-
- Image {
- anchors.centerIn: parent
- source: {
- if(appWindow.whatIsEnable)
- return "images/whatIsIcon.png"
- return helpArea.containsMouse ? "images/helpIconHovered.png" :
- "images/helpIcon.png"
- }
- }
-
- MouseArea {
- id: helpArea
- anchors.fill: parent
- hoverEnabled: true
- onClicked: {
- appWindow.whatIsEnable = !appWindow.whatIsEnable
- }
- }
- }
-
- Rectangle {
- width: 25
- height: 25
- radius: 5
- clip: true
- color: minimizeArea.containsMouse ? "#DBDBDB" : "#FFFFFF"
-
- Rectangle {
- width: 25
- height: 25
- radius: 5
- color: "#FFFFFF"
- visible: minimizeArea.containsMouse
- x: 1; y: 2
- }
-
- Image {
- anchors.centerIn: parent
- source: minimizeArea.containsMouse ? "images/minimizeIconHovered.png" :
- "images/minimizeIcon.png"
- }
-
- MouseArea {
- id: minimizeArea
- anchors.fill: parent
- hoverEnabled: true
- onClicked: appWindow.visibility = Window.Minimized
- }
- }
-
- Rectangle {
- property bool checked: false
- width: 25
- height: 25
- radius: 5
- clip: true
- color: maximizeArea.containsMouse ? "#DBDBDB" : "#FFFFFF"
-
- Rectangle {
- width: 25
- height: 25
- radius: 5
- color: "#FFFFFF"
- visible: maximizeArea.containsMouse
- x: 1; y: 2
- }
-
- Image {
- anchors.centerIn: parent
- source: {
- if(parent.checked)
- return maximizeArea.containsMouse ? "images/backToWindowIconHovered.png" :
- "images/backToWindowIcon.png"
- return maximizeArea.containsMouse ? "images/maximizeIconHovered.png" :
- "images/maximizeIcon.png"
- }
- }
-
- MouseArea {
- id: maximizeArea
- anchors.fill: parent
- hoverEnabled: true
- onClicked: {
- parent.checked = !parent.checked
- appWindow.visibility = parent.checked ? Window.FullScreen :
- Window.Windowed
- }
- }
- }
-
- Rectangle {
- width: 25
- height: 25
- radius: 5
- clip: true
- color: closeArea.containsMouse ? "#DBDBDB" : "#FFFFFF"
-
- Rectangle {
- width: 25
- height: 25
- radius: 5
- color: "#FFFFFF"
- visible: closeArea.containsMouse
- x: 1; y: 2
- }
-
- Image {
- anchors.centerIn: parent
- source: "images/closeIcon.png"
- }
-
- MouseArea {
- id: closeArea
- anchors.fill: parent
- hoverEnabled: true
- onClicked: Qt.quit()
- }
- }
}
TabView {
diff --git a/bitmonero.pro.user b/bitmonero.pro.user
index 46969c8e..1abc37cc 100644
--- a/bitmonero.pro.user
+++ b/bitmonero.pro.user
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
-<!-- Written by QtCreator 3.1.2, 2014-07-11T00:19:38. -->
+<!-- Written by QtCreator 3.1.2, 2014-07-13T14:09:13. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
diff --git a/components/DatePicker.qml b/components/DatePicker.qml
new file mode 100644
index 00000000..7a974ea8
--- /dev/null
+++ b/components/DatePicker.qml
@@ -0,0 +1,333 @@
+import QtQuick 2.2
+import QtQuick.Controls 1.2
+import QtQuick.Controls.Styles 1.2
+
+Item {
+ id: datePicker
+ property bool expanded: false
+ property var currentDate: new Date()
+ property bool showCurrentDate: true
+ height: 37
+ width: 156
+
+ onExpandedChanged: if(expanded) appWindow.currentItem = datePicker
+ function hide() { datePicker.expanded = false }
+ function containsPoint(px, py) {
+ if(px < 0)
+ return false
+ if(px > width)
+ return false
+ if(py < 0)
+ return false
+ if(py > height + calendarRect.height)
+ return false
+ return true
+ }
+
+ Item {
+ id: head
+ anchors.fill: parent
+
+ Rectangle {
+ anchors.left: parent.left
+ anchors.right: parent.right
+ height: parent.height - 1
+ radius: 4
+ y: 0
+ color: "#DBDBDB"
+ }
+
+ Rectangle {
+ anchors.left: parent.left
+ anchors.right: parent.right
+ height: parent.height - 1
+ radius: 4
+ y: 1
+ color: "#FFFFFF"
+
+ Item {
+ id: buttonItem
+ anchors.right: parent.right
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ anchors.margins: 4
+ width: height
+
+ StandardButton {
+ id: button
+ anchors.fill: parent
+ shadowReleasedColor: "#DBDBDB"
+ shadowPressedColor: "#888888"
+ releasedColor: "#F0EEEE"
+ pressedColor: "#DBDBDB"
+ icon: "../images/datePicker.png"
+ visible: !datePicker.expanded
+ onClicked: datePicker.expanded = true
+ }
+
+ Image {
+ anchors.centerIn: parent
+ source: "../images/datePicker.png"
+ visible: datePicker.expanded
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ enabled: datePicker.expanded
+ onClicked: datePicker.expanded = false
+ }
+ }
+
+ Rectangle {
+ id: separator
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.right: buttonItem.left
+ anchors.rightMargin: 4
+ height: 16
+ width: 1
+ color: "#DBDBDB"
+ visible: datePicker.expanded
+ }
+
+ Row {
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: parent.left
+ anchors.leftMargin: 10
+
+ TextInput {
+ id: dayInput
+ width: 22
+ font.family: "Arial"
+ font.pixelSize: 18
+ color: "#525252"
+ maximumLength: 2
+ horizontalAlignment: TextInput.AlignHCenter
+ validator: IntValidator{bottom: 01; top: 31;}
+ KeyNavigation.tab: monthInput
+ text: {
+ if(datePicker.showCurrentDate) {
+ var day = datePicker.currentDate.getDate()
+ return day < 10 ? "0" + day : day
+ }
+ }
+ }
+
+ Text {
+ font.family: "Arial"
+ font.pixelSize: 18
+ color: "#525252"
+ text: "."
+ }
+
+ TextInput {
+ id: monthInput
+ width: 22
+ font.family: "Arial"
+ font.pixelSize: 18
+ color: "#525252"
+ maximumLength: 2
+ horizontalAlignment: TextInput.AlignHCenter
+ validator: IntValidator{bottom: 01; top: 12;}
+ KeyNavigation.tab: yearInput
+ text: {
+ if(datePicker.showCurrentDate) {
+ var month = datePicker.currentDate.getMonth() + 1
+ return month < 10 ? "0" + month : month
+ }
+ }
+ }
+
+ Text {
+ font.family: "Arial"
+ font.pixelSize: 18
+ color: "#525252"
+ text: "."
+ }
+
+ TextInput {
+ id: yearInput
+ width: 44
+ font.family: "Arial"
+ font.pixelSize: 18
+ color: "#525252"
+ maximumLength: 4
+ horizontalAlignment: TextInput.AlignHCenter
+ validator: IntValidator{bottom: 2000; top: 2100;}
+ text: if(datePicker.showCurrentDate) datePicker.currentDate.getFullYear()
+ }
+
+ }
+ }
+
+ Rectangle {
+ anchors.left: parent.left
+ anchors.bottom: parent.bottom
+ height: 3; width: 3
+ color: "#FFFFFF"
+ visible: datePicker.expanded
+ }
+
+ Rectangle {
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ height: 3; width: 3
+ color: "#FFFFFF"
+ visible: datePicker.expanded
+ }
+ }
+
+ Rectangle {
+ id: calendarRect
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.top: head.bottom
+ color: "#FFFFFF"
+ height: datePicker.expanded ? calendar.height : 0
+ clip: true
+ radius: 4
+
+ Behavior on height {
+ NumberAnimation { duration: 100; easing.type: Easing.InQuad }
+ }
+
+ Rectangle {
+ anchors.left: parent.left
+ anchors.top: parent.top
+ height: 3; width: 3
+ color: "#FFFFFF"
+ }
+
+ Rectangle {
+ anchors.right: parent.right
+ anchors.top: parent.top
+ height: 3; width: 3
+ color: "#FFFFFF"
+ }
+
+ Calendar {
+ id: calendar
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.top: parent.top
+ height: 180
+ frameVisible: false
+
+ style: CalendarStyle {
+ gridVisible: false
+ background: Rectangle { color: "transparent" }
+ dayDelegate: Item {
+ implicitHeight: implicitWidth
+ implicitWidth: calendar.width / 7
+
+ Rectangle {
+ anchors.fill: parent
+ radius: parent.implicitHeight / 2
+ color: dayArea.pressed && styleData.visibleMonth ? "#FF6C3B" : "transparent"
+ }
+
+ Text {
+ anchors.centerIn: parent
+ font.family: "Arial"
+ font.pixelSize: 12
+ font.letterSpacing: -1
+ font.bold: dayArea.pressed
+ text: styleData.date.getDate()
+ color: {
+ if(!styleData.visibleMonth) return "#DBDBDB"
+ if(dayArea.pressed) return "#FFFFFF"
+ if(styleData.today) return "#FF6C3B"
+ return "#4A4848"
+ }
+ }
+
+ MouseArea {
+ id: dayArea
+ anchors.fill: parent
+ onClicked: {
+ if(styleData.visibleMonth) {
+ var date = styleData.date
+ var day = date.getDate()
+ var month = date.getMonth() + 1
+ dayInput.text = day < 10 ? "0" + day : day
+ monthInput.text = month < 10 ? "0" + month : month
+ yearInput.text = date.getFullYear()
+ datePicker.expanded = false
+ } else {
+ var date = styleData.date
+ if(date.getMonth() > calendar.visibleMonth)
+ calendar.showNextMonth()
+ else calendar.showPreviousMonth()
+ }
+ }
+ }
+ }
+
+ dayOfWeekDelegate: Item {
+ implicitHeight: 20
+ implicitWidth: calendar.width / 7
+
+ Text {
+ anchors.centerIn: parent
+ elide: Text.ElideRight
+ font.family: "Arial"
+ font.pixelSize: 9
+ font.letterSpacing: -1
+ color: "#535353"
+ text: {
+ var locale = Qt.locale()
+ return locale.dayName(styleData.dayOfWeek, Locale.ShortFormat)
+ }
+ }
+ }
+
+ navigationBar: Rectangle {
+ implicitWidth: calendar.width
+ implicitHeight: 30
+
+ Text {
+ anchors.centerIn: parent
+ font.family: "Arial"
+ font.pixelSize: 12
+ font.letterSpacing: -1
+ color: "#4A4646"
+ text: styleData.title
+ }
+
+ Item {
+ anchors.left: parent.left
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ width: height
+
+ Image {
+ anchors.centerIn: parent
+ source: "../images/prevMonth.png"
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: calendar.showPreviousMonth()
+ }
+ }
+
+ Item {
+ anchors.right: parent.right
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ width: height
+
+ Image {
+ anchors.centerIn: parent
+ source: "../images/nextMonth.png"
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: calendar.showNextMonth()
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/components/Label.qml b/components/Label.qml
index 81b2c6c2..c85d6d61 100644
--- a/components/Label.qml
+++ b/components/Label.qml
@@ -37,7 +37,7 @@ Item {
hoverEnabled: true
onEntered: {
icon.visible = false
- var pos = rootItem.mapFromItem(icon, 0, -15)
+ var pos = appWindow.mapFromItem(icon, 0, -15)
tipItem.text = item.tipText
tipItem.x = pos.x
if(tipItem.height > 30)
diff --git a/components/MenuButton.qml b/components/MenuButton.qml
index 80384d0f..38e63c92 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.altPressed
+ visible: appWindow.ctrlPressed
}
}
diff --git a/components/PrivacyLevel.qml b/components/PrivacyLevel.qml
index f5ada015..19645b07 100644
--- a/components/PrivacyLevel.qml
+++ b/components/PrivacyLevel.qml
@@ -32,12 +32,26 @@ Item {
anchors.left: parent.left
anchors.margins: 4
radius: 2
+ width: row.x
+
color: {
if(item.fillLevel < 3) return "#FF6C3C"
if(item.fillLevel < repeater.count - 1) return "#FFE00A"
return "#36B25C"
}
- width: row.x
+
+ Timer {
+ interval: 500
+ running: true
+ repeat: false
+ onTriggered: fillRect.loaded = true
+ }
+
+ property bool loaded: false
+ Behavior on width {
+ enabled: fillRect.loaded
+ NumberAnimation { duration: 100; easing.type: Easing.InQuad }
+ }
}
MouseArea {
@@ -82,7 +96,6 @@ Item {
width: 1
height: 48
property bool mainTick: index === 0 || index === 3 || index === repeater.count - 1
-
Component.onCompleted: repeater.modelItems[index] = delegate
Image {
diff --git a/components/TableDropdown.qml b/components/TableDropdown.qml
index fb248d19..9cd58238 100644
--- a/components/TableDropdown.qml
+++ b/components/TableDropdown.qml
@@ -161,7 +161,7 @@ Item {
anchors.fill: parent
propagateComposedEvents: true
onEntered: {
- var pos = rootItem.mapFromItem(delegate, 30, -20)
+ var pos = appWindow.mapFromItem(delegate, 30, -20)
tipItem.text = name
tipItem.x = pos.x
if(tipItem.height > 30)
diff --git a/components/TitleBar.qml b/components/TitleBar.qml
new file mode 100644
index 00000000..fbaad01b
--- /dev/null
+++ b/components/TitleBar.qml
@@ -0,0 +1,137 @@
+import QtQuick 2.2
+import QtQuick.Window 2.0
+
+Row {
+ Rectangle {
+ width: 25
+ height: 25
+ radius: 5
+ clip: true
+ color: helpArea.containsMouse ? "#DBDBDB" : "#FFFFFF"
+
+ Rectangle {
+ width: 25
+ height: 25
+ radius: 5
+ color: "#FFFFFF"
+ visible: helpArea.containsMouse
+ x: 1; y: 2
+ }
+
+ Image {
+ anchors.centerIn: parent
+ source: {
+ if(appWindow.whatIsEnable)
+ return "../images/whatIsIcon.png"
+ return helpArea.containsMouse ? "../images/helpIconHovered.png" :
+ "../images/helpIcon.png"
+ }
+ }
+
+ MouseArea {
+ id: helpArea
+ anchors.fill: parent
+ hoverEnabled: true
+ onClicked: appWindow.whatIsEnable = !appWindow.whatIsEnable
+ }
+ }
+
+ Rectangle {
+ width: 25
+ height: 25
+ radius: 5
+ clip: true
+ color: minimizeArea.containsMouse ? "#DBDBDB" : "#FFFFFF"
+
+ Rectangle {
+ width: 25
+ height: 25
+ radius: 5
+ color: "#FFFFFF"
+ visible: minimizeArea.containsMouse
+ x: 1; y: 2
+ }
+
+ Image {
+ anchors.centerIn: parent
+ source: minimizeArea.containsMouse ? "../images/minimizeIconHovered.png" :
+ "../images/minimizeIcon.png"
+ }
+
+ MouseArea {
+ id: minimizeArea
+ anchors.fill: parent
+ hoverEnabled: true
+ onClicked: appWindow.visibility = Window.Minimized
+ }
+ }
+
+ Rectangle {
+ property bool checked: false
+ width: 25
+ height: 25
+ radius: 5
+ clip: true
+ color: maximizeArea.containsMouse ? "#DBDBDB" : "#FFFFFF"
+
+ Rectangle {
+ width: 25
+ height: 25
+ radius: 5
+ color: "#FFFFFF"
+ visible: maximizeArea.containsMouse
+ x: 1; y: 2
+ }
+
+ Image {
+ anchors.centerIn: parent
+ source: {
+ if(parent.checked)
+ return maximizeArea.containsMouse ? "../images/backToWindowIconHovered.png" :
+ "../images/backToWindowIcon.png"
+ return maximizeArea.containsMouse ? "../images/maximizeIconHovered.png" :
+ "../images/maximizeIcon.png"
+ }
+ }
+
+ MouseArea {
+ id: maximizeArea
+ anchors.fill: parent
+ hoverEnabled: true
+ onClicked: {
+ parent.checked = !parent.checked
+ appWindow.visibility = parent.checked ? Window.FullScreen :
+ Window.Windowed
+ }
+ }
+ }
+
+ Rectangle {
+ width: 25
+ height: 25
+ radius: 5
+ clip: true
+ color: closeArea.containsMouse ? "#DBDBDB" : "#FFFFFF"
+
+ Rectangle {
+ width: 25
+ height: 25
+ radius: 5
+ color: "#FFFFFF"
+ visible: closeArea.containsMouse
+ x: 1; y: 2
+ }
+
+ Image {
+ anchors.centerIn: parent
+ source: "../images/closeIcon.png"
+ }
+
+ MouseArea {
+ id: closeArea
+ anchors.fill: parent
+ hoverEnabled: true
+ onClicked: Qt.quit()
+ }
+ }
+}
diff --git a/filter.cpp b/filter.cpp
index 3e838ef6..df0b9376 100644
--- a/filter.cpp
+++ b/filter.cpp
@@ -5,38 +5,49 @@
filter::filter(QObject *parent) :
QObject(parent)
{
- m_altPressed = true;
+ m_tabPressed = false;
}
bool filter::eventFilter(QObject *obj, QEvent *ev) {
switch(ev->type()) {
case QEvent::KeyPress: {
QKeyEvent *ke = static_cast<QKeyEvent*>(ev);
- if(ke->key() == Qt::Key_Alt) {
- emit altPressed();
- m_altPressed = true;
+ if(ke->key() == Qt::Key_Tab || ke->key() == Qt::Key_Backtab) {
+ if(m_tabPressed)
+ break;
+ else m_tabPressed = true;
+ }
+
+ QString sks;
+ if(ke->key() == Qt::Key_Control) {
+ sks = "Ctrl";
} else {
QKeySequence ks(ke->modifiers() + ke->key());
- QString sks = ks.toString();
- emit sequencePressed(sks);
+ sks = ks.toString();
}
+ emit sequencePressed(QVariant::fromValue<QObject*>(obj), sks);
} break;
case QEvent::KeyRelease: {
QKeyEvent *ke = static_cast<QKeyEvent*>(ev);
- if(ke->key() == Qt::Key_Alt) {
- emit altReleased();
- m_altPressed = false;
+ if(ke->key() == Qt::Key_Tab || ke->key() == Qt::Key_Backtab)
+ m_tabPressed = false;
+
+ QString sks;
+ if(ke->key() == Qt::Key_Control) {
+ sks = "Ctrl";
+ } else {
+ QKeySequence ks(ke->modifiers() + ke->key());
+ sks = ks.toString();
}
+ emit sequenceReleased(QVariant::fromValue<QObject*>(obj), sks);
} break;
case QEvent::MouseButtonPress: {
QMouseEvent *me = static_cast<QMouseEvent*>(ev);
emit mousePressed(QVariant::fromValue<QObject*>(obj), me->x(), me->y());
- m_mousePressed = true;
} break;
case QEvent::MouseButtonRelease: {
QMouseEvent *me = static_cast<QMouseEvent*>(ev);
emit mouseReleased(QVariant::fromValue<QObject*>(obj), me->x(), me->y());
- m_mousePressed = false;
} break;
default: break;
}
diff --git a/filter.h b/filter.h
index 51a2afd2..fe52074f 100644
--- a/filter.h
+++ b/filter.h
@@ -6,10 +6,8 @@
class filter : public QObject
{
Q_OBJECT
-
private:
- bool m_altPressed;
- bool m_mousePressed;
+ bool m_tabPressed;
public:
explicit filter(QObject *parent = 0);
@@ -18,9 +16,8 @@ protected:
bool eventFilter(QObject *obj, QEvent *ev);
signals:
- void altPressed();
- void altReleased();
- void sequencePressed(const QVariant &seq);
+ void sequencePressed(const QVariant &o, const QVariant &seq);
+ void sequenceReleased(const QVariant &o, 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/datePicker.png b/images/datePicker.png
new file mode 100644
index 00000000..8af9fead
--- /dev/null
+++ b/images/datePicker.png
Binary files differ
diff --git a/images/nextMonth.png b/images/nextMonth.png
new file mode 100644
index 00000000..ba5d1f2d
--- /dev/null
+++ b/images/nextMonth.png
Binary files differ
diff --git a/images/prevMonth.png b/images/prevMonth.png
new file mode 100644
index 00000000..d523d459
--- /dev/null
+++ b/images/prevMonth.png
Binary files differ
diff --git a/main.cpp b/main.cpp
index e5b937e5..b1e66ae8 100644
--- a/main.cpp
+++ b/main.cpp
@@ -13,9 +13,8 @@ int main(int argc, char *argv[])
engine.load(QUrl(QStringLiteral("qrc:///main.qml")));
QObject *rootObject = engine.rootObjects().first();
- 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(sequencePressed(QVariant,QVariant)), rootObject, SLOT(sequencePressed(QVariant,QVariant)));
+ QObject::connect(eventFilter, SIGNAL(sequenceReleased(QVariant,QVariant)), rootObject, SLOT(sequenceReleased(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)));
diff --git a/main.qml b/main.qml
index ec6f3e29..ef9191ba 100644
--- a/main.qml
+++ b/main.qml
@@ -9,20 +9,50 @@ ApplicationWindow {
objectName: "appWindow"
property var currentItem
property bool whatIsEnable: false
- property bool altPressed: false
- function altKeyPressed() { altPressed = true; }
- function altKeyReleased() { altPressed = false; }
- function sequencePressed(seq) {
+ property bool ctrlPressed: false
+ function altKeyReleased() { ctrlPressed = false; }
+ function showPageRequest(page) {
+ middlePanel.state = page
+ leftPanel.selectItem(page)
+ }
+ function sequencePressed(obj, seq) {
if(seq === undefined)
return
- 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"
+ if(seq === "Ctrl") {
+ ctrlPressed = true
+ 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 = "Mining"
+ else if(seq === "Ctrl+S") middlePanel.state = "Settings"
+ else if(seq === "Ctrl+Tab") {
+ if(middlePanel.state === "Dashboard") middlePanel.state = "Transfer"
+ else if(middlePanel.state === "Transfer") middlePanel.state = "History"
+ else if(middlePanel.state === "History") middlePanel.state = "AddressBook"
+ else if(middlePanel.state === "AddressBook") middlePanel.state = "Mining"
+ else if(middlePanel.state === "Mining") middlePanel.state = "Settings"
+ else if(middlePanel.state === "Settings") middlePanel.state = "Dashboard"
+ } else if(seq === "Ctrl+Shift+Backtab") {
+ if(middlePanel.state === "Dashboard") middlePanel.state = "Settings"
+ else if(middlePanel.state === "Settings") middlePanel.state = "Mining"
+ else if(middlePanel.state === "Mining") middlePanel.state = "AddressBook"
+ else if(middlePanel.state === "AddressBook") middlePanel.state = "History"
+ else if(middlePanel.state === "History") middlePanel.state = "Transfer"
+ else if(middlePanel.state === "Transfer") middlePanel.state = "Dashboard"
+ }
+
leftPanel.selectItem(middlePanel.state)
}
+
+ function sequenceReleased(obj, seq) {
+ if(seq === "Ctrl")
+ ctrlPressed = false
+ }
+
function mousePressed(obj, mouseX, mouseY) {
if(obj.objectName === "appWindow")
obj = rootItem
@@ -41,9 +71,9 @@ ApplicationWindow {
currentItem.hide()
currentItem = undefined
}
-
}
}
+
function mouseReleased(obj, mouseX, mouseY) {
}
diff --git a/pages/AddressBook.qml b/pages/AddressBook.qml
index 8f965e8c..d333710c 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("<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
+// }
+// }
}
diff --git a/pages/Dashboard.qml b/pages/Dashboard.qml
index 9bbaf3c6..1f3e62e4 100644
--- a/pages/Dashboard.qml
+++ b/pages/Dashboard.qml
@@ -72,7 +72,7 @@ Rectangle {
text: qsTr("<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style>\
lookng for security level and address book? go to <a href='#'>Transfer</a> tab")
font.underline: false
- onLinkActivated: console.log("link activated")
+ onLinkActivated: appWindow.showPageRequest("Transfer")
}
}
diff --git a/pages/History.qml b/pages/History.qml
index c972e631..dd5a720f 100644
--- a/pages/History.qml
+++ b/pages/History.qml
@@ -1,5 +1,59 @@
import QtQuick 2.0
+import "../components"
Rectangle {
- color: "#00FF00"
+ color: "#F0EEEE"
+
+ Text {
+ id: filterHeaderText
+ 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("Filter trasactions history")
+ }
+
+ Label {
+ id: paymentIdText
+ anchors.left: parent.left
+ anchors.top: filterHeaderText.bottom
+ anchors.leftMargin: 17
+ anchors.topMargin: 17
+ text: qsTr("Payment ID")
+ fontSize: 14
+ tipText: qsTr("<b>Tip tekst test</b>")
+ }
+
+ LineEdit {
+ id: paymentIdLine
+ anchors.left: parent.left
+ anchors.top: paymentIdText.bottom
+ anchors.leftMargin: 17
+ anchors.topMargin: 5
+ width: 156
+ }
+
+ Label {
+ id: dateFromText
+ anchors.left: parent.left
+ anchors.top: paymentIdLine.bottom
+ anchors.leftMargin: 17
+ anchors.topMargin: 17
+ text: qsTr("Date from")
+ fontSize: 14
+ tipText: qsTr("<b>Tip tekst test</b>")
+ }
+
+ DatePicker {
+ anchors.left: parent.left
+ anchors.top: dateFromText.bottom
+ anchors.leftMargin: 17
+ anchors.topMargin: 5
+ }
}
diff --git a/pages/Transfer.qml b/pages/Transfer.qml
index 97520747..603819ff 100644
--- a/pages/Transfer.qml
+++ b/pages/Transfer.qml
@@ -94,7 +94,7 @@ Rectangle {
text: qsTr("<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style>\
Address <font size='2'> ( Type in or select from </font> <a href='#'>Address</a><font size='2'> book )</font>")
- onLinkActivated: console.log("link activated")
+ onLinkActivated: appWindow.showPageRequest("AddressBook")
}
LineEdit {
diff --git a/qml.qrc b/qml.qrc
index 8514067f..e3b5e95e 100644
--- a/qml.qrc
+++ b/qml.qrc
@@ -65,5 +65,10 @@
<file>components/CheckBox.qml</file>
<file>images/checkedIcon.png</file>
<file>images/uncheckedIcon.png</file>
+ <file>components/DatePicker.qml</file>
+ <file>images/datePicker.png</file>
+ <file>images/nextMonth.png</file>
+ <file>images/prevMonth.png</file>
+ <file>components/TitleBar.qml</file>
</qresource>
</RCC>