aboutsummaryrefslogtreecommitdiff
path: root/aoapplication.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'aoapplication.cpp')
-rw-r--r--aoapplication.cpp63
1 files changed, 63 insertions, 0 deletions
diff --git a/aoapplication.cpp b/aoapplication.cpp
new file mode 100644
index 0000000..cb7c44d
--- /dev/null
+++ b/aoapplication.cpp
@@ -0,0 +1,63 @@
+#include <QDebug>
+
+#include "aoapplication.h"
+
+AOApplication::AOApplication(int &argc, char **argv) : QApplication(argc, argv)
+{
+
+}
+
+AOApplication::~AOApplication()
+{
+
+}
+
+void AOApplication::construct_lobby()
+{
+ if (lobby_constructed)
+ {
+ qDebug() << "W: lobby was attempted constructed when it already exists";
+ return;
+ }
+
+ w_lobby = new Lobby();
+ lobby_constructed = true;
+}
+
+void AOApplication::destruct_lobby()
+{
+ if(!lobby_constructed)
+ {
+ qDebug() << "W: lobby was attempted destructed when it did not exist";
+ return;
+ }
+
+ delete w_lobby;
+ lobby_constructed = false;
+}
+
+void AOApplication::construct_courtroom()
+{
+ if (courtroom_constructed)
+ {
+ qDebug() << "W: courtroom was attempted constructed when it already exists";
+ return;
+ }
+
+ w_courtroom = new QMainWindow();
+ courtroom_constructed = true;
+}
+
+void AOApplication::destruct_courtroom()
+{
+ if (!courtroom_constructed)
+ {
+ qDebug() << "W: courtroom was attempted destructed when it did not exist";
+ return;
+ }
+
+ delete w_courtroom;
+ courtroom_constructed = false;
+}
+
+