-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanager.cpp
61 lines (48 loc) · 1.3 KB
/
manager.cpp
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
#include "QDebug"
#include "manager.h"
Manager::Manager() : QObject()
{
m_mainWindow = new MainWindow;
m_menuWindow = new MenuWindow(m_mainWindow);
emit m_mainWindow->isReadyMenu(m_menuWindow);
m_menuMusicWindow = new MenuMusicWindow(m_mainWindow);
emit m_menuWindow->isReadyMusic(m_menuMusicWindow);
m_client = new ClientTcp;
emit m_client->isReadyMenu(m_menuWindow);
emit m_client->isReadyWindow(m_mainWindow);
emit m_menuMusicWindow->isReadyClient(m_client);
emit m_mainWindow->isReadyClient(m_client);
m_decoder = new Decoder;
emit m_client->isReadyDecoder(m_decoder);
emit m_decoder->isReadyClient(m_client);
emit m_decoder->isReadyMenuMusicWindow(m_menuMusicWindow);
m_mainWindow->setShow();
}
Manager::~Manager()
{
m_mainWindow->deleteLater();
m_menuWindow->deleteLater();
m_menuMusicWindow->deleteLater();
m_client->deleteLater();
m_decoder->deleteLater();
}
MainWindow* Manager::getInstanceMainWindow()
{
return m_mainWindow;
}
MenuWindow* Manager::getInstanceMenuWindow()
{
return m_menuWindow;
}
MenuMusicWindow* Manager::getInstanceMenuMusicWindow()
{
return m_menuMusicWindow;
}
ClientTcp* Manager::getInstanceClientTcp()
{
return m_client;
}
Decoder* Manager::getInstanceDecoder()
{
return m_decoder;
}