mirror of
https://git.wownero.com/wowlet/wowlet.git
synced 2024-08-15 01:03:14 +00:00
Merge pull request 'Consolidate exchanges to exchange tab' (#203) from tobtoht/feather:consolidate_exchanges into master
Reviewed-on: https://git.wownero.com/feather/feather/pulls/203
This commit is contained in:
commit
2b72624ec0
8 changed files with 80 additions and 66 deletions
|
@ -121,7 +121,7 @@ if(DONATE_BEG)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(XMRTO)
|
if(XMRTO)
|
||||||
target_compile_definitions(feather PRIVATE XMRTO=1)
|
target_compile_definitions(feather PRIVATE HAS_XMRTO=1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MORPHTOKEN)
|
if(MORPHTOKEN)
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>1</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tabCreateTrade">
|
<widget class="QWidget" name="tabCreateTrade">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
|
|
@ -147,7 +147,7 @@ AppContext::AppContext(QCommandLineParser *cmdargs) {
|
||||||
AppContext::prices = new Prices();
|
AppContext::prices = new Prices();
|
||||||
|
|
||||||
// xmr.to
|
// xmr.to
|
||||||
#ifdef XMRTO
|
#ifdef HAS_XMRTO
|
||||||
this->XMRTo = new XmrTo(this);
|
this->XMRTo = new XmrTo(this);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -419,7 +419,7 @@ void AppContext::onWSMessage(const QJsonObject &msg) {
|
||||||
QJsonObject fiat_rates = msg.value("data").toObject();
|
QJsonObject fiat_rates = msg.value("data").toObject();
|
||||||
AppContext::prices->fiatPricesReceived(fiat_rates);
|
AppContext::prices->fiatPricesReceived(fiat_rates);
|
||||||
}
|
}
|
||||||
#if defined(XMRTO)
|
#if defined(HAS_XMRTO)
|
||||||
else if(cmd == "xmrto_rates") {
|
else if(cmd == "xmrto_rates") {
|
||||||
auto xmr_rates = msg.value("data").toObject();
|
auto xmr_rates = msg.value("data").toObject();
|
||||||
this->XMRTo->onRatesReceived(xmr_rates);
|
this->XMRTo->onRatesReceived(xmr_rates);
|
||||||
|
|
|
@ -106,7 +106,7 @@ MainWindow::MainWindow(AppContext *ctx, QWidget *parent) :
|
||||||
connect(ui->actionShow_debug_info, &QAction::triggered, this, &MainWindow::showDebugInfo);
|
connect(ui->actionShow_debug_info, &QAction::triggered, this, &MainWindow::showDebugInfo);
|
||||||
connect(ui->actionOfficialWebsite, &QAction::triggered, [=] { Utils::externalLinkWarning("https://featherwallet.org"); });
|
connect(ui->actionOfficialWebsite, &QAction::triggered, [=] { Utils::externalLinkWarning("https://featherwallet.org"); });
|
||||||
|
|
||||||
#if defined(XMRTO)
|
#if defined(HAS_XMRTO)
|
||||||
// xmr.to connects/widget
|
// xmr.to connects/widget
|
||||||
connect(ui->xmrToWidget, &XMRToWidget::viewOrder, m_ctx->XMRTo, &XmrTo::onViewOrder);
|
connect(ui->xmrToWidget, &XMRToWidget::viewOrder, m_ctx->XMRTo, &XmrTo::onViewOrder);
|
||||||
connect(ui->xmrToWidget, &XMRToWidget::getRates, m_ctx->XMRTo, &XmrTo::onGetRates);
|
connect(ui->xmrToWidget, &XMRToWidget::getRates, m_ctx->XMRTo, &XmrTo::onGetRates);
|
||||||
|
@ -118,11 +118,11 @@ MainWindow::MainWindow(AppContext *ctx, QWidget *parent) :
|
||||||
connect(m_ctx->XMRTo, &XmrTo::openURL, this, [=](const QString &url){ Utils::externalLinkWarning(url); });
|
connect(m_ctx->XMRTo, &XmrTo::openURL, this, [=](const QString &url){ Utils::externalLinkWarning(url); });
|
||||||
ui->xmrToWidget->setHistoryModel(m_ctx->XMRTo->tableModel);
|
ui->xmrToWidget->setHistoryModel(m_ctx->XMRTo->tableModel);
|
||||||
#else
|
#else
|
||||||
ui->tabWidget->setTabVisible(Tabs::XMR_TO, false);
|
ui->tabExchanges->setTabVisible(0, false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAS_MORPHTOKEN
|
#ifndef HAS_MORPHTOKEN
|
||||||
ui->tabWidget->setTabVisible(Tabs::MORPHTOKEN, false);
|
ui->tabExchanges->setTabVisible(1, false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(Q_OS_LINUX)
|
#if defined(Q_OS_LINUX)
|
||||||
|
@ -403,20 +403,12 @@ void MainWindow::initMenu() {
|
||||||
m_tabShowHideMapper["Calc"] = new ToggleTab(ui->tabCalc, "Calc", "Calc", ui->actionShow_calc, Config::showTabCalc);
|
m_tabShowHideMapper["Calc"] = new ToggleTab(ui->tabCalc, "Calc", "Calc", ui->actionShow_calc, Config::showTabCalc);
|
||||||
m_tabShowHideSignalMapper->setMapping(ui->actionShow_calc, "Calc");
|
m_tabShowHideSignalMapper->setMapping(ui->actionShow_calc, "Calc");
|
||||||
|
|
||||||
#if defined(HAS_MORPHTOKEN)
|
#if defined(HAS_XMRTO) || defined(HAS_MORPHTOKEN)
|
||||||
connect(ui->actionShow_MorphToken, &QAction::triggered, m_tabShowHideSignalMapper, QOverload<>::of(&QSignalMapper::map));
|
connect(ui->actionShow_Exchange, &QAction::triggered, m_tabShowHideSignalMapper, QOverload<>::of(&QSignalMapper::map));
|
||||||
m_tabShowHideMapper["MorphToken"] = new ToggleTab(ui->tabMorphToken, "MorphToken", "MorphToken", ui->actionShow_MorphToken, Config::showTabMorphToken);
|
m_tabShowHideMapper["Exchange"] = new ToggleTab(ui->tabExchange, "Exchange", "Exchange", ui->actionShow_Exchange, Config::showTabExchange);
|
||||||
m_tabShowHideSignalMapper->setMapping(ui->actionShow_MorphToken, "MorphToken");
|
m_tabShowHideSignalMapper->setMapping(ui->actionShow_Exchange, "Exchange");
|
||||||
#else
|
#else
|
||||||
ui->actionShow_MorphToken->setVisible(false);
|
ui->actionShow_Exchanges->setVisible(false);
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(XMRTO)
|
|
||||||
connect(ui->actionShow_xmr_to, &QAction::triggered, m_tabShowHideSignalMapper, QOverload<>::of(&QSignalMapper::map));
|
|
||||||
m_tabShowHideMapper["XMRto"] = new ToggleTab(ui->tabXmrTo, "XMRto", "XMR.to", ui->actionShow_xmr_to, Config::showTabXMRto);
|
|
||||||
m_tabShowHideSignalMapper->setMapping(ui->actionShow_xmr_to, "XMRto");
|
|
||||||
#else
|
|
||||||
ui->actionShow_xmr_to->setVisible(false);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAS_XMRIG)
|
#if defined(HAS_XMRIG)
|
||||||
|
|
|
@ -76,8 +76,7 @@ public:
|
||||||
RECEIVE,
|
RECEIVE,
|
||||||
COINS,
|
COINS,
|
||||||
CALC,
|
CALC,
|
||||||
MORPHTOKEN,
|
EXCHANGES,
|
||||||
XMR_TO,
|
|
||||||
XMRIG
|
XMRIG
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -96,7 +96,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="tabHomeWidget">
|
<widget class="QTabWidget" name="tabHomeWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>1</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="documentMode">
|
<property name="documentMode">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
@ -272,29 +272,15 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="tabMorphToken">
|
<widget class="QWidget" name="tabExchange">
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
<iconset resource="assets.qrc">
|
<iconset resource="assets.qrc">
|
||||||
<normaloff>:/assets/images/morphtoken.png</normaloff>:/assets/images/morphtoken.png</iconset>
|
<normaloff>:/assets/images/update.png</normaloff>:/assets/images/update.png</iconset>
|
||||||
</attribute>
|
</attribute>
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>MorphToken</string>
|
<string>Exchange</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
<layout class="QVBoxLayout" name="verticalLayout_8">
|
||||||
<item>
|
|
||||||
<widget class="MorphTokenWidget" name="morphtokenWidget" native="true"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="tabXmrTo">
|
|
||||||
<attribute name="icon">
|
|
||||||
<iconset resource="assets.qrc">
|
|
||||||
<normaloff>:/assets/images/xmrto.png</normaloff>:/assets/images/xmrto.png</iconset>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="title">
|
|
||||||
<string>XMR.to</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
|
@ -305,26 +291,66 @@
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>1</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="XMRToWidget" name="xmrToWidget" native="true"/>
|
<widget class="QTabWidget" name="tabExchanges">
|
||||||
</item>
|
<property name="currentIndex">
|
||||||
<item>
|
<number>0</number>
|
||||||
<spacer name="verticalSpacer_2">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeType">
|
<widget class="QWidget" name="tabXMRto">
|
||||||
<enum>QSizePolicy::Preferred</enum>
|
<attribute name="icon">
|
||||||
</property>
|
<iconset resource="assets.qrc">
|
||||||
<property name="sizeHint" stdset="0">
|
<normaloff>:/assets/images/xmrto.png</normaloff>:/assets/images/xmrto.png</iconset>
|
||||||
<size>
|
</attribute>
|
||||||
<width>20</width>
|
<attribute name="title">
|
||||||
<height>0</height>
|
<string>XMR.to</string>
|
||||||
</size>
|
</attribute>
|
||||||
</property>
|
<layout class="QVBoxLayout" name="verticalLayout_10">
|
||||||
</spacer>
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="XMRToWidget" name="xmrToWidget" native="true"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="tabMorphToken">
|
||||||
|
<attribute name="icon">
|
||||||
|
<iconset resource="assets.qrc">
|
||||||
|
<normaloff>:/assets/images/morphtoken.png</normaloff>:/assets/images/morphtoken.png</iconset>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="title">
|
||||||
|
<string>MorphToken</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_9">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="MorphTokenWidget" name="morphtokenWidget" native="true"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -465,8 +491,7 @@
|
||||||
</property>
|
</property>
|
||||||
<addaction name="actionShow_Coins"/>
|
<addaction name="actionShow_Coins"/>
|
||||||
<addaction name="actionShow_calc"/>
|
<addaction name="actionShow_calc"/>
|
||||||
<addaction name="actionShow_MorphToken"/>
|
<addaction name="actionShow_Exchange"/>
|
||||||
<addaction name="actionShow_xmr_to"/>
|
|
||||||
<addaction name="actionShow_XMRig"/>
|
<addaction name="actionShow_XMRig"/>
|
||||||
</widget>
|
</widget>
|
||||||
<addaction name="menuFile"/>
|
<addaction name="menuFile"/>
|
||||||
|
@ -713,9 +738,9 @@
|
||||||
<string>Import transaction</string>
|
<string>Import transaction</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionShow_MorphToken">
|
<action name="actionShow_Exchange">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Show MorphToken</string>
|
<string>Show Exchange</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
|
@ -41,8 +41,7 @@ static const QHash<Config::ConfigKey, ConfigDirective> configStrings = {
|
||||||
{Config::nodeSource,{QS("nodeSource"), 0}},
|
{Config::nodeSource,{QS("nodeSource"), 0}},
|
||||||
{Config::useOnionNodes,{QS("useOnionNodes"), false}},
|
{Config::useOnionNodes,{QS("useOnionNodes"), false}},
|
||||||
{Config::showTabCoins,{QS("showTabCoins"), false}},
|
{Config::showTabCoins,{QS("showTabCoins"), false}},
|
||||||
{Config::showTabMorphToken, {QS("showTabMorphToken"), false}},
|
{Config::showTabExchange, {QS("showTabExchange"), true}},
|
||||||
{Config::showTabXMRto,{QS("showTabXMRto"), true}},
|
|
||||||
{Config::showTabXMRig,{QS("showTabXMRig"), false}},
|
{Config::showTabXMRig,{QS("showTabXMRig"), false}},
|
||||||
{Config::showTabCalc,{QS("showTabCalc"), true}},
|
{Config::showTabCalc,{QS("showTabCalc"), true}},
|
||||||
{Config::geometry, {QS("geometry"), {}}},
|
{Config::geometry, {QS("geometry"), {}}},
|
||||||
|
|
|
@ -39,8 +39,7 @@ public:
|
||||||
nodeSource,
|
nodeSource,
|
||||||
useOnionNodes,
|
useOnionNodes,
|
||||||
showTabCoins,
|
showTabCoins,
|
||||||
showTabMorphToken,
|
showTabExchange,
|
||||||
showTabXMRto,
|
|
||||||
showTabCalc,
|
showTabCalc,
|
||||||
showTabXMRig,
|
showTabXMRig,
|
||||||
geometry,
|
geometry,
|
||||||
|
|
Loading…
Reference in a new issue