mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-04-04 16:25:39 -05:00
Move GetSceneGroupByName functions to scene-group.hpp
This commit is contained in:
parent
9670a01e1a
commit
7cfa956b80
|
|
@ -82,3 +82,6 @@ private:
|
|||
|
||||
SceneGroup *sceneGroup = nullptr;
|
||||
};
|
||||
|
||||
SceneGroup *GetSceneGroupByName(const char *name);
|
||||
SceneGroup *GetSceneGroupByQString(const QString &name);
|
||||
|
|
|
|||
|
|
@ -684,3 +684,23 @@ void SceneGroupEditWidget::RepeatChanged(int state)
|
|||
std::lock_guard<std::mutex> lock(switcher->m);
|
||||
sceneGroup->repeat = state;
|
||||
}
|
||||
|
||||
SceneGroup *GetSceneGroupByName(const char *name)
|
||||
{
|
||||
if (!switcher) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
for (SceneGroup &sg : switcher->sceneGroups) {
|
||||
if (sg.name == name) {
|
||||
return &sg;
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
SceneGroup *GetSceneGroupByQString(const QString &name)
|
||||
{
|
||||
return GetSceneGroupByName(name.toUtf8().constData());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,26 +9,6 @@ static inline bool SceneGroupValid(SceneGroup *group)
|
|||
return false;
|
||||
}
|
||||
|
||||
static inline SceneGroup *GetSceneGroupByName(const char *name)
|
||||
{
|
||||
if (!switcher) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
for (SceneGroup &sg : switcher->sceneGroups) {
|
||||
if (sg.name == name) {
|
||||
return &sg;
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
static inline SceneGroup *GetSceneGroupByQString(const QString &name)
|
||||
{
|
||||
return GetSceneGroupByName(name.toUtf8().constData());
|
||||
}
|
||||
|
||||
bool SceneSwitcherEntry::initialized()
|
||||
{
|
||||
return (usePreviousScene || WeakSourceValid(scene) ||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user