Skip to content

Commit 5531aec

Browse files
Rename CreationDialog and LoadDialog
1 parent a6bfb36 commit 5531aec

File tree

8 files changed

+130
-52
lines changed

8 files changed

+130
-52
lines changed
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
#include <QFontMetrics>
88

99
#include "../NameOfExt.hpp"
10-
#include "LoadDialog.hpp"
10+
#include "LoadFromTheFileWindow.hpp"
1111

12-
LoadDialog::LoadDialog(QWidget* parent) : QDialog(parent)
12+
LoadFromTheFileWindow::LoadFromTheFileWindow(QWidget* parent) : QDialog(parent)
1313
{
14-
QHBoxLayout* ltOkAndCancel = new QHBoxLayout();
15-
QPushButton* btnOk = new QPushButton(tr("START"));
16-
QPushButton* btnCancel = new QPushButton(tr("BACK"));
17-
QHBoxLayout* ltBtnOk = new QHBoxLayout();
18-
QHBoxLayout* ltBtnCancel = new QHBoxLayout();
14+
QHBoxLayout* ltOkAndCancel = new QHBoxLayout();
15+
QPushButton* btnOk = new QPushButton(tr("START"));
16+
QPushButton* btnCancel = new QPushButton(tr("BACK"));
17+
QHBoxLayout* ltBtnOk = new QHBoxLayout();
18+
QHBoxLayout* ltBtnCancel = new QHBoxLayout();
1919
btnOk->setObjectName(nameof(btnOk));
2020
btnOk->setFixedWidth(80);
2121
ltBtnOk->setAlignment(Qt::Alignment::enum_type::AlignRight);
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#pragma once
22
#include <QDialog>
33

4-
class CreationDialog : public QDialog
4+
class LoadFromTheFileWindow : public QDialog
55
{
66
Q_OBJECT
77
public: // Methods
8-
CreationDialog(QWidget* parent = nullptr);
8+
LoadFromTheFileWindow(QWidget *parent = nullptr);
99
signals:
1010
void btnBackClicked();
1111
void btnStartClicked();
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
#include "../Logger.hpp"
1010
#include "../Registry.hpp"
1111
#include "../NameOfExt.hpp"
12-
#include "CreationDialog.hpp"
12+
#include "LoadFromTheGameWindow.hpp"
1313

14-
CreationDialog::CreationDialog(QWidget* parent) : QDialog(parent)
14+
LoadFromTheGameWindow::LoadFromTheGameWindow(QWidget* parent) : QDialog(parent)
1515
{
1616
QHBoxLayout* ltOkAndCancel = new QHBoxLayout();
1717
QPushButton* btnOk = new QPushButton(tr("START"));
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#pragma once
22
#include <QDialog>
33

4-
class LoadDialog : public QDialog
4+
class LoadFromTheGameWindow : public QDialog
55
{
66
Q_OBJECT
77
public: // Methods
8-
LoadDialog(QWidget *parent = nullptr);
8+
LoadFromTheGameWindow(QWidget* parent = nullptr);
99
signals:
1010
void btnBackClicked();
1111
void btnStartClicked();

src/GUI/SetUpWindowsWrapper.cpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "../Logger.hpp"
2-
#include "ImageManager.hpp"
32
#include "WindowManager.hpp"
3+
#include "ImageManager.hpp"
4+
#include "LoadFromTheGameWindow.hpp"
45
#include "SetUpWindowsWrapper.hpp"
56

67
SetUpWindowsWrapper::SetUpWindowsWrapper(QWidget* parent) : QStackedWidget(parent)
@@ -24,13 +25,13 @@ void SetUpWindowsWrapper::AttachConnections()
2425
connect(pGreetingWidget, &GreetingWindow::pressed,
2526
this, &SetUpWindowsWrapper::BtnNewProjectOrBtnLoadProject_Clicked);
2627

27-
connect(pLoadDialog, &LoadDialog::btnBackClicked,
28+
connect(pLoadDialog, &LoadFromTheFileWindow::btnBackClicked,
2829
this, &SetUpWindowsWrapper::BtnBack_Clicked);
2930

30-
connect(pCreationDialog, &CreationDialog::btnBackClicked,
31+
connect(pCreationDialog, &LoadFromTheGameWindow::btnBackClicked,
3132
this, &SetUpWindowsWrapper::BtnBack_Clicked);
3233

33-
connect(pCreationDialog, &CreationDialog::btnStartClicked,
34+
connect(pCreationDialog, &LoadFromTheGameWindow::btnStartClicked,
3435
this, &SetUpWindowsWrapper::CreationDialog_AcceptConfiguration);
3536
}
3637

@@ -42,21 +43,21 @@ void SetUpWindowsWrapper::DetachConnections()
4243
disconnect(pGreetingWidget, &GreetingWindow::pressed,
4344
this, &SetUpWindowsWrapper::BtnNewProjectOrBtnLoadProject_Clicked);
4445

45-
disconnect(pLoadDialog, &LoadDialog::btnBackClicked,
46+
disconnect(pLoadDialog, &LoadFromTheFileWindow::btnBackClicked,
4647
this, &SetUpWindowsWrapper::BtnBack_Clicked);
4748

48-
disconnect(pCreationDialog, &CreationDialog::btnBackClicked,
49+
disconnect(pCreationDialog, &LoadFromTheGameWindow::btnBackClicked,
4950
this, &SetUpWindowsWrapper::BtnBack_Clicked);
5051

51-
disconnect(pCreationDialog, &CreationDialog::btnStartClicked,
52+
disconnect(pCreationDialog, &LoadFromTheGameWindow::btnStartClicked,
5253
this, &SetUpWindowsWrapper::CreationDialog_AcceptConfiguration);
5354
}
5455

5556
void SetUpWindowsWrapper::AddWidgets()
5657
{
5758
pGreetingWidget = new GreetingWindow(this);
58-
pCreationDialog = new CreationDialog(pGreetingWidget);
59-
pLoadDialog = new LoadDialog(pGreetingWidget);
59+
pCreationDialog = new LoadFromTheGameWindow(pGreetingWidget);
60+
pLoadDialog = new LoadFromTheFileWindow(pGreetingWidget);
6061

6162
pGreetingWidget->setFixedSize(size());
6263
pCreationDialog->setFixedSize(size());

src/GUI/SetUpWindowsWrapper.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
#pragma once
22
#include <QStackedWidget>
33
#include "GreetingWindow.hpp"
4-
#include "CreationDialog.hpp"
5-
#include "LoadDialog.hpp"
4+
#include "LoadFromTheGameWindow.hpp"
5+
#include "LoadFromTheFileWindow.hpp"
66

77
class SetUpWindowsWrapper final : public QStackedWidget
88
{
99
Q_OBJECT
1010
private: // Data
1111
GreetingWindow* pGreetingWidget = nullptr;
12-
CreationDialog* pCreationDialog = nullptr;
13-
LoadDialog* pLoadDialog = nullptr;
12+
LoadFromTheGameWindow* pCreationDialog = nullptr;
13+
LoadFromTheFileWindow* pLoadDialog = nullptr;
1414

1515
private: // Methods
1616
/// @brief Connects slots and singals.
@@ -21,7 +21,7 @@ class SetUpWindowsWrapper final : public QStackedWidget
2121
SetUpWindowsWrapper(QWidget* parent = nullptr);
2222

2323
private:
24-
/// @brief Initialize `GreetingWindow`, `CreationDialog`, `LoadDialog`.
24+
/// @brief Initialize `GreetingWindow`, `LoadFromTheGameWindow`, `LoadFromTheFileWindow`.
2525
void AddWidgets();
2626

2727
private slots:

src/GUI/Theme/Styles.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ QComboBox::down-arrow { image: url(Resources/Theme/ScrollArrowDown.webp); }
5656
QComboBox::up-arrow { image: url(Resources/Theme/ScrollArrowUp.webp); }
5757

5858
/* Start widget style setting */
59-
LoadDialog, SetUpWindowsWrapper, CreationDialog
59+
LoadFromTheFileWindow, SetUpWindowsWrapper, LoadFromTheGameWindow
6060
{
6161
border-image: url(Resources/Theme/StartMenuBackground.webp) 0 0 0 0 stretch stretch;
6262
background-color: black;
@@ -85,14 +85,14 @@ GreetingWindow QPushButton#btnSettings
8585

8686
GreetingWindow QPushButton { font-size: 18pt; }
8787

88-
GreetingWindow QLabel, LoadDialog QLabel, CreationDialog QLabel,
89-
GreetingWindow QRadioButton, LoadDialog QRadioButton, CreationDialog QRadioButton,
90-
GreetingWindow QCheckBox, LoadDialog QCheckBox, CreationDialog QCheckBox
88+
GreetingWindow QLabel, LoadFromTheFileWindow QLabel, LoadFromTheGameWindow QLabel,
89+
GreetingWindow QRadioButton, LoadFromTheFileWindow QRadioButton, LoadFromTheGameWindow QRadioButton,
90+
GreetingWindow QCheckBox, LoadFromTheFileWindow QCheckBox, LoadFromTheGameWindow QCheckBox
9191
{
9292
color: white;
9393
}
9494

95-
GreetingWindow QPushButton:hover, LoadDialog QPushButton:hover, CreationDialog QPushButton:hover
95+
GreetingWindow QPushButton:hover, LoadFromTheFileWindow QPushButton:hover, LoadFromTheGameWindow QPushButton:hover
9696
{
9797
background-color: #3543e7;
9898
color: #baff0c;

src/GUI/Translations/ru.ts

Lines changed: 97 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,16 @@
5757
<context>
5858
<name>CreationDialog</name>
5959
<message>
60-
<location filename="../CreationDialog.cpp" line="17"/>
6160
<source>START</source>
62-
<translation>НАЧАТЬ</translation>
61+
<translation type="vanished">НАЧАТЬ</translation>
6362
</message>
6463
<message>
65-
<location filename="../CreationDialog.cpp" line="18"/>
6664
<source>BACK</source>
67-
<translation>НАЗАД</translation>
65+
<translation type="vanished">НАЗАД</translation>
6866
</message>
6967
<message>
70-
<location filename="../CreationDialog.cpp" line="56"/>
7168
<source>Save hotkeys dirrectly to the game.</source>
72-
<translation>Сохранять горячие клавиши в игре.</translation>
69+
<translation type="vanished">Сохранять горячие клавиши в игре.</translation>
7370
</message>
7471
</context>
7572
<context>
@@ -279,29 +276,24 @@
279276
<context>
280277
<name>LoadDialog</name>
281278
<message>
282-
<location filename="../LoadDialog.cpp" line="15"/>
283279
<source>START</source>
284-
<translation>НАЧАТЬ</translation>
280+
<translation type="vanished">НАЧАТЬ</translation>
285281
</message>
286282
<message>
287-
<location filename="../LoadDialog.cpp" line="16"/>
288283
<source>BACK</source>
289-
<translation>НАЗАД</translation>
284+
<translation type="vanished">НАЗАД</translation>
290285
</message>
291286
<message>
292-
<location filename="../LoadDialog.cpp" line="43"/>
293287
<source>Text files</source>
294-
<translation>Текстовые файлы</translation>
288+
<translation type="vanished">Текстовые файлы</translation>
295289
</message>
296290
<message>
297-
<location filename="../LoadDialog.cpp" line="44"/>
298291
<source>Any files</source>
299-
<translation>Все файлы</translation>
292+
<translation type="vanished">Все файлы</translation>
300293
</message>
301294
<message>
302-
<location filename="../LoadDialog.cpp" line="48"/>
303295
<source>REVIEW</source>
304-
<translation>ОБЗОР</translation>
296+
<translation type="vanished">ОБЗОР</translation>
305297
</message>
306298
<message>
307299
<source>LOAD PROJECT</source>
@@ -312,14 +304,99 @@
312304
<translation type="vanished">Обзор</translation>
313305
</message>
314306
<message>
315-
<location filename="../LoadDialog.cpp" line="54"/>
316307
<source>Load project</source>
317-
<translation>Загрузить проект</translation>
308+
<translation type="vanished">Загрузить проект</translation>
309+
</message>
310+
<message>
311+
<source>Load installed game hotkey map</source>
312+
<translation type="vanished">Загрузить горячие клавиши из игры</translation>
313+
</message>
314+
</context>
315+
<context>
316+
<name>LoadFromTheFileWindow</name>
317+
<message>
318+
<location filename="../LoadFromTheFileWindow.cpp" line="15"/>
319+
<source>START</source>
320+
<translation type="unfinished">НАЧАТЬ</translation>
321+
</message>
322+
<message>
323+
<location filename="../LoadFromTheFileWindow.cpp" line="16"/>
324+
<source>BACK</source>
325+
<translation type="unfinished">НАЗАД</translation>
326+
</message>
327+
<message>
328+
<location filename="../LoadFromTheFileWindow.cpp" line="43"/>
329+
<source>Text files</source>
330+
<translation type="unfinished">Текстовые файлы</translation>
331+
</message>
332+
<message>
333+
<location filename="../LoadFromTheFileWindow.cpp" line="44"/>
334+
<source>Any files</source>
335+
<translation type="unfinished">Все файлы</translation>
336+
</message>
337+
<message>
338+
<location filename="../LoadFromTheFileWindow.cpp" line="48"/>
339+
<source>REVIEW</source>
340+
<translation type="unfinished">ОБЗОР</translation>
341+
</message>
342+
<message>
343+
<location filename="../LoadFromTheFileWindow.cpp" line="54"/>
344+
<source>Load project</source>
345+
<translation type="unfinished">Загрузить проект</translation>
346+
</message>
347+
<message>
348+
<location filename="../LoadFromTheFileWindow.cpp" line="63"/>
349+
<source>Load installed game hotkey map</source>
350+
<translation type="unfinished">Загрузить горячие клавиши из игры</translation>
351+
</message>
352+
</context>
353+
<context>
354+
<name>LoadFromTheGameWindow</name>
355+
<message>
356+
<location filename="../LoadFromTheGameWindow.cpp" line="17"/>
357+
<source>START</source>
358+
<translation type="unfinished">НАЧАТЬ</translation>
359+
</message>
360+
<message>
361+
<location filename="../LoadFromTheGameWindow.cpp" line="18"/>
362+
<source>BACK</source>
363+
<translation type="unfinished">НАЗАД</translation>
364+
</message>
365+
<message>
366+
<location filename="../LoadFromTheGameWindow.cpp" line="56"/>
367+
<source>Save hotkeys dirrectly to the game.</source>
368+
<translation type="unfinished">Сохранять горячие клавиши в игре.</translation>
369+
</message>
370+
</context>
371+
<context>
372+
<name>LoadWindow</name>
373+
<message>
374+
<source>START</source>
375+
<translation type="obsolete">НАЧАТЬ</translation>
376+
</message>
377+
<message>
378+
<source>BACK</source>
379+
<translation type="obsolete">НАЗАД</translation>
380+
</message>
381+
<message>
382+
<source>Text files</source>
383+
<translation type="obsolete">Текстовые файлы</translation>
384+
</message>
385+
<message>
386+
<source>Any files</source>
387+
<translation type="obsolete">Все файлы</translation>
388+
</message>
389+
<message>
390+
<source>REVIEW</source>
391+
<translation type="obsolete">ОБЗОР</translation>
392+
</message>
393+
<message>
394+
<source>Load project</source>
395+
<translation type="obsolete">Загрузить проект</translation>
318396
</message>
319397
<message>
320-
<location filename="../LoadDialog.cpp" line="63"/>
321398
<source>Load installed game hotkey map</source>
322-
<translation>Загрузить горячие клавиши из игры</translation>
399+
<translation type="obsolete">Загрузить горячие клавиши из игры</translation>
323400
</message>
324401
</context>
325402
<context>

0 commit comments

Comments
 (0)