|
@ -30,6 +30,12 @@ Controller::Controller(MainWindow* main) |
|
|
this->main = main; |
|
|
this->main = main; |
|
|
this->ui = main->ui; |
|
|
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
|
|
|
// Setup balances table model
|
|
|
balancesTableModel = new BalancesTableModel(main->ui->balancesTable); |
|
|
balancesTableModel = new BalancesTableModel(main->ui->balancesTable); |
|
|
main->ui->balancesTable->setModel(balancesTableModel); |
|
|
main->ui->balancesTable->setModel(balancesTableModel); |
|
@ -38,6 +44,7 @@ Controller::Controller(MainWindow* main) |
|
|
transactionsTableModel = new TxTableModel(ui->transactionsTable); |
|
|
transactionsTableModel = new TxTableModel(ui->transactionsTable); |
|
|
main->ui->transactionsTable->setModel(transactionsTableModel); |
|
|
main->ui->transactionsTable->setModel(transactionsTableModel); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Set up timer to refresh Price
|
|
|
// Set up timer to refresh Price
|
|
|
priceTimer = new QTimer(main); |
|
|
priceTimer = new QTimer(main); |
|
|
QObject::connect(priceTimer, &QTimer::timeout, [=]() { |
|
|
QObject::connect(priceTimer, &QTimer::timeout, [=]() { |
|
@ -61,10 +68,6 @@ Controller::Controller(MainWindow* main) |
|
|
}); |
|
|
}); |
|
|
timer->start(Settings::priceRefreshSpeed); |
|
|
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
|
|
|
// Create the data model
|
|
|
model = new DataModel(); |
|
|
model = new DataModel(); |
|
|
|
|
|
|
|
|