forked from kn0w0n3/Super_Mario
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtitle.h
90 lines (78 loc) · 1.95 KB
/
title.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
/*
* Author: equati0n
* Date: December 2016
*/
#ifndef TITLE_H
#define TITLE_H
#include <QPushButton>
#include <QLineEdit>
#include <QRadioButton>
#include <QMessageBox>
#include <QRegularExpression>
#include <QRegularExpressionMatch>
#include "mainwindow.h"
#include "myscene.h"
#include "database.h"
#include "soundmanager.h"
class View;
class LoginWindow;
class MyScene;
class AnimatedGraphicsItem : public QObject, public QGraphicsPixmapItem{
Q_OBJECT
Q_PROPERTY(QPointF pos READ pos WRITE setPos)
};
class Title : public QGraphicsScene{
Q_OBJECT
public:
Title(View *view, QWidget *parent = 0);
Connection createConnection();
bool regExUserTest();
signals:
void quitGame();
void playSound(QString);
//void killSound();
protected:
public slots:
void stopMusic();
private slots:
void login();
void newUser();
void developerLogin();
void on_radioButton_toggled(bool checked);
void quitProgram();
private:
int selection = 0;
const int width = 1280;
const int height = 720;
Connection DBase;
AnimatedGraphicsItem *background;
View *viewer;
QGraphicsPixmapItem *foreground;
QGraphicsPixmapItem *cursor;
QGraphicsPixmapItem *logo;
QGraphicsPixmapItem *border;
QGraphicsTextItem *start;
QGraphicsTextItem *quit;
QMediaPlaylist *playlist;
QPropertyAnimation *animation;
QScrollBar *scroll;
MyScene *scene;
QPushButton *loginButton;
QPushButton *newUserButton;
QPushButton *developerButton;
QPushButton *quitButton;
LoginWindow *loginWindow;
QLineEdit *userLine;
QLineEdit *passLine;
QLabel *userName;
QLabel *radioText;
QLabel *password;
QRadioButton *radioButton;
QSqlDatabase db;
QRegularExpression *usernameRegEx;
QRegularExpressionMatch *usernamenameMatch;
QRegularExpression *passwordRegEx;
QRegularExpressionMatch *passwordMatch;
SoundManager *soundManager;
};
#endif // TITLE_H