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 @@ - + ProjectExplorer.Project.ActiveTarget 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(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(obj), sks); } break; case QEvent::KeyRelease: { QKeyEvent *ke = static_cast(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(obj), sks); } break; case QEvent::MouseButtonPress: { QMouseEvent *me = static_cast(ev); emit mousePressed(QVariant::fromValue(obj), me->x(), me->y()); - m_mousePressed = true; } break; case QEvent::MouseButtonRelease: { QMouseEvent *me = static_cast(ev); emit mouseReleased(QVariant::fromValue(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 Binary files /dev/null and b/images/datePicker.png differ diff --git a/images/nextMonth.png b/images/nextMonth.png new file mode 100644 index 00000000..ba5d1f2d Binary files /dev/null and b/images/nextMonth.png differ diff --git a/images/prevMonth.png b/images/prevMonth.png new file mode 100644 index 00000000..d523d459 Binary files /dev/null and b/images/prevMonth.png 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("Tip tekst test") - } +// Label { +// id: addressLabel +// anchors.left: parent.left +// anchors.top: newEntryText.bottom +// anchors.leftMargin: 17 +// anchors.topMargin: 17 +// text: qsTr("Address") +// fontSize: 14 +// tipText: qsTr("Tip tekst test") +// } - LineEdit { - id: addressLine - anchors.left: parent.left - anchors.right: parent.right - anchors.top: addressLabel.bottom - anchors.leftMargin: 17 - anchors.rightMargin: 17 - anchors.topMargin: 5 - } +// LineEdit { +// id: addressLine +// anchors.left: parent.left +// anchors.right: parent.right +// anchors.top: addressLabel.bottom +// anchors.leftMargin: 17 +// anchors.rightMargin: 17 +// anchors.topMargin: 5 +// } - Label { - id: paymentIdLabel - anchors.left: parent.left - anchors.top: addressLine.bottom - anchors.leftMargin: 17 - anchors.topMargin: 17 - text: qsTr("Payment ID (Optional)") - fontSize: 14 - tipText: qsTr("Payment ID

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

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

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

test line 2") +// width: 156 +// } - LineEdit { - id: paymentIdLine - anchors.left: parent.left - anchors.top: paymentIdLabel.bottom - anchors.leftMargin: 17 - anchors.topMargin: 5 - width: 156 - } +// LineEdit { +// id: paymentIdLine +// anchors.left: parent.left +// anchors.top: paymentIdLabel.bottom +// anchors.leftMargin: 17 +// anchors.topMargin: 5 +// width: 156 +// } - LineEdit { - id: descriptionLine - anchors.left: paymentIdLine.right - anchors.right: addButton.left - anchors.top: paymentIdLabel.bottom - anchors.leftMargin: 17 - anchors.rightMargin: 17 - anchors.topMargin: 5 - } +// LineEdit { +// id: descriptionLine +// anchors.left: paymentIdLine.right +// anchors.right: addButton.left +// anchors.top: paymentIdLabel.bottom +// anchors.leftMargin: 17 +// anchors.rightMargin: 17 +// anchors.topMargin: 5 +// } - StandardButton { - id: addButton - anchors.right: parent.right - anchors.top: paymentIdLabel.bottom - anchors.rightMargin: 17 - anchors.topMargin: 5 - width: 60 +// StandardButton { +// id: addButton +// anchors.right: parent.right +// anchors.top: paymentIdLabel.bottom +// anchors.rightMargin: 17 +// anchors.topMargin: 5 +// width: 60 - shadowReleasedColor: "#FF4304" - shadowPressedColor: "#B32D00" - releasedColor: "#FF6C3C" - pressedColor: "#FF4304" - text: qsTr("ADD") - } +// shadowReleasedColor: "#FF4304" +// shadowPressedColor: "#B32D00" +// releasedColor: "#FF6C3C" +// pressedColor: "#FF4304" +// text: qsTr("ADD") +// } - Rectangle { - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - anchors.top: paymentIdLine.bottom - anchors.topMargin: 17 - color: "#FFFFFF" +// Rectangle { +// anchors.left: parent.left +// anchors.right: parent.right +// anchors.bottom: parent.bottom +// anchors.top: paymentIdLine.bottom +// anchors.topMargin: 17 +// color: "#FFFFFF" - Rectangle { - anchors.left: parent.left - anchors.right: parent.right - anchors.top: parent.top - height: 1 - color: "#DBDBDB" - } +// Rectangle { +// anchors.left: parent.left +// anchors.right: parent.right +// anchors.top: parent.top +// height: 1 +// color: "#DBDBDB" +// } - ListModel { - id: columnsModel - ListElement { columnName: "Payment ID"; columnWidth: 148 } - ListElement { columnName: "Description"; columnWidth: 420 } - } +// ListModel { +// id: columnsModel +// ListElement { columnName: "Payment ID"; columnWidth: 148 } +// ListElement { columnName: "Description"; columnWidth: 420 } +// } - TableHeader { - id: header - anchors.left: parent.left - anchors.right: parent.right - anchors.top: parent.top - anchors.topMargin: 17 - anchors.leftMargin: 14 - anchors.rightMargin: 14 - dataModel: columnsModel - onSortRequest: console.log("column: " + column + " desc: " + desc) - } +// TableHeader { +// id: header +// anchors.left: parent.left +// anchors.right: parent.right +// anchors.top: parent.top +// anchors.topMargin: 17 +// anchors.leftMargin: 14 +// anchors.rightMargin: 14 +// dataModel: columnsModel +// onSortRequest: console.log("column: " + column + " desc: " + desc) +// } - ListModel { - id: testModel - ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" } - ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" } - ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" } - ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" } - ListElement { paymentId: ""; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "" } - ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" } - ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" } - ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" } - ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" } - ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" } - ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" } - ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" } - ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" } - ListElement { paymentId: ""; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "" } - } +// ListModel { +// id: testModel +// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" } +// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" } +// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" } +// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" } +// ListElement { paymentId: ""; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "" } +// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" } +// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" } +// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" } +// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" } +// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" } +// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" } +// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" } +// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" } +// ListElement { paymentId: ""; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "" } +// } - Scroll { - id: flickableScroll - anchors.rightMargin: -14 - flickable: table - yPos: table.y - } +// Scroll { +// id: flickableScroll +// anchors.rightMargin: -14 +// flickable: table +// yPos: table.y +// } - AddressBookTable { - id: table - anchors.left: parent.left - anchors.right: parent.right - anchors.top: header.bottom - anchors.bottom: parent.bottom - anchors.leftMargin: 14 - anchors.rightMargin: 14 - onContentYChanged: flickableScroll.flickableContentYChanged() - model: testModel - } - } +// AddressBookTable { +// id: table +// anchors.left: parent.left +// anchors.right: parent.right +// anchors.top: header.bottom +// anchors.bottom: parent.bottom +// anchors.leftMargin: 14 +// anchors.rightMargin: 14 +// onContentYChanged: flickableScroll.flickableContentYChanged() +// model: testModel +// } +// } } diff --git a/pages/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("\ lookng for security level and address book? go to Transfer 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("Tip tekst test") + } + + 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("Tip tekst test") + } + + 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("\ Address ( Type in or select from Address book )") - 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 @@ components/CheckBox.qml images/checkedIcon.png images/uncheckedIcon.png + components/DatePicker.qml + images/datePicker.png + images/nextMonth.png + images/prevMonth.png + components/TitleBar.qml