Mercurial > hg > sonic-visualiser
comparison main/MainWindow.cpp @ 381:fad5611ef9db macness
Encapsulate itunes-remote functionality into class ITunesSVRemote. Provides context for playback sync etc
author | Dan Stowell <dan.stowell@eecs.qmul.ac.uk> |
---|---|
date | Mon, 18 Oct 2010 13:59:08 +0100 |
parents | 909cf273bed1 |
children | abb9c3dedec2 |
comparison
equal
deleted
inserted
replaced
380:7298621f1192 | 381:fad5611ef9db |
---|---|
77 #include "base/UnitDatabase.h" | 77 #include "base/UnitDatabase.h" |
78 #include "layer/ColourDatabase.h" | 78 #include "layer/ColourDatabase.h" |
79 #include "widgets/ModelDataTableDialog.h" | 79 #include "widgets/ModelDataTableDialog.h" |
80 #include "rdf/PluginRDFIndexer.h" | 80 #include "rdf/PluginRDFIndexer.h" |
81 #include "rdf/RDFExporter.h" | 81 #include "rdf/RDFExporter.h" |
82 #ifdef Q_WS_MAC | |
83 #include "osx/svitunes.h" | |
84 #endif | |
85 | 82 |
86 #include "Surveyer.h" | 83 #include "Surveyer.h" |
87 #include "framework/VersionTester.h" | 84 #include "framework/VersionTester.h" |
88 | 85 |
89 // For version information | 86 // For version information |
158 m_playControlsSpacer(0), | 155 m_playControlsSpacer(0), |
159 m_playControlsWidth(0), | 156 m_playControlsWidth(0), |
160 m_preferencesDialog(0), | 157 m_preferencesDialog(0), |
161 m_layerTreeDialog(0), | 158 m_layerTreeDialog(0), |
162 m_activityLog(new ActivityLog()), | 159 m_activityLog(new ActivityLog()), |
163 m_keyReference(new KeyReference()) | 160 m_keyReference(new KeyReference()), |
161 m_iTunes(new ITunesSVRemote()) | |
164 { | 162 { |
165 Profiler profiler("MainWindow::MainWindow"); | 163 Profiler profiler("MainWindow::MainWindow"); |
166 | 164 |
167 setWindowTitle(tr("Sonic Visualiser")); | 165 setWindowTitle(tr("Sonic Visualiser")); |
168 | 166 |
2163 | 2161 |
2164 #ifdef Q_WS_MAC | 2162 #ifdef Q_WS_MAC |
2165 void | 2163 void |
2166 MainWindow::importITunesAudio() | 2164 MainWindow::importITunesAudio() |
2167 { | 2165 { |
2168 QStringList nowPlaying = iTunesNowPlaying(); | 2166 QStringList nowPlaying = m_iTunes->getNowPlaying(); |
2169 QString path = nowPlaying.at(0); | 2167 QString path = nowPlaying.at(0); |
2170 QString genre = (nowPlaying.size() > 1) ? nowPlaying.at(1) : ""; | 2168 QString genre = (nowPlaying.size() > 1) ? nowPlaying.at(1) : ""; |
2171 std::cerr << "MainWindow::importITunesAudio(): genre is " << genre.toStdString() << std::endl; | 2169 std::cerr << "MainWindow::importITunesAudio(): genre is " << genre.toStdString() << std::endl; |
2172 | 2170 |
2173 if (path != "") { | 2171 if (path != "") { |