From e7a23a4bfb07ec560a9436745f9f6377b267bf8c Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Fri, 5 Nov 2021 08:55:40 -0700 Subject: [PATCH 1/2] Start implementing the showing of server details in Hushd Tab --- src/controller.cpp | 4 ++++ src/mainwindow.ui | 47 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/src/controller.cpp b/src/controller.cpp index 3ba422b..51ee296 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -61,6 +61,10 @@ Controller::Controller(MainWindow* main) }); timer->start(Settings::priceRefreshSpeed); + main->ui->current_server->setText("current.server"); + main->ui->config_server->setText("config.server"); + main->ui->sticky_server->setText("Sticky?"); + // Create the data model model = new DataModel(); diff --git a/src/mainwindow.ui b/src/mainwindow.ui index 1b239a9..ebce774 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -1682,6 +1682,7 @@ + @@ -1689,6 +1690,52 @@ + + + + + Current Server + + + + + + + ... + + + + + + + + Configured Server + + + + + + + ... + + + + + + + + Sticky Server + + + + + + + ... + + + + From 532d8824ab1bb1de918110db451ba1fdcb16e077 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Fri, 5 Nov 2021 13:02:36 -0400 Subject: [PATCH 2/2] Render current server in hushd tab --- src/controller.cpp | 11 +++++++---- src/mainwindow.ui | 45 ++++++++++++++++++++++----------------------- 2 files changed, 29 insertions(+), 27 deletions(-) diff --git a/src/controller.cpp b/src/controller.cpp index 51ee296..4b3b89b 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -30,6 +30,12 @@ Controller::Controller(MainWindow* main) this->main = main; this->ui = main->ui; + auto current_server = Settings::getInstance()->getSettings().server; + main->ui->current_server->setText(current_server); + + auto stickyServer = Settings::getInstance()->getSettings().stickyServer; + main->ui->sticky_server->setText( stickyServer ? "True" : "False" ); + // Setup balances table model balancesTableModel = new BalancesTableModel(main->ui->balancesTable); main->ui->balancesTable->setModel(balancesTableModel); @@ -37,6 +43,7 @@ Controller::Controller(MainWindow* main) // Setup transactions table model transactionsTableModel = new TxTableModel(ui->transactionsTable); main->ui->transactionsTable->setModel(transactionsTableModel); + // Set up timer to refresh Price priceTimer = new QTimer(main); @@ -61,10 +68,6 @@ Controller::Controller(MainWindow* main) }); timer->start(Settings::priceRefreshSpeed); - main->ui->current_server->setText("current.server"); - main->ui->config_server->setText("config.server"); - main->ui->sticky_server->setText("Sticky?"); - // Create the data model model = new DataModel(); diff --git a/src/mainwindow.ui b/src/mainwindow.ui index ebce774..68f4cd9 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -1692,46 +1692,45 @@ - + Current Server - - + + - ... + <html><head/><body><p align="center">|</p></body></html> + + + + + + + Loading... - - - Configured Server - - - - - - - ... - - - - - - + Sticky Server - - + + - ... + <html><head/><body><p align="center">|</p></body></html> + + + + + + + Loading...