Mercurial > hg > sonic-visualiser
changeset 2233:f6fb577f3809 osc-script
Implement options, add --no-splash
author | Chris Cannam |
---|---|
date | Tue, 26 Mar 2019 14:35:11 +0000 |
parents | 76b1c50f1f6d |
children | 0ff11ea22471 |
files | main/main.cpp |
diffstat | 1 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/main/main.cpp Mon Mar 25 15:53:03 2019 +0000 +++ b/main/main.cpp Tue Mar 26 14:35:11 2019 +0000 @@ -266,6 +266,8 @@ ("Do not attempt to open an audio output device.") }, { "no-osc", QApplication::tr ("Do not provide an Open Sound Control port for remote control.") }, + { "no-splash", QApplication::tr + ("Do not show a splash screen.") }, { "osc-script", QApplication::tr ("Batch run the OSC script found in the given file. Scripts consist of /command arg1 arg2 ... OSC control lines, optionally interleaved with numbers to specify pauses in seconds."), "osc.txt" } @@ -286,11 +288,12 @@ parser.process(args); + bool audioOutput = !(parser.isSet("no-audio")); + bool oscSupport = !(parser.isSet("no-osc")); + bool showSplash = !(parser.isSet("no-splash")); + args = parser.positionalArguments(); - bool audioOutput = true; - bool oscSupport = true; - QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); signal(SIGINT, signalHandler); @@ -313,7 +316,7 @@ settings.endGroup(); settings.beginGroup("Preferences"); - if (settings.value("show-splash", true).toBool()) { + if (showSplash && settings.value("show-splash", true).toBool()) { splash = new SVSplash(); splash->show(); QTimer::singleShot(5000, splash, SLOT(hide()));