Mercurial > hg > sonic-visualiser
comparison main/main.cpp @ 2233:f6fb577f3809 osc-script
Implement options, add --no-splash
author | Chris Cannam |
---|---|
date | Tue, 26 Mar 2019 14:35:11 +0000 |
parents | 76b1c50f1f6d |
children | ca0ee1fe88c7 |
comparison
equal
deleted
inserted
replaced
2232:76b1c50f1f6d | 2233:f6fb577f3809 |
---|---|
264 parser.addOptions({ | 264 parser.addOptions({ |
265 { "no-audio", QApplication::tr | 265 { "no-audio", QApplication::tr |
266 ("Do not attempt to open an audio output device.") }, | 266 ("Do not attempt to open an audio output device.") }, |
267 { "no-osc", QApplication::tr | 267 { "no-osc", QApplication::tr |
268 ("Do not provide an Open Sound Control port for remote control.") }, | 268 ("Do not provide an Open Sound Control port for remote control.") }, |
269 { "no-splash", QApplication::tr | |
270 ("Do not show a splash screen.") }, | |
269 { "osc-script", QApplication::tr | 271 { "osc-script", QApplication::tr |
270 ("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."), | 272 ("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."), |
271 "osc.txt" } | 273 "osc.txt" } |
272 }); | 274 }); |
273 | 275 |
284 } | 286 } |
285 } | 287 } |
286 | 288 |
287 parser.process(args); | 289 parser.process(args); |
288 | 290 |
291 bool audioOutput = !(parser.isSet("no-audio")); | |
292 bool oscSupport = !(parser.isSet("no-osc")); | |
293 bool showSplash = !(parser.isSet("no-splash")); | |
294 | |
289 args = parser.positionalArguments(); | 295 args = parser.positionalArguments(); |
290 | |
291 bool audioOutput = true; | |
292 bool oscSupport = true; | |
293 | 296 |
294 QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); | 297 QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); |
295 | 298 |
296 signal(SIGINT, signalHandler); | 299 signal(SIGINT, signalHandler); |
297 signal(SIGTERM, signalHandler); | 300 signal(SIGTERM, signalHandler); |
311 settings.setValue("run-vamp-plugins-in-process", false); | 314 settings.setValue("run-vamp-plugins-in-process", false); |
312 } | 315 } |
313 settings.endGroup(); | 316 settings.endGroup(); |
314 | 317 |
315 settings.beginGroup("Preferences"); | 318 settings.beginGroup("Preferences"); |
316 if (settings.value("show-splash", true).toBool()) { | 319 if (showSplash && settings.value("show-splash", true).toBool()) { |
317 splash = new SVSplash(); | 320 splash = new SVSplash(); |
318 splash->show(); | 321 splash->show(); |
319 QTimer::singleShot(5000, splash, SLOT(hide())); | 322 QTimer::singleShot(5000, splash, SLOT(hide())); |
320 application.processEvents(); | 323 application.processEvents(); |
321 } | 324 } |