MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / ExecutableSwitchWidget

Method ExecutableSwitchWidget

lib/legacy/switch-executable.cpp:204–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202}
203
204ExecutableSwitchWidget::ExecutableSwitchWidget(QWidget *parent,
205 ExecutableSwitch *s)
206 : SwitchWidget(parent, s, true, true)
207{
208 processes = new QComboBox();
209 requiresFocus = new QCheckBox(obs_module_text(
210 "AdvSceneSwitcher.executableTab.requiresFocus"));
211
212 QWidget::connect(processes, SIGNAL(currentTextChanged(const QString &)),
213 this, SLOT(ProcessChanged(const QString &)));
214 QWidget::connect(requiresFocus, SIGNAL(stateChanged(int)), this,
215 SLOT(FocusChanged(int)));
216
217 PopulateProcessSelection(processes);
218
219 processes->setEditable(true);
220 processes->setMaxVisibleItems(20);
221
222 if (s) {
223 processes->setCurrentText(s->exe);
224 requiresFocus->setChecked(s->inFocus);
225 }
226
227 QHBoxLayout *mainLayout = new QHBoxLayout;
228 std::unordered_map<std::string, QWidget *> widgetPlaceholders = {
229 {"{{processes}}", processes},
230 {"{{requiresFocus}}", requiresFocus},
231 {"{{scenes}}", scenes},
232 {"{{transitions}}", transitions}};
233 PlaceWidgets(obs_module_text("AdvSceneSwitcher.executableTab.entry"),
234 mainLayout, widgetPlaceholders);
235 setLayout(mainLayout);
236
237 switchData = s;
238
239 loading = false;
240}
241
242ExecutableSwitch *ExecutableSwitchWidget::getSwitchData()
243{

Callers

nothing calls this directly

Calls 5

obs_module_textFunction · 0.85
PlaceWidgetsFunction · 0.85
setCurrentTextMethod · 0.80
setCheckedMethod · 0.80
PopulateProcessSelectionFunction · 0.50

Tested by

no test coverage detected