1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

Launcher translation upgrade, still WIP:

- launcher can be re-translated without restart
- mod info (name/description/etc) can have localized versions
This commit is contained in:
Ivan Savenko 2022-12-25 13:19:16 +02:00
parent 9e4cef015d
commit 1696db8a3c
20 changed files with 1153 additions and 513 deletions

View File

@ -1,6 +1,13 @@
{ {
"name" : "VCMI essential files", "name" : "VCMI essential files",
"description" : "Essential files required for VCMI to run correctly", "description" : "Essential files required for VCMI to run correctly",
"translation_uk" : {
"name" : "VCMI - ключові файли",
"description" : "Ключові файли необхідні для повноцінної роботи VCMI",
"author" : "Команда VCMI",
"modType" : "Графіка",
},
"version" : "1.0", "version" : "1.0",
"author" : "VCMI Team", "author" : "VCMI Team",

View File

@ -88,7 +88,7 @@ else()
endif() endif()
find_package(Qt5LinguistTools) find_package(Qt5LinguistTools)
set(launcher_TS translation/launcher_pl.ts translation/launcher_ru.ts translation/launcher_uk.ts) set(launcher_TS translation/launcher_en.ts translation/launcher_pl.ts translation/launcher_ru.ts translation/launcher_uk.ts)
qt5_add_translation( QM_FILES ${launcher_TS} ) qt5_add_translation( QM_FILES ${launcher_TS} )
if(WIN32) if(WIN32)
@ -160,4 +160,5 @@ else()
install(FILES "eu.vcmi.VCMI.metainfo.xml" DESTINATION share/metainfo) install(FILES "eu.vcmi.VCMI.metainfo.xml" DESTINATION share/metainfo)
endif() endif()
endif() endif()
install(DIRECTORY icons DESTINATION ${ICONS_DESTINATION}) install(DIRECTORY icons DESTINATION ${ICONS_DESTINATION})

View File

@ -35,6 +35,14 @@ Lobby::Lobby(QWidget *parent) :
ui->kickButton->setVisible(false); ui->kickButton->setVisible(false);
} }
void Lobby::changeEvent(QEvent *event)
{
if ( event->type() == QEvent::LanguageChange)
{
ui->retranslateUi(this);
}
}
Lobby::~Lobby() Lobby::~Lobby()
{ {
delete ui; delete ui;

View File

@ -19,6 +19,7 @@ class Lobby : public QWidget
{ {
Q_OBJECT Q_OBJECT
void changeEvent(QEvent *event) override;
public: public:
explicit Lobby(QWidget *parent = nullptr); explicit Lobby(QWidget *parent = nullptr);
~Lobby(); ~Lobby();

View File

@ -27,6 +27,14 @@ LobbyRoomRequest::LobbyRoomRequest(SocketLobby & socket, const QString & room, c
show(); show();
} }
void LobbyRoomRequest::changeEvent(QEvent *event)
{
if ( event->type() == QEvent::LanguageChange)
{
ui->retranslateUi(this);
}
}
LobbyRoomRequest::~LobbyRoomRequest() LobbyRoomRequest::~LobbyRoomRequest()
{ {
delete ui; delete ui;

View File

@ -21,6 +21,7 @@ class LobbyRoomRequest : public QDialog
{ {
Q_OBJECT Q_OBJECT
void changeEvent(QEvent *event) override;
public: public:
explicit LobbyRoomRequest(SocketLobby & socket, const QString & room, const QMap<QString, QString> & mods, QWidget *parent = nullptr); explicit LobbyRoomRequest(SocketLobby & socket, const QString & room, const QMap<QString, QString> & mods, QWidget *parent = nullptr);
~LobbyRoomRequest(); ~LobbyRoomRequest();

View File

@ -33,10 +33,6 @@ int main(int argc, char * argv[])
#endif #endif
QApplication vcmilauncher(argc, argv); QApplication vcmilauncher(argc, argv);
//QTranslator translator;
//translator.load("./launcher_uk.qm");
//vcmilauncher.installTranslator(&translator);
MainWindow mainWindow; MainWindow mainWindow;
mainWindow.show(); mainWindow.show();
result = vcmilauncher.exec(); result = vcmilauncher.exec();

View File

@ -79,6 +79,14 @@ MainWindow::MainWindow(QWidget * parent)
UpdateDialog::showUpdateDialog(false); UpdateDialog::showUpdateDialog(false);
} }
void MainWindow::changeEvent(QEvent *event)
{
if ( event->type() == QEvent::LanguageChange)
{
ui->retranslateUi(this);
}
}
MainWindow::~MainWindow() MainWindow::~MainWindow()
{ {
//save window settings //save window settings
@ -116,3 +124,16 @@ void MainWindow::on_lobbyButton_clicked()
ui->startGameButton->setEnabled(false); ui->startGameButton->setEnabled(false);
ui->tabListWidget->setCurrentIndex(TabRows::LOBBY); ui->tabListWidget->setCurrentIndex(TabRows::LOBBY);
} }
void MainWindow::updateTranslation()
{
std::string languageCode = settings["general"]["language"].String();
QString translationFile = "./launcher_" + QString::fromStdString(languageCode) + ".qm";
qApp->removeTranslator(&translator);
if (!translator.load(translationFile))
logGlobal->error("Failed to load translation");
if (!qApp->installTranslator(&translator))
logGlobal->error("Failed to install translator");
}

View File

@ -26,6 +26,7 @@ class MainWindow : public QMainWindow
{ {
Q_OBJECT Q_OBJECT
QTranslator translator;
private: private:
Ui::MainWindow * ui; Ui::MainWindow * ui;
void load(); void load();
@ -35,12 +36,14 @@ private:
MODS = 0, SETTINGS = 1, LOBBY = 2 MODS = 0, SETTINGS = 1, LOBBY = 2
}; };
void changeEvent(QEvent *event) override;
public: public:
explicit MainWindow(QWidget * parent = 0); explicit MainWindow(QWidget * parent = 0);
~MainWindow(); ~MainWindow();
const CModList & getModList() const; const CModList & getModList() const;
void updateTranslation();
public slots: public slots:
void on_startGameButton_clicked(); void on_startGameButton_clicked();

View File

@ -31,6 +31,22 @@
</property> </property>
<widget class="QWidget" name="centralWidget"> <widget class="QWidget" name="centralWidget">
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="1" rowspan="7">
<widget class="Line" name="line">
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="lineWidth">
<number>1</number>
</property>
<property name="midLineWidth">
<number>0</number>
</property>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QToolButton" name="settingsButton"> <widget class="QToolButton" name="settingsButton">
<property name="sizePolicy"> <property name="sizePolicy">
@ -75,64 +91,42 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="0"> <item row="6" column="0">
<spacer name="verticalSpacer"> <widget class="QLabel" name="startGameTitle">
<property name="orientation"> <property name="font">
<enum>Qt::Vertical</enum> <font>
</property> <weight>75</weight>
<property name="sizeHint" stdset="0"> <bold>true</bold>
<size> </font>
<width>80</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0">
<widget class="QToolButton" name="lobbyButton">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property> </property>
<property name="text"> <property name="text">
<string>Lobby</string> <string>Start game</string>
</property> </property>
<property name="icon"> <property name="alignment">
<iconset> <set>Qt::AlignCenter</set>
<normaloff>icons:menu-lobby.png</normaloff>icons:menu-lobby.png</iconset>
</property>
<property name="iconSize">
<size>
<width>60</width>
<height>60</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<property name="autoExclusive">
<bool>true</bool>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
<property name="autoRaise">
<bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="0"> <item row="0" column="2" rowspan="7">
<widget class="QStackedWidget" name="tabListWidget">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>10</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="CModListView" name="modlistView"/>
<widget class="CSettingsView" name="settingsView"/>
<widget class="Lobby" name="lobbyView"/>
</widget>
</item>
<item row="5" column="0">
<widget class="QToolButton" name="startGameButton"> <widget class="QToolButton" name="startGameButton">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum">
@ -179,39 +173,48 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="0"> <item row="2" column="0">
<widget class="QLabel" name="startGameTitle"> <widget class="QToolButton" name="lobbyButton">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Start game</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="2" rowspan="6">
<widget class="QStackedWidget" name="tabListWidget">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum">
<horstretch>10</horstretch> <horstretch>1</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="currentIndex"> <property name="minimumSize">
<number>0</number> <size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Lobby</string>
</property>
<property name="icon">
<iconset>
<normaloff>icons:menu-lobby.png</normaloff>icons:menu-lobby.png</iconset>
</property>
<property name="iconSize">
<size>
<width>60</width>
<height>60</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<property name="autoExclusive">
<bool>true</bool>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
<property name="autoRaise">
<bool>true</bool>
</property> </property>
<widget class="CModListView" name="modlistView"/>
<widget class="CSettingsView" name="settingsView"/>
<widget class="Lobby" name="lobbyView"/>
</widget> </widget>
</item> </item>
<item row="0" column="0"> <item row="0" column="0">
@ -258,20 +261,60 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1" rowspan="6"> <item row="3" column="0">
<widget class="Line" name="line"> <spacer name="verticalSpacer">
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="lineWidth">
<number>1</number>
</property>
<property name="midLineWidth">
<number>0</number>
</property>
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeHint" stdset="0">
<size>
<width>80</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item row="4" column="0">
<widget class="QToolButton" name="startEditorButton">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Editor</string>
</property>
<property name="iconSize">
<size>
<width>60</width>
<height>60</height>
</size>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonIconOnly</enum>
</property>
<property name="autoRaise">
<bool>false</bool>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>

View File

@ -10,6 +10,7 @@
#include "StdInc.h" #include "StdInc.h"
#include "cmodlist.h" #include "cmodlist.h"
#include "../lib/CConfigHandler.h"
#include "../../lib/JsonNode.h" #include "../../lib/JsonNode.h"
#include "../../lib/filesystem/CFileInputStream.h" #include "../../lib/filesystem/CFileInputStream.h"
#include "../../lib/GameConstants.h" #include "../../lib/GameConstants.h"
@ -157,23 +158,35 @@ QString CModEntry::getName() const
QVariant CModEntry::getValue(QString value) const QVariant CModEntry::getValue(QString value) const
{ {
QString lang = QString::fromStdString(settings["general"]["language"].String());
QString langValue = "translation_" + lang;
// Priorities
// 1) data from newest version
// 2) data from preferred language
bool useRepositoryData = repository.contains(value);
if(repository.contains(value) && localData.contains(value)) if(repository.contains(value) && localData.contains(value))
{ {
// value is present in both repo and locally installed. Select one from latest version // value is present in both repo and locally installed. Select one from latest version
QString installedVer = localData["installedVersion"].toString(); QString installedVer = localData["installedVersion"].toString();
QString availableVer = repository["latestVersion"].toString(); QString availableVer = repository["latestVersion"].toString();
if(compareVersions(installedVer, availableVer)) useRepositoryData = compareVersions(installedVer, availableVer);
return repository[value];
else
return localData[value];
} }
if(repository.contains(value)) auto & storage = useRepositoryData ? repository : localData;
return repository[value];
if(localData.contains(value)) if (storage.contains(langValue))
return localData[value]; {
auto langStorage = storage[langValue].toMap();
if (langStorage.contains(value))
return langStorage[value];
}
if (storage.contains(value))
return storage[value];
return QVariant(); return QVariant();
} }

View File

@ -25,16 +25,6 @@ static const QString names[ModFields::COUNT] =
"author" "author"
}; };
static const QString header[ModFields::COUNT] =
{
"Name",
"", // status icon
"", // status icon
"Type",
"Version",
"Size",
"Author"
};
} }
namespace ModStatus namespace ModStatus
@ -155,13 +145,25 @@ Qt::ItemFlags CModListModel::flags(const QModelIndex &) const
QVariant CModListModel::headerData(int section, Qt::Orientation orientation, int role) const QVariant CModListModel::headerData(int section, Qt::Orientation orientation, int role) const
{ {
static const QString header[ModFields::COUNT] =
{
QT_TR_NOOP("Name"),
QT_TR_NOOP(""), // status icon
QT_TR_NOOP(""), // status icon
QT_TR_NOOP("Type"),
QT_TR_NOOP("Version"),
QT_TR_NOOP("Size"),
QT_TR_NOOP("Author")
};
if(role == Qt::DisplayRole && orientation == Qt::Horizontal) if(role == Qt::DisplayRole && orientation == Qt::Horizontal)
return ModFields::header[section]; return QCoreApplication::translate("ModFields", header[section].toStdString().c_str());
return QVariant(); return QVariant();
} }
void CModListModel::reloadRepositories() void CModListModel::reloadRepositories()
{ {
//emit headerDataChanged(Qt::Horizontal, 0, -1 );
beginResetModel(); beginResetModel();
endResetModel(); endResetModel();
} }

View File

@ -34,6 +34,15 @@ void CModListView::setupModModel()
this, &CModListView::extraResolutionsEnabledChanged); this, &CModListView::extraResolutionsEnabledChanged);
} }
void CModListView::changeEvent(QEvent *event)
{
if ( event->type() == QEvent::LanguageChange)
{
ui->retranslateUi(this);
modModel->reloadRepositories();
}
}
void CModListView::setupFilterModel() void CModListView::setupFilterModel()
{ {
filterModel = new CModFilterModel(modModel, this); filterModel = new CModFilterModel(modModel, this);
@ -227,8 +236,8 @@ QString CModListView::genModInfoText(CModEntry & mod)
QString textTemplate = prefix + "</p><p align=\"justify\">%2</p>"; QString textTemplate = prefix + "</p><p align=\"justify\">%2</p>";
QString listTemplate = "<p align=\"justify\">%1: %2</p>"; QString listTemplate = "<p align=\"justify\">%1: %2</p>";
QString noteTemplate = "<p align=\"justify\">%1</p>"; QString noteTemplate = "<p align=\"justify\">%1</p>";
QString compatibleString = prefix + "Mod is compatible</p>"; QString compatibleString = prefix + tr("Mod is compatible") + "</p>";
QString incompatibleString = redPrefix + "Mod is incompatible</p>"; QString incompatibleString = redPrefix + tr("Mod is incompatible") + "</p>";
QString supportedVersions = redPrefix + "%2 %3 %4</p>"; QString supportedVersions = redPrefix + "%2 %3 %4</p>";
QString result; QString result;

View File

@ -64,6 +64,7 @@ class CModListView : public QWidget
QString genChangelogText(CModEntry & mod); QString genChangelogText(CModEntry & mod);
QString genModInfoText(CModEntry & mod); QString genModInfoText(CModEntry & mod);
void changeEvent(QEvent *event) override;
signals: signals:
void extraResolutionsEnabledChanged(bool enabled); void extraResolutionsEnabledChanged(bool enabled);

View File

@ -20,6 +20,14 @@ ImageViewer::ImageViewer(QWidget * parent)
ui->setupUi(this); ui->setupUi(this);
} }
void ImageViewer::changeEvent(QEvent *event)
{
if ( event->type() == QEvent::LanguageChange)
{
ui->retranslateUi(this);
}
}
ImageViewer::~ImageViewer() ImageViewer::~ImageViewer()
{ {
delete ui; delete ui;

View File

@ -21,6 +21,7 @@ class ImageViewer : public QDialog
{ {
Q_OBJECT Q_OBJECT
void changeEvent(QEvent *event) override;
public: public:
explicit ImageViewer(QWidget * parent = 0); explicit ImageViewer(QWidget * parent = 0);
~ImageViewer(); ~ImageViewer();

View File

@ -11,6 +11,8 @@
#include "csettingsview_moc.h" #include "csettingsview_moc.h"
#include "ui_csettingsview_moc.h" #include "ui_csettingsview_moc.h"
#include "mainwindow_moc.h"
#include "../jsonutils.h" #include "../jsonutils.h"
#include "../launcherdirs.h" #include "../launcherdirs.h"
#include "../updatedialog_moc.h" #include "../updatedialog_moc.h"
@ -44,6 +46,15 @@ static const std::string knownEncodingsList[] = //TODO: remove hardcode
"CP949" // extension of EUC-KR. "CP949" // extension of EUC-KR.
}; };
/// List of tags of languages that can be selected from Launcher (and have translation for Launcher)
static const std::string languageTagList[] =
{
"en", // english
"pl", // polish
"ru", // russian
"uk", // ukrainian
};
void CSettingsView::setDisplayList() void CSettingsView::setDisplayList()
{ {
QStringList list; QStringList list;
@ -301,3 +312,19 @@ void CSettingsView::on_updatesButton_clicked()
UpdateDialog::showUpdateDialog(true); UpdateDialog::showUpdateDialog(true);
} }
void CSettingsView::on_comboBoxLanguage_currentIndexChanged(int index)
{
Settings node = settings.write["general"]["language"];
node->String() = languageTagList[index];
dynamic_cast<MainWindow*>(qApp->activeWindow())->updateTranslation();
}
void CSettingsView::changeEvent(QEvent *event)
{
if ( event->type() == QEvent::LanguageChange)
{
ui->retranslateUi(this);
}
}

View File

@ -25,6 +25,7 @@ public:
void loadSettings(); void loadSettings();
void setDisplayList(); void setDisplayList();
void changeEvent(QEvent *event) override;
bool isExtraResolutionsModEnabled{}; bool isExtraResolutionsModEnabled{};
@ -68,6 +69,8 @@ private slots:
void on_updatesButton_clicked(); void on_updatesButton_clicked();
void on_comboBoxLanguage_currentIndexChanged(int index);
private: private:
Ui::CSettingsView * ui; Ui::CSettingsView * ui;

View File

@ -26,67 +26,35 @@
<property name="bottomMargin"> <property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item row="1" column="8"> <item row="2" column="7" colspan="2">
<widget class="QPushButton" name="changeGameDataDir"> <widget class="QLineEdit" name="lineEditUserDataDir">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="text"> <property name="minimumSize">
<string>Change</string>
</property>
</widget>
</item>
<item row="3" column="9">
<widget class="QPushButton" name="openTempDir">
<property name="text">
<string>Open</string>
</property>
</widget>
</item>
<item row="2" column="6">
<widget class="QLabel" name="labelUserDataDir">
<property name="text">
<string>User data directory</string>
</property>
</widget>
</item>
<item row="10" column="5">
<spacer name="spacerColumns">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size> <size>
<width>8</width> <width>150</width>
<height>20</height> <height>0</height>
</size> </size>
</property> </property>
</spacer> <property name="text">
</item> <string notr="true">/home/user/.vcmi</string>
<item row="10" column="7"> </property>
<widget class="QComboBox" name="comboBoxAutoSave"> <property name="readOnly">
<property name="currentIndex"> <bool>true</bool>
<number>1</number>
</property> </property>
<item>
<property name="text">
<string>Off</string>
</property>
</item>
<item>
<property name="text">
<string>On</string>
</property>
</item>
</widget> </widget>
</item> </item>
<item row="1" column="9"> <item row="17" column="1" colspan="4">
<widget class="QPushButton" name="openGameDataDir"> <widget class="QLabel" name="LauncherSettings">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string>Open</string> <string>Launcher Settings</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -103,6 +71,47 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="8">
<widget class="QPushButton" name="changeGameDataDir">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Change</string>
</property>
</widget>
</item>
<item row="18" column="6">
<widget class="QComboBox" name="comboBoxAutoCheck">
<property name="currentIndex">
<number>1</number>
</property>
<item>
<property name="text">
<string>Off</string>
</property>
</item>
<item>
<property name="text">
<string>On</string>
</property>
</item>
</widget>
</item>
<item row="3" column="9">
<widget class="QPushButton" name="openTempDir">
<property name="text">
<string>Open</string>
</property>
</widget>
</item>
<item row="10" column="6">
<widget class="QLabel" name="labelEncoding">
<property name="text">
<string>Heroes III character set</string>
</property>
</widget>
</item>
<item row="2" column="1"> <item row="2" column="1">
<widget class="QLabel" name="labelFullScreen"> <widget class="QLabel" name="labelFullScreen">
<property name="text"> <property name="text">
@ -110,37 +119,57 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="10" column="4"> <item row="3" column="4">
<widget class="QComboBox" name="comboBoxNeutralAI"> <widget class="QComboBox" name="comboBoxShowIntro">
<property name="currentText"> <property name="currentIndex">
<string notr="true">BattleAI</string> <number>1</number>
</property> </property>
<item> <item>
<property name="text"> <property name="text">
<string notr="true">BattleAI</string> <string>Off</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text">
<string notr="true">StupidAI</string> <string>On</string>
</property> </property>
</item> </item>
</widget> </widget>
</item> </item>
<item row="8" column="7" colspan="3"> <item row="3" column="6">
<widget class="QSpinBox" name="spinBoxNetworkPort"> <widget class="QLabel" name="labelTempDir">
<property name="minimum"> <property name="text">
<number>1024</number> <string>Log files directory</string>
</property>
<property name="maximum">
<number>65535</number>
</property>
<property name="value">
<number>3030</number>
</property> </property>
</widget> </widget>
</item> </item>
<item row="17" column="1" colspan="4"> <item row="3" column="7" colspan="2">
<widget class="QLineEdit" name="lineEditTempDir">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string notr="true">/home/user/.vcmi</string>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="12" column="6">
<widget class="QLabel" name="labelAutoSave">
<property name="text">
<string>Autosave</string>
</property>
</widget>
</item>
<item row="19" column="1" colspan="4">
<widget class="QLabel" name="labelRepositories"> <widget class="QLabel" name="labelRepositories">
<property name="font"> <property name="font">
<font> <font>
@ -153,20 +182,123 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="4"> <item row="18" column="7">
<widget class="QComboBox" name="comboBoxResolution"/>
</item>
<item row="16" column="7">
<widget class="QPushButton" name="updatesButton"> <widget class="QPushButton" name="updatesButton">
<property name="text"> <property name="text">
<string>Check for updates</string> <string>Check for updates</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="10" column="1"> <item row="4" column="4">
<widget class="QLabel" name="labelNeutralAI"> <widget class="QComboBox" name="comboBoxDisplayIndex"/>
</item>
<item row="18" column="1" colspan="4">
<widget class="QLabel" name="labelAutoCheck">
<property name="text"> <property name="text">
<string>Neutral AI</string> <string>Check repositories on startup</string>
</property>
</widget>
</item>
<item row="2" column="9">
<widget class="QPushButton" name="openUserDataDir">
<property name="text">
<string>Open</string>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QLabel" name="labelPlayerAI">
<property name="text">
<string>Player AI</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="labelDisplayIndex">
<property name="text">
<string>Display index</string>
</property>
</widget>
</item>
<item row="10" column="1" colspan="4">
<widget class="QLabel" name="labelAIInTheBattlefield">
<property name="font">
<font>
<weight>75</weight>
<italic>true</italic>
<bold>true</bold>
<underline>false</underline>
</font>
</property>
<property name="text">
<string>AI in the battlefield</string>
</property>
</widget>
</item>
<item row="21" column="1" colspan="9">
<widget class="QPlainTextEdit" name="plainTextEditRepos">
<property name="lineWrapMode">
<enum>QPlainTextEdit::NoWrap</enum>
</property>
<property name="plainText">
<string notr="true">http://downloads.vcmi.eu/Mods/repository.json</string>
</property>
</widget>
</item>
<item row="7" column="6" colspan="4">
<widget class="QLabel" name="labelGeneral">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>General</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="labelShowIntro">
<property name="text">
<string>Show intro</string>
</property>
</widget>
</item>
<item row="16" column="1" colspan="4">
<spacer name="spacerRepos">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>8</height>
</size>
</property>
</spacer>
</item>
<item row="14" column="6">
<widget class="QLabel" name="labelBuildVersionDesc">
<property name="text">
<string>Build version</string>
</property>
</widget>
</item>
<item row="1" column="6">
<widget class="QLabel" name="labelGameDir">
<property name="text">
<string>Extra data directory</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="labelResolution">
<property name="text">
<string>Resolution</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -192,15 +324,25 @@
</item> </item>
</widget> </widget>
</item> </item>
<item row="2" column="9"> <item row="12" column="7">
<widget class="QPushButton" name="openUserDataDir"> <widget class="QComboBox" name="comboBoxAutoSave">
<property name="text"> <property name="currentIndex">
<string>Open</string> <number>1</number>
</property> </property>
<item>
<property name="text">
<string>Off</string>
</property>
</item>
<item>
<property name="text">
<string>On</string>
</property>
</item>
</widget> </widget>
</item> </item>
<item row="7" column="6" colspan="4"> <item row="7" column="1" colspan="4">
<widget class="QLabel" name="labelGeneral"> <widget class="QLabel" name="labelAIMovingOnTheMap">
<property name="font"> <property name="font">
<font> <font>
<weight>75</weight> <weight>75</weight>
@ -208,37 +350,137 @@
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string>General</string> <string>AI on the map</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="7" colspan="2"> <item row="8" column="4">
<widget class="QLineEdit" name="lineEditUserDataDir"> <widget class="QComboBox" name="comboBoxPlayerAI">
<property name="enabled"> <property name="currentText">
<bool>false</bool> <string notr="true">VCAI</string>
</property> </property>
<property name="minimumSize"> <item>
<property name="text">
<string notr="true">VCAI</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">Nullkiller</string>
</property>
</item>
</widget>
</item>
<item row="12" column="5">
<spacer name="spacerColumns">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size> <size>
<width>150</width> <width>8</width>
<height>0</height> <height>20</height>
</size> </size>
</property> </property>
</spacer>
</item>
<item row="1" column="4">
<widget class="QComboBox" name="comboBoxResolution"/>
</item>
<item row="1" column="9">
<widget class="QPushButton" name="openGameDataDir">
<property name="text"> <property name="text">
<string notr="true">/home/user/.vcmi</string> <string>Open</string>
</property>
<property name="readOnly">
<bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item row="8" column="1"> <item row="0" column="1" colspan="4">
<widget class="QLabel" name="labelPlayerAI"> <widget class="QLabel" name="labelVideo">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string>Player AI</string> <string>Video</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="9" column="7" colspan="3"> <item row="0" column="6" colspan="4">
<widget class="QLabel" name="labelDataDirs">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Data Directories</string>
</property>
</widget>
</item>
<item row="6" column="1" colspan="4">
<spacer name="spacerSections">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>56</width>
<height>8</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="6">
<widget class="QLabel" name="labelUserDataDir">
<property name="text">
<string>User data directory</string>
</property>
</widget>
</item>
<item row="11" column="6">
<widget class="QLabel" name="labelNetworkPort">
<property name="text">
<string>Network port</string>
</property>
</widget>
</item>
<item row="11" column="7">
<widget class="QSpinBox" name="spinBoxNetworkPort">
<property name="minimum">
<number>1024</number>
</property>
<property name="maximum">
<number>65535</number>
</property>
<property name="value">
<number>3030</number>
</property>
</widget>
</item>
<item row="8" column="6">
<widget class="QLabel" name="labelLanguage">
<property name="text">
<string>VCMI Language</string>
</property>
</widget>
</item>
<item row="14" column="7" colspan="2">
<widget class="QLabel" name="labelBuildVersion">
<property name="text">
<string notr="true"/>
</property>
</widget>
</item>
<item row="10" column="7" colspan="2">
<widget class="QComboBox" name="comboBoxEncoding"> <widget class="QComboBox" name="comboBoxEncoding">
<item> <item>
<property name="text"> <property name="text">
@ -272,127 +514,39 @@
</item> </item>
</widget> </widget>
</item> </item>
<item row="12" column="1"> <item row="8" column="7" colspan="2">
<widget class="QLabel" name="labelFriendlyAI"> <widget class="QComboBox" name="comboBoxLanguage">
<property name="minimumSize">
<size>
<width>0</width>
<height>22</height>
</size>
</property>
<property name="text">
<string>Friendly AI</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="labelResolution">
<property name="text">
<string>Resolution</string>
</property>
</widget>
</item>
<item row="7" column="1" colspan="4">
<widget class="QLabel" name="labelAIMovingOnTheMap">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>AI on the map</string>
</property>
</widget>
</item>
<item row="14" column="1" colspan="4">
<spacer name="spacerRepos">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>8</height>
</size>
</property>
</spacer>
</item>
<item row="4" column="4">
<widget class="QComboBox" name="comboBoxDisplayIndex"/>
</item>
<item row="10" column="6">
<widget class="QLabel" name="labelAutoSave">
<property name="text">
<string>Autosave</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="labelDisplayIndex">
<property name="text">
<string>Display index</string>
</property>
</widget>
</item>
<item row="3" column="7" colspan="2">
<widget class="QLineEdit" name="lineEditTempDir">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string notr="true">/home/user/.vcmi</string>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="16" column="1" colspan="4">
<widget class="QLabel" name="labelAutoCheck">
<property name="text">
<string>Check repositories on startup</string>
</property>
</widget>
</item>
<item row="8" column="6">
<widget class="QLabel" name="labelNetworkPort">
<property name="text">
<string>Network port</string>
</property>
</widget>
</item>
<item row="8" column="4">
<widget class="QComboBox" name="comboBoxPlayerAI">
<property name="currentText">
<string notr="true">VCAI</string>
</property>
<item> <item>
<property name="text"> <property name="text">
<string notr="true">VCAI</string> <string>English</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text">
<string notr="true">Nullkiller</string> <string>Polska (Polish)</string>
</property>
</item>
<item>
<property name="text">
<string>Русский (Russian)</string>
</property>
</item>
<item>
<property name="text">
<string>Українська (Ukrainian)</string>
</property> </property>
</item> </item>
</widget> </widget>
</item> </item>
<item row="13" column="4"> <item row="11" column="1">
<widget class="QComboBox" name="comboBoxEnemyAI"> <widget class="QLabel" name="labelNeutralAI">
<property name="editable"> <property name="text">
<bool>false</bool> <string>Neutral AI</string>
</property> </property>
</widget>
</item>
<item row="11" column="4">
<widget class="QComboBox" name="comboBoxNeutralAI">
<property name="currentText"> <property name="currentText">
<string notr="true">BattleAI</string> <string notr="true">BattleAI</string>
</property> </property>
@ -408,36 +562,16 @@
</item> </item>
</widget> </widget>
</item> </item>
<item row="0" column="6" colspan="4"> <item row="12" column="1">
<widget class="QLabel" name="labelDataDirs"> <widget class="QLabel" name="labelFriendlyAI">
<property name="font"> <property name="minimumSize">
<font> <size>
<weight>75</weight> <width>0</width>
<bold>true</bold> <height>22</height>
</font> </size>
</property> </property>
<property name="text"> <property name="text">
<string>Data Directories</string> <string>Friendly AI</string>
</property>
</widget>
</item>
<item row="0" column="1" colspan="4">
<widget class="QLabel" name="labelVideo">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Video</string>
</property>
</widget>
</item>
<item row="9" column="6">
<widget class="QLabel" name="labelEncoding">
<property name="text">
<string>Heroes III character set</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -461,91 +595,27 @@
</item> </item>
</widget> </widget>
</item> </item>
<item row="1" column="6"> <item row="14" column="4">
<widget class="QLabel" name="labelGameDir"> <widget class="QComboBox" name="comboBoxEnemyAI">
<property name="text"> <property name="editable">
<string>Extra data directory</string> <bool>false</bool>
</property> </property>
</widget> <property name="currentText">
</item> <string notr="true">BattleAI</string>
<item row="16" column="6">
<widget class="QComboBox" name="comboBoxAutoCheck">
<property name="currentIndex">
<number>1</number>
</property> </property>
<item> <item>
<property name="text"> <property name="text">
<string>Off</string> <string notr="true">BattleAI</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text">
<string>On</string> <string notr="true">StupidAI</string>
</property> </property>
</item> </item>
</widget> </widget>
</item> </item>
<item row="3" column="6"> <item row="14" column="1">
<widget class="QLabel" name="labelTempDir">
<property name="text">
<string>Log files directory</string>
</property>
</widget>
</item>
<item row="19" column="1" colspan="9">
<widget class="QPlainTextEdit" name="plainTextEditRepos">
<property name="lineWrapMode">
<enum>QPlainTextEdit::NoWrap</enum>
</property>
<property name="plainText">
<string notr="true">http://downloads.vcmi.eu/Mods/repository.json</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="labelShowIntro">
<property name="text">
<string>Show intro</string>
</property>
</widget>
</item>
<item row="15" column="1" colspan="4">
<widget class="QLabel" name="LauncherSettings">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Launcher Settings</string>
</property>
</widget>
</item>
<item row="12" column="6">
<widget class="QLabel" name="labelBuildVersionDesc">
<property name="text">
<string>Build version</string>
</property>
</widget>
</item>
<item row="6" column="1" colspan="4">
<spacer name="spacerSections">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>56</width>
<height>8</height>
</size>
</property>
</spacer>
</item>
<item row="13" column="1">
<widget class="QLabel" name="labelEnemyAI"> <widget class="QLabel" name="labelEnemyAI">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
@ -558,45 +628,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="4">
<widget class="QComboBox" name="comboBoxShowIntro">
<property name="currentIndex">
<number>1</number>
</property>
<item>
<property name="text">
<string>Off</string>
</property>
</item>
<item>
<property name="text">
<string>On</string>
</property>
</item>
</widget>
</item>
<item row="12" column="7" colspan="3">
<widget class="QLabel" name="labelBuildVersion">
<property name="text">
<string notr="true"/>
</property>
</widget>
</item>
<item row="9" column="1" colspan="4">
<widget class="QLabel" name="labelAIInTheBattlefield">
<property name="font">
<font>
<weight>75</weight>
<italic>true</italic>
<bold>true</bold>
<underline>false</underline>
</font>
</property>
<property name="text">
<string>AI in the battlefield</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
<resources/> <resources/>

File diff suppressed because it is too large Load Diff