mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-03 17:39:54 +00:00
shortcuts fix + ctrl+tab/ctrl+shift+tab functionality + heperlinks fix
This commit is contained in:
parent
5085aa3a64
commit
49bb4516f2
21 changed files with 771 additions and 327 deletions
|
@ -16,7 +16,7 @@ Rectangle {
|
||||||
else if(pos === "History") menuColumn.previousButton = historyButton
|
else if(pos === "History") menuColumn.previousButton = historyButton
|
||||||
else if(pos === "Transfer") menuColumn.previousButton = transferButton
|
else if(pos === "Transfer") menuColumn.previousButton = transferButton
|
||||||
else if(pos === "AddressBook") menuColumn.previousButton = addressBookButton
|
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
|
else if(pos === "Settings") menuColumn.previousButton = settingsButton
|
||||||
menuColumn.previousButton.checked = true
|
menuColumn.previousButton.checked = true
|
||||||
}
|
}
|
||||||
|
|
139
RightPanel.qml
139
RightPanel.qml
|
@ -1,152 +1,17 @@
|
||||||
import QtQuick 2.2
|
import QtQuick 2.2
|
||||||
import QtQuick.Window 2.0
|
|
||||||
import QtQuick.Controls 1.2
|
import QtQuick.Controls 1.2
|
||||||
import QtQuick.Controls.Styles 1.2
|
import QtQuick.Controls.Styles 1.2
|
||||||
import "tabs"
|
import "tabs"
|
||||||
|
import "components"
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: 330
|
width: 330
|
||||||
|
|
||||||
Row {
|
TitleBar {
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.topMargin: 5
|
anchors.topMargin: 5
|
||||||
anchors.rightMargin: 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 {
|
TabView {
|
||||||
|
|
|
@ -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-11T00:19:38. -->
|
<!-- Written by QtCreator 3.1.2, 2014-07-13T14:09:13. -->
|
||||||
<qtcreator>
|
<qtcreator>
|
||||||
<data>
|
<data>
|
||||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||||
|
|
333
components/DatePicker.qml
Normal file
333
components/DatePicker.qml
Normal file
|
@ -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()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -37,7 +37,7 @@ Item {
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
onEntered: {
|
onEntered: {
|
||||||
icon.visible = false
|
icon.visible = false
|
||||||
var pos = rootItem.mapFromItem(icon, 0, -15)
|
var pos = appWindow.mapFromItem(icon, 0, -15)
|
||||||
tipItem.text = item.tipText
|
tipItem.text = item.tipText
|
||||||
tipItem.x = pos.x
|
tipItem.x = pos.x
|
||||||
if(tipItem.height > 30)
|
if(tipItem.height > 30)
|
||||||
|
|
|
@ -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.altPressed
|
visible: appWindow.ctrlPressed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,12 +32,26 @@ Item {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.margins: 4
|
anchors.margins: 4
|
||||||
radius: 2
|
radius: 2
|
||||||
|
width: row.x
|
||||||
|
|
||||||
color: {
|
color: {
|
||||||
if(item.fillLevel < 3) return "#FF6C3C"
|
if(item.fillLevel < 3) return "#FF6C3C"
|
||||||
if(item.fillLevel < repeater.count - 1) return "#FFE00A"
|
if(item.fillLevel < repeater.count - 1) return "#FFE00A"
|
||||||
return "#36B25C"
|
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 {
|
MouseArea {
|
||||||
|
@ -82,7 +96,6 @@ Item {
|
||||||
width: 1
|
width: 1
|
||||||
height: 48
|
height: 48
|
||||||
property bool mainTick: index === 0 || index === 3 || index === repeater.count - 1
|
property bool mainTick: index === 0 || index === 3 || index === repeater.count - 1
|
||||||
|
|
||||||
Component.onCompleted: repeater.modelItems[index] = delegate
|
Component.onCompleted: repeater.modelItems[index] = delegate
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
|
|
|
@ -161,7 +161,7 @@ Item {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
propagateComposedEvents: true
|
propagateComposedEvents: true
|
||||||
onEntered: {
|
onEntered: {
|
||||||
var pos = rootItem.mapFromItem(delegate, 30, -20)
|
var pos = appWindow.mapFromItem(delegate, 30, -20)
|
||||||
tipItem.text = name
|
tipItem.text = name
|
||||||
tipItem.x = pos.x
|
tipItem.x = pos.x
|
||||||
if(tipItem.height > 30)
|
if(tipItem.height > 30)
|
||||||
|
|
137
components/TitleBar.qml
Normal file
137
components/TitleBar.qml
Normal file
|
@ -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()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
33
filter.cpp
33
filter.cpp
|
@ -5,38 +5,49 @@
|
||||||
filter::filter(QObject *parent) :
|
filter::filter(QObject *parent) :
|
||||||
QObject(parent)
|
QObject(parent)
|
||||||
{
|
{
|
||||||
m_altPressed = true;
|
m_tabPressed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
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_Alt) {
|
if(ke->key() == Qt::Key_Tab || ke->key() == Qt::Key_Backtab) {
|
||||||
emit altPressed();
|
if(m_tabPressed)
|
||||||
m_altPressed = true;
|
break;
|
||||||
|
else m_tabPressed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString sks;
|
||||||
|
if(ke->key() == Qt::Key_Control) {
|
||||||
|
sks = "Ctrl";
|
||||||
} else {
|
} else {
|
||||||
QKeySequence ks(ke->modifiers() + ke->key());
|
QKeySequence ks(ke->modifiers() + ke->key());
|
||||||
QString sks = ks.toString();
|
sks = ks.toString();
|
||||||
emit sequencePressed(sks);
|
|
||||||
}
|
}
|
||||||
|
emit sequencePressed(QVariant::fromValue<QObject*>(obj), sks);
|
||||||
} 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_Alt) {
|
if(ke->key() == Qt::Key_Tab || ke->key() == Qt::Key_Backtab)
|
||||||
emit altReleased();
|
m_tabPressed = false;
|
||||||
m_altPressed = 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;
|
} break;
|
||||||
case QEvent::MouseButtonPress: {
|
case QEvent::MouseButtonPress: {
|
||||||
QMouseEvent *me = static_cast<QMouseEvent*>(ev);
|
QMouseEvent *me = static_cast<QMouseEvent*>(ev);
|
||||||
emit mousePressed(QVariant::fromValue<QObject*>(obj), me->x(), me->y());
|
emit mousePressed(QVariant::fromValue<QObject*>(obj), me->x(), me->y());
|
||||||
m_mousePressed = true;
|
|
||||||
} break;
|
} break;
|
||||||
case QEvent::MouseButtonRelease: {
|
case QEvent::MouseButtonRelease: {
|
||||||
QMouseEvent *me = static_cast<QMouseEvent*>(ev);
|
QMouseEvent *me = static_cast<QMouseEvent*>(ev);
|
||||||
emit mouseReleased(QVariant::fromValue<QObject*>(obj), me->x(), me->y());
|
emit mouseReleased(QVariant::fromValue<QObject*>(obj), me->x(), me->y());
|
||||||
m_mousePressed = false;
|
|
||||||
} break;
|
} break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
9
filter.h
9
filter.h
|
@ -6,10 +6,8 @@
|
||||||
class filter : public QObject
|
class filter : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_altPressed;
|
bool m_tabPressed;
|
||||||
bool m_mousePressed;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit filter(QObject *parent = 0);
|
explicit filter(QObject *parent = 0);
|
||||||
|
@ -18,9 +16,8 @@ protected:
|
||||||
bool eventFilter(QObject *obj, QEvent *ev);
|
bool eventFilter(QObject *obj, QEvent *ev);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void altPressed();
|
void sequencePressed(const QVariant &o, const QVariant &seq);
|
||||||
void altReleased();
|
void sequenceReleased(const QVariant &o, 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/datePicker.png
Normal file
BIN
images/datePicker.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 268 B |
BIN
images/nextMonth.png
Normal file
BIN
images/nextMonth.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 304 B |
BIN
images/prevMonth.png
Normal file
BIN
images/prevMonth.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 296 B |
5
main.cpp
5
main.cpp
|
@ -13,9 +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(altPressed()), rootObject, SLOT(altKeyPressed()));
|
QObject::connect(eventFilter, SIGNAL(sequencePressed(QVariant,QVariant)), rootObject, SLOT(sequencePressed(QVariant,QVariant)));
|
||||||
QObject::connect(eventFilter, SIGNAL(altReleased()), rootObject, SLOT(altKeyReleased()));
|
QObject::connect(eventFilter, SIGNAL(sequenceReleased(QVariant,QVariant)), rootObject, SLOT(sequenceReleased(QVariant,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)));
|
||||||
|
|
||||||
|
|
52
main.qml
52
main.qml
|
@ -9,20 +9,50 @@ ApplicationWindow {
|
||||||
objectName: "appWindow"
|
objectName: "appWindow"
|
||||||
property var currentItem
|
property var currentItem
|
||||||
property bool whatIsEnable: false
|
property bool whatIsEnable: false
|
||||||
property bool altPressed: false
|
property bool ctrlPressed: false
|
||||||
function altKeyPressed() { altPressed = true; }
|
function altKeyReleased() { ctrlPressed = false; }
|
||||||
function altKeyReleased() { altPressed = false; }
|
function showPageRequest(page) {
|
||||||
function sequencePressed(seq) {
|
middlePanel.state = page
|
||||||
|
leftPanel.selectItem(page)
|
||||||
|
}
|
||||||
|
function sequencePressed(obj, seq) {
|
||||||
if(seq === undefined)
|
if(seq === undefined)
|
||||||
return
|
return
|
||||||
if(seq === "Alt+D") middlePanel.state = "Dashboard"
|
if(seq === "Ctrl") {
|
||||||
else if(seq === "Alt+H") middlePanel.state = "History"
|
ctrlPressed = true
|
||||||
else if(seq === "Alt+T") middlePanel.state = "Transfer"
|
return
|
||||||
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+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)
|
leftPanel.selectItem(middlePanel.state)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function sequenceReleased(obj, seq) {
|
||||||
|
if(seq === "Ctrl")
|
||||||
|
ctrlPressed = false
|
||||||
|
}
|
||||||
|
|
||||||
function mousePressed(obj, mouseX, mouseY) {
|
function mousePressed(obj, mouseX, mouseY) {
|
||||||
if(obj.objectName === "appWindow")
|
if(obj.objectName === "appWindow")
|
||||||
obj = rootItem
|
obj = rootItem
|
||||||
|
@ -41,9 +71,9 @@ ApplicationWindow {
|
||||||
currentItem.hide()
|
currentItem.hide()
|
||||||
currentItem = undefined
|
currentItem = undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function mouseReleased(obj, mouseX, mouseY) {
|
function mouseReleased(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
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ Rectangle {
|
||||||
text: qsTr("<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style>\
|
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")
|
lookng for security level and address book? go to <a href='#'>Transfer</a> tab")
|
||||||
font.underline: false
|
font.underline: false
|
||||||
onLinkActivated: console.log("link activated")
|
onLinkActivated: appWindow.showPageRequest("Transfer")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,59 @@
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
|
import "../components"
|
||||||
|
|
||||||
Rectangle {
|
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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,7 +94,7 @@ Rectangle {
|
||||||
text: qsTr("<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style>\
|
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>")
|
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 {
|
LineEdit {
|
||||||
|
|
5
qml.qrc
5
qml.qrc
|
@ -65,5 +65,10 @@
|
||||||
<file>components/CheckBox.qml</file>
|
<file>components/CheckBox.qml</file>
|
||||||
<file>images/checkedIcon.png</file>
|
<file>images/checkedIcon.png</file>
|
||||||
<file>images/uncheckedIcon.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>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
Loading…
Reference in a new issue