|
|
|
@ -34,12 +34,17 @@ MainWindow::MainWindow(QWidget *parent) :
|
|
|
|
|
daemonManager->setMonerodPath(monerodPath);
|
|
|
|
|
connect(daemonManager, &DaemonManager::daemonConsoleUpdated, this, &MainWindow::writeLogLine);
|
|
|
|
|
|
|
|
|
|
connect(m_showWindow, &QAction::triggered, [this]{
|
|
|
|
|
this->show();
|
|
|
|
|
this->raise();
|
|
|
|
|
this->activateWindow();
|
|
|
|
|
this->setFocus();
|
|
|
|
|
connect(m_trayIcon, &QSystemTrayIcon::activated, [this](QSystemTrayIcon::ActivationReason reason){
|
|
|
|
|
switch (reason) {
|
|
|
|
|
case QSystemTrayIcon::ActivationReason::Trigger:
|
|
|
|
|
case QSystemTrayIcon::ActivationReason::DoubleClick:
|
|
|
|
|
case QSystemTrayIcon::ActivationReason::MiddleClick:
|
|
|
|
|
this->showWindow();
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
connect(m_showWindow, &QAction::triggered, this, &MainWindow::showWindow);
|
|
|
|
|
|
|
|
|
|
connect(ui->btn_Configure, &QPushButton::clicked, this, &MainWindow::showConfigurator);
|
|
|
|
|
connect(ui->commandPrompt, &CommandLineEdit::commandExecuted, this, &MainWindow::sendCommand);
|
|
|
|
@ -228,6 +233,13 @@ QString MainWindow::loadStylesheet(const QString &resource) {
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void MainWindow::showWindow() {
|
|
|
|
|
this->show();
|
|
|
|
|
this->raise();
|
|
|
|
|
this->activateWindow();
|
|
|
|
|
this->setFocus();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MainWindow::~MainWindow()
|
|
|
|
|
{
|
|
|
|
|
delete ui;
|
|
|
|
|