MCPcopy Create free account
hub / github.com/clementgallet/libTAS / createTabWidget

Method createTabWidget

src/program/ui/settings/SettingsWindow.cpp:89–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87}
88
89QWidget *SettingsWindow::createTabWidget(TabIndex index)
90{
91 switch (index) {
92 case RuntimeTab:
93 if (!rp) {
94 rp = new RuntimePane(context);
95 rp->loadConfig();
96 rp->update(currentStatus);
97 return GetWrappedWidget(rp, this, 125, 100);
98 }
99 return tabPages[RuntimeTab];
100 case MovieTab:
101 if (!mp) {
102 mp = new MoviePane(context);
103 mp->loadConfig();
104 mp->update(currentStatus);
105 return GetWrappedWidget(mp, this, 125, 100);
106 }
107 return tabPages[MovieTab];
108 case InputTab:
109 if (!ip) {
110 ip = new InputPane(context);
111 ip->loadConfig();
112 ip->update(currentStatus);
113 return GetWrappedWidget(ip, this, 125, 100);
114 }
115 return tabPages[InputTab];
116 case AudioTab:
117 if (!ap) {
118 ap = new AudioPane(context);
119 ap->loadConfig();
120 ap->update(currentStatus);
121 return GetWrappedWidget(ap, this, 125, 100);
122 }
123 return tabPages[AudioTab];
124 case VideoTab:
125 if (!vp) {
126 vp = new VideoPane(context);
127 vp->loadConfig();
128 vp->update(currentStatus);
129 return GetWrappedWidget(vp, this, 125, 100);
130 }
131 return tabPages[VideoTab];
132 case DebugTab:
133 if (!gp) {
134 gp = new DebugPane(context);
135 gp->loadConfig();
136 gp->update(currentStatus);
137 return GetWrappedWidget(gp, this, 125, 100);
138 }
139 return tabPages[DebugTab];
140 case GameSpecificTab:
141 if (!gsp) {
142 gsp = new GameSpecificPane(context);
143 gsp->loadConfig();
144 gsp->update(currentStatus);
145 return GetWrappedWidget(gsp, this, 125, 100);
146 }

Callers

nothing calls this directly

Calls 3

GetWrappedWidgetFunction · 0.85
loadConfigMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected