|
@@ -33,7 +33,6 @@ MainWindow::MainWindow(QWidget *parent)
|
|
|
, current_active_entry_(nullptr)
|
|
|
, current_hovered_entry_(nullptr)
|
|
|
, status_widget_(nullptr)
|
|
|
- , settings_widget_(nullptr)
|
|
|
, help_widget_(nullptr)
|
|
|
, about_widget_(nullptr)
|
|
|
, choose_locale_dialog_(nullptr)
|
|
@@ -49,20 +48,13 @@ MainWindow::MainWindow(QWidget *parent)
|
|
|
|
|
|
qDebug() << __FUNCTION__ << "Initialising main frame...";
|
|
|
status_widget_ = new StatusWidget(this);
|
|
|
- settings_widget_ = new SettingsWidget(this);
|
|
|
help_widget_ = new HelpWidget(this);
|
|
|
about_widget_ = new AboutWidget(this);
|
|
|
|
|
|
ui->content_layout->addWidget(status_widget_);
|
|
|
- ui->content_layout->addWidget(settings_widget_);
|
|
|
ui->content_layout->addWidget(help_widget_);
|
|
|
ui->content_layout->addWidget(about_widget_);
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
|
|
|
hideAllContentWidgets();
|
|
|
status_widget_->show();
|
|
@@ -236,17 +228,9 @@ void MainWindow::on_menuentry_2_clicked()
|
|
|
{
|
|
|
current_active_entry_ = ui->menuentry_2;
|
|
|
hideAllContentWidgets();
|
|
|
-
|
|
|
help_widget_->show();
|
|
|
}
|
|
|
|
|
|
-void MainWindow::on_menuentry_3_clicked()
|
|
|
-{
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-}
|
|
|
-
|
|
|
void MainWindow::on_menuentry_4_clicked()
|
|
|
{
|
|
|
current_active_entry_ = ui->menuentry_4;
|
|
@@ -298,7 +282,6 @@ void MainWindow::setupMenuHoverWidget()
|
|
|
|
|
|
connect(ui->menuentry_1, &MenuEntry::entryIsHovered, this, &MainWindow::onHoverMenuentry);
|
|
|
connect(ui->menuentry_2, &MenuEntry::entryIsHovered, this, &MainWindow::onHoverMenuentry);
|
|
|
-
|
|
|
connect(ui->menuentry_4, &MenuEntry::entryIsHovered, this, &MainWindow::onHoverMenuentry);
|
|
|
|
|
|
current_active_entry_ = ui->menuentry_1;
|
|
@@ -326,7 +309,6 @@ void MainWindow::moveMenuHoverWidget(MenuEntry *target)
|
|
|
|
|
|
ui->menuentry_1->raise();
|
|
|
ui->menuentry_2->raise();
|
|
|
-
|
|
|
ui->menuentry_4->raise();
|
|
|
}
|
|
|
|
|
@@ -344,7 +326,6 @@ void MainWindow::checkMenuIsHovered()
|
|
|
void MainWindow::hideAllContentWidgets()
|
|
|
{
|
|
|
status_widget_->hide();
|
|
|
- settings_widget_->hide();
|
|
|
help_widget_->hide();
|
|
|
about_widget_->hide();
|
|
|
}
|
|
@@ -353,7 +334,6 @@ void MainWindow::updateFontSizes()
|
|
|
{
|
|
|
ui->menuentry_1->setFont(trajan_9pt);
|
|
|
ui->menuentry_2->setFont(trajan_9pt);
|
|
|
-
|
|
|
ui->menuentry_4->setFont(trajan_9pt);
|
|
|
}
|
|
|
|
|
@@ -377,21 +357,6 @@ void MainWindow::closeEvent(QCloseEvent *event)
|
|
|
event->ignore();
|
|
|
}
|
|
|
|
|
|
-void MainWindow::showChooseVersionDialog()
|
|
|
-{
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- choose_locale_dialog_->show();
|
|
|
-}
|
|
|
-
|
|
|
-void MainWindow::hideChooseVersionDialog()
|
|
|
-{
|
|
|
-
|
|
|
- choose_locale_dialog_->hide();
|
|
|
-}
|
|
|
-
|
|
|
void MainWindow::onErrorStatusChanged(AppErrorStatus status)
|
|
|
{
|
|
|
|
|
@@ -410,8 +375,9 @@ void MainWindow::on_minimizeButton_clicked()
|
|
|
|
|
|
void MainWindow::setEventFilterRecursive(QObject *widget)
|
|
|
{
|
|
|
- if (!widget)
|
|
|
+ if (!widget) {
|
|
|
return;
|
|
|
+ }
|
|
|
|
|
|
widget->installEventFilter(this);
|
|
|
|
|
@@ -420,7 +386,7 @@ void MainWindow::setEventFilterRecursive(QObject *widget)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-bool MainWindow::eventFilter(QObject *watched, QEvent *event)
|
|
|
+bool MainWindow::eventFilter(QObject *, QEvent *event)
|
|
|
{
|
|
|
if (event->type() == QEvent::MouseButtonPress) {
|
|
|
mousePressEvent((QMouseEvent*)(event));
|