-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsmartprogramsetting.h
85 lines (68 loc) · 1.67 KB
/
smartprogramsetting.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
#ifndef SMARTPROGRAMSETTING_H
#define SMARTPROGRAMSETTING_H
#include "autocontrollerdefines.h"
#include "pokemondatabase.h"
#include <QDate>
#include <QDebug>
#include <QFile>
#include <QFileDialog>
#include <QMediaPlayer>
#include <QMessageBox>
#include <QSettings>
#include <QSound>
#include <QTextStream>
#include <QWidget>
enum DateArrangement
{
DA_JP,
DA_EU,
DA_US
};
namespace Ui {
class SmartProgramSetting;
}
class SmartProgramSetting : public QWidget
{
Q_OBJECT
public:
explicit SmartProgramSetting(QWidget *parent = nullptr);
~SmartProgramSetting();
void closeEvent(QCloseEvent *event);
// System
bool isPreventUpdate();
DateArrangement getDateArrangement();
QDate getDate();
GameLanguage getGameLanguage();
bool ensureTrainedDataExist();
// Sound
bool isSoundEnabled();
void playSound();
// Stream Counter
bool isStreamCounterEnabled();
bool isStreamCounterExcludePrefix();
// Others
bool isLogAutosave();
bool isLogDebugCommand();
bool isLogDebugColor();
private slots:
// System
void on_CB_DateArrangement_currentIndexChanged(int index);
void on_PB_CurrentDate_clicked();
void on_CB_GameLanguage_currentIndexChanged(int index);
// Sound
void on_RB_DefaultSound_clicked();
void on_RB_CustomSound_clicked();
void on_PB_Sound_clicked();
void on_PB_PlaySound_clicked();
private:
// Sound
void SetCustomSoundEnabled();
private:
Ui::SmartProgramSetting *ui;
QSettings *m_settings;
QString m_path;
QMediaPlayer m_defaultPlayer;
QSound* m_customSound = Q_NULLPTR;
bool m_ignoreLanguageWarning;
};
#endif // SMARTPROGRAMSETTING_H