feat(CPP): Saved addresses section

This commit is contained in:
MishkaRogachev 2022-09-05 19:22:18 +04:00 committed by Mikhail Rogachev
parent abb2254e59
commit 89bd073eed
5 changed files with 52 additions and 1 deletions

View File

@ -23,6 +23,7 @@ qt6_add_qml_module(Wallet
qml/Status/Wallet/AssetView.qml qml/Status/Wallet/AssetView.qml
qml/Status/Wallet/WalletContentView.qml qml/Status/Wallet/WalletContentView.qml
qml/Status/Wallet/WalletView.qml qml/Status/Wallet/WalletView.qml
qml/Status/Wallet/SavedAddressesView.qml
# Required to suppress "qmllint may not work" warning # Required to suppress "qmllint may not work" warning
OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Status/Wallet/ OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Status/Wallet/
@ -79,4 +80,6 @@ target_sources(Wallet
src/WalletAsset.cpp src/WalletAsset.cpp
include/Status/Wallet/WalletController.h include/Status/Wallet/WalletController.h
src/WalletController.cpp src/WalletController.cpp
include/Status/Wallet/SavedAddressesController.h
src/SavedAddressesController.cpp
) )

View File

@ -0,0 +1,18 @@
#pragma once
#include <QtQmlIntegration>
namespace Status::Wallet
{
class SavedAddressesController : public QObject
{
Q_OBJECT
QML_ELEMENT
QML_UNCREATABLE("C++ only")
public:
SavedAddressesController(QObject* parent = nullptr);
};
} // namespace Status::Wallet

View File

@ -0,0 +1,11 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Status.Wallet
import Status.Containers
Item {
id: root
}

View File

@ -22,7 +22,7 @@ Item {
} }
TabBar { TabBar {
id: tabBar id: tabBar
width: parent.width Layout.fillWidth: true
TabButton { TabButton {
text: qsTr("Assets") text: qsTr("Assets")
@ -30,6 +30,9 @@ Item {
TabButton { TabButton {
text: qsTr("Positions") text: qsTr("Positions")
} }
TabButton {
text: qsTr("Saved Addresses")
}
} }
SwipeView { SwipeView {
@ -69,6 +72,13 @@ Item {
} }
} }
} }
Loader {
active: SwipeView.isCurrentItem
sourceComponent: SavedAddressesView {
}
}
} }
} }
} }

View File

@ -0,0 +1,9 @@
#include "Status/Wallet/SavedAddressesController.h"
namespace Status::Wallet
{
SavedAddressesController::SavedAddressesController(QObject* parent)
: QObject(parent)
{ }
} // namespace Status::Wallet