comparison main/main.cpp @ 70:e269ae6ed008

* When adding a layer, make it the selected layer on that pane * More OSC support, including transforms
author Chris Cannam
date Fri, 10 Nov 2006 17:45:26 +0000
parents f7f676a533e5
children bedc7517b6e8
comparison
equal deleted inserted replaced
69:76cc2c424268 70:e269ae6ed008
89 #endif 89 #endif
90 90
91 svSystemSpecificInitialisation(); 91 svSystemSpecificInitialisation();
92 92
93 bool audioOutput = true; 93 bool audioOutput = true;
94 bool oscSupport = true;
95
96 if (args.contains("--help")) {
97 std::cerr << QApplication::tr(
98 "\nSonic Visualiser is a program for viewing and exploring audio data\nfor semantic music analysis and annotation.\n\nUsage:\n\n %1 [--no-audio] [--no-osc] [<file> ...]\n\n --no-audio: Do not attempt to open an audio output device\n --no-osc: Do not provide an Open Sound Control port for remote control\n <file>: One or more Sonic Visualiser (.sv) and audio files may be provided.\n").arg(argv[0]).toStdString() << std::endl;
99 exit(2);
100 }
101
94 if (args.contains("--no-audio")) audioOutput = false; 102 if (args.contains("--no-audio")) audioOutput = false;
103 if (args.contains("--no-osc")) oscSupport = false;
95 104
96 QApplication::setOrganizationName("sonic-visualiser"); 105 QApplication::setOrganizationName("sonic-visualiser");
97 QApplication::setOrganizationDomain("sonicvisualiser.org"); 106 QApplication::setOrganizationDomain("sonicvisualiser.org");
98 QApplication::setApplicationName("sonic-visualiser"); 107 QApplication::setApplicationName("sonic-visualiser");
99 108
115 124
116 // Permit size_t and PropertyName to be used as args in queued signal calls 125 // Permit size_t and PropertyName to be used as args in queued signal calls
117 qRegisterMetaType<size_t>("size_t"); 126 qRegisterMetaType<size_t>("size_t");
118 qRegisterMetaType<PropertyContainer::PropertyName>("PropertyContainer::PropertyName"); 127 qRegisterMetaType<PropertyContainer::PropertyName>("PropertyContainer::PropertyName");
119 128
120 MainWindow gui(audioOutput); 129 MainWindow gui(audioOutput, oscSupport);
121 application.setMainWindow(&gui); 130 application.setMainWindow(&gui);
122 131
123 QDesktopWidget *desktop = QApplication::desktop(); 132 QDesktopWidget *desktop = QApplication::desktop();
124 QRect available = desktop->availableGeometry(); 133 QRect available = desktop->availableGeometry();
125 134