Multiple download fix, Added pause button, Added next button
authorElias Woods <EliasWoods@gmail.com>
Thu, 1 Jul 2010 05:39:08 +0000 (01:39 -0400)
committerElias Woods <EliasWoods@gmail.com>
Thu, 1 Jul 2010 05:39:08 +0000 (01:39 -0400)
Credit to w00t for catching memory bugs

13 files changed:
Groove.pro
Groove.pro.user
Makefile
groove.cpp
groove.h
grooveprogressbar.cpp
grooveprogressbar.h
playlist.cpp
playlist.h
qmaemo5rotator.cpp
qmaemo5rotator.h
splayer.cpp
splayer.h

index fa7f8d2..1444540 100644 (file)
@@ -28,8 +28,7 @@ SOURCES += main.cpp \
     streamio.cpp \
     playlist.cpp \
     downloadmanager.cpp \
-    grooveprogressbar.cpp \
-    qmaemo5rotator.cpp
+    grooveprogressbar.cpp
 
 HEADERS += \
     groove.h \
@@ -38,9 +37,12 @@ HEADERS += \
     streamio.h \
     playlist.h \
     downloadmanager.h \
-    grooveprogressbar.h \
-    qmaemo5rotator.h
+    grooveprogressbar.h
 
+maemo5 {
+SOURCES += qmaemo5rotator.cpp
+HEADERS += qmaemo5rotator.h
+}
 OTHER_FILES += \
     icon.svg \
     groove.png
index ae4a94e..ecdfbb8 100644 (file)
@@ -21,9 +21,7 @@
     <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
      <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">qmake</value>
      <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
-     <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList">
-      <value type="QString">LIBS+=-L/usr/lib -lqjson</value>
-     </valuelist>
+     <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
     </valuemap>
     <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
      <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
@@ -44,7 +42,9 @@
     </valuemap>
     <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
     <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
-    <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+    <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList">
+     <value type="QString">LD_LIBRARY_PATH=/usr/lib</value>
+    </valuelist>
     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Debug</value>
     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MaemoRunConfiguration</value>
     <valuelist key="Qt4ProjectManager.MaemoRunConfiguration.Arguments" type="QVariantList"/>
     <valuemap key="Qt4ProjectManager.MaemoRunConfiguration.DebuggingHelpersLastDeployed" type="QVariantMap">
-     <value key="192.168.1.3" type="QDateTime">2010-05-16T00:55:48</value>
+     <value key="192.168.1.3" type="QDateTime">2010-06-30T23:36:47</value>
     </valuemap>
     <value key="Qt4ProjectManager.MaemoRunConfiguration.DeviceId" type="qulonglong">1</value>
     <valuemap key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployed" type="QVariantMap">
-     <value key="192.168.1.3" type="QDateTime">2010-06-25T21:36:22</value>
+     <value key="192.168.1.3" type="QDateTime">2010-07-01T01:31:56</value>
     </valuemap>
     <value key="Qt4ProjectManager.MaemoRunConfiguration.Simulator" type="QString"></value>
    </valuemap>
     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Debug</value>
     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/scratchbox/users/eli/home/eli/qt4/Groove-build</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/scratchbox/users/eli/home/eli/qt4/Groove-build-simulator</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">4</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Release</value>
     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/scratchbox/users/eli/home/eli/qt4/Groove-build</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/scratchbox/users/eli/home/eli/qt4/Groove-build-simulator</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">4</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
    </valuemap>
    <value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">2</value>
    <valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
-    <valuelist key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments" type="QVariantList"/>
-    <value key="ProjectExplorer.CustomExecutableRunConfiguration.BaseEnvironmentBase" type="int">2</value>
-    <value key="ProjectExplorer.CustomExecutableRunConfiguration.Executable" type="QString">/home/eli/Projects/qt4/Groove-build/Groove</value>
-    <value key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal" type="bool">false</value>
-    <valuelist key="ProjectExplorer.CustomExecutableRunConfiguration.UserEnvironmentChanges" type="QVariantList">
-     <value type="QString">LD_LIBRARY_PATH=/home/eli/NokiaQtSDK/QtCreator/lib/qtcreator:../qjson/lib/</value>
-    </valuelist>
-    <value key="ProjectExplorer.CustomExecutableRunConfiguration.UserName" type="QString"></value>
-    <value key="ProjectExplorer.CustomExecutableRunConfiguration.UserSetName" type="bool">false</value>
-    <value key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory" type="QString">$BUILDDIR</value>
-    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Run /home/eli/Projects/qt4/Groove-build/Groove</value>
-    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.CustomExecutableRunConfiguration</value>
+    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Groove</value>
+    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4RunConfiguration</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase" type="int">2</value>
+    <valuelist key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments" type="QVariantList"/>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.ProFile" type="QString">Groove.pro</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix" type="bool">false</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal" type="bool">false</value>
+    <valuelist key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetName" type="bool">false</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetWorkingDirectory" type="bool">false</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory" type="QString"></value>
    </valuemap>
    <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
   </valuemap>
index 334586f..e226c11 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 #############################################################################
 # Makefile for building: groove
-# Generated by qmake (2.01a) (Qt 4.6.2) on: Fri Jun 25 06:09:19 2010
+# Generated by qmake (2.01a) (Qt 4.6.2) on: Thu Jul 1 01:20:30 2010
 # Project:  Groove.pro
 # Template: app
 # Command: /usr/bin/qmake -unix -o Makefile Groove.pro
 
 CC            = gcc
 CXX           = g++
-DEFINES       = -DQT_GL_NO_SCISSOR_TEST -DQT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH=1024 -DQT_NO_DEBUG -DQT_PHONON_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED
-CFLAGS        = -pipe -O3 -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wall -W -D_REENTRANT $(DEFINES)
-CXXFLAGS      = -pipe -O3 -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wall -W -D_REENTRANT $(DEFINES)
-INCPATH       = -I/targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/linux-g++-maemo5 -I. -I/targets/FREMANTLE_ARMEL/usr/include/QtCore -I/targets/FREMANTLE_ARMEL/usr/include/QtNetwork -I/targets/FREMANTLE_ARMEL/usr/include/QtGui -I/targets/FREMANTLE_ARMEL/usr/include/phonon -I/targets/FREMANTLE_ARMEL/usr/include -I. -I../qjson/src -I/usr/include/phonon_compat -I.
+DEFINES       = -DDATADIR="/usr/share" -DPKGDATADIR="" -DQT_NO_DEBUG -DQT_PHONON_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED
+CFLAGS        = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
+CXXFLAGS      = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
+INCPATH       = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/phonon -I/usr/include/qt4 -I. -I/usr/include/qjson -I/usr/include/qt4/phonon_compat -I.
 LINK          = g++
-LFLAGS        = -Wl,-rpath-link,/usr/lib -Wl,-O1 -Wl,--hash-style=gnu -Wl,-rpath,/usr/lib
-LIBS          = $(SUBLIBS)  -L/usr/lib -L~/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1014-slim/usr/lib -lqjson -lphonon -L/usr/lib -L/usr/X11R6/lib -lQtGui -lQtNetwork -lQtDBus -lQtXml -lQtCore -lpthread 
+LFLAGS        = -Wl,-O1
+LIBS          = $(SUBLIBS)  -L/usr/lib -L/usr/local/lib -lqjson -lphonon -lQtGui -lQtNetwork -lQtCore -lpthread 
 AR            = ar cqs
 RANLIB        = 
 QMAKE         = /usr/bin/qmake
@@ -50,16 +50,13 @@ SOURCES       = main.cpp \
                streamio.cpp \
                playlist.cpp \
                downloadmanager.cpp \
-               grooveprogressbar.cpp \
-               qmaemo5rotator.cpp moc_groove.cpp \
+               grooveprogressbar.cpp moc_groove.cpp \
                moc_gscom.cpp \
                moc_splayer.cpp \
                moc_streamio.cpp \
                moc_playlist.cpp \
                moc_downloadmanager.cpp \
-               moc_grooveprogressbar.cpp \
-               moc_qmaemo5rotator.cpp \
-               qrc_reasource.cpp
+               moc_grooveprogressbar.cpp
 OBJECTS       = main.o \
                groove.o \
                gscom.o \
@@ -68,34 +65,32 @@ OBJECTS       = main.o \
                playlist.o \
                downloadmanager.o \
                grooveprogressbar.o \
-               qmaemo5rotator.o \
                moc_groove.o \
                moc_gscom.o \
                moc_splayer.o \
                moc_streamio.o \
                moc_playlist.o \
                moc_downloadmanager.o \
-               moc_grooveprogressbar.o \
-               moc_qmaemo5rotator.o \
-               qrc_reasource.o
-DIST          = /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/common/unix.conf \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/common/linux.conf \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/qconfig.pri \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/qt_functions.prf \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/qt_config.prf \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/default_pre.prf \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/release.prf \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/default_post.prf \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/warn_on.prf \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/qt.prf \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/unix/thread.prf \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/moc.prf \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/resources.prf \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/uic.prf \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/yacc.prf \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/lex.prf \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/include_source_dir.prf \
+               moc_grooveprogressbar.o
+DIST          = /usr/share/qt4/mkspecs/common/g++.conf \
+               /usr/share/qt4/mkspecs/common/unix.conf \
+               /usr/share/qt4/mkspecs/common/linux.conf \
+               /usr/share/qt4/mkspecs/qconfig.pri \
+               /usr/share/qt4/mkspecs/features/qt_functions.prf \
+               /usr/share/qt4/mkspecs/features/qt_config.prf \
+               /usr/share/qt4/mkspecs/features/exclusive_builds.prf \
+               /usr/share/qt4/mkspecs/features/default_pre.prf \
+               /usr/share/qt4/mkspecs/features/release.prf \
+               /usr/share/qt4/mkspecs/features/default_post.prf \
+               /usr/share/qt4/mkspecs/features/warn_on.prf \
+               /usr/share/qt4/mkspecs/features/qt.prf \
+               /usr/share/qt4/mkspecs/features/unix/thread.prf \
+               /usr/share/qt4/mkspecs/features/moc.prf \
+               /usr/share/qt4/mkspecs/features/resources.prf \
+               /usr/share/qt4/mkspecs/features/uic.prf \
+               /usr/share/qt4/mkspecs/features/yacc.prf \
+               /usr/share/qt4/mkspecs/features/lex.prf \
+               /usr/share/qt4/mkspecs/features/include_source_dir.prf \
                Groove.pro
 QMAKE_TARGET  = groove
 DESTDIR       = 
@@ -128,61 +123,59 @@ all: Makefile $(TARGET)
 $(TARGET):  $(OBJECTS)  
        $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
 
-Makefile: Groove.pro  /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/linux-g++-maemo5/qmake.conf /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/common/unix.conf \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/common/linux.conf \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/qconfig.pri \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/qt_functions.prf \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/qt_config.prf \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/default_pre.prf \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/release.prf \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/default_post.prf \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/warn_on.prf \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/qt.prf \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/unix/thread.prf \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/moc.prf \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/resources.prf \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/uic.prf \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/yacc.prf \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/lex.prf \
-               /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/include_source_dir.prf \
+Makefile: Groove.pro  /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/share/qt4/mkspecs/common/g++.conf \
+               /usr/share/qt4/mkspecs/common/unix.conf \
+               /usr/share/qt4/mkspecs/common/linux.conf \
+               /usr/share/qt4/mkspecs/qconfig.pri \
+               /usr/share/qt4/mkspecs/features/qt_functions.prf \
+               /usr/share/qt4/mkspecs/features/qt_config.prf \
+               /usr/share/qt4/mkspecs/features/exclusive_builds.prf \
+               /usr/share/qt4/mkspecs/features/default_pre.prf \
+               /usr/share/qt4/mkspecs/features/release.prf \
+               /usr/share/qt4/mkspecs/features/default_post.prf \
+               /usr/share/qt4/mkspecs/features/warn_on.prf \
+               /usr/share/qt4/mkspecs/features/qt.prf \
+               /usr/share/qt4/mkspecs/features/unix/thread.prf \
+               /usr/share/qt4/mkspecs/features/moc.prf \
+               /usr/share/qt4/mkspecs/features/resources.prf \
+               /usr/share/qt4/mkspecs/features/uic.prf \
+               /usr/share/qt4/mkspecs/features/yacc.prf \
+               /usr/share/qt4/mkspecs/features/lex.prf \
+               /usr/share/qt4/mkspecs/features/include_source_dir.prf \
                /usr/lib/libphonon.prl \
-               /usr/lib/libQtDBus.prl \
-               /usr/lib/libQtXml.prl \
-               /usr/lib/libQtCore.prl \
                /usr/lib/libQtGui.prl \
-               /usr/lib/libQtNetwork.prl
+               /usr/lib/libQtNetwork.prl \
+               /usr/lib/libQtCore.prl
        $(QMAKE) -unix -o Makefile Groove.pro
-/targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/common/unix.conf:
-/targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/common/linux.conf:
-/targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/qconfig.pri:
-/targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/qt_functions.prf:
-/targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/qt_config.prf:
-/targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/exclusive_builds.prf:
-/targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/default_pre.prf:
-/targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/release.prf:
-/targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/default_post.prf:
-/targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/warn_on.prf:
-/targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/qt.prf:
-/targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/unix/thread.prf:
-/targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/moc.prf:
-/targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/resources.prf:
-/targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/uic.prf:
-/targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/yacc.prf:
-/targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/lex.prf:
-/targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/features/include_source_dir.prf:
+/usr/share/qt4/mkspecs/common/g++.conf:
+/usr/share/qt4/mkspecs/common/unix.conf:
+/usr/share/qt4/mkspecs/common/linux.conf:
+/usr/share/qt4/mkspecs/qconfig.pri:
+/usr/share/qt4/mkspecs/features/qt_functions.prf:
+/usr/share/qt4/mkspecs/features/qt_config.prf:
+/usr/share/qt4/mkspecs/features/exclusive_builds.prf:
+/usr/share/qt4/mkspecs/features/default_pre.prf:
+/usr/share/qt4/mkspecs/features/release.prf:
+/usr/share/qt4/mkspecs/features/default_post.prf:
+/usr/share/qt4/mkspecs/features/warn_on.prf:
+/usr/share/qt4/mkspecs/features/qt.prf:
+/usr/share/qt4/mkspecs/features/unix/thread.prf:
+/usr/share/qt4/mkspecs/features/moc.prf:
+/usr/share/qt4/mkspecs/features/resources.prf:
+/usr/share/qt4/mkspecs/features/uic.prf:
+/usr/share/qt4/mkspecs/features/yacc.prf:
+/usr/share/qt4/mkspecs/features/lex.prf:
+/usr/share/qt4/mkspecs/features/include_source_dir.prf:
 /usr/lib/libphonon.prl:
-/usr/lib/libQtDBus.prl:
-/usr/lib/libQtXml.prl:
-/usr/lib/libQtCore.prl:
 /usr/lib/libQtGui.prl:
 /usr/lib/libQtNetwork.prl:
+/usr/lib/libQtCore.prl:
 qmake:  FORCE
        @$(QMAKE) -unix -o Makefile Groove.pro
 
 dist: 
        @$(CHK_DIR_EXISTS) .tmp/groove1.0.0 || $(MKDIR) .tmp/groove1.0.0 
-       $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/groove1.0.0/ && $(COPY_FILE) --parents groove.h gscom.h splayer.h streamio.h playlist.h downloadmanager.h grooveprogressbar.h qmaemo5rotator.h .tmp/groove1.0.0/ && $(COPY_FILE) --parents reasource.qrc .tmp/groove1.0.0/ && $(COPY_FILE) --parents main.cpp groove.cpp gscom.cpp splayer.cpp streamio.cpp playlist.cpp downloadmanager.cpp grooveprogressbar.cpp qmaemo5rotator.cpp .tmp/groove1.0.0/ && (cd `dirname .tmp/groove1.0.0` && $(TAR) groove1.0.0.tar groove1.0.0 && $(COMPRESS) groove1.0.0.tar) && $(MOVE) `dirname .tmp/groove1.0.0`/groove1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/groove1.0.0
+       $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/groove1.0.0/ && $(COPY_FILE) --parents groove.h gscom.h splayer.h streamio.h playlist.h downloadmanager.h grooveprogressbar.h .tmp/groove1.0.0/ && $(COPY_FILE) --parents main.cpp groove.cpp gscom.cpp splayer.cpp streamio.cpp playlist.cpp downloadmanager.cpp grooveprogressbar.cpp .tmp/groove1.0.0/ && (cd `dirname .tmp/groove1.0.0` && $(TAR) groove1.0.0.tar groove1.0.0 && $(COMPRESS) groove1.0.0.tar) && $(MOVE) `dirname .tmp/groove1.0.0`/groove1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/groove1.0.0
 
 
 clean:compiler_clean 
@@ -201,9 +194,9 @@ mocclean: compiler_moc_header_clean compiler_moc_source_clean
 
 mocables: compiler_moc_header_make_all compiler_moc_source_make_all
 
-compiler_moc_header_make_all: moc_groove.cpp moc_gscom.cpp moc_splayer.cpp moc_streamio.cpp moc_playlist.cpp moc_downloadmanager.cpp moc_grooveprogressbar.cpp moc_qmaemo5rotator.cpp
+compiler_moc_header_make_all: moc_groove.cpp moc_gscom.cpp moc_splayer.cpp moc_streamio.cpp moc_playlist.cpp moc_downloadmanager.cpp moc_grooveprogressbar.cpp
 compiler_moc_header_clean:
-       -$(DEL_FILE) moc_groove.cpp moc_gscom.cpp moc_splayer.cpp moc_streamio.cpp moc_playlist.cpp moc_downloadmanager.cpp moc_grooveprogressbar.cpp moc_qmaemo5rotator.cpp
+       -$(DEL_FILE) moc_groove.cpp moc_gscom.cpp moc_splayer.cpp moc_streamio.cpp moc_playlist.cpp moc_downloadmanager.cpp moc_grooveprogressbar.cpp
 moc_groove.cpp: gscom.h \
                splayer.h \
                streamio.h \
@@ -211,10 +204,10 @@ moc_groove.cpp: gscom.h \
                qmaemo5rotator.h \
                playlist.h \
                groove.h
-       /usr/bin/moc $(DEFINES) $(INCPATH) groove.h -o moc_groove.cpp
+       /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) groove.h -o moc_groove.cpp
 
 moc_gscom.cpp: gscom.h
-       /usr/bin/moc $(DEFINES) $(INCPATH) gscom.h -o moc_gscom.cpp
+       /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) gscom.h -o moc_gscom.cpp
 
 moc_splayer.cpp: streamio.h \
                splayer.h \
@@ -223,7 +216,7 @@ moc_splayer.cpp: streamio.h \
                playlist.h \
                gscom.h \
                splayer.h
-       /usr/bin/moc $(DEFINES) $(INCPATH) splayer.h -o moc_splayer.cpp
+       /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) splayer.h -o moc_splayer.cpp
 
 moc_streamio.cpp: splayer.h \
                streamio.h \
@@ -232,29 +225,21 @@ moc_streamio.cpp: splayer.h \
                playlist.h \
                gscom.h \
                streamio.h
-       /usr/bin/moc $(DEFINES) $(INCPATH) streamio.h -o moc_streamio.cpp
+       /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) streamio.h -o moc_streamio.cpp
 
 moc_playlist.cpp: gscom.h \
                playlist.h
-       /usr/bin/moc $(DEFINES) $(INCPATH) playlist.h -o moc_playlist.cpp
+       /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) playlist.h -o moc_playlist.cpp
 
 moc_downloadmanager.cpp: downloadmanager.h
-       /usr/bin/moc $(DEFINES) $(INCPATH) downloadmanager.h -o moc_downloadmanager.cpp
+       /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) downloadmanager.h -o moc_downloadmanager.cpp
 
 moc_grooveprogressbar.cpp: qmaemo5rotator.h \
                grooveprogressbar.h
-       /usr/bin/moc $(DEFINES) $(INCPATH) grooveprogressbar.h -o moc_grooveprogressbar.cpp
+       /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) grooveprogressbar.h -o moc_grooveprogressbar.cpp
 
-moc_qmaemo5rotator.cpp: qmaemo5rotator.h
-       /usr/bin/moc $(DEFINES) $(INCPATH) qmaemo5rotator.h -o moc_qmaemo5rotator.cpp
-
-compiler_rcc_make_all: qrc_reasource.cpp
+compiler_rcc_make_all:
 compiler_rcc_clean:
-       -$(DEL_FILE) qrc_reasource.cpp
-qrc_reasource.cpp: reasource.qrc \
-               icon.svg
-       /usr/bin/rcc -name reasource reasource.qrc -o qrc_reasource.cpp
-
 compiler_image_collection_make_all: qmake_image_collection.cpp
 compiler_image_collection_clean:
        -$(DEL_FILE) qmake_image_collection.cpp
@@ -268,7 +253,7 @@ compiler_yacc_impl_make_all:
 compiler_yacc_impl_clean:
 compiler_lex_make_all:
 compiler_lex_clean:
-compiler_clean: compiler_moc_header_clean compiler_rcc_clean 
+compiler_clean: compiler_moc_header_clean 
 
 ####### Compile
 
@@ -320,9 +305,6 @@ grooveprogressbar.o: grooveprogressbar.cpp grooveprogressbar.h \
                qmaemo5rotator.h
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o grooveprogressbar.o grooveprogressbar.cpp
 
-qmaemo5rotator.o: qmaemo5rotator.cpp qmaemo5rotator.h
-       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o qmaemo5rotator.o qmaemo5rotator.cpp
-
 moc_groove.o: moc_groove.cpp 
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_groove.o moc_groove.cpp
 
@@ -344,12 +326,6 @@ moc_downloadmanager.o: moc_downloadmanager.cpp
 moc_grooveprogressbar.o: moc_grooveprogressbar.cpp 
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_grooveprogressbar.o moc_grooveprogressbar.cpp
 
-moc_qmaemo5rotator.o: moc_qmaemo5rotator.cpp 
-       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_qmaemo5rotator.o moc_qmaemo5rotator.cpp
-
-qrc_reasource.o: qrc_reasource.cpp 
-       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o qrc_reasource.o qrc_reasource.cpp
-
 ####### Install
 
 install_target: first FORCE
@@ -362,9 +338,29 @@ uninstall_target:  FORCE
        -$(DEL_DIR) $(INSTALL_ROOT)/usr/bin/ 
 
 
-install:  install_target  FORCE
+install_desktop: first FORCE
+       @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/share/applications/hildon/ || $(MKDIR) $(INSTALL_ROOT)/usr/share/applications/hildon/ 
+       -$(INSTALL_FILE) /scratchbox/users/eli/home/eli/qt4/Groove/groove.desktop $(INSTALL_ROOT)/usr/share/applications/hildon/
+
+
+uninstall_desktop:  FORCE
+       -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/share/applications/hildon/groove.desktop
+       -$(DEL_DIR) $(INSTALL_ROOT)/usr/share/applications/hildon/ 
+
+
+install_icon64: first FORCE
+       @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/share/icons/hicolor/64x64/apps/ || $(MKDIR) $(INSTALL_ROOT)/usr/share/icons/hicolor/64x64/apps/ 
+       -$(INSTALL_FILE) /scratchbox/users/eli/home/eli/qt4/Groove/groove.png $(INSTALL_ROOT)/usr/share/icons/hicolor/64x64/apps/
+
+
+uninstall_icon64:  FORCE
+       -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/share/icons/hicolor/64x64/apps/groove.png
+       -$(DEL_DIR) $(INSTALL_ROOT)/usr/share/icons/hicolor/64x64/apps/ 
+
+
+install:  install_target install_desktop install_icon64  FORCE
 
-uninstall: uninstall_target   FORCE
+uninstall: uninstall_target uninstall_desktop uninstall_icon64   FORCE
 
 FORCE:
 
index e857651..f8c30c0 100644 (file)
@@ -1,5 +1,7 @@
 #include "groove.h"
+#if defined(Q_WS_MAEMO_5) || defined(Q_WS_HILDON)
 #include "qmaemo5rotator.h"
+#endif
 
 
 groove::groove(QWidget *parent) :
@@ -14,9 +16,10 @@ groove::groove(QWidget *parent) :
     QVBoxLayout *vlayout = new QVBoxLayout();
     QHBoxLayout *bottomLayout = new QHBoxLayout();
     button = new QPushButton("Search");
-    QPushButton *dButton = new QPushButton("Play");
-    QPushButton *stopButton = new QPushButton("Stop");
+    QPushButton *dButton = new QPushButton("Queue");
+    QPushButton *stopButton = new QPushButton("Pause");
     QPushButton *moreButton = new QPushButton("...");
+    QPushButton *nextB = new QPushButton("->");
     resultView = new QTableView();
     QMenu *pushMenu = new QMenu();
     //showFullScreen();
@@ -28,8 +31,8 @@ groove::groove(QWidget *parent) :
     pd = new grooveProgressBar(this);
     pd->hide();
     QMenu *moreAction = new QMenu();
-    moreAction->addAction("Playlist");
-    connect(moreAction->addAction("Add current song to playlist"),SIGNAL(triggered()),this,SLOT(addSongPlaylist()));
+    //moreAction->addAction("Playlist");
+    connect(moreAction->addAction("Play Now"),SIGNAL(triggered()),this,SLOT(play()));
     connect(moreAction->addAction("Show download Progress"),SIGNAL(triggered()),pd,SLOT(show()));
     moreButton->setMenu(moreAction);
 
@@ -54,7 +57,10 @@ groove::groove(QWidget *parent) :
     resultView->setPalette(pal);*/
     portrait = false;
     layout->addWidget(sMethod);
+#if defined(Q_WS_MAEMO_5) || defined(Q_WS_HILDON)
     rot = new QMaemo5Rotator(QMaemo5Rotator::AutomaticBehavior,this);
+#endif
+    //this->setAttribute(Qt::WA_Maemo5AutoOrientation);
     layout->addWidget(lineEdit);
     layout->addWidget(button);
     vlayout->addLayout(layout);
@@ -62,6 +68,7 @@ groove::groove(QWidget *parent) :
     vlayout->addLayout(bottomLayout);
     bottomLayout->addWidget(dButton);
     bottomLayout->addWidget(stopButton);
+    bottomLayout->addWidget(nextB);
     bottomLayout->addWidget(moreButton);
     vlayout->setMenuBar(mBar);
     setLayout(vlayout);
@@ -73,7 +80,7 @@ groove::groove(QWidget *parent) :
     connect(gs, SIGNAL(finishedSearch()), this, SLOT(finishedS()));
     connect(lineEdit,SIGNAL(returnPressed()),this, SLOT(search()));
     connect(pushMenu,SIGNAL(triggered(QAction*)),this,SLOT(changeS(QAction*)));
-    connect(dButton,SIGNAL(clicked()),this, SLOT(play()));
+    connect(dButton,SIGNAL(clicked()),this, SLOT(addSongPlaylist()));
     connect(stopButton,SIGNAL(clicked()),this,SLOT(stop()));
     connect(moreButton,SIGNAL(clicked()),this,SLOT(moreB()));
     //connect(rotator,SIGNAL(orientationChanged(Orientation)),this,SLOT(orientationChanged()));
@@ -82,6 +89,10 @@ groove::groove(QWidget *parent) :
     player->setPlaylist(pl);
     connect(pl,SIGNAL(downloadProgress(int,qint64,qint64)),this,SLOT(progressUpdate(int,qint64,qint64)));
     connect(pl,SIGNAL(bufferReady(int)),pd,SLOT(close()));
+    connect(pl,SIGNAL(freeze(bool)),resultView,SLOT(setDisabled(bool)));
+    connect(pl,SIGNAL(freeze(bool)),pushMenu,SLOT(setDisabled(bool)));
+    connect(pl,SIGNAL(freeze(bool)),dButton,SLOT(setDisabled(bool)));
+    connect(nextB,SIGNAL(clicked()),player,SLOT(playNext()));
 }
 void groove::search()
 {
@@ -169,7 +180,7 @@ void groove::addSongPlaylist()
 
 void groove::stop()
 {
-    player->stop();
+    player->pause();
 }
 void groove::moreB()
 {
@@ -179,6 +190,8 @@ void groove::progressUpdate(int p, qint64 d, qint64 t)
 {
     //if(!pd->isHidden())
     //{
+
+
         pd->setMaximum(t);
         pd->setValue(d);
     //}
index 3bb0000..4abda41 100644 (file)
--- a/groove.h
+++ b/groove.h
@@ -3,7 +3,9 @@
 #include <QtGui>
 #include "gscom.h"
 #include "splayer.h"
+#if defined(Q_WS_MAEMO_5) || defined(Q_WS_HILDON)
 #include "qmaemo5rotator.h"
+#endif
 #include <QMenuBar>
 #include "playlist.h"
 #include "grooveprogressbar.h"
@@ -37,7 +39,9 @@ private:
     QPushButton *button;
     bool portrait;
     gscom *gs;
+#if defined(Q_WS_MAEMO_5) || defined(Q_WS_HILDON)
     QMaemo5Rotator *rot;
+#endif
     playlist *pl;
     grooveProgressBar *pd;
 
index 2817e83..e63a4d8 100644 (file)
@@ -1,5 +1,7 @@
 #include "grooveprogressbar.h"
+#if defined(Q_WS_MAEMO_5) || defined(Q_WS_HILDON)
 #include "qmaemo5rotator.h"
+#endif
 grooveProgressBar::grooveProgressBar(QWidget *parent) :
     QDialog(parent)
 {
index d0067fd..6887b52 100644 (file)
@@ -3,8 +3,9 @@
 
 #include <QDialog>
 #include <QtGui>
+#if defined(Q_WS_MAEMO_5) || defined(Q_WS_HILDON)
 #include "qmaemo5rotator.h"
-
+#endif
 class grooveProgressBar : public QDialog
 {
     Q_OBJECT
@@ -13,7 +14,9 @@ public:
     void setMaximum(int maximum);
     void setValue(int position);
     int maximum();
+#if defined(Q_WS_MAEMO_5) || defined(Q_WS_HILDON)
     QMaemo5Rotator *rot;
+#endif
 
 signals:
 
index 10f7d49..3004f86 100644 (file)
@@ -8,6 +8,7 @@ playlist::playlist(QObject *parent) :
    pList = new QList<songElement *>;
    this->currentplayingitem = -1;
    this->currentSkeyItem = -1;
+   this->reply = NULL;
 }
 void playlist::markPlayed(int position)
 {
@@ -16,7 +17,7 @@ void playlist::markPlayed(int position)
 }
 void playlist::freeMemory(int position)
 {
-   pList->at(position)->buffer->~QBuffer();
+   delete pList->at(position)->buffer;
    pList->at(position)->buffer = new QBuffer();
 }
 bool playlist::existAt(int position)
@@ -70,7 +71,11 @@ void playlist::beginDownload(int position)
     req.setUrl(*pList->at(currentdownloaditem)->server);
     qDebug() << pList->at(currentdownloaditem)->server;
     req.setHeader(req.ContentTypeHeader,QVariant("application/x-www-form-urlencoded"));
-    delete reply;
+    if(reply)
+    {
+        reply->abort();
+        delete reply;
+    }
     reply = manager->post(req,QString("streamKey=" + pList->at(this->currentdownloaditem)->streamkey->toAscii()).toAscii());
     pList->at(this->currentdownloaditem)->buffer->open(QBuffer::ReadWrite | QBuffer::Truncate);
     connect(reply,SIGNAL(downloadProgress(qint64,qint64)),this,SLOT(downloadSlot(qint64,qint64)));
@@ -86,7 +91,7 @@ void playlist::setGscom(gscom *comm)
 }
 void playlist::skeyFound()
 {
-    emit this->unfreeze();
+    emit this->freeze(false);
     pList->at(this->currentSkeyItem)->streamkey = new QString(gs->streamID);
     pList->at(this->currentSkeyItem)->server = new QUrl(gs->sku);
     if(this->currentdownloaditem == -1)
@@ -110,8 +115,9 @@ int playlist::addSong(QStandardItem *item)
     newelement->type = playlist::EStream;
     pList->append(newelement);
     gs->getSong(item->text());
-    emit this->freeze();
+
     this->currentSkeyItem = pList->size()-1;
+    emit this->freeze(true);
     return pList->size()-1;
 }
 
@@ -145,20 +151,23 @@ void playlist::downloadSlot(qint64 b, qint64 t)
     if(t != 0)
     {
         emit this->downloadProgress(this->currentdownloaditem,b,t);
-        pList->at(this->currentdownloaditem)->buffer->buffer().append(reply->readAll());
-        //qDebug() << !pList->at(this->currentdownloaditem)->bufferready << this->currentdownloaditem;
-        if ( b >= t*0.05 && !pList->at(this->currentdownloaditem)->bufferready)
-            //if(!pList->at(currentdownloaditem)->bufferready && b/(startStreamT.msecsTo(QTime::currentTime()) + 1)*100/1024 >= 10)
+        if(existAt(this->currentdownloaditem))
         {
-            this->setBufferRdy(this->currentdownloaditem);
-            emit this->bufferReady(this->currentdownloaditem);
+            pList->at(this->currentdownloaditem)->buffer->buffer().append(reply->readAll());
+            //qDebug() << !pList->at(this->currentdownloaditem)->bufferready << this->currentdownloaditem;
+            if ( b >= t*0.05 && !pList->at(this->currentdownloaditem)->bufferready)
+                //if(!pList->at(currentdownloaditem)->bufferready && b/(startStreamT.msecsTo(QTime::currentTime()) + 1)*100/1024 >= 10)
+            {
+                this->setBufferRdy(this->currentdownloaditem);
+                emit this->bufferReady(this->currentdownloaditem);
 
-            qDebug() << "Buffer Ready";
-        }
-        if (b==t)
-        {
+                qDebug() << "Buffer Ready";
+            }
+            if (b==t)
+            {
             emit this->downloadComplete(this->currentdownloaditem);
             //emit this->bufferReady(this->currentdownloaditem);
+            }
         }
     }
 }
index 4365d8d..2fe1acb 100644 (file)
@@ -41,8 +41,7 @@ signals:
     void bufferReady(int position);
     void sFailure(int position,failType);
     void downloadComplete(int position);
-    void freeze();
-    void unfreeze();
+    void freeze(bool);
 
 public slots:
 private slots:
index 78cbe6a..7515550 100644 (file)
@@ -5,7 +5,7 @@
 #include <mce/mode-names.h>
 #include <QtDBus/QDBusConnection>
 #include <QtDBus/QDBusMessage>
-#endif
+
 
 QMaemo5Rotator::QMaemo5Rotator(RotationBehavior behavior, QWidget *parent)
     : QObject(parent),
@@ -16,9 +16,7 @@ QMaemo5Rotator::QMaemo5Rotator(RotationBehavior behavior, QWidget *parent)
 
 QMaemo5Rotator::~QMaemo5Rotator()
 {
-#if defined(Q_WS_MAEMO_5) || defined(Q_WS_HILDON)
     QDBusConnection::systemBus().call(QDBusMessage::createMethodCall(MCE_SERVICE, MCE_REQUEST_PATH, MCE_REQUEST_IF, MCE_ACCELEROMETER_DISABLE_REQ));
-#endif
 }
 
 const QMaemo5Rotator::RotationBehavior QMaemo5Rotator::currentBehavior()
@@ -33,7 +31,6 @@ const QMaemo5Rotator::Orientation QMaemo5Rotator::currentOrientation()
 
 void QMaemo5Rotator::setCurrentBehavior(QMaemo5Rotator::RotationBehavior value)
 {
-#if defined(Q_WS_MAEMO_5) || defined(Q_WS_HILDON)
     if (value == _currentBehavior && isSetUp)
         return;
 
@@ -58,7 +55,6 @@ void QMaemo5Rotator::setCurrentBehavior(QMaemo5Rotator::RotationBehavior value)
             setCurrentOrientation(QMaemo5Rotator::LandscapeOrientation);
         }
     }
-#endif
 }
 
 void QMaemo5Rotator::setCurrentOrientation(QMaemo5Rotator::Orientation value)
@@ -71,20 +67,16 @@ void QMaemo5Rotator::setCurrentOrientation(QMaemo5Rotator::Orientation value)
     case QMaemo5Rotator::PortraitOrientation:
         if (par != NULL)
         {
-#if defined(Q_WS_MAEMO_5)
             par->setAttribute(Qt::WA_Maemo5LandscapeOrientation, false);
             par->setAttribute(Qt::WA_Maemo5PortraitOrientation, true);
-#endif
         }
         orientationChanged(QMaemo5Rotator::PortraitOrientation);
         break;
     case QMaemo5Rotator::LandscapeOrientation:
         if (par != NULL)
         {
-#if defined(Q_WS_MAEMO_5)
             par->setAttribute(Qt::WA_Maemo5PortraitOrientation, false);
             par->setAttribute(Qt::WA_Maemo5LandscapeOrientation, true);
-#endif
         }
         orientationChanged(QMaemo5Rotator::LandscapeOrientation);
 
@@ -104,3 +96,4 @@ void QMaemo5Rotator::on_orientation_changed(const QString& newOrientation)
     }
     QApplication::desktop()->updateGeometry();
 }
+#endif
index 0e63bf7..82b2afa 100644 (file)
@@ -1,6 +1,5 @@
 #ifndef QMAEMO5ROTATOR_H
 #define QMAEMO5ROTATOR_H
-
 //----------
 // Provides a means of WORKING automatic rotation for Maemo 5 apps. (The default Qt solution is buggy.)
 //----------
@@ -54,5 +53,4 @@ signals:
     void orientationChanged(Orientation orientation);
 
 };
-
 #endif // QMAEMO5ROTATOR_H
index 16c8ec3..a59899d 100644 (file)
@@ -34,6 +34,21 @@ void sPlayer::markComplete()
     else
         pl->setCurrentPlaying(-1);
 }
+void sPlayer::pause()
+{
+    if(media->state() == Phonon::PausedState)
+        media->play();
+    if(media->state() == Phonon::PlayingState)
+        media->pause();
+}
+void sPlayer::playNext()
+{
+    if(pl->existAt(pl->currentplaying()+1))
+    {
+        media->stop();
+        this->markComplete();
+    }
+}
 
 sPlayer::~sPlayer()
 {
index 5c3e18a..6d41fd6 100644 (file)
--- a/splayer.h
+++ b/splayer.h
@@ -15,9 +15,10 @@ class sPlayer : public QObject
 public:
     explicit sPlayer(QObject *parent = 0);
     void play(int p);
-    void playNext();
+
     void play();
     void stop();
+    void pause();
     void setPlaylist(playlist *playList);
     ~sPlayer();
 
@@ -26,6 +27,7 @@ signals:
     void downloadComplete();
 public slots:
     void start(int p);
+    void playNext();
     void putb(int p,qint64,qint64);
     void abortDownload();
 private slots: