-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscreensfactory.cpp
62 lines (49 loc) · 1.44 KB
/
screensfactory.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
#include "screensfactory.h"
#include <ui/mainfragment.h>
#include <ui/splashfragment.h>
#include <ui/auth/loginfragment.h>
#include <ui/auth/registrationfragment.h>
#include <ui/auth/startfragment.h>
#include <ui/desk/Shedule.h>
#include <ui/desk/Friends.h>
#include <ui/desk/Groups.h>
#include <ui/desk/Groups.h>
#include <ui/desk/Profile.h>
#include <ui/desk/Group.h>
#include <ui/desk/Settings.h>
using namespace screens;
ScreensFactory::ScreensFactory() {
}
ScreensFactory::~ScreensFactory() {
}
BaseFragment* ScreensFactory::create(QString tag) {
qDebug("ScreensFactory create");
if (tag == SPLASH_TAG) {
return new SplashFragment;
} else if (tag == START_TAG) {
return new StartFragment;
} else if (tag == LOGIN_TAG) {
return new LoginFragment;
} else if (tag == REGISTRATION_TAG) {
return new RegistrationFragment;
} else if (tag == MAIN_TAG) {
return new MainFragment;
} else if (tag == MY_FRIENDS_SCREEN) {
return new Friends;
} else if (tag == MY_GROUPS_SCREEN) {
return new Groups;
} else if (tag == MY_SHEDULE_SCREEN) {
return new Shedule;
} else if (tag == MY_SETTINGS_SCREEN) {
return new Settings;
} else if (tag == MY_PROFILE_SCREEN) {
return new profile;
} else if (tag == GROUP) {
return new Group;
} else {
return nullptr;
}
}
QString ScreensFactory::createStart() {
return SPLASH_TAG;
}