diff 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
line wrap: on
line diff
--- a/main/MainWindow.cpp	Mon Oct 18 13:29:48 2010 +0100
+++ b/main/MainWindow.cpp	Mon Oct 18 13:59:08 2010 +0100
@@ -79,9 +79,6 @@
 #include "widgets/ModelDataTableDialog.h"
 #include "rdf/PluginRDFIndexer.h"
 #include "rdf/RDFExporter.h"
-#ifdef Q_WS_MAC
-	#include "osx/svitunes.h"
-#endif
 
 #include "Surveyer.h"
 #include "framework/VersionTester.h"
@@ -160,7 +157,8 @@
     m_preferencesDialog(0),
     m_layerTreeDialog(0),
     m_activityLog(new ActivityLog()),
-    m_keyReference(new KeyReference())
+    m_keyReference(new KeyReference()),
+    m_iTunes(new ITunesSVRemote())
 {
     Profiler profiler("MainWindow::MainWindow");
 
@@ -2165,7 +2163,7 @@
 void
 MainWindow::importITunesAudio()
 {
-    QStringList nowPlaying = iTunesNowPlaying();
+    QStringList nowPlaying = m_iTunes->getNowPlaying();
     QString path = nowPlaying.at(0);
     QString genre = (nowPlaying.size() > 1) ? nowPlaying.at(1) : "";
     std::cerr << "MainWindow::importITunesAudio(): genre is " << genre.toStdString() << std::endl;