Pārlūkot izejas kodu

Legacy project restructured, moved resources to project root folder

Ivan Arkhipov 6 gadi atpakaļ
vecāks
revīzija
193a95050b

+ 2 - 2
src/Legacy-advanced/build_res.pri → build_res.pri

@@ -9,8 +9,8 @@ exists($$BIN_PATH/res) {
 }
 
 EXT_RES =                                                                   \
-    "$$PWD/resources/backgrounds.qrc            -o $$BIN_PATH/data01.gtr"     \
-    "$$PWD/resources/common.qrc                 -o $$BIN_PATH/data02.gtr"     \
+    "$${PROJECT_ROOT_PATH}/resources/backgrounds.qrc            -o $$BIN_PATH/data01.gtr"     \
+    "$${PROJECT_ROOT_PATH}/resources/common.qrc                 -o $$BIN_PATH/data02.gtr"     \
 
 for (RES, EXT_RES) {
     win32 {

+ 4 - 8
src/Legacy-advanced/Legacy-advanced.pro

@@ -61,11 +61,7 @@ FORMS += \
     widgets\messagedialog.ui \
     widgets\lotroprogresswidget.ui
 
-RESOURCES += \
-    resources\backgrounds.qrc \
-    resources\common.qrc
-
-win32:RC_ICONS = $$PWD/resources/appicon.ico
+win32:RC_ICONS = $${PROJECT_ROOT_PATH}/resources/appicon.ico
 
 INCLUDEPATH += $$PWD/src
 INCLUDEPATH += $$PWD/widgets
@@ -77,8 +73,8 @@ LIBS += -llibzlibstatic
 
 CONFIG(debug, debug|release) {
         RESOURCES += \
-                resources/backgrounds.qrc \
-                resources/common.qrc
+                $${PROJECT_ROOT_PATH}/resources/backgrounds.qrc \
+                $${PROJECT_ROOT_PATH}/resources/common.qrc
 } else {
-        include(build_res.pri)
+        include(../../build_res.pri)
 }

+ 1 - 1
src/Legacy-advanced/Legacy-advanced_resource.rc

@@ -1,6 +1,6 @@
 #include <windows.h>
 
-IDI_ICON1	ICON	DISCARDABLE	"D:\\Programming\\SourceRepos\\Legacy_v2\\src\\Legacy-advanced\\resources\\appicon.ico"
+IDI_ICON1	ICON	DISCARDABLE	"D:\\Programming\\SourceRepos\\Legacy_v2\\resources\\appicon.ico"
 
 VS_VERSION_INFO VERSIONINFO
 	FILEVERSION 0,0,0,0

+ 0 - 2
src/Legacy-advanced/object_script.Legacy-advanced.Release

@@ -1,6 +1,4 @@
 INPUT(
-./..\..\build\release\Legacy-advanced\rcc\qrc_backgrounds.o
-./..\..\build\release\Legacy-advanced\rcc\qrc_common.o
 ./..\..\build\release\Legacy-advanced\obj\main.o
 ./..\..\build\release\Legacy-advanced\obj\downloader.o
 ./..\..\build\release\Legacy-advanced\obj\filesystem.o

+ 4 - 4
src/Legacy/Legacy.pro

@@ -48,7 +48,7 @@ FORMS += \
     widgets/settingswidget.ui \
     widgets/statuswidget.ui
 
-win32:RC_ICONS = $$PWD/resources/appicon.ico
+win32:RC_ICONS = $${PROJECT_ROOT_PATH}/resources/appicon.ico
 
 INCLUDEPATH += $$PWD/src
 INCLUDEPATH += $$PWD/gui
@@ -60,8 +60,8 @@ LIBS += -llibzlibstatic
 
 CONFIG(debug, debug|release) {
         RESOURCES += \
-                resources/backgrounds.qrc \
-                resources/common.qrc
+                $${PROJECT_ROOT_PATH}/resources/backgrounds.qrc \
+                $${PROJECT_ROOT_PATH}/resources/common.qrc
 } else {
-        include(build_res.pri)
+        include(../../build_res.pri)
 }

+ 1 - 1
src/Legacy/Legacy_resource.rc

@@ -1,6 +1,6 @@
 #include <windows.h>
 
-IDI_ICON1	ICON	DISCARDABLE	"D:\\Programming\\SourceRepos\\Legacy_v2\\src\\Legacy\\resources\\appicon.ico"
+IDI_ICON1	ICON	DISCARDABLE	"D:\\Programming\\SourceRepos\\Legacy_v2\\resources\\appicon.ico"
 
 VS_VERSION_INFO VERSIONINFO
 	FILEVERSION 0,0,0,0

+ 0 - 26
src/Legacy/build_res.pri

@@ -1,26 +0,0 @@
-message(==========BUILDING EXTERNAL RES============)
-
-guiRes.target = BuildResources
-exists($$BIN_PATH/res) {
-    message("Directory $$BIN_PATH/res already exists")
-} else {
-    message("Directory $$BIN_PATH/res DOES NOT exist")
-    guiRes.commands += $(MKDIR) \"$$BIN_PATH/res\" $$escape_expand(\n\t)
-}
-
-EXT_RES =                                                                   \
-    "$$PWD/resources/backgrounds.qrc            -o $$BIN_PATH/data01.gtr"     \
-    "$$PWD/resources/common.qrc                 -o $$BIN_PATH/data02.gtr"     \
-
-for (RES, EXT_RES) {
-    win32 {
-        message(rcc.exe -binary $${RES})
-        guiRes.commands += rcc.exe -binary $${RES} $$escape_expand(\n\t)
-    }
-    unix {
-        guiRes.commands += rcc -binary $${RES} $$escape_expand(\n\t)
-    }
-}
-
-QMAKE_EXTRA_TARGETS += guiRes
-PRE_TARGETDEPS += BuildResources

+ 13 - 13
src/Legacy/object_script.Legacy.Debug

@@ -2,26 +2,26 @@ INPUT(
 ./..\..\build\debug\Legacy\rcc\qrc_backgrounds.o
 ./..\..\build\debug\Legacy\rcc\qrc_common.o
 ./..\..\build\debug\Legacy\obj\main.o
+./..\..\build\debug\Legacy\obj\downloader.o
+./..\..\build\debug\Legacy\obj\filesystem.o
+./..\..\build\debug\Legacy\obj\lotromanager.o
+./..\..\build\debug\Legacy\obj\helpwidget.o
 ./..\..\build\debug\Legacy\obj\mainwindow.o
 ./..\..\build\debug\Legacy\obj\menuentry.o
-./..\..\build\debug\Legacy\obj\legacyapp.o
-./..\..\build\debug\Legacy\obj\filesystem.o
-./..\..\build\debug\Legacy\obj\statuswidget.o
-./..\..\build\debug\Legacy\obj\rusificationwidget.o
-./..\..\build\debug\Legacy\obj\settingswidget.o
 ./..\..\build\debug\Legacy\obj\newswidget.o
-./..\..\build\debug\Legacy\obj\helpwidget.o
-./..\..\build\debug\Legacy\obj\networkdownloader.o
 ./..\..\build\debug\Legacy\obj\rusificationtreeitem.o
+./..\..\build\debug\Legacy\obj\rusificationwidget.o
+./..\..\build\debug\Legacy\obj\settingswidget.o
+./..\..\build\debug\Legacy\obj\statuswidget.o
 ./..\..\build\debug\Legacy\obj\legacy_plugin_import.o
+./..\..\build\debug\Legacy\obj\moc_downloader.o
+./..\..\build\debug\Legacy\obj\moc_filesystem.o
+./..\..\build\debug\Legacy\obj\moc_lotromanager.o
+./..\..\build\debug\Legacy\obj\moc_helpwidget.o
 ./..\..\build\debug\Legacy\obj\moc_mainwindow.o
 ./..\..\build\debug\Legacy\obj\moc_menuentry.o
-./..\..\build\debug\Legacy\obj\moc_legacyapp.o
-./..\..\build\debug\Legacy\obj\moc_filesystem.o
-./..\..\build\debug\Legacy\obj\moc_statuswidget.o
+./..\..\build\debug\Legacy\obj\moc_newswidget.o
 ./..\..\build\debug\Legacy\obj\moc_rusificationwidget.o
 ./..\..\build\debug\Legacy\obj\moc_settingswidget.o
-./..\..\build\debug\Legacy\obj\moc_newswidget.o
-./..\..\build\debug\Legacy\obj\moc_helpwidget.o
-./..\..\build\debug\Legacy\obj\moc_networkdownloader.o
+./..\..\build\debug\Legacy\obj\moc_statuswidget.o
 );

+ 13 - 13
src/Legacy/object_script.Legacy.Release

@@ -1,25 +1,25 @@
 INPUT(
 ./..\..\build\release\Legacy\obj\main.o
+./..\..\build\release\Legacy\obj\downloader.o
+./..\..\build\release\Legacy\obj\filesystem.o
+./..\..\build\release\Legacy\obj\lotromanager.o
+./..\..\build\release\Legacy\obj\helpwidget.o
 ./..\..\build\release\Legacy\obj\mainwindow.o
 ./..\..\build\release\Legacy\obj\menuentry.o
-./..\..\build\release\Legacy\obj\legacyapp.o
-./..\..\build\release\Legacy\obj\filesystem.o
-./..\..\build\release\Legacy\obj\statuswidget.o
-./..\..\build\release\Legacy\obj\rusificationwidget.o
-./..\..\build\release\Legacy\obj\settingswidget.o
 ./..\..\build\release\Legacy\obj\newswidget.o
-./..\..\build\release\Legacy\obj\helpwidget.o
-./..\..\build\release\Legacy\obj\networkdownloader.o
 ./..\..\build\release\Legacy\obj\rusificationtreeitem.o
+./..\..\build\release\Legacy\obj\rusificationwidget.o
+./..\..\build\release\Legacy\obj\settingswidget.o
+./..\..\build\release\Legacy\obj\statuswidget.o
 ./..\..\build\release\Legacy\obj\legacy_plugin_import.o
+./..\..\build\release\Legacy\obj\moc_downloader.o
+./..\..\build\release\Legacy\obj\moc_filesystem.o
+./..\..\build\release\Legacy\obj\moc_lotromanager.o
+./..\..\build\release\Legacy\obj\moc_helpwidget.o
 ./..\..\build\release\Legacy\obj\moc_mainwindow.o
 ./..\..\build\release\Legacy\obj\moc_menuentry.o
-./..\..\build\release\Legacy\obj\moc_legacyapp.o
-./..\..\build\release\Legacy\obj\moc_filesystem.o
-./..\..\build\release\Legacy\obj\moc_statuswidget.o
+./..\..\build\release\Legacy\obj\moc_newswidget.o
 ./..\..\build\release\Legacy\obj\moc_rusificationwidget.o
 ./..\..\build\release\Legacy\obj\moc_settingswidget.o
-./..\..\build\release\Legacy\obj\moc_newswidget.o
-./..\..\build\release\Legacy\obj\moc_helpwidget.o
-./..\..\build\release\Legacy\obj\moc_networkdownloader.o
+./..\..\build\release\Legacy\obj\moc_statuswidget.o
 );

+ 7 - 32
src/Legacy/widgets/mainwindow.cpp

@@ -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);
 }
 
 

+ 6 - 9
src/Legacy/widgets/mainwindow.ui

@@ -22,9 +22,6 @@
   <property name="autoFillBackground">
    <bool>false</bool>
   </property>
-  <property name="styleSheet">
-   <string notr="true"/>
-  </property>
   <property name="animated">
    <bool>false</bool>
   </property>
@@ -42,7 +39,7 @@
     <bool>false</bool>
    </property>
    <property name="styleSheet">
-    <string notr="true">border-image: url(:/assets/backgrounds/bg1.png);</string>
+    <string notr="true">border-image: url(:/backgrounds/bg1.png);</string>
    </property>
    <widget class="QWidget" name="content_area" native="true">
     <property name="geometry">
@@ -366,9 +363,9 @@
            </size>
           </property>
           <property name="styleSheet">
-           <string notr="true">QPushButton#minimizeButton {border-image: url(:/assets/buttons/minimize.png) 0 0 0 0 stretch stretch; border: 0px;}
+           <string notr="true">QPushButton#minimizeButton {border-image: url(:/buttons/minimize.png) 0 0 0 0 stretch stretch; border: 0px;}
 
-QPushButton#minimizeButton:hover {border-image: url(:/assets/buttons/minimize.png) 0 0 0 0 stretch stretch; border: 1px;}
+QPushButton#minimizeButton:hover {border-image: url(:/buttons/minimize.png) 0 0 0 0 stretch stretch; border: 1px;}
 
 </string>
           </property>
@@ -386,9 +383,9 @@ QPushButton#minimizeButton:hover {border-image: url(:/assets/buttons/minimize.pn
            </size>
           </property>
           <property name="styleSheet">
-           <string notr="true">QPushButton#closeButton { border-image: url(:/assets/buttons/close.png) 0 0 0 0 stretch stretch; }
+           <string notr="true">QPushButton#closeButton { border-image: url(:/buttons/close.png) 0 0 0 0 stretch stretch; }
 
-QPushButton#closeButton:hover { border-image: url(:/assets/buttons/close.png) 0 0 0 0 stretch stretch; border:1px;}</string>
+QPushButton#closeButton:hover { border-image: url(:/buttons/close.png) 0 0 0 0 stretch stretch; border:1px;}</string>
           </property>
           <property name="text">
            <string>Х</string>
@@ -407,7 +404,7 @@ QPushButton#closeButton:hover { border-image: url(:/assets/buttons/close.png) 0
   <customwidget>
    <class>MenuEntry</class>
    <extends>QLabel</extends>
-   <header>menuentry.h</header>
+   <header>widgets/menuentry.h</header>
   </customwidget>
  </customwidgets>
  <resources/>

+ 1 - 1
src/Legacy/widgets/newswidget.cpp

@@ -53,7 +53,7 @@ void NewsWidget::updateNews()
         constructNewsPiece(i, news_title, news_desrc, news_src);
 
         QtConcurrent::run([i, this, img_src](){
-            NetworkDownloader img_dwnld;
+            Downloader img_dwnld;
             QByteArray img;
             img_dwnld.setUrl(QUrl(img_src));
             img_dwnld.targetBytearray = &img;

+ 99 - 102
src/Legacy/widgets/settingswidget.cpp

@@ -1,20 +1,17 @@
-#include "gui\settingswidget.h"
+#include "widgets/settingswidget.h"
 #include "ui_settingswidget.h"
-#include "legacyapp.h"
-#include "filesystem.h"
+#include "models/filesystem.h"
 
 #include <QDebug>
 #include <QFileDialog>
 #include <QMessageBox>
 
 
-SettingsWidget::SettingsWidget(LegacyApp *_app, QWidget *parent) :
+SettingsWidget::SettingsWidget(QWidget *parent) :
     QWidget(parent),
-    ui(new Ui::SettingsWidget),
-    app(_app)
+    ui(new Ui::SettingsWidget)
 {
     ui->setupUi(this);
-
     ui_update_timer.setInterval(500);
     connect(&ui_update_timer, &QTimer::timeout, this, &SettingsWidget::updateUI);
     ui_update_timer.start();
@@ -31,136 +28,136 @@ void SettingsWidget::updateUI()
     if (!qApp)
         return;
 
-    QString path = app->properties.value("settings/lotro_folder", "(не выбрана)").toString();
-    ui->folder_value_common->setText(path);
-
-    ui->data_protection_checkbox_common->setChecked(app->properties.value("settings/data_protection", 1).toBool());
-    ui->restore_checkbox_common->setChecked(app->properties.value("settings/auto_restore", 1).toBool());
-    ui->download_updates_checkbox_common->setChecked(app->properties.value("settings/download_updates", 1).toBool());
-    ui->expert_tabs_checkbox_common->setChecked(app->properties.value("settings/expert_mode", 0).toBool());
-    ui->restrict_download_speed_checkbox_common->setChecked(app->properties.value("settings/limit_download_speed", 0).toBool());
-    ui->download_restrict_slider->setValue(app->properties.value("settings/download_speed", 64).toInt());
-
-    if (app->properties.value("settings/expert_mode", 0).toBool()) {
-        ui->management_widget->show();
-        ui->data_protection_checkbox_common->show();
-        ui->restore_checkbox_common->show();
-    } else {
-        ui->management_widget->hide();
-        ui->data_protection_checkbox_common->hide();
-        ui->restore_checkbox_common->hide();
-    }
-
-    int locale_index = 0;
-    QString value = app->properties.value("settings/locale", "English").toString();
-
-    if (value == "English")
-        locale_index = 0;
-    if (value == "DE")
-        locale_index = 1;
-    if (value == "FR")
-        locale_index = 2;
-
-    ui->lotro_patch_language_combobox_common->setCurrentIndex(locale_index);
+//    QString path = app->properties.value("settings/lotro_folder", "(не выбрана)").toString();
+//    ui->folder_value_common->setText(path);
+
+//    ui->data_protection_checkbox_common->setChecked(app->properties.value("settings/data_protection", 1).toBool());
+//    ui->restore_checkbox_common->setChecked(app->properties.value("settings/auto_restore", 1).toBool());
+//    ui->download_updates_checkbox_common->setChecked(app->properties.value("settings/download_updates", 1).toBool());
+//    ui->expert_tabs_checkbox_common->setChecked(app->properties.value("settings/expert_mode", 0).toBool());
+//    ui->restrict_download_speed_checkbox_common->setChecked(app->properties.value("settings/limit_download_speed", 0).toBool());
+//    ui->download_restrict_slider->setValue(app->properties.value("settings/download_speed", 64).toInt());
+
+//    if (app->properties.value("settings/expert_mode", 0).toBool()) {
+//        ui->management_widget->show();
+//        ui->data_protection_checkbox_common->show();
+//        ui->restore_checkbox_common->show();
+//    } else {
+//        ui->management_widget->hide();
+//        ui->data_protection_checkbox_common->hide();
+//        ui->restore_checkbox_common->hide();
+//    }
+
+//    int locale_index = 0;
+//    QString value = app->properties.value("settings/locale", "English").toString();
+
+//    if (value == "English")
+//        locale_index = 0;
+//    if (value == "DE")
+//        locale_index = 1;
+//    if (value == "FR")
+//        locale_index = 2;
+
+//    ui->lotro_patch_language_combobox_common->setCurrentIndex(locale_index);
 }
 
 void SettingsWidget::on_download_restrict_slider_valueChanged(int value)
 {
-    if (value >= 1024) {
-        double new_value = double(value) / 1024;
-        ui->download_speed_label_common->setText(QString::number(new_value, 'g', 2) + " Мб/с");
-    } else {
-        ui->download_speed_label_common->setText(QString::number(value) + " Кб/с");
-    }
-    app->properties.setValue("settings/download_speed", value);
-    app->properties.sync();
+//    if (value >= 1024) {
+//        double new_value = double(value) / 1024;
+//        ui->download_speed_label_common->setText(QString::number(new_value, 'g', 2) + " Мб/с");
+//    } else {
+//        ui->download_speed_label_common->setText(QString::number(value) + " Кб/с");
+//    }
+//    app->properties.setValue("settings/download_speed", value);
+//    app->properties.sync();
 }
 
 void SettingsWidget::on_interface_scale_combobox_common_currentIndexChanged(const QString &arg1)
 {
-    int value = arg1.left(arg1.length() - 1).toInt();
-    app->window.changeFontSizeRecursive(value, &app->window);
-    app->window.resize(900 * value / 100, 650 * value / 100);
-    app->properties.setValue("settings/ui_scale", value);
-    app->properties.sync();
+//    int value = arg1.left(arg1.length() - 1).toInt();
+//    app->window.changeFontSizeRecursive(value, &app->window);
+//    app->window.resize(900 * value / 100, 650 * value / 100);
+//    app->properties.setValue("settings/ui_scale", value);
+//    app->properties.sync();
 }
 
 void SettingsWidget::on_change_folder_button_clicked()
 {
-    QStringList known_paths = FileSystem::recognizeRegistryLotroPath();
-    QString template_path = known_paths.size() > 0 ? known_paths[0] : "";
-    QString str = QFileDialog::getOpenFileName(0, "Расположение игры", template_path, "LotroLauncher.exe");
-    QString path = str.replace("/LotroLauncher.exe", "").replace("\\", "/").replace("//", "/");
-
-    if (!FileSystem::fileExists(path + "/LotroLauncher.exe")) {
-        QMessageBox error_box("Ошибка!", "Похоже, указана неверная папка с игрой. Не могу найти файл LotroLauncher.exe",
-                              QMessageBox::Critical, QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton);
-
-        return;
-    }
-
-    if (!FileSystem::fileExists(path + "/client_local_English.dat")) {
-        QMessageBox pmbx("Файл данных не найден",
-                         "Файл данных client_local_English.dat не обнаружен в папке с игрой. Запустить лаунчер игры с целью скачать недостающие данные?",
-                         QMessageBox::Warning,
-                         QMessageBox::Yes,
-                         QMessageBox::No,
-                         QMessageBox::NoButton);
-
-        if (pmbx.exec() == QMessageBox::Yes) {
-            // Start LotRO;
-            return;
-        } else {
-            // Set status Файл данных не найден
-        }
-    }
-
-    app->properties.setValue("settings/lotro_folder", path);
-    app->properties.sync();
-    ui->folder_value_common->setText(path);
+//    QStringList known_paths = FileSystem::recognizeRegistryLotroPath();
+//    QString template_path = known_paths.size() > 0 ? known_paths[0] : "";
+//    QString str = QFileDialog::getOpenFileName(0, "Расположение игры", template_path, "LotroLauncher.exe");
+//    QString path = str.replace("/LotroLauncher.exe", "").replace("\\", "/").replace("//", "/");
+
+//    if (!FileSystem::fileExists(path + "/LotroLauncher.exe")) {
+//        QMessageBox error_box("Ошибка!", "Похоже, указана неверная папка с игрой. Не могу найти файл LotroLauncher.exe",
+//                              QMessageBox::Critical, QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton);
+
+//        return;
+//    }
+
+//    if (!FileSystem::fileExists(path + "/client_local_English.dat")) {
+//        QMessageBox pmbx("Файл данных не найден",
+//                         "Файл данных client_local_English.dat не обнаружен в папке с игрой. Запустить лаунчер игры с целью скачать недостающие данные?",
+//                         QMessageBox::Warning,
+//                         QMessageBox::Yes,
+//                         QMessageBox::No,
+//                         QMessageBox::NoButton);
+
+//        if (pmbx.exec() == QMessageBox::Yes) {
+//            // Start LotRO;
+//            return;
+//        } else {
+//            // Set status Файл данных не найден
+//        }
+//    }
+
+//    app->properties.setValue("settings/lotro_folder", path);
+//    app->properties.sync();
+//    ui->folder_value_common->setText(path);
 }
 
 void SettingsWidget::on_data_protection_checkbox_common_stateChanged(int arg1)
 {
-    app->properties.setValue("settings/data_protection", arg1);
-    app->properties.sync();
+//    app->properties.setValue("settings/data_protection", arg1);
+//    app->properties.sync();
 }
 
 void SettingsWidget::on_restore_checkbox_common_stateChanged(int arg1)
 {
-    app->properties.setValue("settings/auto_restore", arg1);
-    app->properties.sync();
+//    app->properties.setValue("settings/auto_restore", arg1);
+//    app->properties.sync();
 }
 
 void SettingsWidget::on_download_updates_checkbox_common_stateChanged(int arg1)
 {
-    app->properties.setValue("settings/download_updates", arg1);
-    app->properties.sync();
+//    app->properties.setValue("settings/download_updates", arg1);
+//    app->properties.sync();
 }
 
 void SettingsWidget::on_expert_tabs_checkbox_common_stateChanged(int arg1)
 {
-    app->properties.setValue("settings/expert_mode", arg1);
-    app->properties.sync();
+//    app->properties.setValue("settings/expert_mode", arg1);
+//    app->properties.sync();
 }
 
 void SettingsWidget::on_restrict_download_speed_checkbox_common_stateChanged(int arg1)
 {
-    app->properties.setValue("settings/limit_download_speed", arg1);
-    app->properties.sync();
+//    app->properties.setValue("settings/limit_download_speed", arg1);
+//    app->properties.sync();
 }
 
 
 void SettingsWidget::on_lotro_patch_language_combobox_common_activated(int index)
 {
-    QString value = "";
-    if (index == 0)
-        value = "English";
-    if (index == 1)
-        value = "DE";
-    if (index == 2)
-        value = "FR";
-
-    app->properties.setValue("settings/locale", value);
-    app->properties.sync();
+//    QString value = "";
+//    if (index == 0)
+//        value = "English";
+//    if (index == 1)
+//        value = "DE";
+//    if (index == 2)
+//        value = "FR";
+//
+//    app->properties.setValue("settings/locale", value);
+//    app->properties.sync();
 }

+ 1 - 4
src/Legacy/widgets/settingswidget.h

@@ -8,14 +8,12 @@ namespace Ui {
 class SettingsWidget;
 }
 
-class LegacyApp;
-
 class SettingsWidget : public QWidget
 {
     Q_OBJECT
 
 public:
-    explicit SettingsWidget(LegacyApp *_app, QWidget *parent = 0);
+    explicit SettingsWidget(QWidget *parent = 0);
     ~SettingsWidget();
 
 private slots:
@@ -41,7 +39,6 @@ private slots:
 
 private:
     Ui::SettingsWidget *ui;
-    LegacyApp *app;
     QTimer ui_update_timer;
 };
 

+ 2 - 3
src/Legacy/widgets/statuswidget.cpp

@@ -1,10 +1,9 @@
 #include "statuswidget.h"
 #include "ui_statuswidget.h"
 
-StatusWidget::StatusWidget(LegacyApp *_app, QWidget *parent) :
+StatusWidget::StatusWidget(QWidget *parent) :
     QWidget(parent),
-    ui(new Ui::StatusWidget),
-    app(_app)
+    ui(new Ui::StatusWidget)
 {
     ui->setupUi(this);
 }

+ 1 - 4
src/Legacy/widgets/statuswidget.h

@@ -7,19 +7,16 @@ namespace Ui {
 class StatusWidget;
 }
 
-class LegacyApp;
-
 class StatusWidget : public QWidget
 {
     Q_OBJECT
 
 public:
-    explicit StatusWidget(LegacyApp *_app, QWidget *parent = 0);
+    explicit StatusWidget(QWidget *parent = 0);
     ~StatusWidget();
 
 private:
     Ui::StatusWidget *ui;
-    LegacyApp *app;
 
     const QColor inWorkColor = QColor(85, 170, 255);
     const QColor readyColor = QColor(0, 170, 0);

+ 141 - 225
src/Legacy/widgets/statuswidget.ui

@@ -6,58 +6,159 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>860</width>
-    <height>491</height>
+    <width>688</width>
+    <height>456</height>
    </rect>
   </property>
   <property name="windowTitle">
    <string>Form</string>
   </property>
-  <layout class="QGridLayout" name="gridLayout_3" rowstretch="1,0,4">
-   <item row="0" column="1">
-    <spacer name="verticalSpacer">
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeType">
-      <enum>QSizePolicy::Expanding</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>20</width>
-       <height>20</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="2" column="1">
-    <spacer name="verticalSpacer_2">
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>20</width>
-       <height>40</height>
-      </size>
-     </property>
-    </spacer>
+  <layout class="QGridLayout" name="gridLayout_3" rowstretch="1,0,0">
+   <item row="2" column="0" colspan="2">
+    <widget class="QWidget" name="widget" native="true">
+     <layout class="QHBoxLayout" name="horizontalLayout_2">
+      <item>
+       <widget class="QLabel" name="label">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="minimumSize">
+         <size>
+          <width>0</width>
+          <height>20</height>
+         </size>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>16777215</width>
+          <height>20</height>
+         </size>
+        </property>
+        <property name="styleSheet">
+         <string notr="true">	border-image: url(:/buttons/progressbar.png);
+</string>
+        </property>
+        <property name="text">
+         <string>&lt;img src=&quot;:/buttons/progressbar_chunk.png&quot; width=&quot;390&quot; height=&quot;20&quot;/&gt;</string>
+        </property>
+        <property name="margin">
+         <number>0</number>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="game_button">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="minimumSize">
+         <size>
+          <width>120</width>
+          <height>45</height>
+         </size>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>120</width>
+          <height>45</height>
+         </size>
+        </property>
+        <property name="font">
+         <font>
+          <family>TRAJAN PRO 3</family>
+          <pointsize>-1</pointsize>
+          <weight>75</weight>
+          <italic>false</italic>
+          <bold>true</bold>
+         </font>
+        </property>
+        <property name="autoFillBackground">
+         <bool>false</bool>
+        </property>
+        <property name="styleSheet">
+         <string notr="true">QPushButton#game_button { 
+	color: white;
+	font: 14px &quot;TRAJAN PRO 3&quot;;
+	font-weight: bold;
+	border-image: url(:/buttons/large-button-active.png) 0 0 0 0 stretch stretch; 
+}
+
+QPushButton#game_button:hover {
+	color: white;
+	border-image: url(:/buttons/large-button-active-pressed.png) 0 0 0 0 stretch stretch; 
+}
+
+QPushButton#game_button:pressed {
+	color: white;
+	border-image: url(:/buttons/large-button-pressed.png) 0 0 0 0 stretch stretch; 
+}
+
+</string>
+        </property>
+        <property name="text">
+         <string notr="true">    ИГРАТЬ    </string>
+        </property>
+        <property name="iconSize">
+         <size>
+          <width>0</width>
+          <height>0</height>
+         </size>
+        </property>
+        <property name="default">
+         <bool>false</bool>
+        </property>
+        <property name="flat">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
    </item>
-   <item row="0" column="2" rowspan="3">
+   <item row="0" column="0" rowspan="2" colspan="2">
     <widget class="QWidget" name="right_column_widget" native="true">
      <layout class="QGridLayout" name="gridLayout_2">
-      <item row="1" column="0">
-       <spacer name="horizontalSpacer_3">
-        <property name="orientation">
-         <enum>Qt::Horizontal</enum>
+      <item row="1" column="1">
+       <widget class="QWidget" name="buttons_widget" native="true">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
         </property>
-        <property name="sizeHint" stdset="0">
+        <property name="minimumSize">
          <size>
-          <width>219</width>
-          <height>20</height>
+          <width>0</width>
+          <height>80</height>
          </size>
         </property>
-       </spacer>
+        <property name="styleSheet">
+         <string notr="true"/>
+        </property>
+        <layout class="QHBoxLayout" name="horizontalLayout">
+         <property name="spacing">
+          <number>1</number>
+         </property>
+         <property name="leftMargin">
+          <number>1</number>
+         </property>
+         <property name="topMargin">
+          <number>1</number>
+         </property>
+         <property name="rightMargin">
+          <number>1</number>
+         </property>
+         <property name="bottomMargin">
+          <number>1</number>
+         </property>
+        </layout>
+       </widget>
       </item>
       <item row="0" column="0" colspan="2">
        <widget class="QWidget" name="common_status_widget" native="true">
@@ -313,194 +414,9 @@ background-color: rgba(30, 0, 0, 100);</string>
         </layout>
        </widget>
       </item>
-      <item row="1" column="1">
-       <widget class="QWidget" name="buttons_widget" native="true">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="minimumSize">
-         <size>
-          <width>0</width>
-          <height>80</height>
-         </size>
-        </property>
-        <property name="styleSheet">
-         <string notr="true">background-color: rgb(0, 0, 84);</string>
-        </property>
-        <layout class="QHBoxLayout" name="horizontalLayout" stretch="1">
-         <property name="spacing">
-          <number>1</number>
-         </property>
-         <property name="leftMargin">
-          <number>1</number>
-         </property>
-         <property name="topMargin">
-          <number>1</number>
-         </property>
-         <property name="rightMargin">
-          <number>1</number>
-         </property>
-         <property name="bottomMargin">
-          <number>1</number>
-         </property>
-         <item>
-          <widget class="QPushButton" name="game_button">
-           <property name="sizePolicy">
-            <sizepolicy hsizetype="Fixed" vsizetype="Expanding">
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="minimumSize">
-            <size>
-             <width>150</width>
-             <height>0</height>
-            </size>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>180</width>
-             <height>16777215</height>
-            </size>
-           </property>
-           <property name="font">
-            <font>
-             <family>Times New Roman</family>
-             <pointsize>-1</pointsize>
-             <weight>75</weight>
-             <italic>false</italic>
-             <bold>true</bold>
-            </font>
-           </property>
-           <property name="autoFillBackground">
-            <bool>false</bool>
-           </property>
-           <property name="styleSheet">
-            <string notr="true">border-image: url(:/assets/buttons/gray-button-hi.png);
-color: rgb(85, 0, 0);
-font: 24px &quot;Times New Roman&quot;;
-font-weight: bold;</string>
-           </property>
-           <property name="text">
-            <string notr="true">    ИГРАТЬ    </string>
-           </property>
-           <property name="iconSize">
-            <size>
-             <width>0</width>
-             <height>0</height>
-            </size>
-           </property>
-           <property name="default">
-            <bool>false</bool>
-           </property>
-           <property name="flat">
-            <bool>true</bool>
-           </property>
-          </widget>
-         </item>
-        </layout>
-       </widget>
-      </item>
      </layout>
     </widget>
    </item>
-   <item row="1" column="1">
-    <widget class="QWidget" name="left_column_widget" native="true">
-     <property name="sizePolicy">
-      <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-     <layout class="QVBoxLayout" name="verticalLayout_2">
-      <item>
-       <widget class="QWidget" name="status_image_widget" native="true">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="minimumSize">
-         <size>
-          <width>200</width>
-          <height>200</height>
-         </size>
-        </property>
-        <property name="baseSize">
-         <size>
-          <width>200</width>
-          <height>200</height>
-         </size>
-        </property>
-        <property name="styleSheet">
-         <string notr="true">image: url(:/assets/status/info.png);</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QWidget" name="status_label_widget" native="true">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="minimumSize">
-         <size>
-          <width>0</width>
-          <height>40</height>
-         </size>
-        </property>
-        <layout class="QHBoxLayout" name="horizontalLayout_3">
-         <item>
-          <widget class="QLabel" name="status_label_supertitle">
-           <property name="font">
-            <font>
-             <family>Times New Roman</family>
-             <pointsize>28</pointsize>
-             <weight>75</weight>
-             <italic>false</italic>
-             <bold>true</bold>
-            </font>
-           </property>
-           <property name="styleSheet">
-            <string notr="true">color: rgb(85, 170, 255);
-</string>
-           </property>
-           <property name="text">
-            <string>В РАБОТЕ</string>
-           </property>
-           <property name="alignment">
-            <set>Qt::AlignHCenter|Qt::AlignTop</set>
-           </property>
-          </widget>
-         </item>
-        </layout>
-       </widget>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item row="1" column="0">
-    <spacer name="horizontalSpacer">
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="sizeType">
-      <enum>QSizePolicy::Fixed</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>40</width>
-       <height>20</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
   </layout>
  </widget>
  <resources/>