Skip to content

Commit

Permalink
Fixed conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
durkmurder committed Nov 2, 2018
2 parents 4e96802 + d62c2c5 commit 0b73153
Show file tree
Hide file tree
Showing 36 changed files with 1,060 additions and 95 deletions.
2 changes: 2 additions & 0 deletions src/app/QMLUtils.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "QMLUtils.hpp"
#include <Models/WalletTransactionsListModel.hpp>
#include <Models/WalletAssetsListModel.hpp>
#include <Models/AssetsListProxyModel.hpp>
#include <ViewModels/WalletAssetViewModel.hpp>
#include <ViewModels/ApplicationViewModel.hpp>
#include <ViewModels/EmulatorViewModel.hpp>
Expand Down Expand Up @@ -75,6 +76,7 @@ void QMLUtils::RegisterViewModels(const char *uri, int versionMinor, int version
void QMLUtils::RegisterModels(const char *uri, int versionMinor, int versionMajor)
{
QML_REGISTER_TYPE_HELPER(WalletAssetsListModel);
QML_REGISTER_TYPE_HELPER(AssetsListProxyModel);
}

//==============================================================================
Expand Down
1 change: 0 additions & 1 deletion src/app/qml/Components/CustomizedComboBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import QtQuick.Controls 2.1
ComboBox {
id: control
font.pixelSize: 14

delegate: ItemDelegate {
width: control.width
contentItem: XSNLabel {
Expand Down
4 changes: 1 addition & 3 deletions src/app/qml/Pages/MainPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,9 @@ Page {
}
}

XSNLabel {
SettingsPage {
Layout.fillHeight: true
Layout.fillWidth: true
text: "Settings"
color: "white"
}
// TransactionPage {
// Layout.fillHeight: true
Expand Down
3 changes: 3 additions & 0 deletions src/app/qml/Pages/PortfolioPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import com.xsn.models 1.0

Page {
id: root
property string accountBalance: portofiloWalletsListView.accountBalance

background: Rectangle {
anchors.fill: parent
Expand All @@ -28,9 +29,11 @@ Page {
mainHeader: "Statistics"
buttonsVisible: false
coinSymbol: "usd"
accountBalance: root.accountBalance
}

PortofiloWalletsListView {
id: portofiloWalletsListView
Layout.fillWidth: true
Layout.fillHeight: true
}
Expand Down
59 changes: 59 additions & 0 deletions src/app/qml/Pages/SettingsPage.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import QtQuick 2.0
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0

import "../Views"
import "../Components"
import "../Popups"

import com.xsn.viewmodels 1.0
import com.xsn.models 1.0

Page {
id: root
background: Rectangle {
color: "transparent"
}

ColumnLayout {
anchors.fill: parent

anchors.leftMargin: 30
anchors.rightMargin: 30
anchors.bottomMargin: 30
spacing: 35

Item {
Layout.fillWidth: true
Layout.preferredHeight: 45

LinearGradient {
id: background
anchors.fill: parent
start: Qt.point(0, 0)
end: Qt.point(width, 0)
gradient: Gradient {
GradientStop { position: 1.0; color: "transparent" }
GradientStop { position: 0.0; color: "#0D1E3D"}
}
}

SettingsHeader {
id: settingsHeader
}
}

SettingsView {
Layout.fillWidth: true
Layout.fillHeight: true
currentIndex: settingsHeader.actualIndex

Rectangle {
anchors.fill: parent
color: "red"
}
}
}
}

11 changes: 6 additions & 5 deletions src/app/qml/Pages/WalletPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Page {
property string currentAssetName: assetsListView.currentItem ? assetsListView.currentItem.name : ""
property string currentAssetColor: assetsListView.currentItem ? assetsListView.currentItem.color : ""
property string currentAssetSymbol: assetsListView.currentItem ? assetsListView.currentItem.symbol : ""
property var currentBalance: assetsListView.currentItem ? assetsListView.currentItem.balance : undefined
property var currentUsdBalance: assetsListView.currentItem ? assetsListView.currentItem.usdBalance : undefined

background: Rectangle {
color: "transparent"
Expand Down Expand Up @@ -63,22 +65,21 @@ Page {
Component.onCompleted: initialize(ApplicationViewModel)

onModelReset: {
assetsListView.currentIndex = 0;
assetsListView.currentIndex = assetsListView.actualIndex;
}
}
}
}

}
WalletPageHeaderView {
//Layout.fillHeight: true
Layout.fillWidth: true

Layout.preferredHeight: headerViewHeightSmallMode/*windowWidth > windowWidthSmallMode ? (width > windowWidthLargeMode ? headerViewHeightLargeMode : headerViewHeightMediumMode)
: headerViewHeightSmallMode*/
Layout.preferredHeight: headerViewHeightSmallMode
coinMeasure: currentAssetName
labelColor: currentAssetColor
coinSymbol: currentAssetSymbol
balance: currentBalance
usdBalance: currentUsdBalance
windowWidth: root.windowWidth

onSendCoins: {
Expand Down
30 changes: 30 additions & 0 deletions src/app/qml/Views/LocalizationView.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import QtQuick 2.0
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3

import "../Components"

ColumnLayout {
spacing: 40

Column {
Layout.fillWidth: true
Layout.preferredHeight: 50

XSNLabel {
text: "Currency"
font.pixelSize: 25
}

XSNLabel {
text: "Set your preferred local currency"
font.pixelSize: 15
}

ComboBox {
Layout.fillWidth: true
Layout.fillHeight: true
model: ["Japanese", "South Korean", "United States"]
}
}
}
3 changes: 2 additions & 1 deletion src/app/qml/Views/PageHeaderView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ColumnLayout {
property string coinSymbol : ""
property int windowWidth: 0
property bool buttonsVisible: false
property string accountBalance: ""

RowLayout {
Layout.fillWidth: true
Expand Down Expand Up @@ -71,7 +72,7 @@ ColumnLayout {

XSNLabel {
id: coinsAmount
text: "73 612.12"
text: accountBalance
}

XSNLabel {
Expand Down
37 changes: 27 additions & 10 deletions src/app/qml/Views/PortofiloWalletsListView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import com.xsn.viewmodels 1.0
import com.xsn.models 1.0

ColumnLayout {
id: root
property string accountBalance: walletsListModel.model.accountBalance !== undefined ? walletsListModel.model.accountBalance.toString() : ""

RowLayout {
Layout.fillWidth: true
Expand Down Expand Up @@ -37,12 +39,16 @@ ColumnLayout {
color: "#8C9CD4"
}

TextArea {
TextField {
id: searchArea
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: 14
color: "#8C9CD4"
placeholderText: "Search wallet or coin"
font.pixelSize: 15
placeholderText: "Search wallet"

FontLoader { id: localFont; source: "qrc:/Rubik-Regular.ttf" }
font.family: localFont.name

color: "#8C9CD4"
background: Rectangle {
color: "transparent"
}
Expand All @@ -65,15 +71,15 @@ ColumnLayout {
}

CustomizedComboBox {
id: comboBox
anchors.verticalCenter: parent.verticalCenter
model: ["Balance", "Portfolio"]
model: ["Currency", "Balance"]
}
}
}

ColumnLayout {
Layout.fillHeight: true

Layout.fillWidth: true

WalletsListHeaderView {
Expand All @@ -82,18 +88,29 @@ ColumnLayout {
}

WalletsListView {
id: walletsListModel
Layout.fillHeight: true
Layout.fillWidth: true
model: WalletAssetsListModel {
Component.onCompleted: initialize(ApplicationViewModel)
}

onSendCoinsRequested: {
openSendDialog();
}
onReceiveCoinsRequested: {
openReceiveDialog();
}

AssetsListProxyModel {
id: assetListProxyModel

source: WalletAssetsListModel {
Component.onCompleted: initialize(ApplicationViewModel)
}
sortRole: comboBox.currentText === "Balance" ? "balance" : "name"
filterString: searchArea.text
filterCaseSensitivity: Qt.CaseInsensitive
sortCaseSensitivity: Qt.CaseInsensitive
}

model: assetListProxyModel
}
}
}
56 changes: 56 additions & 0 deletions src/app/qml/Views/SettingsHeader.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import QtQuick 2.0
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0

import "../Components"

ListView {
id: listView

model: ["Assets", "Localization", "Skins"]
property int actualIndex: 0

anchors.leftMargin: 10
anchors.rightMargin: 10
anchors.fill: parent
clip: true

highlight: Item {
Rectangle {
id: highlightItem
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
width: 100
height: 3
color: "grey"
}
}

orientation: ListView.Horizontal
highlightFollowsCurrentItem: true
spacing: 15

delegate: Item {
id: asset
height: parent.height
width: 110

XSNLabel {
anchors.centerIn: parent
id: assetsName
text: modelData
font.pixelSize: 15
color: asset.ListView.isCurrentItem ? "grey" : mouseArea.containsMouse ? "white" : "#6B78A6"
}

MouseArea {
id: mouseArea
anchors.fill: parent
hoverEnabled: true
onClicked: {
listView.actualIndex = index;
listView.currentIndex = index;
}
}
}
}
40 changes: 40 additions & 0 deletions src/app/qml/Views/SettingsView.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import QtQuick 2.0
import QtQuick.Controls 2.3
import QtQuick.Layouts 1.3

import "../Components"

StackLayout {
anchors.leftMargin: 10

Item {
Layout.fillHeight: true
Layout.fillWidth: true
Layout.alignment: Qt.AlignCenter

XSNLabel {
anchors.centerIn: parent
text: "Coming soon"
color: "white"
font.pixelSize: 20
}
}

LocalizationView {
Layout.fillHeight: true
Layout.fillWidth: true
}

Item {
Layout.fillHeight: true
Layout.fillWidth: true
Layout.alignment: Qt.AlignCenter

XSNLabel {
anchors.centerIn: parent
text: "Coming soon"
color: "white"
font.pixelSize: 20
}
}
}
Loading

0 comments on commit 0b73153

Please sign in to comment.