-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.h
94 lines (72 loc) · 2.03 KB
/
MainWindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QFileDialog>
#include <QDebug>
#include <QMessageBox>
#include <QTextStream>
#include <QLabel>
#include <QCloseEvent>
#include <QTranslator>
#include <QLibraryInfo>
#include <QSaveFile>
#include <QTextEdit>
#include <QActionGroup>
#include <QXmlStreamReader>
#include "SearchAndReplaceDial.h"
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
private slots:
void on_actionPlik_triggered();
void on_actionOtworz_triggered();
void on_actionZapisz_triggered();
void on_actionZapiszJako_triggered();
void on_actionNowy_triggered();
void on_textEdit_textChanged();
void on_actionTextWrap_triggered();
void on_actionPolski_triggered();
void on_actionAngielski_triggered();
void on_actionNiemiecki_triggered();
void on_actionSzukajIZastap_triggered();
void onWindowClosed(const QWidget* widget);
private:
Ui::MainWindow *ui;
SearchAndReplaceDial* dlgSearchAndReplace;
QLabel* statusLabel;
QTranslator* sysTranslator;
bool bSysTranslatorLoaded;
QTranslator* enTranslator;
bool bEnTranslatorLoaded;
QTranslator* deTranslator;
bool bDeTranslatorLoaded;
QString currentLanguage;
QString actFile;
QString xmlConfigFile;
void init();
uint hashCode;
void openFile();
void readFile(const QString& filename);
bool saveFile(const QString& filename);
bool saveFileAs();
bool queryExit();
bool querySave();
// Przy zamykaniu zwraca
void closeEvent(QCloseEvent* event) override;
// Nadpisanie changeEvent dla tlumaczenia
void changeEvent(QEvent* event) override;
void loadLanguage(const QString&);
void removeAllTranslators();
void writeXMLSettings(const QString&);
void readXMLSettings(const QString&);
void setTextWrap();
void setNewDocument();
bool x;
};
#endif // MAINWINDOW_H