|
@@ -1,6 +1,5 @@
|
|
|
#include "mainwindow.h"
|
|
|
#include "ui_mainwindow.h"
|
|
|
-#include "legacyapp.h"
|
|
|
|
|
|
#include <QBitmap>
|
|
|
#include <QPainter>
|
|
@@ -21,30 +20,22 @@ MainWindow::MainWindow(QWidget *parent) :
|
|
|
qDebug() << "Initialising Settings module";
|
|
|
QSettings *settings = new QSettings(qApp->applicationDirPath() + "/legacy_v2.ini", QSettings::IniFormat);
|
|
|
|
|
|
-
|
|
|
- qDebug() << "Creating lotro manager instance & thread";
|
|
|
- lotro_mgr_thread = new QThread();
|
|
|
- lotro_manager = new LotroManager(settings);
|
|
|
- QObject::connect(lotro_mgr_thread, &QThread::finished, lotro_manager, &QObject::deleteLater, Qt::QueuedConnection);
|
|
|
- lotro_manager->moveToThread(lotro_mgr_thread);
|
|
|
- lotro_mgr_thread->start();
|
|
|
-
|
|
|
status_widget = new StatusWidget(this);
|
|
|
rusification_widget = new RusificationWidget(this);
|
|
|
settings_widget = new SettingsWidget(this);
|
|
|
news_widget = new NewsWidget(this);
|
|
|
help_widget = new HelpWidget(this);
|
|
|
|
|
|
- ui->content_layout->addWidget(status_frame);
|
|
|
- ui->content_layout->addWidget(rusification_frame);
|
|
|
- ui->content_layout->addWidget(settings_frame);
|
|
|
- ui->content_layout->addWidget(news_frame);
|
|
|
- ui->content_layout->addWidget(help_frame);
|
|
|
+ ui->content_layout->addWidget(status_widget);
|
|
|
+ ui->content_layout->addWidget(rusification_widget);
|
|
|
+ ui->content_layout->addWidget(settings_widget);
|
|
|
+ ui->content_layout->addWidget(news_widget);
|
|
|
+ ui->content_layout->addWidget(help_widget);
|
|
|
|
|
|
ui->centralWidget->setStyleSheet("");
|
|
|
|
|
|
hideAllContentWidgets();
|
|
|
- status_frame->show();
|
|
|
+ status_widget->show();
|
|
|
|
|
|
qDebug() << "Making fonts and making background";
|
|
|
changeFontSizeRecursive(100, this);
|
|
@@ -97,23 +88,7 @@ void MainWindow::resizeEvent(QResizeEvent * event)
|
|
|
|
|
|
ui->content_area->move(width * 25 / 2000, height * 250 / 1296);
|
|
|
ui->content_area->resize(width * 1950 / 2000, height * 1000 / 1296);
|
|
|
- setupWindowBackgroundAndMask();
|
|
|
-}
|
|
|
-
|
|
|
-void MainWindow::enableMenuItems()
|
|
|
-{
|
|
|
- ui->menuentry_1_common->setEnabled(true);
|
|
|
- ui->menuentry_2_common->setEnabled(true);
|
|
|
- ui->menuentry_3_common->setEnabled(true);
|
|
|
- ui->menuentry_4_common->setEnabled(true);
|
|
|
-}
|
|
|
-
|
|
|
-void MainWindow::disableMenuItems()
|
|
|
-{
|
|
|
- ui->menuentry_1_common->setEnabled(false);
|
|
|
- ui->menuentry_2_common->setEnabled(false);
|
|
|
- ui->menuentry_3_common->setEnabled(false);
|
|
|
- ui->menuentry_4_common->setEnabled(false);
|
|
|
+ setupWindowBackgroundAndMask(current_bg);
|
|
|
}
|
|
|
|
|
|
|