-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
85 lines (75 loc) · 2.01 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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QDir>
#include <QDesktopServices>
#include <QFile>
#include "qpushbutton.h"
#include "sound.h"
#include <QSoundEffect>
#include "character.h"
#include "model.h"
#include "graphicsscene.h"
#include <QRandomGenerator>
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(Model &model, QWidget *parent = nullptr);
~MainWindow();
private:
Ui::MainWindow *ui;
void setSoundFile(QString);
Sound sound;
void emitSelectionOne(int,int);
void emitSelectionTwo(int,int);
QVector<QPushButton*> levelButtons1;
QVector<QPushButton*> levelButtons2;
int selectedButton1Pos;
int selectedButton2Pos;
void resetLevel();
bool muteButton = false;
int drawingSizeX;
int drawingSizeY;
int imageWidth;
int imageHeight;
GraphicsScene *graphic;
QGraphicsScene *charGraphic;
QImage image;
int currentLevel;
signals:
void playPronunciation(QString);
void playBackgroundMusic();
void muteSound(bool);
void muteFirework(bool);
void emitOne(int);
void emitTwo(int);
void imageUpdate(GraphicsScene * graphic);
void selectorIndexValue(int);
void sendMatch(bool);
private slots:
void displayHomeImage();
void displayLearnImage();
void displayPracticeHome();
void displayWikiPage();
void displayFireworksPage();
void displayPDF(QString);
void on_fireworksButton_clicked();
void displayLevel(QVector<Character>,int);
void displayLevelSelect();
void receiveMatch(bool);
void on_muteButton_clicked();
void displayDrawPage();
void updateDrawing(QPointF mouseLoc);
void updateImage(GraphicsScene * graphic);
void clearBackground();
void displayKanaImage(QString filePath);
void sendKanaSelectorIndex();
void updateLevelButton();
void updateTimeLabel(int);
void loadCompletion(QVector<Level>);
};
#endif // MAINWINDOW_H