From 59d16a1d126e26a48ae1784d55b9d96f4f53ad53 Mon Sep 17 00:00:00 2001 From: felixrojauro Date: Fri, 27 Nov 2015 15:43:53 +0100 Subject: [PATCH] Exchanges widget --- casinocoin-qt.pro | 407 +++++------ src/qt/bitcoin.qrc | 3 + src/qt/forms/infopage.ui | 664 ++++-------------- src/qt/infopage.cpp | 14 +- src/qt/infopage.h | 4 + .../cpp/guiexchangescontrol.cpp | 41 ++ .../cpp/guiexchangescontrol.h | 31 + .../cpp/guiexchangeslistview.cpp | 50 ++ .../cpp/guiexchangeslistview.h | 35 + .../cpp/guiexchangeswidget.cpp | 104 +++ .../qtquick_controls/cpp/guiexchangeswidget.h | 39 + .../cpp/qmlexchangeslistitem.cpp | 57 ++ .../cpp/qmlexchangeslistitem.h | 47 ++ .../cpp/qmlexchangeslistmodel.cpp | 30 + .../cpp/qmlexchangeslistmodel.h | 26 + .../qml/QmlGUIExchangesControl.qml | 32 + .../qml/QmlGUIExchangesListView.qml | 164 +++++ .../qml/QmlGUIExchangesWindow.qml | 14 + 18 files changed, 1024 insertions(+), 738 deletions(-) create mode 100644 src/qt/qtquick_controls/cpp/guiexchangescontrol.cpp create mode 100644 src/qt/qtquick_controls/cpp/guiexchangescontrol.h create mode 100644 src/qt/qtquick_controls/cpp/guiexchangeslistview.cpp create mode 100644 src/qt/qtquick_controls/cpp/guiexchangeslistview.h create mode 100644 src/qt/qtquick_controls/cpp/guiexchangeswidget.cpp create mode 100644 src/qt/qtquick_controls/cpp/guiexchangeswidget.h create mode 100644 src/qt/qtquick_controls/cpp/qmlexchangeslistitem.cpp create mode 100644 src/qt/qtquick_controls/cpp/qmlexchangeslistitem.h create mode 100644 src/qt/qtquick_controls/cpp/qmlexchangeslistmodel.cpp create mode 100644 src/qt/qtquick_controls/cpp/qmlexchangeslistmodel.h create mode 100644 src/qt/qtquick_controls/qml/QmlGUIExchangesControl.qml create mode 100644 src/qt/qtquick_controls/qml/QmlGUIExchangesListView.qml create mode 100644 src/qt/qtquick_controls/qml/QmlGUIExchangesWindow.qml diff --git a/casinocoin-qt.pro b/casinocoin-qt.pro index 727161d..4728e6c 100644 --- a/casinocoin-qt.pro +++ b/casinocoin-qt.pro @@ -177,212 +177,222 @@ QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wextra -Wformat -Wform # Input DEPENDPATH += src src/json src/qt HEADERS += src/qt/bitcoingui.h \ - src/qt/transactiontablemodel.h \ - src/qt/addresstablemodel.h \ - src/qt/optionsdialog.h \ - src/qt/sendcoinsdialog.h \ - src/qt/coincontroldialog.h \ - src/qt/coincontroltreewidget.h \ - src/qt/addressbookpage.h \ - src/qt/signverifymessagedialog.h \ - src/qt/aboutdialog.h \ - src/qt/editaddressdialog.h \ - src/qt/bitcoinaddressvalidator.h \ - src/alert.h \ - src/addrman.h \ - src/base58.h \ - src/bignum.h \ - src/checkpoints.h \ - src/coincontrol.h \ - src/compat.h \ - src/sync.h \ - src/util.h \ - src/hash.h \ - src/uint256.h \ - src/serialize.h \ - src/main.h \ - src/net.h \ - src/key.h \ - src/db.h \ - src/walletdb.h \ - src/script.h \ - src/init.h \ - src/bloom.h \ - src/mruset.h \ - src/checkqueue.h \ - src/json/json_spirit_writer_template.h \ - src/json/json_spirit_writer.h \ - src/json/json_spirit_value.h \ - src/json/json_spirit_utils.h \ - src/json/json_spirit_stream_reader.h \ - src/json/json_spirit_reader_template.h \ - src/json/json_spirit_reader.h \ - src/json/json_spirit_error_position.h \ - src/json/json_spirit.h \ - src/qt/clientmodel.h \ - src/qt/guiutil.h \ - src/qt/transactionrecord.h \ - src/qt/guiconstants.h \ - src/qt/optionsmodel.h \ - src/qt/monitoreddatamapper.h \ - src/qt/transactiondesc.h \ - src/qt/transactiondescdialog.h \ - src/qt/bitcoinamountfield.h \ - src/wallet.h \ - src/keystore.h \ - src/qt/transactionfilterproxy.h \ - src/qt/transactionview.h \ - src/qt/walletmodel.h \ - src/qt/walletview.h \ - src/qt/walletstack.h \ - src/qt/walletframe.h \ - src/bitcoinrpc.h \ - src/qt/overviewpage.h \ - src/qt/csvmodelwriter.h \ - src/crypter.h \ - src/qt/sendcoinsentry.h \ - src/qt/qvalidatedlineedit.h \ - src/qt/bitcoinunits.h \ - src/qt/qvaluecombobox.h \ - src/qt/askpassphrasedialog.h \ - src/protocol.h \ - src/qt/notificator.h \ - src/qt/paymentserver.h \ - src/allocators.h \ - src/ui_interface.h \ - src/qt/rpcconsole.h \ - src/scrypt.h \ - src/version.h \ - src/netbase.h \ - src/clientversion.h \ - src/txdb.h \ - src/leveldb.h \ - src/threadsafety.h \ - src/limitedmap.h \ - src/qt/macnotificationhandler.h \ - src/qt/splashscreen.h \ - src/qt/CSCPublicAPI/casinocoinwebapi.h \ - src/qt/CSCPublicAPI/casinocoinwebapiparser.h \ - src/qt/CSCPublicAPI/jsonactivepromotionsparser.h \ + src/qt/transactiontablemodel.h \ + src/qt/addresstablemodel.h \ + src/qt/optionsdialog.h \ + src/qt/sendcoinsdialog.h \ + src/qt/coincontroldialog.h \ + src/qt/coincontroltreewidget.h \ + src/qt/addressbookpage.h \ + src/qt/signverifymessagedialog.h \ + src/qt/aboutdialog.h \ + src/qt/editaddressdialog.h \ + src/qt/bitcoinaddressvalidator.h \ + src/alert.h \ + src/addrman.h \ + src/base58.h \ + src/bignum.h \ + src/checkpoints.h \ + src/coincontrol.h \ + src/compat.h \ + src/sync.h \ + src/util.h \ + src/hash.h \ + src/uint256.h \ + src/serialize.h \ + src/main.h \ + src/net.h \ + src/key.h \ + src/db.h \ + src/walletdb.h \ + src/script.h \ + src/init.h \ + src/bloom.h \ + src/mruset.h \ + src/checkqueue.h \ + src/json/json_spirit_writer_template.h \ + src/json/json_spirit_writer.h \ + src/json/json_spirit_value.h \ + src/json/json_spirit_utils.h \ + src/json/json_spirit_stream_reader.h \ + src/json/json_spirit_reader_template.h \ + src/json/json_spirit_reader.h \ + src/json/json_spirit_error_position.h \ + src/json/json_spirit.h \ + src/qt/clientmodel.h \ + src/qt/guiutil.h \ + src/qt/transactionrecord.h \ + src/qt/guiconstants.h \ + src/qt/optionsmodel.h \ + src/qt/monitoreddatamapper.h \ + src/qt/transactiondesc.h \ + src/qt/transactiondescdialog.h \ + src/qt/bitcoinamountfield.h \ + src/wallet.h \ + src/keystore.h \ + src/qt/transactionfilterproxy.h \ + src/qt/transactionview.h \ + src/qt/walletmodel.h \ + src/qt/walletview.h \ + src/qt/walletstack.h \ + src/qt/walletframe.h \ + src/bitcoinrpc.h \ + src/qt/overviewpage.h \ + src/qt/csvmodelwriter.h \ + src/crypter.h \ + src/qt/sendcoinsentry.h \ + src/qt/qvalidatedlineedit.h \ + src/qt/bitcoinunits.h \ + src/qt/qvaluecombobox.h \ + src/qt/askpassphrasedialog.h \ + src/protocol.h \ + src/qt/notificator.h \ + src/qt/paymentserver.h \ + src/allocators.h \ + src/ui_interface.h \ + src/qt/rpcconsole.h \ + src/scrypt.h \ + src/version.h \ + src/netbase.h \ + src/clientversion.h \ + src/txdb.h \ + src/leveldb.h \ + src/threadsafety.h \ + src/limitedmap.h \ + src/qt/macnotificationhandler.h \ + src/qt/splashscreen.h \ + src/qt/CSCPublicAPI/casinocoinwebapi.h \ + src/qt/CSCPublicAPI/casinocoinwebapiparser.h \ + src/qt/CSCPublicAPI/jsonactivepromotionsparser.h \ src/qt/CSCPublicAPI/jsonactiveexchangesparser.h \ src/qt/CSCPublicAPI/jsonsingleactivepromotion.h \ src/qt/CSCPublicAPI/jsonsingleactiveexchange.h \ src/qt/qtquick_controls/cpp/guibannercontrol.h \ - src/qt/qtquick_controls/cpp/guibannerlistview.h \ - src/qt/qtquick_controls/cpp/guibannerwidget.h \ - src/qt/qtquick_controls/cpp/listiteminterface.h \ - src/qt/qtquick_controls/cpp/qmlbannerlistitem.h \ - src/qt/qtquick_controls/cpp/qmlbannerlistmodel.h \ - src/qt/qtquick_controls/cpp/qmlimageprovider.h \ - src/qt/qtquick_controls/cpp/qmllistitem.h \ - src/qt/qtquick_controls/cpp/qmllistmodel.h \ - src/qt/qtquick_controls/cpp/qmlmenutoolbarmodel.h \ - src/qt/qtquick_controls/cpp/qmlmenutoolbaritem.h \ - src/qt/qtquick_controls/cpp/guimenutoolbarwidget.h \ - src/qt/qtquick_controls/cpp/guimenutoolbarlistview.h \ - src/qt/qtquick_controls/cpp/guimenutoolbarcontrol.h \ - src/qt/gui20_skin.h \ - src/qt/cscfusionstyle.h \ - src/qt/pryptopage.h \ - src/qt/currencies.h \ - src/qt/CSCPublicAPI/jsoncoininfoparser.h \ - src/qt/infopage.h + src/qt/qtquick_controls/cpp/guibannerlistview.h \ + src/qt/qtquick_controls/cpp/guibannerwidget.h \ + src/qt/qtquick_controls/cpp/listiteminterface.h \ + src/qt/qtquick_controls/cpp/qmlbannerlistitem.h \ + src/qt/qtquick_controls/cpp/qmlbannerlistmodel.h \ + src/qt/qtquick_controls/cpp/qmlimageprovider.h \ + src/qt/qtquick_controls/cpp/qmllistitem.h \ + src/qt/qtquick_controls/cpp/qmllistmodel.h \ + src/qt/qtquick_controls/cpp/qmlmenutoolbarmodel.h \ + src/qt/qtquick_controls/cpp/qmlmenutoolbaritem.h \ + src/qt/qtquick_controls/cpp/guimenutoolbarwidget.h \ + src/qt/qtquick_controls/cpp/guimenutoolbarlistview.h \ + src/qt/qtquick_controls/cpp/guimenutoolbarcontrol.h \ + src/qt/gui20_skin.h \ + src/qt/cscfusionstyle.h \ + src/qt/pryptopage.h \ + src/qt/currencies.h \ + src/qt/CSCPublicAPI/jsoncoininfoparser.h \ + src/qt/infopage.h \ + src/qt/qtquick_controls/cpp/guiexchangeswidget.h \ + src/qt/qtquick_controls/cpp/qmlexchangeslistmodel.h \ + src/qt/qtquick_controls/cpp/qmlexchangeslistitem.h \ + src/qt/qtquick_controls/cpp/guiexchangeslistview.h \ + src/qt/qtquick_controls/cpp/guiexchangescontrol.h SOURCES += src/qt/bitcoin.cpp \ - src/qt/bitcoingui.cpp \ - src/qt/transactiontablemodel.cpp \ - src/qt/addresstablemodel.cpp \ - src/qt/optionsdialog.cpp \ - src/qt/sendcoinsdialog.cpp \ - src/qt/coincontroldialog.cpp \ - src/qt/coincontroltreewidget.cpp \ - src/qt/addressbookpage.cpp \ - src/qt/signverifymessagedialog.cpp \ - src/qt/aboutdialog.cpp \ - src/qt/editaddressdialog.cpp \ - src/qt/bitcoinaddressvalidator.cpp \ - src/alert.cpp \ - src/version.cpp \ - src/sync.cpp \ - src/util.cpp \ - src/hash.cpp \ - src/netbase.cpp \ - src/key.cpp \ - src/script.cpp \ - src/main.cpp \ - src/init.cpp \ - src/net.cpp \ - src/bloom.cpp \ - src/checkpoints.cpp \ - src/addrman.cpp \ - src/db.cpp \ - src/walletdb.cpp \ - src/qt/clientmodel.cpp \ - src/qt/guiutil.cpp \ - src/qt/transactionrecord.cpp \ - src/qt/optionsmodel.cpp \ - src/qt/monitoreddatamapper.cpp \ - src/qt/transactiondesc.cpp \ - src/qt/transactiondescdialog.cpp \ - src/qt/bitcoinstrings.cpp \ - src/qt/bitcoinamountfield.cpp \ - src/wallet.cpp \ - src/keystore.cpp \ - src/qt/transactionfilterproxy.cpp \ - src/qt/transactionview.cpp \ - src/qt/walletmodel.cpp \ - src/qt/walletview.cpp \ - src/qt/walletstack.cpp \ - src/qt/walletframe.cpp \ - src/bitcoinrpc.cpp \ - src/rpcdump.cpp \ - src/rpcnet.cpp \ - src/rpcmining.cpp \ - src/rpcwallet.cpp \ - src/rpcblockchain.cpp \ - src/rpcrawtransaction.cpp \ - src/qt/overviewpage.cpp \ - src/qt/csvmodelwriter.cpp \ - src/crypter.cpp \ - src/qt/sendcoinsentry.cpp \ - src/qt/qvalidatedlineedit.cpp \ - src/qt/bitcoinunits.cpp \ - src/qt/qvaluecombobox.cpp \ - src/qt/askpassphrasedialog.cpp \ - src/protocol.cpp \ - src/qt/notificator.cpp \ - src/qt/paymentserver.cpp \ - src/qt/rpcconsole.cpp \ - src/scrypt.cpp \ - src/noui.cpp \ - src/leveldb.cpp \ - src/txdb.cpp \ - src/qt/splashscreen.cpp \ - src/qt/CSCPublicAPI/casinocoinwebapi.cpp \ - src/qt/CSCPublicAPI/casinocoinwebapiparser.cpp \ - src/qt/CSCPublicAPI/jsonactivepromotionsparser.cpp \ + src/qt/bitcoingui.cpp \ + src/qt/transactiontablemodel.cpp \ + src/qt/addresstablemodel.cpp \ + src/qt/optionsdialog.cpp \ + src/qt/sendcoinsdialog.cpp \ + src/qt/coincontroldialog.cpp \ + src/qt/coincontroltreewidget.cpp \ + src/qt/addressbookpage.cpp \ + src/qt/signverifymessagedialog.cpp \ + src/qt/aboutdialog.cpp \ + src/qt/editaddressdialog.cpp \ + src/qt/bitcoinaddressvalidator.cpp \ + src/alert.cpp \ + src/version.cpp \ + src/sync.cpp \ + src/util.cpp \ + src/hash.cpp \ + src/netbase.cpp \ + src/key.cpp \ + src/script.cpp \ + src/main.cpp \ + src/init.cpp \ + src/net.cpp \ + src/bloom.cpp \ + src/checkpoints.cpp \ + src/addrman.cpp \ + src/db.cpp \ + src/walletdb.cpp \ + src/qt/clientmodel.cpp \ + src/qt/guiutil.cpp \ + src/qt/transactionrecord.cpp \ + src/qt/optionsmodel.cpp \ + src/qt/monitoreddatamapper.cpp \ + src/qt/transactiondesc.cpp \ + src/qt/transactiondescdialog.cpp \ + src/qt/bitcoinstrings.cpp \ + src/qt/bitcoinamountfield.cpp \ + src/wallet.cpp \ + src/keystore.cpp \ + src/qt/transactionfilterproxy.cpp \ + src/qt/transactionview.cpp \ + src/qt/walletmodel.cpp \ + src/qt/walletview.cpp \ + src/qt/walletstack.cpp \ + src/qt/walletframe.cpp \ + src/bitcoinrpc.cpp \ + src/rpcdump.cpp \ + src/rpcnet.cpp \ + src/rpcmining.cpp \ + src/rpcwallet.cpp \ + src/rpcblockchain.cpp \ + src/rpcrawtransaction.cpp \ + src/qt/overviewpage.cpp \ + src/qt/csvmodelwriter.cpp \ + src/crypter.cpp \ + src/qt/sendcoinsentry.cpp \ + src/qt/qvalidatedlineedit.cpp \ + src/qt/bitcoinunits.cpp \ + src/qt/qvaluecombobox.cpp \ + src/qt/askpassphrasedialog.cpp \ + src/protocol.cpp \ + src/qt/notificator.cpp \ + src/qt/paymentserver.cpp \ + src/qt/rpcconsole.cpp \ + src/scrypt.cpp \ + src/noui.cpp \ + src/leveldb.cpp \ + src/txdb.cpp \ + src/qt/splashscreen.cpp \ + src/qt/CSCPublicAPI/casinocoinwebapi.cpp \ + src/qt/CSCPublicAPI/casinocoinwebapiparser.cpp \ + src/qt/CSCPublicAPI/jsonactivepromotionsparser.cpp \ src/qt/CSCPublicAPI/jsonactiveexchangesparser.cpp \ src/qt/CSCPublicAPI/jsonsingleactivepromotion.cpp \ src/qt/CSCPublicAPI/jsonsingleactiveexchange.cpp \ - src/qt/qtquick_controls/cpp/guibannercontrol.cpp \ - src/qt/qtquick_controls/cpp/guibannerlistview.cpp \ - src/qt/qtquick_controls/cpp/guibannerwidget.cpp \ - src/qt/qtquick_controls/cpp/qmlbannerlistitem.cpp \ - src/qt/qtquick_controls/cpp/qmlbannerlistmodel.cpp \ - src/qt/qtquick_controls/cpp/qmlimageprovider.cpp \ - src/qt/qtquick_controls/cpp/qmllistitem.cpp \ - src/qt/qtquick_controls/cpp/qmllistmodel.cpp \ - src/qt/qtquick_controls/cpp/qmlmenutoolbarmodel.cpp \ - src/qt/qtquick_controls/cpp/qmlmenutoolbaritem.cpp \ - src/qt/qtquick_controls/cpp/guimenutoolbarwidget.cpp \ - src/qt/qtquick_controls/cpp/guimenutoolbarlistview.cpp \ - src/qt/qtquick_controls/cpp/guimenutoolbarcontrol.cpp \ - src/qt/gui20_skin.cpp \ - src/qt/cscfusionstyle.cpp \ - src/qt/pryptopage.cpp \ - src/qt/currencies.cpp \ - src/qt/CSCPublicAPI/jsoncoininfoparser.cpp \ - src/qt/infopage.cpp + src/qt/qtquick_controls/cpp/guibannercontrol.cpp \ + src/qt/qtquick_controls/cpp/guibannerlistview.cpp \ + src/qt/qtquick_controls/cpp/guibannerwidget.cpp \ + src/qt/qtquick_controls/cpp/qmlbannerlistitem.cpp \ + src/qt/qtquick_controls/cpp/qmlbannerlistmodel.cpp \ + src/qt/qtquick_controls/cpp/qmlimageprovider.cpp \ + src/qt/qtquick_controls/cpp/qmllistitem.cpp \ + src/qt/qtquick_controls/cpp/qmllistmodel.cpp \ + src/qt/qtquick_controls/cpp/qmlmenutoolbarmodel.cpp \ + src/qt/qtquick_controls/cpp/qmlmenutoolbaritem.cpp \ + src/qt/qtquick_controls/cpp/guimenutoolbarwidget.cpp \ + src/qt/qtquick_controls/cpp/guimenutoolbarlistview.cpp \ + src/qt/qtquick_controls/cpp/guimenutoolbarcontrol.cpp \ + src/qt/gui20_skin.cpp \ + src/qt/cscfusionstyle.cpp \ + src/qt/pryptopage.cpp \ + src/qt/currencies.cpp \ + src/qt/CSCPublicAPI/jsoncoininfoparser.cpp \ + src/qt/infopage.cpp \ + src/qt/qtquick_controls/cpp/guiexchangeswidget.cpp \ + src/qt/qtquick_controls/cpp/qmlexchangeslistmodel.cpp \ + src/qt/qtquick_controls/cpp/qmlexchangeslistitem.cpp \ + src/qt/qtquick_controls/cpp/guiexchangeslistview.cpp \ + src/qt/qtquick_controls/cpp/guiexchangescontrol.cpp RESOURCES += src/qt/bitcoin.qrc @@ -462,6 +472,9 @@ OTHER_FILES += README.md \ src/qt/qtquick_controls/qml/QmlGUIBannerControl.qml \ src/qt/qtquick_controls/qml/QmlGUIBannerListView.qml \ src/qt/qtquick_controls/qml/QmlGUIBannerWindow.qml \ + src/qt/qtquick_controls/qml/QmlGUIExchangesControl.qml \ + src/qt/qtquick_controls/qml/QmlGUIExchangesListView.qml \ + src/qt/qtquick_controls/qml/QmlGUIExchangesWindow.qml \ src/qt/qtquick_controls/qml/QmlGUIMenuToolbarWindow.qml \ src/qt/qtquick_controls/qml/QmlGUIMenuToolbarListView.qml \ src/qt/qtquick_controls/qml/QmlGUIMenuToolbarControl.qml diff --git a/src/qt/bitcoin.qrc b/src/qt/bitcoin.qrc index bdf8c76..cf1cefd 100644 --- a/src/qt/bitcoin.qrc +++ b/src/qt/bitcoin.qrc @@ -132,5 +132,8 @@ qtquick_controls/qml/QmlGUIMenuToolbarWindow.qml qtquick_controls/qml/QmlGUIMenuToolbarListView.qml qtquick_controls/qml/QmlGUIMenuToolbarControl.qml + qtquick_controls/qml/QmlGUIExchangesWindow.qml + qtquick_controls/qml/QmlGUIExchangesListView.qml + qtquick_controls/qml/QmlGUIExchangesControl.qml diff --git a/src/qt/forms/infopage.ui b/src/qt/forms/infopage.ui index 167ef20..a15726c 100644 --- a/src/qt/forms/infopage.ui +++ b/src/qt/forms/infopage.ui @@ -29,37 +29,88 @@ 15 - - + + QFrame::StyledPanel QFrame::Sunken - - - - 20 - 10 - 351 - 21 - - - - - 10 - 75 - true - - - - color: rgb(166, 27, 31); - - - Exchanges - - + + + + + + 10 + 75 + true + + + + color: rgb(166, 27, 31); + + + News + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + QFrame::StyledPanel + + + QFrame::Sunken + + + + + + + 10 + 75 + true + + + + color: rgb(166, 27, 31); + + + Casinos + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + @@ -74,6 +125,23 @@ QFrame::Sunken + + + + + 10 + 75 + true + + + + color: rgb(166, 27, 31); + + + Casinos + + + @@ -495,110 +563,51 @@ - - - - - MS Shell Dlg 2 - 10 - 75 - true - + + + + Qt::Vertical - - color: rgb(166, 27, 31); + + + 20 + 40 + - - Information - - + - - + + QFrame::StyledPanel QFrame::Sunken - - - - 20 - 10 - 351 - 21 - - - - - 10 - 75 - true - - - - color: rgb(166, 27, 31); - - - News - - - - - - - - QFrame::StyledPanel - - - QFrame::Sunken - - - - - 20 - 10 - 351 - 21 - - - - - 10 - 75 - true - - - - color: rgb(166, 27, 31); - - - Casinos - - - - - - - - false - - - QFrame::StyledPanel - - - QFrame::Sunken - - + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + - + - MS Shell Dlg 2 10 75 true @@ -608,435 +617,10 @@ color: rgb(166, 27, 31); - Information + Exchanges - - - - - - QFormLayout::AllNonFixedFieldsGrow - - - 15 - - - 10 - - - 10 - - - 10 - - - 10 - - - 10 - - - - - - - - Current number of blocks - - - true - - - - - - - - 75 - true - - - - - - - - - - - true - - - - - - - - - - Last block time - - - true - - - - - - - - 75 - true - - - - - - - - - - - true - - - - - - - - - - Coin Supply - - - true - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - - - 75 - true - - - - - - - - - - - true - - - - - - - - - - Number of connections - - - true - - - - - - - - 75 - true - - - - - - - - - - - true - - - - - - - - - - Difficulty - - - true - - - - - - - - 75 - true - - - - - - - - - - - true - - - - - - - - - - Network Hashrate - - - true - - - - - - - - 75 - true - - - - - - - - - - - true - - - - - - - - - - Transactions - - - true - - - - - - - - 75 - true - - - - - - - - - - - true - - - - - - - diff --git a/src/qt/infopage.cpp b/src/qt/infopage.cpp index 9f5c869..484d12f 100644 --- a/src/qt/infopage.cpp +++ b/src/qt/infopage.cpp @@ -7,15 +7,20 @@ #include "bitcoinunits.h" #include "main.h" +#include "qtquick_controls/cpp/guiexchangeswidget.h" + using namespace std; InfoPage::InfoPage(QWidget *parent) : QDialog(parent), + exchangesWidget( 0 ), ui(new Ui::InfoPage) { ui->setupUi(this); ui->casinoInfoBox->setVisible(false); ui->newsItemsBox->setVisible(false); + + createExchangesWidget(); } void InfoPage::setWalletModel(WalletModel *model) @@ -105,5 +110,12 @@ double InfoPage::GetNetworkHashRate(int lookup, int height) { InfoPage::~InfoPage() { - delete ui; + delete ui; +} + +void InfoPage::createExchangesWidget() +{ + exchangesWidget = new GUIExchangesWidget( this ); + exchangesWidget->PopulateExchangesFromWeb(); + ui->verticalLayoutExchanges->addWidget( exchangesWidget->dockQmlToWidget() ); } diff --git a/src/qt/infopage.h b/src/qt/infopage.h index 41c585f..ae59aab 100644 --- a/src/qt/infopage.h +++ b/src/qt/infopage.h @@ -5,6 +5,7 @@ class WalletModel; class ClientModel; +class GUIExchangesWidget; namespace Ui { class InfoPage; @@ -32,6 +33,9 @@ private: Ui::InfoPage *ui; WalletModel *walletModel; ClientModel *clientModel; + GUIExchangesWidget* exchangesWidget; + + void createExchangesWidget(); double GetNetworkHashRate(int lookup, int height); }; diff --git a/src/qt/qtquick_controls/cpp/guiexchangescontrol.cpp b/src/qt/qtquick_controls/cpp/guiexchangescontrol.cpp new file mode 100644 index 0000000..a4d9c86 --- /dev/null +++ b/src/qt/qtquick_controls/cpp/guiexchangescontrol.cpp @@ -0,0 +1,41 @@ +#include "guiexchangescontrol.h" +#include "guiexchangeslistview.h" +#include "qmlexchangeslistmodel.h" +#include "qmlexchangeslistitem.h" + +GUIExchangesControl::GUIExchangesControl( QQuickItem* a_pParent ) + : QQuickItem( a_pParent ) + , m_pExchangesView( 0 ) +{ +} + +GUIExchangesControl::~GUIExchangesControl() +{ + if ( m_pExchangesView ) + { + delete m_pExchangesView; + m_pExchangesView = 0; + } +} + +void GUIExchangesControl::InitializeExchangesView( GUIExchangesListView* a_pView ) +{ + if ( a_pView ) + { + if ( m_pExchangesView ) + { + delete m_pExchangesView; + } + m_pExchangesView = a_pView; + } +} + +void GUIExchangesControl::slotPopulateListView( JsonActiveExchangesParser* a_pActiveExchanges ) +{ + if ( m_pExchangesView ) + { + QmlExchangesListModel* pExchangesModel = new QmlExchangesListModel( *a_pActiveExchanges ); + m_pExchangesView->SetModel( pExchangesModel ); + } +} + diff --git a/src/qt/qtquick_controls/cpp/guiexchangescontrol.h b/src/qt/qtquick_controls/cpp/guiexchangescontrol.h new file mode 100644 index 0000000..400cc0e --- /dev/null +++ b/src/qt/qtquick_controls/cpp/guiexchangescontrol.h @@ -0,0 +1,31 @@ +#ifndef GUIEEXCHANGESCONTROL_H +#define GUIEEXCHANGESCONTROL_H + +#include + +#include "../../CSCPublicAPI/jsonactiveexchangesparser.h" + +class GUIExchangesListView; + +class GUIExchangesControl : public QQuickItem +{ + Q_OBJECT +public: + GUIExchangesControl( QQuickItem* a_pParent = 0 ); + virtual ~GUIExchangesControl(); + + Q_INVOKABLE void InitializeExchangesView( GUIExchangesListView* a_pView ); + GUIExchangesListView* GetExchangesView() const { return m_pExchangesView; } + +public slots: + void slotPopulateListView( JsonActiveExchangesParser* a_pActiveExchanges ); + +signals: + +public slots: + +private: + GUIExchangesListView* m_pExchangesView; +}; + +#endif // GUIEEXCHANGESCONTROL_H diff --git a/src/qt/qtquick_controls/cpp/guiexchangeslistview.cpp b/src/qt/qtquick_controls/cpp/guiexchangeslistview.cpp new file mode 100644 index 0000000..e672de0 --- /dev/null +++ b/src/qt/qtquick_controls/cpp/guiexchangeslistview.cpp @@ -0,0 +1,50 @@ +#include "guiexchangeslistview.h" + +#include "qmlexchangeslistitem.h" +#include "qmlexchangeslistmodel.h" +#include "qmllistmodel.h" + +#include +#include + +GUIExchangesListView::GUIExchangesListView( QQuickItem* a_pParent ) + : QQuickItem( a_pParent ) + , m_pModel( 0 ) +{ +} + +void GUIExchangesListView::Clear() +{ + if ( m_pModel ) + { + m_pModel->clear(); + } +} + +void GUIExchangesListView::OnClicked( int a_iItemIndex ) +{ + if ( m_pModel ) + { + QString strUrl = m_pModel->GetData( a_iItemIndex, QmlExchangesListItem::ROLE_DESTINATION_URL ).toString(); + QDesktopServices::openUrl( QUrl( strUrl ) ); + } +} + +GUIExchangesListView::~GUIExchangesListView() +{ + if ( m_pModel ) + { + delete m_pModel; + m_pModel = 0; + } +} + +void GUIExchangesListView::SetModel( QmlExchangesListModel* a_pModel ) +{ + if ( m_pModel ) + { + delete m_pModel; + } + m_pModel = a_pModel; + emit signalModelChanged(); +} diff --git a/src/qt/qtquick_controls/cpp/guiexchangeslistview.h b/src/qt/qtquick_controls/cpp/guiexchangeslistview.h new file mode 100644 index 0000000..d351291 --- /dev/null +++ b/src/qt/qtquick_controls/cpp/guiexchangeslistview.h @@ -0,0 +1,35 @@ +#ifndef GUIEXCHANGESLISTVIEW_H +#define GUIEXCHANGESLISTVIEW_H + +#include + +class QmlListModel; +class QmlExchangesListModel; +class QmlExchangesListItem; + +class GUIExchangesListView : public QQuickItem +{ + Q_OBJECT + Q_PROPERTY( QmlExchangesListModel* p_pListModel MEMBER m_pModel NOTIFY signalModelChanged ) + +public: + explicit GUIExchangesListView( QQuickItem *a_pParent = 0 ); + virtual ~GUIExchangesListView(); /** Destructor **/ + + void SetModel( QmlExchangesListModel* a_pModel ); + QmlExchangesListModel* GetModel() const { return m_pModel; } + + void Clear(); + + Q_INVOKABLE void OnClicked( int a_iItemIndex ); +signals: + void signalModelChanged(); + +public slots: + +private: + + QmlExchangesListModel* m_pModel; +}; + +#endif // GUIEXCHANGESLISTVIEW_H diff --git a/src/qt/qtquick_controls/cpp/guiexchangeswidget.cpp b/src/qt/qtquick_controls/cpp/guiexchangeswidget.cpp new file mode 100644 index 0000000..57568a2 --- /dev/null +++ b/src/qt/qtquick_controls/cpp/guiexchangeswidget.cpp @@ -0,0 +1,104 @@ +#include "guiexchangeswidget.h" + +#include +#include +#include +#include + +#include "gui20_skin.h" + +// qml +#include "guiexchangescontrol.h" +#include "guiexchangeslistview.h" +#include "qmlexchangeslistmodel.h" +#include "qmlexchangeslistitem.h" +#include "qmlimageprovider.h" + +// web +#include "../../CSCPublicAPI/casinocoinwebapi.h" +#include "../../CSCPublicAPI/casinocoinwebapiparser.h" + + +GUIExchangesWidget::GUIExchangesWidget(QWidget *parent) + : QWidget(parent) + , m_pExchangesControl( 0 ) + , m_pWebApiParserTemporary( new CasinoCoinWebAPIParser( this ) ) + , m_pWebApiTemporary( new CasinoCoinWebAPI( this ) ) + , m_pQmlImageProvider( 0 ) +{ + registerCustomQmlTypes(); + connect( m_pWebApiTemporary, SIGNAL( signalResponseReady(const QByteArray&)), m_pWebApiParserTemporary, SLOT( slotParseAnswer(const QByteArray&)), Qt::UniqueConnection ); + connect( m_pWebApiTemporary, SIGNAL( signalNetworkError(QNetworkReply::NetworkError,const QUrl)), m_pWebApiParserTemporary, SLOT( slotNetworkError(QNetworkReply::NetworkError,const QUrl)), Qt::UniqueConnection ); + connect( m_pWebApiParserTemporary, SIGNAL( signalActiveExchangesParsed(JsonActiveExchangesParser*)), this, SLOT( slotPopulateFromWeb(JsonActiveExchangesParser*)), Qt::UniqueConnection ); +} + +GUIExchangesWidget::~GUIExchangesWidget() +{ + // member objects are moved to qml engine and it manages their instances +} + +void GUIExchangesWidget::registerCustomQmlTypes() +{ + qmlRegisterType("CasinoCoinControls", 1, 0, "GUIExchangesControl" ); + qmlRegisterType("CasinoCoinControls", 1, 0, "GUIExchangesListView" ); + qmlRegisterType("CasinoCoinControls", 1, 0, "QmlExchangesListModel" ); +} + +QWidget* GUIExchangesWidget::dockQmlToWidget() +{ + QQuickView* pExchangesWindow = new QQuickView; + QWidget* pPlaceHolder = 0; + if ( pExchangesWindow ) + { + QQmlContext* pContext = pExchangesWindow->rootContext(); + if ( pContext ) + { + pContext->setContextProperty( "GUI20Skin", &GUI20Skin::Instance() ); + } + QQmlEngine* pEngine = pExchangesWindow->engine(); + if ( pEngine ) + { + m_pQmlImageProvider = new QmlImageProvider(); + pEngine->addImageProvider( "exchangesImages", m_pQmlImageProvider ); + } + pExchangesWindow->setSource( QUrl( QStringLiteral( "qrc:/qml/qtquick_controls/qml/QmlGUIExchangesWindow.qml" ) ) ); + QQuickItem* pRootObject = pExchangesWindow->rootObject(); + if ( pRootObject ) + { + m_pExchangesControl = pRootObject->findChild(); + if ( m_pExchangesControl ) + { + m_pExchangesControl->setWidth( 400 ); + m_pExchangesControl->setHeight( 120 ); + } + } + pPlaceHolder = QWidget::createWindowContainer( pExchangesWindow, this ); + if ( pPlaceHolder ) + { + pPlaceHolder->setMinimumSize( 400, 120 ); + } + } + + return pPlaceHolder; +} + +void GUIExchangesWidget::PopulateExchangesFromWeb() +{ + if ( m_pWebApiTemporary ) + { + m_pWebApiTemporary->GetActiveExchanges(); + } +} + +void GUIExchangesWidget::slotPopulateFromWeb( JsonActiveExchangesParser* a_pExchangesParser ) +{ + if ( a_pExchangesParser ) + { + a_pExchangesParser->AddImagesToPool( m_pQmlImageProvider ); + } + if ( m_pExchangesControl ) + { + m_pExchangesControl->slotPopulateListView( a_pExchangesParser ); + } +} + diff --git a/src/qt/qtquick_controls/cpp/guiexchangeswidget.h b/src/qt/qtquick_controls/cpp/guiexchangeswidget.h new file mode 100644 index 0000000..0937dd1 --- /dev/null +++ b/src/qt/qtquick_controls/cpp/guiexchangeswidget.h @@ -0,0 +1,39 @@ +#ifndef GUIEXCHANGESWIDGET_H +#define GUIEXCHANGESWIDGET_H + +#include +#include + +class CasinoCoinWebAPIParser; +class CasinoCoinWebAPI; +class GUIExchangesControl; +class QmlImageProvider; +class JsonActiveExchangesParser; + +class GUIExchangesWidget : public QWidget +{ + Q_OBJECT + +public: + GUIExchangesWidget( QWidget *parent = 0) ; + ~GUIExchangesWidget(); + + QWidget* dockQmlToWidget(); + + void PopulateExchangesFromWeb(); + void PopulateExchangesLocally(); + +private: + void registerCustomQmlTypes(); + + GUIExchangesControl* m_pExchangesControl; + + CasinoCoinWebAPIParser* m_pWebApiParserTemporary; + CasinoCoinWebAPI* m_pWebApiTemporary; + QmlImageProvider* m_pQmlImageProvider; +private slots: + void slotPopulateFromWeb( JsonActiveExchangesParser* a_pExchangesParser ); + +}; + +#endif // GUIEXCHANGESWIDGET_H diff --git a/src/qt/qtquick_controls/cpp/qmlexchangeslistitem.cpp b/src/qt/qtquick_controls/cpp/qmlexchangeslistitem.cpp new file mode 100644 index 0000000..0307cf5 --- /dev/null +++ b/src/qt/qtquick_controls/cpp/qmlexchangeslistitem.cpp @@ -0,0 +1,57 @@ +#include "qmlexchangeslistitem.h" + +#include + +QmlExchangesListItem::QmlExchangesListItem(QString a_strImageSource, QString a_strDestinationUrl, QString a_strExchangesName, double a_dBidPrice, double a_dAskPrice, double a_dLastPrice, QString a_strDescription, QObject* a_pParent ) + : QmlListItem ( QVariant( a_strImageSource ) + , QVariant( a_strDestinationUrl ) + , QVariant( a_strExchangesName ) + , QVariant( GetFormattedPrice( a_dBidPrice ) ) + , QVariant( GetFormattedPrice( a_dAskPrice ) ) + , QVariant( GetFormattedPrice( a_dLastPrice ) ) + , QVariant( a_strDescription ) + , a_pParent + ) +{ +} + +QmlExchangesListItem::QmlExchangesListItem( const JsonSingleActiveExchange& a_rExchangeDescription, QObject* a_pParent ) + : QmlListItem ( QVariant( a_rExchangeDescription.getImageName() ) + , QVariant( a_rExchangeDescription.getAccessUrl() ) + , QVariant( a_rExchangeDescription.getExchangeName() ) + , QVariant( GetFormattedPrice( a_rExchangeDescription.getLastBidPriceBTC() ) ) + , QVariant( GetFormattedPrice( a_rExchangeDescription.getLastAskPriceBTC() ) ) + , QVariant( GetFormattedPrice( a_rExchangeDescription.getLastPriceBTC() ) ) + , QVariant( a_rExchangeDescription.getDescription() ) + , a_pParent + ) +{ +} + +QmlExchangesListItem::QmlExchangesListItem( QObject* a_pParent ) + : QmlListItem( QVariant( "" ), QVariant( "" ), QVariant( "" ), QVariant( "" ), QVariant( "" ), QVariant( "" ), QVariant( "" ), a_pParent ) +{ +} + +QmlExchangesListItem::~QmlExchangesListItem() +{ + +} + +QHash QmlExchangesListItem::RoleNames() const +{ + QHash aRoleNames; + aRoleNames[ROLE_IMAGE_SOURCE] = "m_imageSource"; + aRoleNames[ROLE_DESTINATION_URL] = "m_destinationUrl"; + aRoleNames[ROLE_EXCHANGE_NAME] = "m_exchangeName"; + aRoleNames[ROLE_BID_PRICE] = "m_bidPrice"; + aRoleNames[ROLE_ASK_PRICE] = "m_askPrice"; + aRoleNames[ROLE_LAST_PRICE] = "m_lastPrice"; + aRoleNames[ROLE_DESCRIPTION] = "m_description"; + return aRoleNames; +} + +QString QmlExchangesListItem::GetFormattedPrice(double a_dPrice) +{ + return QString::number( a_dPrice, 'f', 8 ); +} diff --git a/src/qt/qtquick_controls/cpp/qmlexchangeslistitem.h b/src/qt/qtquick_controls/cpp/qmlexchangeslistitem.h new file mode 100644 index 0000000..ec34886 --- /dev/null +++ b/src/qt/qtquick_controls/cpp/qmlexchangeslistitem.h @@ -0,0 +1,47 @@ +#ifndef QMLEXCHANGESLISTITEM_H +#define QMLEXCHANGESLISTITEM_H + +#include "qmllistitem.h" +#include "../../CSCPublicAPI/jsonsingleactiveexchange.h" + +class QmlExchangesListItem : public QmlListItem +{ + Q_OBJECT +public: + enum EExchangesRoles /** User-specific model roles **/ + { ROLE_IMAGE_SOURCE = ROLE_1 + , ROLE_DESTINATION_URL = ROLE_2 + , ROLE_EXCHANGE_NAME = ROLE_3 + , ROLE_BID_PRICE = ROLE_4 + , ROLE_ASK_PRICE = ROLE_5 + , ROLE_LAST_PRICE = ROLE_6 + , ROLE_DESCRIPTION = ROLE_7 + }; + + explicit QmlExchangesListItem + ( QString a_strImageSource + , QString a_strDestinationUrl + , QString a_strExchangesName + , double a_dBidPrice + , double a_dAskPrice + , double a_dLastPrice + , QString a_strDescription + , QObject *a_pParent = 0 + ); + explicit QmlExchangesListItem ( const JsonSingleActiveExchange& a_rExchangeDescription + , QObject *a_pParent = 0 + ); + explicit QmlExchangesListItem( QObject *a_pParent = 0 ); + virtual ~QmlExchangesListItem(); + + virtual QHash RoleNames() const; /** Define class-specific roles **/ + +signals: + +public slots: + +private: + QString GetFormattedPrice( double a_dPrice ); +}; + +#endif // QMLEXCHANGESLISTITEM_H diff --git a/src/qt/qtquick_controls/cpp/qmlexchangeslistmodel.cpp b/src/qt/qtquick_controls/cpp/qmlexchangeslistmodel.cpp new file mode 100644 index 0000000..c396ef4 --- /dev/null +++ b/src/qt/qtquick_controls/cpp/qmlexchangeslistmodel.cpp @@ -0,0 +1,30 @@ +#include "qmlexchangeslistmodel.h" + +#include "qmlexchangeslistitem.h" + +#include "../../CSCPublicAPI/jsonactiveexchangesparser.h" +#include "../../CSCPublicAPI/jsonsingleactiveexchange.h" + +#include + +QmlExchangesListModel::QmlExchangesListModel( QObject* a_pParent ) + : QmlListModel( new QmlExchangesListItem( 0 ), a_pParent ) +{ +} + +QmlExchangesListModel::QmlExchangesListModel + ( const JsonActiveExchangesParser& a_rActiveExchanges + , QObject* a_pParent + ) + : QmlListModel( new QmlExchangesListItem( 0 ), a_pParent ) +{ + foreach( const JsonSingleActiveExchange& rExchange, a_rActiveExchanges.GetExchanges() ) + { + append( new QmlExchangesListItem( rExchange, this ) ); + } +} + +QmlExchangesListModel::~QmlExchangesListModel() +{ + +} diff --git a/src/qt/qtquick_controls/cpp/qmlexchangeslistmodel.h b/src/qt/qtquick_controls/cpp/qmlexchangeslistmodel.h new file mode 100644 index 0000000..99fb5c3 --- /dev/null +++ b/src/qt/qtquick_controls/cpp/qmlexchangeslistmodel.h @@ -0,0 +1,26 @@ +#ifndef QMLEXCHANGESLISTMODEL_H +#define QMLEXCHANGESLISTMODEL_H + +#include "qmllistmodel.h" + +class QmlExchangesListItem; +class JsonActiveExchangesParser; + +class QmlExchangesListModel : public QmlListModel +{ + Q_OBJECT +public: + explicit QmlExchangesListModel( QObject* a_pParent = 0 ); + explicit QmlExchangesListModel + ( const JsonActiveExchangesParser& a_rActiveExchanges + , QObject* a_pParent = 0 + ); + virtual ~QmlExchangesListModel(); /** Destructor **/ + +signals: + +public slots: + +}; + +#endif // QMLEXCHANGESLISTMODEL_H diff --git a/src/qt/qtquick_controls/qml/QmlGUIExchangesControl.qml b/src/qt/qtquick_controls/qml/QmlGUIExchangesControl.qml new file mode 100644 index 0000000..0fcd4cf --- /dev/null +++ b/src/qt/qtquick_controls/qml/QmlGUIExchangesControl.qml @@ -0,0 +1,32 @@ +import QtQuick 2.2 +import CasinoCoinControls 1.0 + +GUIExchangesControl +{ + id: id_ExchangesControl + + property color colorBackgroundInWidget: GUI20Skin.colorFrameBackground + Rectangle + { + id: id_ExchangessArea + height: id_ExchangesControl.height + width: id_ExchangesControl.width + color: colorBackgroundInWidget + z: -1 + + anchors.fill: id_ExchangesControl +// anchors.horizontalCenter: id_ExchangesControl.horizontalCenter +// anchors.left: id_leftArrow.left + QmlGUIExchangesListView + { + id: id_ExchangesListView + + anchors.fill: id_ExchangessArea + Component.onCompleted: + { + id_ExchangesControl.InitializeExchangesView( id_ExchangesListView ) + } + } +} + +} diff --git a/src/qt/qtquick_controls/qml/QmlGUIExchangesListView.qml b/src/qt/qtquick_controls/qml/QmlGUIExchangesListView.qml new file mode 100644 index 0000000..dc09f51 --- /dev/null +++ b/src/qt/qtquick_controls/qml/QmlGUIExchangesListView.qml @@ -0,0 +1,164 @@ +import QtQuick 2.0 +import CasinoCoinControls 1.0 + +GUIExchangesListView +{ + id: id_ExchangesView + + property int m_iItemBorderWidth: 1 + property int m_iColumnWidth: 0 + property alias m_ListModel: id_listView.model + property alias m_PathView: id_listView + + ListView + { + id: id_listView + anchors.fill: id_ExchangesView + + clip: true + visible: true + interactive: contentHeight > id_listView.height ? true : false + + model: id_ExchangesView.p_pListModel + delegate: id_elementDelegate + } + + Component + { + id: id_elementDelegate + Rectangle + { + id: id_listElement + objectName: id_ExchangesView.objectName + "_Element" + index + + width: 400 + height: 100 + Row + { + id: id_row + anchors.fill: id_listElement + Rectangle + { + id: id_imageRectangle + + width: id_listElement.width / 3 + height: 80 + anchors.verticalCenter: id_row.verticalCenter + Image + { + id: id_exchangeImage + source: "image://exchangesImages/" + m_imageSource + scale: ( id_imageRectangle.height / height ) + anchors.centerIn: id_imageRectangle + } + + MouseArea + { + id: id_leftItemMouseArea + anchors.fill: id_imageRectangle + onClicked: + { + id_ExchangesView.OnClicked( index ) + } + } + } + Rectangle + { + id: id_otherInfoRectangle + + width: id_listElement.width - id_imageRectangle.width + height: 90 + anchors.verticalCenter: id_row.verticalCenter + Column + { + id: id_otherInfoColumn + anchors.fill: id_otherInfoRectangle + Rectangle + { + id: id_exchangeNameRectangle + width: id_otherInfoRectangle.width + height: id_otherInfoRectangle.height / 3 + Text + { + id: id_exchangeNameText + anchors.fill: id_exchangeNameRectangle + text: qsTr( m_exchangeName ) + } + } + Rectangle + { + id: id_pricesRectangle + width: id_otherInfoRectangle.width + height: id_otherInfoRectangle.height / 3 + Row + { + id: id_pricesRow + anchors.fill: id_pricesRectangle + Rectangle + { + id: id_priceBid + width: id_pricesRectangle.width / 3 + height: id_pricesRectangle.height + Text + { + id: id_priceBidText + anchors.fill: id_priceBid + text: qsTr( m_bidPrice ) + } + } + Rectangle + { + id: id_priceAsk + width: id_pricesRectangle.width / 3 + height: id_pricesRectangle.height + Text + { + id: id_priceAskText + anchors.fill: id_priceAsk + text: qsTr( m_askPrice ) + } + } + Rectangle + { + id: id_priceLast + width: id_pricesRectangle.width / 3 + height: id_pricesRectangle.height + Text + { + id: id_priceLastText + anchors.fill: id_priceLast + text: qsTr( m_lastPrice ) + } + } + } + } + Rectangle + { + id: id_exchangeLink + width: id_otherInfoRectangle.width + height: id_otherInfoRectangle.height / 3 + Text + { + id: id_exchangeLinkText + anchors.fill: id_exchangeLink + text: qsTr( "Go to site" ) + MouseArea + { + id: id_linkMouseArea + anchors.fill: id_exchangeLinkText + onClicked: + { + id_ExchangesView.OnClicked( index ) + } + } + } + } + } + } + } + } + + + } + +} diff --git a/src/qt/qtquick_controls/qml/QmlGUIExchangesWindow.qml b/src/qt/qtquick_controls/qml/QmlGUIExchangesWindow.qml new file mode 100644 index 0000000..67c2d0f --- /dev/null +++ b/src/qt/qtquick_controls/qml/QmlGUIExchangesWindow.qml @@ -0,0 +1,14 @@ +import QtQuick 2.2 + +Rectangle +{ + id: id_root + QmlGUIExchangesControl + { + id: id_ExchangesControlMain + } + color: GUI20Skin.colorFrameBackground + width: id_ExchangesControlMain.width + height: id_ExchangesControlMain.height +} +