History

INtroducing the PerformanceManager

Sam Gateau committed 7 years ago

Commit bf7617e1 parent 3c6eecb8 files · +131 −9Browse files

Showing the changes to interface/src/scripting/PerformanceScriptingInterface.cpp (1 of 8 files). Show all

Unified · Split

interface/src/scripting/PerformanceScriptingInterface.cpp+13−0
@@ -19,6 +19,19 @@ PerformanceScriptingInterface::PerformanceScriptingInterface() { · 18 unmodified lines
19 });19 });
20}20}
21 21
22void PerformanceScriptingInterface::setPerformanceProfile(PerformanceProfile performanceProfile) {
23 qApp->getPerformanceManager().setPerformanceProfile((PerformanceManager::PerformanceProfile)performanceProfile);
24}
25
26PerformanceScriptingInterface::PerformanceProfile PerformanceScriptingInterface::getPerformanceProfile() const {
27 return (PerformanceScriptingInterface::PerformanceProfile)qApp->getPerformanceManager().getPerformanceProfile();
28}
29
30QStringList PerformanceScriptingInterface::getPerformanceProfileNames() const {
31 static const QStringList performanceProfileNames = { "Low", "Mid", "High" };
32 return performanceProfileNames;
33}
34
22void PerformanceScriptingInterface::setRefreshRateProfile(RefreshRateProfile refreshRateProfile) {35void PerformanceScriptingInterface::setRefreshRateProfile(RefreshRateProfile refreshRateProfile) {
23 qApp->getRefreshRateManager().setRefreshRateProfile((RefreshRateManager::RefreshRateProfile)refreshRateProfile);36 qApp->getRefreshRateManager().setRefreshRateProfile((RefreshRateManager::RefreshRateProfile)refreshRateProfile);
24}37}