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

Function setupGeneralTabInactiveWarning

lib/general.cpp:925–943  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

923}
924
925static void setupGeneralTabInactiveWarning(QTabWidget *tabs)
926{
927 auto callback = [tabs]() {
928 const bool isRunning = switcher && switcher->th &&
929 switcher->th->isRunning();
930 auto idx = getGeneralTabIdx(tabs);
931 tabs->setTabIcon(
932 idx,
933 isRunning ? QIcon()
934 : QIcon::fromTheme(
935 "obs",
936 QIcon(":/res/images/warning.svg")));
937 };
938
939 auto inactiveTimer = new QTimer(tabs);
940 inactiveTimer->setInterval(1000);
941 QObject::connect(inactiveTimer, &QTimer::timeout, callback);
942 inactiveTimer->start();
943}
944
945void AdvSceneSwitcher::SetCheckIntervalTooLowVisibility() const
946{

Callers 1

SetupGeneralTabMethod · 0.85

Calls 2

getGeneralTabIdxFunction · 0.85
startMethod · 0.45

Tested by

no test coverage detected