first push
245
LeftPanel.qml
Normal file
|
@ -0,0 +1,245 @@
|
|||
import QtQuick 2.2
|
||||
import "components"
|
||||
|
||||
Rectangle {
|
||||
id: panel
|
||||
signal dashboardClicked()
|
||||
signal historyClicked()
|
||||
signal transferClicked()
|
||||
signal settingsClicked()
|
||||
signal addressBookClicked()
|
||||
signal miningClicked()
|
||||
|
||||
width: 260
|
||||
color: "#FFFFFF"
|
||||
|
||||
Image {
|
||||
id: logo
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 31
|
||||
source: "images/moneroLogo.png"
|
||||
}
|
||||
|
||||
Column {
|
||||
id: column1
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: logo.bottom
|
||||
anchors.topMargin: 40
|
||||
spacing: 6
|
||||
|
||||
Label {
|
||||
text: qsTr("Locked balance")
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 50
|
||||
}
|
||||
|
||||
Row {
|
||||
Item {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
height: 26
|
||||
width: 50
|
||||
|
||||
Image {
|
||||
anchors.centerIn: parent
|
||||
source: "images/lockIcon.png"
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
font.family: "Arial"
|
||||
font.pixelSize: 26
|
||||
color: "#000000"
|
||||
text: "78.9239845"
|
||||
}
|
||||
}
|
||||
|
||||
Item { //separator
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
height: 1
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr("Unlocked")
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 50
|
||||
}
|
||||
|
||||
Text {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 50
|
||||
font.family: "Arial"
|
||||
font.pixelSize: 18
|
||||
color: "#000000"
|
||||
text: "2324.9239845"
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: menuRect.top
|
||||
width: 1
|
||||
color: "#DBDBDB"
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
height: 1
|
||||
color: "#DBDBDB"
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: menuRect
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.top: column1.bottom
|
||||
anchors.topMargin: 50
|
||||
color: "#1C1C1C"
|
||||
|
||||
Column {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
|
||||
property var previousButton: dashboardButton
|
||||
MenuButton {
|
||||
id: dashboardButton
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
text: qsTr("Dashboard")
|
||||
symbol: qsTr("D")
|
||||
dotColor: "#FFE00A"
|
||||
checked: true
|
||||
onClicked: {
|
||||
parent.previousButton.checked = false
|
||||
parent.previousButton = dashboardButton
|
||||
panel.dashboardClicked()
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 16
|
||||
color: dashboardButton.checked || transferButton.checked ? "#1C1C1C" : "#505050"
|
||||
height: 1
|
||||
}
|
||||
|
||||
MenuButton {
|
||||
id: transferButton
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
text: qsTr("Transfer")
|
||||
symbol: qsTr("T")
|
||||
dotColor: "#FF6C3C"
|
||||
onClicked: {
|
||||
parent.previousButton.checked = false
|
||||
parent.previousButton = transferButton
|
||||
panel.transferClicked()
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 16
|
||||
color: transferButton.checked || historyButton.checked ? "#1C1C1C" : "#505050"
|
||||
height: 1
|
||||
}
|
||||
|
||||
MenuButton {
|
||||
id: historyButton
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
text: qsTr("History")
|
||||
symbol: qsTr("H")
|
||||
dotColor: "#6B0072"
|
||||
onClicked: {
|
||||
parent.previousButton.checked = false
|
||||
parent.previousButton = historyButton
|
||||
panel.historyClicked()
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 16
|
||||
color: historyButton.checked || addressBookButton.checked ? "#1C1C1C" : "#505050"
|
||||
height: 1
|
||||
}
|
||||
|
||||
MenuButton {
|
||||
id: addressBookButton
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
text: qsTr("Address book")
|
||||
symbol: qsTr("B")
|
||||
dotColor: "#FF4F41"
|
||||
onClicked: {
|
||||
parent.previousButton.checked = false
|
||||
parent.previousButton = addressBookButton
|
||||
panel.addressBookClicked()
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 16
|
||||
color: addressBookButton.checked || miningButton.checked ? "#1C1C1C" : "#505050"
|
||||
height: 1
|
||||
}
|
||||
|
||||
MenuButton {
|
||||
id: miningButton
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
text: qsTr("Mining")
|
||||
symbol: qsTr("M")
|
||||
dotColor: "#FFD781"
|
||||
onClicked: {
|
||||
parent.previousButton.checked = false
|
||||
parent.previousButton = miningButton
|
||||
panel.miningClicked()
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 16
|
||||
color: miningButton.checked || settingsButton.checked ? "#1C1C1C" : "#505050"
|
||||
height: 1
|
||||
}
|
||||
|
||||
MenuButton {
|
||||
id: settingsButton
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
text: qsTr("Settings")
|
||||
symbol: qsTr("S")
|
||||
dotColor: "#36B25C"
|
||||
onClicked: {
|
||||
parent.previousButton.checked = false
|
||||
parent.previousButton = settingsButton
|
||||
panel.settingsClicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NetworkStatusItem {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
connected: true
|
||||
}
|
||||
}
|
||||
}
|
72
MiddlePanel.qml
Normal file
|
@ -0,0 +1,72 @@
|
|||
import QtQuick 2.2
|
||||
|
||||
Rectangle {
|
||||
color: "#F0EEEE"
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "Dashboard"
|
||||
PropertyChanges { target: loader; source: "pages/Dashboard.qml" }
|
||||
}, State {
|
||||
name: "History"
|
||||
PropertyChanges { target: loader; source: "pages/History.qml" }
|
||||
}, State {
|
||||
name: "Transfer"
|
||||
PropertyChanges { target: loader; source: "pages/Transfer.qml" }
|
||||
}, State {
|
||||
name: "AddressBook"
|
||||
PropertyChanges { target: loader; source: "pages/AddressBook.qml" }
|
||||
}, State {
|
||||
name: "Settings"
|
||||
PropertyChanges { target: loader; source: "pages/Settings.qml" }
|
||||
}, State {
|
||||
name: "Mining"
|
||||
PropertyChanges { target: loader; source: "pages/Mining.qml" }
|
||||
}
|
||||
]
|
||||
|
||||
Row {
|
||||
id: styledRow
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
|
||||
Rectangle { height: 4; width: parent.width / 5; color: "#FFE00A" }
|
||||
Rectangle { height: 4; width: parent.width / 5; color: "#6B0072" }
|
||||
Rectangle { height: 4; width: parent.width / 5; color: "#FF6C3C" }
|
||||
Rectangle { height: 4; width: parent.width / 5; color: "#FFD781" }
|
||||
Rectangle { height: 4; width: parent.width / 5; color: "#FF4F41" }
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: loader
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: styledRow.bottom
|
||||
anchors.bottom: parent.bottom
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.top: styledRow.bottom
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: parent.right
|
||||
width: 1
|
||||
color: "#DBDBDB"
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.top: styledRow.bottom
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
width: 1
|
||||
color: "#DBDBDB"
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
height: 1
|
||||
color: "#DBDBDB"
|
||||
}
|
||||
}
|
248
RightPanel.qml
Normal file
|
@ -0,0 +1,248 @@
|
|||
import QtQuick 2.2
|
||||
import QtQuick.Window 2.0
|
||||
import QtQuick.Controls 1.2
|
||||
import QtQuick.Controls.Styles 1.2
|
||||
import "tabs"
|
||||
|
||||
Rectangle {
|
||||
width: 330
|
||||
|
||||
Row {
|
||||
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 {
|
||||
id: tabView
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: styledRow.top
|
||||
anchors.leftMargin: 14
|
||||
anchors.rightMargin: 14
|
||||
anchors.topMargin: 40
|
||||
|
||||
Tab { title: qsTr("Twitter"); source: "tabs/Twitter.qml" }
|
||||
Tab { title: "News" }
|
||||
Tab { title: "Help" }
|
||||
Tab { title: "About" }
|
||||
|
||||
style: TabViewStyle {
|
||||
frameOverlap: 2
|
||||
tabOverlap: 0
|
||||
tab: Rectangle {
|
||||
implicitHeight: 31
|
||||
implicitWidth: 68
|
||||
|
||||
Text {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 12
|
||||
anchors.rightMargin: 12
|
||||
elide: Text.ElideRight
|
||||
font.family: "Arial"
|
||||
font.pixelSize: 14
|
||||
color: styleData.selected ? "#FF4E40" : "#4A4646"
|
||||
text: styleData.title
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: parent.right
|
||||
width: 1
|
||||
color: "#DBDBDB"
|
||||
visible: styleData.index !== tabView.count - 1
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
height: 1
|
||||
color: styleData.selected ? "#FFFFFF" : "#DBDBDB"
|
||||
}
|
||||
}
|
||||
|
||||
frame: Rectangle {
|
||||
color: "#FFFFFF"
|
||||
anchors.fill: parent
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 1
|
||||
height: 1
|
||||
color: "#DBDBDB"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
id: styledRow
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
|
||||
Rectangle { height: 8; width: parent.width / 5; color: "#FFE00A" }
|
||||
Rectangle { height: 8; width: parent.width / 5; color: "#6B0072" }
|
||||
Rectangle { height: 8; width: parent.width / 5; color: "#FF6C3C" }
|
||||
Rectangle { height: 8; width: parent.width / 5; color: "#FFD781" }
|
||||
Rectangle { height: 8; width: parent.width / 5; color: "#FF4F41" }
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
height: 1
|
||||
color: "#DBDBDB"
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: parent.right
|
||||
width: 1
|
||||
color: "#DBDBDB"
|
||||
}
|
||||
}
|
17
bitmonero.pro
Normal file
|
@ -0,0 +1,17 @@
|
|||
TEMPLATE = app
|
||||
|
||||
QT += qml quick widgets
|
||||
|
||||
SOURCES += main.cpp \
|
||||
filter.cpp
|
||||
|
||||
RESOURCES += qml.qrc
|
||||
|
||||
# Additional import path used to resolve QML modules in Qt Creator's code model
|
||||
QML_IMPORT_PATH =
|
||||
|
||||
# Default rules for deployment.
|
||||
include(deployment.pri)
|
||||
|
||||
HEADERS += \
|
||||
filter.h
|
251
bitmonero.pro.user
Normal file
|
@ -0,0 +1,251 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 3.1.2, 2014-07-07T10:49:29. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
<value type="int">0</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||
<value type="QString" key="language">Cpp</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||
<value type="QString" key="language">QmlJS</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
|
||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||
<valuemap type="QVariantMap"/>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.3.0 MinGW 32bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.3.0 MinGW 32bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.53.win32_mingw482_kit</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">G:/RPA/build-bitmonero-Desktop_Qt_5_3_0_MinGW_32bit-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">budowania</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">czyszczenia</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">G:/RPA/build-bitmonero-Desktop_Qt_5_3_0_MinGW_32bit-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">budowania</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">czyszczenia</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">instalacji</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Zainstaluj lokalnie</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
|
||||
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
|
||||
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
|
||||
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
|
||||
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
|
||||
<value type="int">0</value>
|
||||
<value type="int">1</value>
|
||||
<value type="int">2</value>
|
||||
<value type="int">3</value>
|
||||
<value type="int">4</value>
|
||||
<value type="int">5</value>
|
||||
<value type="int">6</value>
|
||||
<value type="int">7</value>
|
||||
<value type="int">8</value>
|
||||
<value type="int">9</value>
|
||||
<value type="int">10</value>
|
||||
<value type="int">11</value>
|
||||
<value type="int">12</value>
|
||||
<value type="int">13</value>
|
||||
<value type="int">14</value>
|
||||
</valuelist>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">bitmonero</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:G:/RPA/bitmonero/bitmonero.pro</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">bitmonero.pro</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
|
||||
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||
<value type="int">1</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
|
||||
<value type="QByteArray">{20382c58-78e1-43a4-9d27-354b0656be87}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||
<value type="int">15</value>
|
||||
</data>
|
||||
</qtcreator>
|
177
components/DashboardTable.qml
Normal file
|
@ -0,0 +1,177 @@
|
|||
import QtQuick 2.0
|
||||
import "../components"
|
||||
|
||||
ListView {
|
||||
id: listView
|
||||
clip: true
|
||||
boundsBehavior: ListView.StopAtBounds
|
||||
|
||||
property var previousItem
|
||||
delegate: Rectangle {
|
||||
id: delegate
|
||||
height: 90
|
||||
width: listView.width
|
||||
z: 0
|
||||
color: index % 2 ? "#F8F8F8" : "#FFFFFF"
|
||||
function collapseDropdown() { dropdown.expanded = false }
|
||||
|
||||
Row {
|
||||
id: row1
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 14
|
||||
|
||||
Rectangle {
|
||||
id: dot
|
||||
width: 14
|
||||
height: width
|
||||
radius: width / 2
|
||||
color: out ? "#FF4F41" : "#36B05B"
|
||||
}
|
||||
|
||||
Item { //separator
|
||||
width: 12
|
||||
height: 14
|
||||
}
|
||||
|
||||
Text {
|
||||
id: paymentIdText
|
||||
width: text.length ? 122 : 0
|
||||
anchors.verticalCenter: dot.verticalCenter
|
||||
font.family: "Arial"
|
||||
font.bold: true
|
||||
font.pixelSize: 19
|
||||
color: "#444444"
|
||||
elide: Text.ElideRight
|
||||
text: paymentId
|
||||
}
|
||||
|
||||
Item { //separator
|
||||
width: paymentIdText.width ? 12 : 0
|
||||
height: 14
|
||||
}
|
||||
|
||||
Text {
|
||||
anchors.verticalCenter: dot.verticalCenter
|
||||
width: parent.width - x - 12
|
||||
elide: Text.ElideRight
|
||||
font.family: "Arial"
|
||||
font.pixelSize: 14
|
||||
color: "#545454"
|
||||
text: address
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
anchors.left: parent.left
|
||||
anchors.top: row1.bottom
|
||||
anchors.topMargin: 8
|
||||
spacing: 12
|
||||
|
||||
Item { //separator
|
||||
width: 14
|
||||
height: 14
|
||||
}
|
||||
|
||||
Column {
|
||||
anchors.top: parent.top
|
||||
width: 202
|
||||
|
||||
Text {
|
||||
anchors.left: parent.left
|
||||
font.family: "Arial"
|
||||
font.pixelSize: 12
|
||||
color: "#545454"
|
||||
text: qsTr("Date")
|
||||
}
|
||||
|
||||
Text {
|
||||
font.family: "Arial"
|
||||
font.pixelSize: 18
|
||||
color: "#000000"
|
||||
text: date
|
||||
}
|
||||
}
|
||||
|
||||
Column {
|
||||
anchors.top: parent.top
|
||||
width: 148
|
||||
|
||||
Text {
|
||||
anchors.left: parent.left
|
||||
font.family: "Arial"
|
||||
font.pixelSize: 12
|
||||
color: "#545454"
|
||||
text: qsTr("Amount")
|
||||
}
|
||||
|
||||
Text {
|
||||
font.family: "Arial"
|
||||
font.pixelSize: 18
|
||||
color: "#000000"
|
||||
text: amount
|
||||
}
|
||||
}
|
||||
|
||||
Column {
|
||||
anchors.top: parent.top
|
||||
width: 148
|
||||
|
||||
Text {
|
||||
anchors.left: parent.left
|
||||
font.family: "Arial"
|
||||
font.pixelSize: 12
|
||||
color: "#545454"
|
||||
text: qsTr("Balance")
|
||||
}
|
||||
|
||||
Row {
|
||||
spacing: 2
|
||||
Text {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 3
|
||||
font.family: "Arial"
|
||||
font.pixelSize: 16
|
||||
color: out ? "#FF4F41" : "#36B05B"
|
||||
text: out ? "↓" : "↑"
|
||||
}
|
||||
|
||||
Text {
|
||||
anchors.bottom: parent.bottom
|
||||
font.family: "Arial"
|
||||
font.pixelSize: 18
|
||||
color: out ? "#FF4F41" : "#36B05B"
|
||||
text: balance
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
height: 1
|
||||
color: "#DBDBDB"
|
||||
}
|
||||
|
||||
TableDropdown {
|
||||
id: dropdown
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 11
|
||||
anchors.rightMargin: 5
|
||||
onExpandedChanged: {
|
||||
if(listView.previousItem !== undefined && listView.previousItem !== delegate)
|
||||
listView.previousItem.collapseDropdown()
|
||||
if(expanded) {
|
||||
listView.previousItem = delegate
|
||||
listView.currentIndex = index
|
||||
listView.currentItem.z = 2
|
||||
}
|
||||
}
|
||||
onCollapsed: delegate.z = 0
|
||||
}
|
||||
}
|
||||
}
|
18
components/Input.qml
Normal file
|
@ -0,0 +1,18 @@
|
|||
import QtQuick.Controls 1.2
|
||||
import QtQuick.Controls.Styles 1.2
|
||||
import QtQuick 2.2
|
||||
|
||||
TextField {
|
||||
font.family: "Arial"
|
||||
font.pixelSize: 18
|
||||
|
||||
style: TextFieldStyle {
|
||||
textColor: "#3F3F3F"
|
||||
placeholderTextColor: "#BABABA"
|
||||
|
||||
background: Rectangle {
|
||||
border.width: 0
|
||||
color: "transparent"
|
||||
}
|
||||
}
|
||||
}
|
28
components/Label.qml
Normal file
|
@ -0,0 +1,28 @@
|
|||
import QtQuick 2.0
|
||||
|
||||
Item {
|
||||
property alias text: label.text
|
||||
property alias color: label.color
|
||||
property int fontSize: 12
|
||||
width: icon.x + icon.width
|
||||
height: icon.height
|
||||
|
||||
Text {
|
||||
id: label
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 2
|
||||
anchors.left: parent.left
|
||||
font.family: "Arial"
|
||||
font.pixelSize: parent.fontSize
|
||||
color: "#555555"
|
||||
}
|
||||
|
||||
Image {
|
||||
id: icon
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: label.right
|
||||
anchors.leftMargin: 5
|
||||
source: "../images/whatIsIcon.png"
|
||||
visible: appWindow.whatIsEnable
|
||||
}
|
||||
}
|
28
components/LineEdit.qml
Normal file
|
@ -0,0 +1,28 @@
|
|||
import QtQuick 2.0
|
||||
|
||||
Item {
|
||||
property alias placeholderText: input.placeholderText
|
||||
property alias text: input.text
|
||||
height: 37
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.bottomMargin: 1
|
||||
color: "#DBDBDB"
|
||||
radius: 4
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: 1
|
||||
color: "#FFFFFF"
|
||||
radius: 4
|
||||
}
|
||||
|
||||
Input {
|
||||
id: input
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: 11
|
||||
anchors.rightMargin: 11
|
||||
}
|
||||
}
|
75
components/MenuButton.qml
Normal file
|
@ -0,0 +1,75 @@
|
|||
import QtQuick 2.0
|
||||
|
||||
Rectangle {
|
||||
id: button
|
||||
property alias text: label.text
|
||||
property bool checked: false
|
||||
property alias dotColor: dot.color
|
||||
property alias symbol: symbolText.text
|
||||
signal clicked()
|
||||
|
||||
height: 64
|
||||
color: checked ? "#FFFFFF" : "#1C1C1C"
|
||||
|
||||
Item {
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
width: 50
|
||||
|
||||
Rectangle {
|
||||
id: dot
|
||||
anchors.centerIn: parent
|
||||
width: 16
|
||||
height: width
|
||||
radius: height / 2
|
||||
|
||||
Rectangle {
|
||||
anchors.centerIn: parent
|
||||
width: 12
|
||||
height: width
|
||||
radius: height / 2
|
||||
color: "#1C1C1C"
|
||||
visible: !button.checked && !buttonArea.containsMouse
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
id: symbolText
|
||||
anchors.centerIn: parent
|
||||
font.pixelSize: 11
|
||||
font.bold: true
|
||||
color: button.checked || buttonArea.containsMouse ? "#FFFFFF" : dot.color
|
||||
visible: appWindow.ctrlPressed
|
||||
}
|
||||
}
|
||||
|
||||
Image {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 20
|
||||
source: "../images/menuIndicator.png"
|
||||
}
|
||||
|
||||
Text {
|
||||
id: label
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 50
|
||||
font.family: "Arial"
|
||||
font.pixelSize: 18
|
||||
color: parent.checked ? "#000000" : "#FFFFFF"
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: buttonArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onClicked: {
|
||||
if(parent.checked)
|
||||
return
|
||||
button.clicked()
|
||||
parent.checked = true
|
||||
}
|
||||
}
|
||||
}
|
41
components/NetworkStatusItem.qml
Normal file
|
@ -0,0 +1,41 @@
|
|||
import QtQuick 2.0
|
||||
|
||||
Row {
|
||||
id: item
|
||||
property bool connected: false
|
||||
|
||||
Item {
|
||||
id: iconItem
|
||||
anchors.bottom: parent.bottom
|
||||
width: 50
|
||||
height: 50
|
||||
|
||||
Image {
|
||||
anchors.centerIn: parent
|
||||
source: item.connected ? "../images/statusConnected.png" :
|
||||
"../images/statusDisconnected.png"
|
||||
}
|
||||
}
|
||||
|
||||
Column {
|
||||
anchors.bottom: parent.bottom
|
||||
height: 53
|
||||
spacing: 3
|
||||
|
||||
Text {
|
||||
anchors.left: parent.left
|
||||
font.family: "Arial"
|
||||
font.pixelSize: 12
|
||||
color: "#545454"
|
||||
text: qsTr("Network status")
|
||||
}
|
||||
|
||||
Text {
|
||||
anchors.left: parent.left
|
||||
font.family: "Arial"
|
||||
font.pixelSize: 18
|
||||
color: item.connected ? "#FF6C3B" : "#AAAAAA"
|
||||
text: item.connected ? qsTr("Connected") : qsTr("Disconnected")
|
||||
}
|
||||
}
|
||||
}
|
167
components/SearchInput.qml
Normal file
|
@ -0,0 +1,167 @@
|
|||
import QtQuick 2.0
|
||||
|
||||
Item {
|
||||
id: item
|
||||
signal searchClicked(string text, int option)
|
||||
height: 50
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: "#DBDBDB"
|
||||
radius: 10
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: 1
|
||||
color: "#FFFFFF"
|
||||
radius: 10
|
||||
|
||||
Item {
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
width: 45
|
||||
|
||||
Image {
|
||||
anchors.centerIn: parent
|
||||
source: "../images/magnifier.png"
|
||||
}
|
||||
}
|
||||
|
||||
Input {
|
||||
id: input
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: dropdown.left
|
||||
anchors.leftMargin: 45
|
||||
verticalAlignment: TextInput.AlignVCenter
|
||||
placeholderText: qsTr("Search by...")
|
||||
}
|
||||
|
||||
Item {
|
||||
id: dropdown
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: button.left
|
||||
width: 154
|
||||
|
||||
Row {
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
Text {
|
||||
id: dropText
|
||||
width: 114 - 12
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
font.family: "Arial"
|
||||
font.pixelSize: 12
|
||||
color: "#4A4747"
|
||||
text: "NAME"
|
||||
}
|
||||
|
||||
Image {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
source: "../images/hseparator.png"
|
||||
}
|
||||
|
||||
Item {
|
||||
height: dropdown.height
|
||||
width: 38
|
||||
|
||||
Image {
|
||||
id: dropIndicator
|
||||
anchors.centerIn: parent
|
||||
source: "../images/dropIndicator.png"
|
||||
rotation: droplist.height === 0 ? 0 : 180
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: droplist.height = droplist.height === 0 ? dropcolumn.height : 0
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: droplist
|
||||
property int currentOption: 0
|
||||
|
||||
width: 154
|
||||
height: 0
|
||||
clip: true
|
||||
x: dropdown.x
|
||||
y: dropdown.height
|
||||
color: "#FFFFFF"
|
||||
|
||||
Behavior on height {
|
||||
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
|
||||
}
|
||||
|
||||
ListModel {
|
||||
id: dropdownModel
|
||||
ListElement { name: "NAME" }
|
||||
ListElement { name: "DESCRIPTION" }
|
||||
ListElement { name: "ADDRESS" }
|
||||
}
|
||||
|
||||
Column {
|
||||
id: dropcolumn
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
|
||||
Repeater {
|
||||
model: dropdownModel
|
||||
delegate: Rectangle {
|
||||
property bool isCurrent: name === dropText.text
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
height: 30
|
||||
color: delegateArea.pressed || isCurrent ? "#4A4646" : "#FFFFFF"
|
||||
|
||||
Text {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
elide: Text.ElideRight
|
||||
anchors.leftMargin: 12
|
||||
anchors.rightMargin: 12
|
||||
font.family: "Arial"
|
||||
font.pixelSize: 12
|
||||
color: delegateArea.pressed || parent.isCurrent ? "#FFFFFF" : "#4A4646"
|
||||
text: name
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: delegateArea
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
droplist.currentOption = index
|
||||
droplist.height = 0
|
||||
dropText.text = name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
StandardButton {
|
||||
id: button
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: parent.right
|
||||
anchors.margins: 6
|
||||
width: 80
|
||||
|
||||
shadowColor: "#8C0B00"
|
||||
pressedColor: "#C60F00"
|
||||
releasedColor: "#FF4F41"
|
||||
text: qsTr("SEARCH")
|
||||
onClicked: item.searchClicked(input.text, droplist.currentOption)
|
||||
}
|
||||
}
|
||||
}
|
46
components/StandardButton.qml
Normal file
|
@ -0,0 +1,46 @@
|
|||
import QtQuick 2.0
|
||||
|
||||
Item {
|
||||
height: 37
|
||||
property string shadowColor
|
||||
property string pressedColor
|
||||
property string releasedColor
|
||||
property string textColor: "#FFFFFF"
|
||||
property alias text: label.text
|
||||
signal clicked()
|
||||
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
height: parent.height - 1
|
||||
y: buttonArea.pressed ? 1 : 0
|
||||
radius: 4
|
||||
color: parent.shadowColor
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
height: parent.height - 1
|
||||
y: buttonArea.pressed ? 0 : 1
|
||||
color: buttonArea.pressed ? parent.pressedColor : parent.releasedColor
|
||||
radius: 4
|
||||
}
|
||||
|
||||
Text {
|
||||
id: label
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
elide: Text.ElideRight
|
||||
font.pixelSize: 12
|
||||
color: parent.textColor
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: buttonArea
|
||||
anchors.fill: parent
|
||||
onClicked: parent.clicked()
|
||||
}
|
||||
}
|
135
components/TableDropdown.qml
Normal file
|
@ -0,0 +1,135 @@
|
|||
import QtQuick 2.0
|
||||
|
||||
Item {
|
||||
id: dropdown
|
||||
property bool expanded: false
|
||||
signal collapsed()
|
||||
width: 72
|
||||
height: 37
|
||||
|
||||
Item {
|
||||
id: head
|
||||
anchors.fill: parent
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: dropdown.expanded ? 0 : 1
|
||||
radius: 3
|
||||
color: dropdown.expanded ? "#888888" : "#DBDBDB"
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.bottomMargin: dropdown.expanded ? 0 : 1
|
||||
radius: 3
|
||||
color: dropdown.expanded ? "#DBDBDB" : "#F0EEEE"
|
||||
}
|
||||
|
||||
Image {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 10
|
||||
source: "../images/tableOptions.png"
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.centerIn: parent
|
||||
anchors.horizontalCenterOffset: 1
|
||||
height: 23
|
||||
width: 1
|
||||
color: dropdown.expanded ? "#FFFFFF" : "#DBDBDB"
|
||||
}
|
||||
|
||||
Image {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 10
|
||||
source: "../images/dropIndicator.png"
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onPressed: dropdown.expanded = !dropdown.expanded
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: head.bottom
|
||||
height: dropdown.expanded ? column.height : 0
|
||||
onHeightChanged: if(height === 0) dropdown.collapsed()
|
||||
clip: true
|
||||
|
||||
Behavior on height {
|
||||
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
|
||||
}
|
||||
|
||||
Column {
|
||||
id: column
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
|
||||
ListModel {
|
||||
id: dataModel
|
||||
ListElement { name: "<b>text 1</b>"; icon: "../images/dropdownOption1.png" }
|
||||
ListElement { name: "<b>longer text 2</b>"; icon: "../images/dropdownSend.png" }
|
||||
ListElement { name: "<b>text3</b><br/><br/>lorem ipsum asdasd asdasd"; icon: "../images/dropdownSearch.png" }
|
||||
}
|
||||
|
||||
Repeater {
|
||||
id: repeater
|
||||
model: dataModel
|
||||
|
||||
delegate: Rectangle {
|
||||
id: delegate
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
height: 30
|
||||
color: delegateArea.containsMouse ? "#F0EEEE" : "#DBDBDB"
|
||||
radius: index === repeater.count - 1 ? 5 : 0
|
||||
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
width: 5
|
||||
height: 5
|
||||
color: delegate.color
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
width: 5
|
||||
height: 5
|
||||
color: delegate.color
|
||||
}
|
||||
|
||||
Image {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 10
|
||||
source: icon
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: delegateArea
|
||||
hoverEnabled: true
|
||||
anchors.fill: parent
|
||||
onEntered: {
|
||||
var pos = rootItem.mapFromItem(delegate, 30, -20)
|
||||
tipItem.text = name
|
||||
tipItem.x = pos.x
|
||||
if(tipItem.height > 30)
|
||||
pos.y -= tipItem.height - 30
|
||||
tipItem.y = pos.y
|
||||
tipItem.visible = true
|
||||
}
|
||||
onExited: tipItem.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
154
components/TableHeader.qml
Normal file
|
@ -0,0 +1,154 @@
|
|||
import QtQuick 2.0
|
||||
|
||||
Rectangle {
|
||||
id: header
|
||||
signal sortRequest(bool desc, int column)
|
||||
property int activeSortColumn: -1
|
||||
|
||||
height: 31
|
||||
color: "#FFFFFF"
|
||||
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
height: 1
|
||||
color: "#DBDBDB"
|
||||
}
|
||||
|
||||
ListModel {
|
||||
id: columnsModel
|
||||
ListElement { columnName: "Date"; columnWidth: 92 }
|
||||
ListElement { columnName: "Amount"; columnWidth: 158 }
|
||||
ListElement { columnName: "Balance"; columnWidth: 168 }
|
||||
}
|
||||
|
||||
Row {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
Rectangle {
|
||||
height: 31
|
||||
width: 1
|
||||
color: "#DBDBDB"
|
||||
}
|
||||
|
||||
Repeater {
|
||||
id: columnsRepeater
|
||||
model: columnsModel
|
||||
delegate: Rectangle {
|
||||
id: delegate
|
||||
property bool desc: false
|
||||
height: 31
|
||||
width: columnWidth
|
||||
|
||||
Text {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.verticalCenterOffset: -2
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 13
|
||||
anchors.rightMargin: 13
|
||||
elide: Text.ElideRight
|
||||
font.family: "Arial"
|
||||
font.pixelSize: 14
|
||||
color: {
|
||||
if(delegateArea.pressed)
|
||||
return "#FF4304"
|
||||
return index === header.activeSortColumn || delegateArea.containsMouse ? "#FF6C3C" : "#4A4949"
|
||||
}
|
||||
text: columnName
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: delegateArea
|
||||
hoverEnabled: true
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
delegate.desc = !delegate.desc
|
||||
header.activeSortColumn = index
|
||||
header.sortRequest(delegate.desc, index)
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.rightMargin: 9
|
||||
|
||||
Item {
|
||||
width: 14
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
|
||||
Image {
|
||||
anchors.centerIn: parent
|
||||
anchors.verticalCenterOffset: -2
|
||||
source: {
|
||||
if(descArea.pressed)
|
||||
return "../images/descSortIndicatorPressed.png"
|
||||
return index === header.activeSortColumn || descArea.containsMouse ? "../images/descSortIndicatorActived.png" :
|
||||
"../images/descSortIndicator.png"
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: descArea
|
||||
hoverEnabled: true
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
delegate.desc = true
|
||||
header.activeSortColumn = index
|
||||
header.sortRequest(delegate.desc, index)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
width: 14
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
|
||||
Image {
|
||||
anchors.centerIn: parent
|
||||
anchors.verticalCenterOffset: -3
|
||||
source: {
|
||||
if(ascArea.pressed)
|
||||
return "../images/ascSortIndicatorPressed.png"
|
||||
return index === header.activeSortColumn || ascArea.containsMouse ? "../images/ascSortIndicatorActived.png" :
|
||||
"../images/ascSortIndicator.png"
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: ascArea
|
||||
hoverEnabled: true
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
delegate.desc = false
|
||||
header.activeSortColumn = index
|
||||
header.sortRequest(delegate.desc, index)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
height: 1
|
||||
color: index === header.activeSortColumn ? "#FFFFFF" : "#DBDBDB"
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: parent.right
|
||||
width: 1
|
||||
color: "#DBDBDB"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
26
components/TipItem.qml
Normal file
|
@ -0,0 +1,26 @@
|
|||
import QtQuick 2.0
|
||||
|
||||
Rectangle {
|
||||
property alias text: content.text
|
||||
width: content.width + 12
|
||||
height: content.height + 17
|
||||
color: "#FF6C3C"
|
||||
radius: 3
|
||||
|
||||
Image {
|
||||
anchors.top: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 8
|
||||
source: "../images/tip.png"
|
||||
}
|
||||
|
||||
Text {
|
||||
id: content
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
y: 6
|
||||
lineHeight: 0.7
|
||||
font.family: "Arial"
|
||||
font.pixelSize: 12
|
||||
color: "#FFFFFF"
|
||||
}
|
||||
}
|
27
deployment.pri
Normal file
|
@ -0,0 +1,27 @@
|
|||
android-no-sdk {
|
||||
target.path = /data/user/qt
|
||||
export(target.path)
|
||||
INSTALLS += target
|
||||
} else:android {
|
||||
x86 {
|
||||
target.path = /libs/x86
|
||||
} else: armeabi-v7a {
|
||||
target.path = /libs/armeabi-v7a
|
||||
} else {
|
||||
target.path = /libs/armeabi
|
||||
}
|
||||
export(target.path)
|
||||
INSTALLS += target
|
||||
} else:unix {
|
||||
isEmpty(target.path) {
|
||||
qnx {
|
||||
target.path = /tmp/$${TARGET}/bin
|
||||
} else {
|
||||
target.path = /opt/$${TARGET}/bin
|
||||
}
|
||||
export(target.path)
|
||||
}
|
||||
INSTALLS += target
|
||||
}
|
||||
|
||||
export(INSTALLS)
|
30
filter.cpp
Normal file
|
@ -0,0 +1,30 @@
|
|||
#include "filter.h"
|
||||
#include <QKeyEvent>
|
||||
|
||||
filter::filter(QObject *parent) :
|
||||
QObject(parent)
|
||||
{
|
||||
m_ctrlPressed = true;
|
||||
}
|
||||
|
||||
bool filter::eventFilter(QObject *obj, QEvent *ev) {
|
||||
switch(ev->type()) {
|
||||
case QEvent::KeyPress: {
|
||||
QKeyEvent *ke = static_cast<QKeyEvent*>(ev);
|
||||
if(ke->key() == Qt::Key_Control) {
|
||||
emit ctrlPressed();
|
||||
m_ctrlPressed = true;
|
||||
}
|
||||
} break;
|
||||
case QEvent::KeyRelease: {
|
||||
QKeyEvent *ke = static_cast<QKeyEvent*>(ev);
|
||||
if(ke->key() == Qt::Key_Control) {
|
||||
emit ctrlReleased();
|
||||
m_ctrlPressed = false;
|
||||
}
|
||||
} break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
return QObject::eventFilter(obj, ev);
|
||||
}
|
24
filter.h
Normal file
|
@ -0,0 +1,24 @@
|
|||
#ifndef FILTER_H
|
||||
#define FILTER_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class filter : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
bool m_ctrlPressed;
|
||||
|
||||
public:
|
||||
explicit filter(QObject *parent = 0);
|
||||
|
||||
protected:
|
||||
bool eventFilter(QObject *obj, QEvent *ev);
|
||||
|
||||
signals:
|
||||
void ctrlPressed();
|
||||
void ctrlReleased();
|
||||
};
|
||||
|
||||
#endif // FILTER_H
|
BIN
images/ascSortIndicator.png
Normal file
After Width: | Height: | Size: 288 B |
BIN
images/ascSortIndicatorActived.png
Normal file
After Width: | Height: | Size: 287 B |
BIN
images/ascSortIndicatorPressed.png
Normal file
After Width: | Height: | Size: 288 B |
BIN
images/backToWindowIcon.png
Normal file
After Width: | Height: | Size: 233 B |
BIN
images/backToWindowIconHovered.png
Normal file
After Width: | Height: | Size: 239 B |
BIN
images/closeIcon.png
Normal file
After Width: | Height: | Size: 238 B |
BIN
images/connectedImage.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
images/descSortIndicator.png
Normal file
After Width: | Height: | Size: 301 B |
BIN
images/descSortIndicatorActived.png
Normal file
After Width: | Height: | Size: 301 B |
BIN
images/descSortIndicatorPressed.png
Normal file
After Width: | Height: | Size: 301 B |
BIN
images/disconnectedImage.png
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
images/dropIndicator.png
Normal file
After Width: | Height: | Size: 301 B |
BIN
images/dropdownOption1.png
Normal file
After Width: | Height: | Size: 384 B |
BIN
images/dropdownSearch.png
Normal file
After Width: | Height: | Size: 477 B |
BIN
images/dropdownSend.png
Normal file
After Width: | Height: | Size: 514 B |
BIN
images/helpIcon.png
Normal file
After Width: | Height: | Size: 220 B |
BIN
images/helpIconHovered.png
Normal file
After Width: | Height: | Size: 220 B |
BIN
images/hseparator.png
Normal file
After Width: | Height: | Size: 201 B |
BIN
images/lockIcon.png
Normal file
After Width: | Height: | Size: 337 B |
BIN
images/magnifier.png
Normal file
After Width: | Height: | Size: 560 B |
BIN
images/maximizeIcon.png
Normal file
After Width: | Height: | Size: 212 B |
BIN
images/maximizeIconHovered.png
Normal file
After Width: | Height: | Size: 215 B |
BIN
images/menuIndicator.png
Normal file
After Width: | Height: | Size: 340 B |
BIN
images/minimizeIcon.png
Normal file
After Width: | Height: | Size: 198 B |
BIN
images/minimizeIconHovered.png
Normal file
After Width: | Height: | Size: 198 B |
BIN
images/moneroLogo.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
images/statusConnected.png
Normal file
After Width: | Height: | Size: 428 B |
BIN
images/statusDisconnected.png
Normal file
After Width: | Height: | Size: 406 B |
BIN
images/tableOptions.png
Normal file
After Width: | Height: | Size: 489 B |
BIN
images/tip.png
Normal file
After Width: | Height: | Size: 217 B |
BIN
images/whatIsIcon.png
Normal file
After Width: | Height: | Size: 365 B |
20
main.cpp
Normal file
|
@ -0,0 +1,20 @@
|
|||
#include <QApplication>
|
||||
#include <QQmlApplicationEngine>
|
||||
|
||||
#include "filter.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication app(argc, argv);
|
||||
filter *eventFilter = new filter;
|
||||
app.installEventFilter(eventFilter);
|
||||
|
||||
QQmlApplicationEngine engine;
|
||||
engine.load(QUrl(QStringLiteral("qrc:///main.qml")));
|
||||
QObject *rootObject = engine.rootObjects().first();
|
||||
|
||||
QObject::connect(eventFilter, SIGNAL(ctrlPressed()), rootObject, SLOT(ctrlKeyPressed()));
|
||||
QObject::connect(eventFilter, SIGNAL(ctrlReleased()), rootObject, SLOT(ctrlKeyReleased()));
|
||||
|
||||
return app.exec();
|
||||
}
|
77
main.qml
Normal file
|
@ -0,0 +1,77 @@
|
|||
import QtQuick 2.2
|
||||
import QtQuick.Window 2.0
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Controls.Styles 1.1
|
||||
import "components"
|
||||
|
||||
ApplicationWindow {
|
||||
id: appWindow
|
||||
property bool whatIsEnable: false
|
||||
property bool ctrlPressed: false
|
||||
function ctrlKeyPressed() { ctrlPressed = true; }
|
||||
function ctrlKeyReleased() { ctrlPressed = false; }
|
||||
|
||||
visible: true
|
||||
width: 1269
|
||||
height: 932
|
||||
color: "#FFFFFF"
|
||||
x: (Screen.width - width) / 2
|
||||
y: (Screen.height - height) / 2
|
||||
flags: Qt.FramelessWindowHint | Qt.WindowSystemMenuHint | Qt.Window | Qt.WindowMinimizeButtonHint
|
||||
|
||||
Item {
|
||||
id: rootItem
|
||||
anchors.fill: parent
|
||||
|
||||
MouseArea {
|
||||
property var previousPosition
|
||||
anchors.fill: parent
|
||||
|
||||
onPressed: previousPosition = Qt.point(mouseX, mouseY)
|
||||
onPositionChanged: {
|
||||
if (pressedButtons == Qt.LeftButton) {
|
||||
var dx = mouseX - previousPosition.x
|
||||
var dy = mouseY - previousPosition.y
|
||||
appWindow.x += dx
|
||||
appWindow.y += dy
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LeftPanel {
|
||||
id: leftPanel
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
onDashboardClicked: middlePanel.state = "Dashboard"
|
||||
onHistoryClicked: middlePanel.state = "History"
|
||||
onTransferClicked: middlePanel.state = "Transfer"
|
||||
onAddressBookClicked: middlePanel.state = "AddressBook"
|
||||
onMiningClicked: middlePanel.state = "Minning"
|
||||
onSettingsClicked: middlePanel.state = "Settings"
|
||||
}
|
||||
|
||||
RightPanel {
|
||||
id: rightPanel
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
}
|
||||
|
||||
MiddlePanel {
|
||||
id: middlePanel
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: leftPanel.right
|
||||
anchors.right: rightPanel.left
|
||||
state: "Dashboard"
|
||||
}
|
||||
|
||||
TipItem {
|
||||
id: tipItem
|
||||
text: "send to the same destination"
|
||||
visible: false
|
||||
z: 100
|
||||
}
|
||||
}
|
||||
}
|
5
pages/AddressBook.qml
Normal file
|
@ -0,0 +1,5 @@
|
|||
import QtQuick 2.0
|
||||
|
||||
Rectangle {
|
||||
color: "#000000"
|
||||
}
|
125
pages/Dashboard.qml
Normal file
|
@ -0,0 +1,125 @@
|
|||
import QtQuick 2.0
|
||||
import "../components"
|
||||
|
||||
Rectangle {
|
||||
color: "#F0EEEE"
|
||||
|
||||
SearchInput {
|
||||
id: searchInput
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.margins: 17
|
||||
z: 1
|
||||
}
|
||||
|
||||
Text {
|
||||
id: quickTransferText
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: searchInput.bottom
|
||||
anchors.topMargin: 20
|
||||
elide: Text.ElideRight
|
||||
anchors.margins: 17
|
||||
font.family: "Arial"
|
||||
font.pixelSize: 18
|
||||
color: "#4A4949"
|
||||
text: qsTr("Quick transfer")
|
||||
}
|
||||
|
||||
LineEdit {
|
||||
id: quickTransferLine
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: quickTransferText.bottom
|
||||
anchors.topMargin: 18
|
||||
anchors.leftMargin: 17
|
||||
anchors.rightMargin: 17
|
||||
}
|
||||
|
||||
Row {
|
||||
id: row
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: quickTransferLine.bottom
|
||||
anchors.topMargin: 18
|
||||
anchors.leftMargin: 17
|
||||
anchors.rightMargin: 17
|
||||
spacing: 17
|
||||
|
||||
LineEdit {
|
||||
id: amountLine
|
||||
width: 148
|
||||
placeholderText: "amount..."
|
||||
}
|
||||
|
||||
StandardButton {
|
||||
id: sendButton
|
||||
width: 60
|
||||
text: qsTr("SEND")
|
||||
shadowColor: "#FF4304"
|
||||
releasedColor: "#FF6C3C"
|
||||
pressedColor: "#FF4304"
|
||||
}
|
||||
|
||||
Text {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
font.family: "Arial"
|
||||
font.pixelSize: 12
|
||||
color: "#545454"
|
||||
text: qsTr("lookng for security level and address book? go to <font size='4' color='#FF6C3C'>Transfer</font> tab")
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.top: row.bottom
|
||||
anchors.topMargin: 17
|
||||
color: "#FFFFFF"
|
||||
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
height: 1
|
||||
color: "#DBDBDB"
|
||||
}
|
||||
|
||||
TableHeader {
|
||||
id: header
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 17
|
||||
anchors.leftMargin: 14
|
||||
anchors.rightMargin: 14
|
||||
onSortRequest: console.log("column: " + column + " desc: " + desc)
|
||||
}
|
||||
|
||||
ListModel {
|
||||
id: testModel
|
||||
ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; date: "Jan 12, 2014 12:23 <font size='2'>AM</font>"; amount: "19301.<font size='2'>870709159241</font>"; balance: "0.<font size='2'>000709159241</font>"; out: false }
|
||||
ListElement { paymentId: "Martin"; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; date: "Jan 12, 2014 12:23 <font size='2'>AM</font>"; amount: "19301.<font size='2'>870709159241</font>"; balance: "0.<font size='2'>000709159241</font>"; out: true }
|
||||
ListElement { paymentId: "Martin"; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; date: "Jan 12, 2014 12:23 <font size='2'>AM</font>"; amount: "19301.<font size='2'>870709159241</font>"; balance: "0.<font size='2'>000709159241</font>"; out: true }
|
||||
ListElement { paymentId: ""; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; date: "Jan 12, 2014 12:23 <font size='2'>AM</font>"; amount: "19301.<font size='2'>870709159241</font>"; balance: "0.<font size='2'>000709159241</font>"; out: false }
|
||||
ListElement { paymentId: ""; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; date: "Jan 12, 2014 12:23 <font size='2'>AM</font>"; amount: "19301.<font size='2'>870709159241</font>"; balance: "0.<font size='2'>000709159241</font>"; out: false }
|
||||
ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; date: "Jan 12, 2014 12:23 <font size='2'>AM</font>"; amount: "19301.<font size='2'>870709159241</font>"; balance: "0.<font size='2'>000709159241</font>"; out: false }
|
||||
ListElement { paymentId: ""; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; date: "Jan 12, 2014 12:23 <font size='2'>AM</font>"; amount: "19301.<font size='2'>870709159241</font>"; balance: "0.<font size='2'>000709159241</font>"; out: false }
|
||||
ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; date: "Jan 12, 2014 12:23 <font size='2'>AM</font>"; amount: "19301.<font size='2'>870709159241</font>"; balance: "0.<font size='2'>000709159241</font>"; out: false }
|
||||
ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; date: "Jan 12, 2014 12:23 <font size='2'>AM</font>"; amount: "19301.<font size='2'>870709159241</font>"; balance: "0.<font size='2'>000709159241</font>"; out: false }
|
||||
ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; date: "Jan 12, 2014 12:23 <font size='2'>AM</font>"; amount: "19301.<font size='2'>870709159241</font>"; balance: "0.<font size='2'>000709159241</font>"; out: false }
|
||||
}
|
||||
|
||||
DashboardTable {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: header.bottom
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.leftMargin: 14
|
||||
anchors.rightMargin: 14
|
||||
model: testModel
|
||||
}
|
||||
}
|
||||
}
|
5
pages/History.qml
Normal file
|
@ -0,0 +1,5 @@
|
|||
import QtQuick 2.0
|
||||
|
||||
Rectangle {
|
||||
color: "#00FF00"
|
||||
}
|
6
pages/Mining.qml
Normal file
|
@ -0,0 +1,6 @@
|
|||
import QtQuick 2.0
|
||||
|
||||
Rectangle {
|
||||
width: 100
|
||||
height: 62
|
||||
}
|
6
pages/Settings.qml
Normal file
|
@ -0,0 +1,6 @@
|
|||
import QtQuick 2.0
|
||||
|
||||
Rectangle {
|
||||
width: 100
|
||||
height: 62
|
||||
}
|
5
pages/Transfer.qml
Normal file
|
@ -0,0 +1,5 @@
|
|||
import QtQuick 2.0
|
||||
|
||||
Rectangle {
|
||||
color: "#0000FF"
|
||||
}
|
57
qml.qrc
Normal file
|
@ -0,0 +1,57 @@
|
|||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>main.qml</file>
|
||||
<file>LeftPanel.qml</file>
|
||||
<file>RightPanel.qml</file>
|
||||
<file>MiddlePanel.qml</file>
|
||||
<file>images/closeIcon.png</file>
|
||||
<file>images/helpIcon.png</file>
|
||||
<file>images/maximizeIcon.png</file>
|
||||
<file>images/minimizeIcon.png</file>
|
||||
<file>images/helpIconHovered.png</file>
|
||||
<file>images/maximizeIconHovered.png</file>
|
||||
<file>images/minimizeIconHovered.png</file>
|
||||
<file>images/moneroLogo.png</file>
|
||||
<file>components/Label.qml</file>
|
||||
<file>images/whatIsIcon.png</file>
|
||||
<file>images/lockIcon.png</file>
|
||||
<file>components/MenuButton.qml</file>
|
||||
<file>images/menuIndicator.png</file>
|
||||
<file>pages/Dashboard.qml</file>
|
||||
<file>pages/Transfer.qml</file>
|
||||
<file>pages/History.qml</file>
|
||||
<file>pages/AddressBook.qml</file>
|
||||
<file>pages/Mining.qml</file>
|
||||
<file>pages/Settings.qml</file>
|
||||
<file>components/NetworkStatusItem.qml</file>
|
||||
<file>images/statusConnected.png</file>
|
||||
<file>images/statusDisconnected.png</file>
|
||||
<file>components/Input.qml</file>
|
||||
<file>components/SearchInput.qml</file>
|
||||
<file>images/magnifier.png</file>
|
||||
<file>components/StandardButton.qml</file>
|
||||
<file>images/dropIndicator.png</file>
|
||||
<file>images/hseparator.png</file>
|
||||
<file>components/LineEdit.qml</file>
|
||||
<file>components/TableHeader.qml</file>
|
||||
<file>images/ascSortIndicator.png</file>
|
||||
<file>images/ascSortIndicatorActived.png</file>
|
||||
<file>images/ascSortIndicatorPressed.png</file>
|
||||
<file>images/descSortIndicator.png</file>
|
||||
<file>images/descSortIndicatorActived.png</file>
|
||||
<file>images/descSortIndicatorPressed.png</file>
|
||||
<file>images/backToWindowIcon.png</file>
|
||||
<file>images/backToWindowIconHovered.png</file>
|
||||
<file>components/DashboardTable.qml</file>
|
||||
<file>components/TableDropdown.qml</file>
|
||||
<file>images/tableOptions.png</file>
|
||||
<file>images/dropdownOption1.png</file>
|
||||
<file>images/dropdownSearch.png</file>
|
||||
<file>images/dropdownSend.png</file>
|
||||
<file>components/TipItem.qml</file>
|
||||
<file>images/tip.png</file>
|
||||
<file>tabs/Twitter.qml</file>
|
||||
<file>tabs/tweetSearch.js</file>
|
||||
<file>tabs/TweetsModel.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
88
tabs/TweetsModel.qml
Normal file
|
@ -0,0 +1,88 @@
|
|||
import QtQuick 2.2
|
||||
import "tweetSearch.js" as Helper
|
||||
|
||||
Item {
|
||||
id: wrapper
|
||||
|
||||
// Insert valid consumer key and secret tokens below
|
||||
// See https://dev.twitter.com/apps
|
||||
//! [auth tokens]
|
||||
property string tweetsMaxCount: "20"
|
||||
property string consumerKey : ""
|
||||
property string consumerSecret : ""
|
||||
//! [auth tokens]
|
||||
property string bearerToken : ""
|
||||
|
||||
property variant model: tweets
|
||||
property string from : ""
|
||||
property string phrase : ""
|
||||
|
||||
property int status: XMLHttpRequest.UNSENT
|
||||
property bool isLoading: status === XMLHttpRequest.LOADING
|
||||
property bool wasLoading: false
|
||||
signal isLoaded
|
||||
|
||||
ListModel { id: tweets }
|
||||
|
||||
function encodePhrase(x) { return encodeURIComponent(x); }
|
||||
|
||||
function reload() {
|
||||
tweets.clear()
|
||||
|
||||
if (from == "" && phrase == "")
|
||||
return;
|
||||
|
||||
//! [requesting]
|
||||
var req = new XMLHttpRequest;
|
||||
req.open("GET", "https://api.twitter.com/1.1/search/tweets.json?from=" + from +
|
||||
"&count=" + tweetsMaxCount + "&q=" + encodePhrase(phrase));
|
||||
req.setRequestHeader("Authorization", "Bearer " + bearerToken);
|
||||
req.onreadystatechange = function() {
|
||||
status = req.readyState;
|
||||
if (status === XMLHttpRequest.DONE) {
|
||||
var objectArray = JSON.parse(req.responseText);
|
||||
if (objectArray.errors !== undefined)
|
||||
console.log("Error fetching tweets: " + objectArray.errors[0].message)
|
||||
else {
|
||||
for (var key in objectArray.statuses) {
|
||||
var jsonObject = objectArray.statuses[key];
|
||||
tweets.append(jsonObject);
|
||||
}
|
||||
}
|
||||
if (wasLoading == true)
|
||||
wrapper.isLoaded()
|
||||
}
|
||||
wasLoading = (status === XMLHttpRequest.LOADING);
|
||||
}
|
||||
req.send();
|
||||
//! [requesting]
|
||||
}
|
||||
|
||||
|
||||
Component.onCompleted: {
|
||||
if (consumerKey === "" || consumerSecret == "") {
|
||||
console.log("setting demo token")
|
||||
bearerToken = encodeURIComponent(Helper.demoToken())
|
||||
tweetsModel.phrase = ""
|
||||
tweetsModel.from = "@monerocurrency"
|
||||
reload()
|
||||
return;
|
||||
}
|
||||
|
||||
var authReq = new XMLHttpRequest;
|
||||
authReq.open("POST", "https://api.twitter.com/oauth2/token");
|
||||
authReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8");
|
||||
authReq.setRequestHeader("Authorization", "Basic " + Qt.btoa(consumerKey + ":" + consumerSecret));
|
||||
authReq.onreadystatechange = function() {
|
||||
if (authReq.readyState === XMLHttpRequest.DONE) {
|
||||
var jsonResponse = JSON.parse(authReq.responseText);
|
||||
if (jsonResponse.errors !== undefined)
|
||||
console.log("Authentication error: " + jsonResponse.errors[0].message)
|
||||
else
|
||||
bearerToken = jsonResponse.access_token;
|
||||
}
|
||||
}
|
||||
authReq.send("grant_type=client_credentials");
|
||||
}
|
||||
|
||||
}
|
124
tabs/Twitter.qml
Normal file
|
@ -0,0 +1,124 @@
|
|||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.2
|
||||
import "tweetSearch.js" as Helper
|
||||
|
||||
Item {
|
||||
id: tab
|
||||
ListModel {
|
||||
id: testModel
|
||||
ListElement { head: "Monero || #xmr"; foot: "<b>@btcplanet</b> Duis turpis arcu, varius nec rutrum in, adipiscing at enim. Donec quis consequat ipsum," }
|
||||
ListElement { head: "Monero || #xmr"; foot: "<b>@btcplanet</b> Duis turpis arcu, varius nec rutrum in, adipiscing at enim. Donec quis consequat ipsum," }
|
||||
ListElement { head: "Monero || #xmr"; foot: "<b>@btcplanet</b> Duis turpis arcu, varius nec rutrum in, adipiscing at enim. Donec quis consequat ipsum," }
|
||||
ListElement { head: "Monero || #xmr"; foot: "<b>@btcplanet</b> Duis turpis arcu, varius nec rutrum in, adipiscing at enim. Donec quis consequat ipsum," }
|
||||
ListElement { head: "Monero || #xmr"; foot: "<b>@btcplanet</b> Duis turpis arcu, varius nec rutrum in, adipiscing at enim. Donec quis consequat ipsum," }
|
||||
ListElement { head: "Monero || #xmr"; foot: "<b>@btcplanet</b> Duis turpis arcu, varius nec rutrum in, adipiscing at enim. Donec quis consequat ipsum," }
|
||||
ListElement { head: "Monero || #xmr"; foot: "<b>@btcplanet</b> Duis turpis arcu, varius nec rutrum in, adipiscing at enim. Donec quis consequat ipsum," }
|
||||
ListElement { head: "Monero || #xmr"; foot: "<b>@btcplanet</b> Duis turpis arcu, varius nec rutrum in, adipiscing at enim. Donec quis consequat ipsum," }
|
||||
ListElement { head: "Monero || #xmr"; foot: "<b>@btcplanet</b> Duis turpis arcu, varius nec rutrum in, adipiscing at enim. Donec quis consequat ipsum," }
|
||||
ListElement { head: "Monero || #xmr"; foot: "<b>@btcplanet</b> Duis turpis arcu, varius nec rutrum in, adipiscing at enim. Donec quis consequat ipsum," }
|
||||
ListElement { head: "Monero || #xmr"; foot: "<b>@btcplanet</b> Duis turpis arcu, varius nec rutrum in, adipiscing at enim. Donec quis consequat ipsum," }
|
||||
ListElement { head: "Monero || #xmr"; foot: "<b>@btcplanet</b> Duis turpis arcu, varius nec rutrum in, adipiscing at enim. Donec quis consequat ipsum," }
|
||||
}
|
||||
|
||||
property int inAnimDur: 250
|
||||
property int counter: 0
|
||||
property alias isLoading: tweetsModel.isLoading
|
||||
property var idx
|
||||
property var ids
|
||||
|
||||
Component.onCompleted: {
|
||||
ids = new Array()
|
||||
}
|
||||
|
||||
function idInModel(id) {
|
||||
for (var j = 0; j < ids.length; j++)
|
||||
if (ids[j] === id)
|
||||
return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
TweetsModel {
|
||||
id: tweetsModel
|
||||
onIsLoaded: {
|
||||
console.debug("Reload")
|
||||
idx = new Array()
|
||||
for (var i = 0; i < tweetsModel.model.count; i++) {
|
||||
var id = tweetsModel.model.get(i).id
|
||||
if (!idInModel(id))
|
||||
idx.push(i)
|
||||
}
|
||||
console.debug(idx.length + " new tweets")
|
||||
tab.counter = idx.length
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: timer
|
||||
interval: 1; running: tab.counter; repeat: true
|
||||
onTriggered: {
|
||||
tab.counter--;
|
||||
var id = tweetsModel.model.get(idx[tab.counter]).id
|
||||
var item = tweetsModel.model.get(tab.counter)
|
||||
listView.add({ "statusText": item.text,
|
||||
"twitterName": item.user.screen_name,
|
||||
"name" : item.user.name,
|
||||
"userImage": item.user.profile_image_url,
|
||||
"source": item.source,
|
||||
"id": id,
|
||||
"uri": Helper.insertLinks(item.user.url, item.user.entities),
|
||||
"published": item.created_at });
|
||||
console.log(item.created_at)
|
||||
ids.push(id)
|
||||
}
|
||||
}
|
||||
|
||||
ListView {
|
||||
id: listView
|
||||
model: ListModel { id: finalModel }
|
||||
anchors.fill: parent
|
||||
clip: true
|
||||
boundsBehavior: ListView.StopAtBounds
|
||||
|
||||
function add(obj) { model.insert(0, obj) }
|
||||
delegate: Rectangle {
|
||||
height: 98
|
||||
width: listView.width
|
||||
|
||||
Text {
|
||||
id: headerText
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 16
|
||||
elide: Text.ElideRight
|
||||
font.family: "Arial"
|
||||
font.pixelSize: 18
|
||||
color: "#000000"
|
||||
text: model.name
|
||||
}
|
||||
|
||||
Text {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: headerText.bottom
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.topMargin: 10
|
||||
anchors.bottomMargin: 10
|
||||
wrapMode: Text.Wrap
|
||||
elide: Text.ElideRight
|
||||
font.family: "Arial"
|
||||
font.pixelSize: 12
|
||||
color: "#535353"
|
||||
text: model.statusText
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
height: 1
|
||||
color: "#DBDBDB"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
83
tabs/tweetSearch.js
Normal file
|
@ -0,0 +1,83 @@
|
|||
.pragma library
|
||||
|
||||
function formatDate(date) {
|
||||
var da = new Date(date)
|
||||
return da.toDateString()
|
||||
}
|
||||
|
||||
function demoToken() {
|
||||
var a = new Array(22).join('A')
|
||||
return a + String.fromCharCode(0x44, 0x69, 0x4a, 0x52, 0x51, 0x41, 0x41, 0x41, 0x41,
|
||||
0x41, 0x41, 0x74, 0x2b, 0x72, 0x6a, 0x6c, 0x2b, 0x71,
|
||||
0x6d, 0x7a, 0x30, 0x72, 0x63, 0x79, 0x2b, 0x42, 0x62,
|
||||
0x75, 0x58, 0x42, 0x42, 0x73, 0x72, 0x55, 0x48, 0x47,
|
||||
0x45, 0x67, 0x3d, 0x71, 0x30, 0x45, 0x4b, 0x32, 0x61,
|
||||
0x57, 0x71, 0x51, 0x4d, 0x62, 0x31, 0x35, 0x67, 0x43,
|
||||
0x5a, 0x4e, 0x77, 0x5a, 0x6f, 0x39, 0x79, 0x71, 0x61,
|
||||
0x65, 0x30, 0x68, 0x70, 0x65, 0x32, 0x46, 0x44, 0x73,
|
||||
0x53, 0x39, 0x32, 0x57, 0x41, 0x75, 0x30, 0x67)
|
||||
}
|
||||
|
||||
function linkForEntity(entity) {
|
||||
return (entity.url ? entity.url :
|
||||
(entity.screen_name ? 'https://twitter.com/' + entity.screen_name :
|
||||
'https://twitter.com/search?q=%23' + entity.text))
|
||||
}
|
||||
|
||||
function textForEntity(entity) {
|
||||
return (entity.display_url ? entity.display_url :
|
||||
(entity.screen_name ? entity.screen_name : entity.text))
|
||||
}
|
||||
|
||||
function insertLinks(text, entities) {
|
||||
if (typeof text !== 'string')
|
||||
return "";
|
||||
|
||||
if (!entities)
|
||||
return text;
|
||||
|
||||
// Add all links (urls, usernames and hashtags) to an array and sort them in
|
||||
// descending order of appearance in text
|
||||
var links = []
|
||||
if (entities.urls)
|
||||
links = entities.urls.concat(entities.hashtags, entities.user_mentions)
|
||||
else if (entities.url)
|
||||
links = entities.url.urls
|
||||
|
||||
links.sort(function(a, b) { return b.indices[0] - a.indices[0] })
|
||||
|
||||
for (var i = 0; i < links.length; i++) {
|
||||
var offset = links[i].url ? 0 : 1
|
||||
text = text.substring(0, links[i].indices[0] + offset) +
|
||||
'<a href=\"' + linkForEntity(links[i]) + '\">' +
|
||||
textForEntity(links[i]) + '</a>' +
|
||||
text.substring(links[i].indices[1])
|
||||
}
|
||||
return text.replace(/\n/g, '<br>');
|
||||
}
|
||||
|
||||
function boldLinks(text, entities) {
|
||||
if (typeof text !== 'string')
|
||||
return "";
|
||||
|
||||
if (!entities)
|
||||
return text;
|
||||
|
||||
// Add all links (urls, usernames and hashtags) to an array and sort them in
|
||||
// descending order of appearance in text
|
||||
var links = []
|
||||
if (entities.urls)
|
||||
links = entities.urls.concat(entities.hashtags, entities.user_mentions)
|
||||
else if (entities.url)
|
||||
links = entities.url.urls
|
||||
|
||||
links.sort(function(a, b) { return b.indices[0] - a.indices[0] })
|
||||
|
||||
for (var i = 0; i < links.length; i++) {
|
||||
var offset = links[i].url ? 0 : 1
|
||||
text = text.substring(0, links[i].indices[0] + offset) +
|
||||
'<b>' + textForEntity(links[i]) + '</b>' +
|
||||
text.substring(links[i].indices[1])
|
||||
}
|
||||
return text.replace(/\n/g, '<br>');
|
||||
}
|