1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-15 18:44:30 +02:00

Merge remote branch 'origin/master' into dynamic

Conflicts:
	src/libtomahawk/CMakeLists.txt
This commit is contained in:
Leo Franchi
2011-01-14 12:56:37 -05:00
8 changed files with 213 additions and 197 deletions

View File

@@ -7,8 +7,8 @@ ENDIF()
SET( QT_USE_QTSQL TRUE ) SET( QT_USE_QTSQL TRUE )
SET( QT_USE_QTNETWORK TRUE ) SET( QT_USE_QTNETWORK TRUE )
SET( QT_USE_QTXML TRUE ) SET( QT_USE_QTXML TRUE )
INCLUDE( ${QT_USE_FILE} )
INCLUDE( ${QT_USE_FILE} )
INCLUDE( ${CMAKE_MODULE_PATH}/AddAppIconMacro.cmake ) INCLUDE( ${CMAKE_MODULE_PATH}/AddAppIconMacro.cmake )
#SET( CMAKE_BUILD_TYPE "Release" ) #SET( CMAKE_BUILD_TYPE "Release" )
@@ -40,20 +40,18 @@ SET( tomahawkSources ${tomahawkSources}
infosystem/infoplugins/echonestplugin.cpp infosystem/infoplugins/echonestplugin.cpp
infosystem/infoplugins/musixmatchplugin.cpp infosystem/infoplugins/musixmatchplugin.cpp
musicscanner.cpp
scriptresolver.cpp
scrobbler.cpp
xmppbot/xmppbot.cpp xmppbot/xmppbot.cpp
web/api_v1.cpp web/api_v1.cpp
musicscanner.cpp
scriptresolver.cpp
scrobbler.cpp
tomahawkapp.cpp tomahawkapp.cpp
main.cpp main.cpp
) )
SET( tomahawkSourcesGui ${tomahawkSourcesGui} SET( tomahawkSourcesGui ${tomahawkSourcesGui}
xspfloader.cpp
utils/querylabel.cpp utils/querylabel.cpp
utils/elidedlabel.cpp utils/elidedlabel.cpp
utils/imagebutton.cpp utils/imagebutton.cpp
@@ -104,16 +102,16 @@ SET( tomahawkSourcesGui ${tomahawkSourcesGui}
widgets/newplaylistwidget.cpp widgets/newplaylistwidget.cpp
widgets/welcomewidget.cpp widgets/welcomewidget.cpp
xspfloader.cpp
transferview.cpp transferview.cpp
tomahawkwindow.cpp
tomahawktrayicon.cpp tomahawktrayicon.cpp
audiocontrols.cpp audiocontrols.cpp
settingsdialog.cpp settingsdialog.cpp
tomahawkwindow.cpp
) )
SET( tomahawkHeaders ${tomahawkHeaders} SET( tomahawkHeaders ${tomahawkHeaders}
"${TOMAHAWK_INC_DIR}/tomahawk/tomahawkapp.h" "${TOMAHAWK_INC_DIR}/tomahawk/tomahawkapp.h"
"${TOMAHAWK_INC_DIR}/tomahawk/infosystem.h" "${TOMAHAWK_INC_DIR}/tomahawk/infosystem.h"
audio/transcodeinterface.h audio/transcodeinterface.h
@@ -127,17 +125,15 @@ SET( tomahawkHeaders ${tomahawkHeaders}
infosystem/infoplugins/echonestplugin.h infosystem/infoplugins/echonestplugin.h
infosystem/infoplugins/musixmatchplugin.h infosystem/infoplugins/musixmatchplugin.h
musicscanner.h
scriptresolver.h
scrobbler.h
xmppbot/xmppbot.h xmppbot/xmppbot.h
web/api_v1.h web/api_v1.h
musicscanner.h
scriptresolver.h
scrobbler.h
) )
SET( tomahawkHeadersGui ${tomahawkHeadersGui} SET( tomahawkHeadersGui ${tomahawkHeadersGui}
xspfloader.h
utils/querylabel.h utils/querylabel.h
utils/elidedlabel.h utils/elidedlabel.h
utils/animatedcounterlabel.h utils/animatedcounterlabel.h
@@ -189,11 +185,12 @@ SET( tomahawkHeadersGui ${tomahawkHeadersGui}
widgets/newplaylistwidget.h widgets/newplaylistwidget.h
widgets/welcomewidget.h widgets/welcomewidget.h
xspfloader.h
transferview.h transferview.h
tomahawkwindow.h
tomahawktrayicon.h tomahawktrayicon.h
audiocontrols.h audiocontrols.h
settingsdialog.h settingsdialog.h
tomahawkwindow.h
) )
SET( tomahawkUI ${tomahawkUI} SET( tomahawkUI ${tomahawkUI}
@@ -204,6 +201,7 @@ SET( tomahawkUI ${tomahawkUI}
audiocontrols.ui audiocontrols.ui
sourcetree/sourcetreeitemwidget.ui sourcetree/sourcetreeitemwidget.ui
topbar/topbar.ui topbar/topbar.ui
infowidgets/sourceinfowidget.ui infowidgets/sourceinfowidget.ui
widgets/newplaylistwidget.ui widgets/newplaylistwidget.ui
widgets/welcomewidget.ui widgets/welcomewidget.ui

View File

@@ -23,6 +23,7 @@ SET( OS_SPECIFIC_LINK_LIBRARIES
IF( APPLE ) IF( APPLE )
INCLUDE( "CMakeLists.osx.txt" ) INCLUDE( "CMakeLists.osx.txt" )
ENDIF( APPLE ) ENDIF( APPLE )
IF( UNIX AND NOT APPLE ) IF( UNIX AND NOT APPLE )
INCLUDE( "CMakeLists.linux.txt" ) INCLUDE( "CMakeLists.linux.txt" )
ENDIF( UNIX AND NOT APPLE ) ENDIF( UNIX AND NOT APPLE )

View File

@@ -71,6 +71,9 @@ private:
QVBoxLayout* m_layout; QVBoxLayout* m_layout;
bool m_resolveOnNextLoad; bool m_resolveOnNextLoad;
// used in OnDemand mode
int m_songsSinceLastResolved;
QLabel* m_headerText; QLabel* m_headerText;
QHBoxLayout* m_headerLayout; QHBoxLayout* m_headerLayout;
QComboBox* m_modeCombo; QComboBox* m_modeCombo;

View File

@@ -3,12 +3,15 @@ project( tomahawklib )
SET( QT_USE_QTSQL TRUE ) SET( QT_USE_QTSQL TRUE )
SET( QT_USE_QTNETWORK TRUE ) SET( QT_USE_QTNETWORK TRUE )
SET( QT_USE_QTXML TRUE ) SET( QT_USE_QTXML TRUE )
include( ${QT_USE_FILE} ) include( ${QT_USE_FILE} )
add_definitions( ${QT_DEFINITIONS} ) add_definitions( ${QT_DEFINITIONS} )
add_definitions( -DQT_SHARED ) add_definitions( -DQT_SHARED )
add_definitions( -DDLLEXPORT_PRO ) add_definitions( -DDLLEXPORT_PRO )
set( libSources set( libSources
<<<<<<< HEAD
tomahawksettings.cpp tomahawksettings.cpp
sourcelist.cpp sourcelist.cpp
pipeline.cpp pipeline.cpp

View File

@@ -64,7 +64,7 @@ DatabaseWorker::doWork( QSharedPointer<DatabaseCommand> cmd )
if( cmd->doesMutates() ) if( cmd->doesMutates() )
{ {
bool transok = m_dbimpl->database().transaction(); bool transok = m_dbimpl->database().transaction();
Q_ASSERT( transok ); // Q_ASSERT( transok );
Q_UNUSED( transok ); Q_UNUSED( transok );
} }
try try
@@ -141,7 +141,7 @@ DatabaseWorker::doWork( QSharedPointer<DatabaseCommand> cmd )
if( cmd->doesMutates() ) if( cmd->doesMutates() )
m_dbimpl->database().rollback(); m_dbimpl->database().rollback();
Q_ASSERT( false ); // Q_ASSERT( false );
} }
catch(...) catch(...)
{ {

View File

@@ -33,7 +33,9 @@ namespace Tomahawk {
* - They expose a list of controls that this generator currently is operating on * - They expose a list of controls that this generator currently is operating on
* - They have a mode of OnDemand or Static * - They have a mode of OnDemand or Static
* *
* And they generate tracks * And they generate tracks in two ways:
* - Statically (ask for X tracks, get X tracks)
* - On Demand (as for next track, ask for next track again, etc)
*/ */
class GeneratorInterface : public QObject class GeneratorInterface : public QObject
{ {
@@ -56,16 +58,24 @@ public:
/// A logo to display for this generator, if it has one /// A logo to display for this generator, if it has one
virtual QPixmap logo(); virtual QPixmap logo();
/** /**
* Generate tracks from the controls in this playlist. If the current mode is * Generate tracks from the controls in this playlist. If this generator is in static
* OnDemand, then \p number is not taken into account. If this generator is in static * mode, then it will return the desired number of tracks. If the generator is in OnDemand
* mode, then it will return the desired number of tracks * mode, this will do nothing.
* *
* Connect to the generated() signal for the results. * Connect to the generated() signal for the results.
* *
*/ */
virtual void generate( int number = -1 ) {} virtual void generate( int number = -1 ) {}
/**
* Starts an on demand session for this generator. Listen to the nextTrack() signal to get
* the first generated track
*/
virtual void startOnDemand() {}
/// The type of this generator /// The type of this generator
QString type() const { return m_type; } QString type() const { return m_type; }
@@ -81,6 +91,7 @@ public:
signals: signals:
void generated( const QList< Tomahawk::query_ptr>& queries ); void generated( const QList< Tomahawk::query_ptr>& queries );
void nextTrackGenerated( const Tomahawk::query_ptr& track );
protected: protected:
QString m_type; QString m_type;