mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-07 14:46:33 +02:00
* This probably needs fixing some connects() now: Moved PlaylistInterface into Tomahawk namespace.
This commit is contained in:
@@ -30,6 +30,8 @@
|
|||||||
|
|
||||||
#include "album.h"
|
#include "album.h"
|
||||||
|
|
||||||
|
using namespace Tomahawk;
|
||||||
|
|
||||||
static QString s_acInfoIdentifier = QString( "AUDIOCONTROLS" );
|
static QString s_acInfoIdentifier = QString( "AUDIOCONTROLS" );
|
||||||
|
|
||||||
|
|
||||||
|
@@ -43,7 +43,7 @@ signals:
|
|||||||
void pausePressed();
|
void pausePressed();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void onRepeatModeChanged( PlaylistInterface::RepeatMode mode );
|
void onRepeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode mode );
|
||||||
void onShuffleModeChanged( bool enabled );
|
void onShuffleModeChanged( bool enabled );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -81,7 +81,7 @@ private:
|
|||||||
QPixmap m_defaultCover;
|
QPixmap m_defaultCover;
|
||||||
|
|
||||||
Tomahawk::result_ptr m_currentTrack;
|
Tomahawk::result_ptr m_currentTrack;
|
||||||
PlaylistInterface::RepeatMode m_repeatMode;
|
Tomahawk::PlaylistInterface::RepeatMode m_repeatMode;
|
||||||
bool m_shuffled;
|
bool m_shuffled;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -29,6 +29,8 @@
|
|||||||
|
|
||||||
#include "album.h"
|
#include "album.h"
|
||||||
|
|
||||||
|
using namespace Tomahawk;
|
||||||
|
|
||||||
AudioEngine* AudioEngine::s_instance = 0;
|
AudioEngine* AudioEngine::s_instance = 0;
|
||||||
|
|
||||||
static QString s_aeInfoIdentifier = QString( "AUDIOENGINE" );
|
static QString s_aeInfoIdentifier = QString( "AUDIOENGINE" );
|
||||||
@@ -319,7 +321,7 @@ AudioEngine::loadNextTrack()
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
AudioEngine::playItem( PlaylistInterface* playlist, const Tomahawk::result_ptr& result )
|
AudioEngine::playItem( Tomahawk::PlaylistInterface* playlist, const Tomahawk::result_ptr& result )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
qDebug() << Q_FUNC_INFO;
|
||||||
|
|
||||||
|
@@ -31,7 +31,10 @@
|
|||||||
|
|
||||||
#define AUDIO_VOLUME_STEP 5
|
#define AUDIO_VOLUME_STEP 5
|
||||||
|
|
||||||
class PlaylistInterface;
|
namespace Tomahawk
|
||||||
|
{
|
||||||
|
class PlaylistInterface;
|
||||||
|
}
|
||||||
|
|
||||||
class DLLEXPORT AudioEngine : public QObject
|
class DLLEXPORT AudioEngine : public QObject
|
||||||
{
|
{
|
||||||
@@ -50,10 +53,10 @@ public:
|
|||||||
bool isPaused() const { return m_mediaObject->state() == Phonon::PausedState; }
|
bool isPaused() const { return m_mediaObject->state() == Phonon::PausedState; }
|
||||||
|
|
||||||
/* Returns the PlaylistInterface of the currently playing track. Note: This might be different to the current playlist! */
|
/* Returns the PlaylistInterface of the currently playing track. Note: This might be different to the current playlist! */
|
||||||
PlaylistInterface* currentTrackPlaylist() const { return m_currentTrackPlaylist; }
|
Tomahawk::PlaylistInterface* currentTrackPlaylist() const { return m_currentTrackPlaylist; }
|
||||||
|
|
||||||
/* Returns the PlaylistInterface of the current playlist. Note: The currently playing track might still be from a different playlist! */
|
/* Returns the PlaylistInterface of the current playlist. Note: The currently playing track might still be from a different playlist! */
|
||||||
PlaylistInterface* playlist() const { return m_playlist; }
|
Tomahawk::PlaylistInterface* playlist() const { return m_playlist; }
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void playPause();
|
void playPause();
|
||||||
@@ -71,9 +74,9 @@ public slots:
|
|||||||
void onVolumeChanged( qreal volume ) { emit volumeChanged( volume * 100 ); }
|
void onVolumeChanged( qreal volume ) { emit volumeChanged( volume * 100 ); }
|
||||||
void mute();
|
void mute();
|
||||||
|
|
||||||
void playItem( PlaylistInterface* playlist, const Tomahawk::result_ptr& result );
|
void playItem( Tomahawk::PlaylistInterface* playlist, const Tomahawk::result_ptr& result );
|
||||||
void setPlaylist( PlaylistInterface* playlist );
|
void setPlaylist( Tomahawk::PlaylistInterface* playlist );
|
||||||
void setQueue( PlaylistInterface* queue ) { m_queue = queue; }
|
void setQueue( Tomahawk::PlaylistInterface* queue ) { m_queue = queue; }
|
||||||
|
|
||||||
void onTrackAboutToFinish();
|
void onTrackAboutToFinish();
|
||||||
|
|
||||||
@@ -91,7 +94,7 @@ signals:
|
|||||||
void timerSeconds( unsigned int secondsElapsed );
|
void timerSeconds( unsigned int secondsElapsed );
|
||||||
void timerPercentage( unsigned int percentage );
|
void timerPercentage( unsigned int percentage );
|
||||||
|
|
||||||
void playlistChanged( PlaylistInterface* playlist );
|
void playlistChanged( Tomahawk::PlaylistInterface* playlist );
|
||||||
|
|
||||||
void error( AudioErrorCode errorCode );
|
void error( AudioErrorCode errorCode );
|
||||||
|
|
||||||
@@ -115,9 +118,9 @@ private:
|
|||||||
|
|
||||||
Tomahawk::result_ptr m_currentTrack;
|
Tomahawk::result_ptr m_currentTrack;
|
||||||
Tomahawk::result_ptr m_lastTrack;
|
Tomahawk::result_ptr m_lastTrack;
|
||||||
PlaylistInterface* m_playlist;
|
Tomahawk::PlaylistInterface* m_playlist;
|
||||||
PlaylistInterface* m_currentTrackPlaylist;
|
Tomahawk::PlaylistInterface* m_currentTrackPlaylist;
|
||||||
PlaylistInterface* m_queue;
|
Tomahawk::PlaylistInterface* m_queue;
|
||||||
|
|
||||||
Phonon::MediaObject* m_mediaObject;
|
Phonon::MediaObject* m_mediaObject;
|
||||||
Phonon::AudioOutput* m_audioOutput;
|
Phonon::AudioOutput* m_audioOutput;
|
||||||
|
@@ -81,11 +81,11 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
virtual void setRepeatMode( PlaylistInterface::RepeatMode /*mode*/ ) {}
|
virtual void setRepeatMode( Tomahawk::PlaylistInterface::RepeatMode /*mode*/ ) {}
|
||||||
virtual void setShuffled( bool /*shuffled*/ ) {}
|
virtual void setShuffled( bool /*shuffled*/ ) {}
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void repeatModeChanged( PlaylistInterface::RepeatMode mode );
|
void repeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode mode );
|
||||||
void shuffleModeChanged( bool enabled );
|
void shuffleModeChanged( bool enabled );
|
||||||
|
|
||||||
void trackCountChanged( unsigned int tracks );
|
void trackCountChanged( unsigned int tracks );
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
#include "dllmacro.h"
|
#include "dllmacro.h"
|
||||||
|
|
||||||
class DLLEXPORT AlbumProxyModel : public QSortFilterProxyModel, public PlaylistInterface
|
class DLLEXPORT AlbumProxyModel : public QSortFilterProxyModel, public Tomahawk::PlaylistInterface
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@@ -50,9 +50,9 @@ public:
|
|||||||
|
|
||||||
virtual void setFilter( const QString& pattern );
|
virtual void setFilter( const QString& pattern );
|
||||||
|
|
||||||
virtual PlaylistInterface::RepeatMode repeatMode() const { return m_repeatMode; }
|
virtual Tomahawk::PlaylistInterface::RepeatMode repeatMode() const { return m_repeatMode; }
|
||||||
virtual bool shuffled() const { return m_shuffled; }
|
virtual bool shuffled() const { return m_shuffled; }
|
||||||
virtual PlaylistInterface::ViewMode viewMode() const { return PlaylistInterface::Album; }
|
virtual Tomahawk::PlaylistInterface::ViewMode viewMode() const { return Tomahawk::PlaylistInterface::Album; }
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void repeatModeChanged( PlaylistInterface::RepeatMode mode );
|
void repeatModeChanged( PlaylistInterface::RepeatMode mode );
|
||||||
|
@@ -46,7 +46,7 @@ public:
|
|||||||
void setModel( QAbstractItemModel* model );
|
void setModel( QAbstractItemModel* model );
|
||||||
|
|
||||||
virtual QWidget* widget() { return this; }
|
virtual QWidget* widget() { return this; }
|
||||||
virtual PlaylistInterface* playlistInterface() const { return proxyModel(); }
|
virtual Tomahawk::PlaylistInterface* playlistInterface() const { return proxyModel(); }
|
||||||
|
|
||||||
virtual QString title() const { return m_model->title(); }
|
virtual QString title() const { return m_model->title(); }
|
||||||
virtual QString description() const { return m_model->description(); }
|
virtual QString description() const { return m_model->description(); }
|
||||||
|
@@ -48,7 +48,7 @@ public:
|
|||||||
void setModel( TreeModel* model );
|
void setModel( TreeModel* model );
|
||||||
|
|
||||||
virtual QWidget* widget() { return this; }
|
virtual QWidget* widget() { return this; }
|
||||||
virtual PlaylistInterface* playlistInterface() const { return proxyModel(); }
|
virtual Tomahawk::PlaylistInterface* playlistInterface() const { return proxyModel(); }
|
||||||
|
|
||||||
virtual QString title() const { return m_model->title(); }
|
virtual QString title() const { return m_model->title(); }
|
||||||
virtual QString description() const { return m_model->description(); }
|
virtual QString description() const { return m_model->description(); }
|
||||||
|
@@ -57,7 +57,7 @@ public:
|
|||||||
virtual void append( const Tomahawk::query_ptr& /*query*/ ) {}
|
virtual void append( const Tomahawk::query_ptr& /*query*/ ) {}
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void repeatModeChanged( PlaylistInterface::RepeatMode mode );
|
void repeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode mode );
|
||||||
void shuffleModeChanged( bool enabled );
|
void shuffleModeChanged( bool enabled );
|
||||||
|
|
||||||
void loadingStarted();
|
void loadingStarted();
|
||||||
|
@@ -40,7 +40,7 @@ public:
|
|||||||
virtual void setModel( QAbstractItemModel* model );
|
virtual void setModel( QAbstractItemModel* model );
|
||||||
|
|
||||||
virtual QWidget* widget() { return this; }
|
virtual QWidget* widget() { return this; }
|
||||||
virtual PlaylistInterface* playlistInterface() const { return proxyModel(); }
|
virtual Tomahawk::PlaylistInterface* playlistInterface() const { return proxyModel(); }
|
||||||
|
|
||||||
virtual QString title() const { return model()->title(); }
|
virtual QString title() const { return model()->title(); }
|
||||||
virtual QString description() const { return model()->description(); }
|
virtual QString description() const { return model()->description(); }
|
||||||
|
@@ -36,7 +36,6 @@ class QVBoxLayout;
|
|||||||
class QHBoxLayout;
|
class QHBoxLayout;
|
||||||
class QPushButton;
|
class QPushButton;
|
||||||
class QComboBox;
|
class QComboBox;
|
||||||
class PlaylistInterface;
|
|
||||||
class PlaylistModel;
|
class PlaylistModel;
|
||||||
class PlaylistView;
|
class PlaylistView;
|
||||||
class AnimatedSplitter;
|
class AnimatedSplitter;
|
||||||
|
@@ -69,7 +69,7 @@ public:
|
|||||||
|
|
||||||
bool isTemporary() const;
|
bool isTemporary() const;
|
||||||
signals:
|
signals:
|
||||||
void repeatModeChanged( PlaylistInterface::RepeatMode mode );
|
void repeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode mode );
|
||||||
void shuffleModeChanged( bool enabled );
|
void shuffleModeChanged( bool enabled );
|
||||||
|
|
||||||
void itemSizeChanged( const QModelIndex& index );
|
void itemSizeChanged( const QModelIndex& index );
|
||||||
|
@@ -43,7 +43,7 @@ public:
|
|||||||
virtual void setModel( QAbstractItemModel* model );
|
virtual void setModel( QAbstractItemModel* model );
|
||||||
|
|
||||||
virtual QWidget* widget() { return this; }
|
virtual QWidget* widget() { return this; }
|
||||||
virtual PlaylistInterface* playlistInterface() const { return proxyModel(); }
|
virtual Tomahawk::PlaylistInterface* playlistInterface() const { return proxyModel(); }
|
||||||
|
|
||||||
virtual bool showFilter() const { return true; }
|
virtual bool showFilter() const { return true; }
|
||||||
|
|
||||||
|
@@ -63,7 +63,7 @@ public slots:
|
|||||||
void setFilter( const QString& filter );
|
void setFilter( const QString& filter );
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void onModeChanged( PlaylistInterface::ViewMode mode );
|
void onModeChanged( Tomahawk::PlaylistInterface::ViewMode mode );
|
||||||
void onFlatMode();
|
void onFlatMode();
|
||||||
void onArtistMode();
|
void onArtistMode();
|
||||||
void onAlbumMode();
|
void onAlbumMode();
|
||||||
|
@@ -74,7 +74,7 @@ public:
|
|||||||
|
|
||||||
virtual QPersistentModelIndex currentItem() { return m_currentIndex; }
|
virtual QPersistentModelIndex currentItem() { return m_currentIndex; }
|
||||||
|
|
||||||
virtual PlaylistInterface::RepeatMode repeatMode() const { return PlaylistInterface::NoRepeat; }
|
virtual Tomahawk::PlaylistInterface::RepeatMode repeatMode() const { return Tomahawk::PlaylistInterface::NoRepeat; }
|
||||||
virtual bool shuffled() const { return false; }
|
virtual bool shuffled() const { return false; }
|
||||||
|
|
||||||
virtual void ensureResolved();
|
virtual void ensureResolved();
|
||||||
@@ -86,7 +86,7 @@ public:
|
|||||||
TrackModelItem* m_rootItem;
|
TrackModelItem* m_rootItem;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void repeatModeChanged( PlaylistInterface::RepeatMode mode );
|
void repeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode mode );
|
||||||
void shuffleModeChanged( bool enabled );
|
void shuffleModeChanged( bool enabled );
|
||||||
|
|
||||||
void trackCountChanged( unsigned int tracks );
|
void trackCountChanged( unsigned int tracks );
|
||||||
@@ -100,7 +100,7 @@ public slots:
|
|||||||
virtual void removeIndex( const QModelIndex& index, bool moreToCome = false );
|
virtual void removeIndex( const QModelIndex& index, bool moreToCome = false );
|
||||||
virtual void removeIndexes( const QList<QModelIndex>& indexes );
|
virtual void removeIndexes( const QList<QModelIndex>& indexes );
|
||||||
|
|
||||||
virtual void setRepeatMode( PlaylistInterface::RepeatMode /*mode*/ ) {}
|
virtual void setRepeatMode( Tomahawk::PlaylistInterface::RepeatMode /*mode*/ ) {}
|
||||||
virtual void setShuffled( bool /*shuffled*/ ) {}
|
virtual void setShuffled( bool /*shuffled*/ ) {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
#include "dllmacro.h"
|
#include "dllmacro.h"
|
||||||
|
|
||||||
class DLLEXPORT TrackProxyModel : public QSortFilterProxyModel, public PlaylistInterface
|
class DLLEXPORT TrackProxyModel : public QSortFilterProxyModel, public Tomahawk::PlaylistInterface
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
@@ -28,7 +28,6 @@
|
|||||||
|
|
||||||
class QAction;
|
class QAction;
|
||||||
class LoadingSpinner;
|
class LoadingSpinner;
|
||||||
class PlaylistInterface;
|
|
||||||
class TrackHeader;
|
class TrackHeader;
|
||||||
class TrackModel;
|
class TrackModel;
|
||||||
class TrackProxyModel;
|
class TrackProxyModel;
|
||||||
|
@@ -101,11 +101,11 @@ public:
|
|||||||
public slots:
|
public slots:
|
||||||
virtual void setCurrentItem( const QModelIndex& index );
|
virtual void setCurrentItem( const QModelIndex& index );
|
||||||
|
|
||||||
virtual void setRepeatMode( PlaylistInterface::RepeatMode /*mode*/ ) {}
|
virtual void setRepeatMode( Tomahawk::PlaylistInterface::RepeatMode /*mode*/ ) {}
|
||||||
virtual void setShuffled( bool /*shuffled*/ ) {}
|
virtual void setShuffled( bool /*shuffled*/ ) {}
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void repeatModeChanged( PlaylistInterface::RepeatMode mode );
|
void repeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode mode );
|
||||||
void shuffleModeChanged( bool enabled );
|
void shuffleModeChanged( bool enabled );
|
||||||
|
|
||||||
void trackCountChanged( unsigned int tracks );
|
void trackCountChanged( unsigned int tracks );
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
#include "dllmacro.h"
|
#include "dllmacro.h"
|
||||||
|
|
||||||
class DLLEXPORT TreeProxyModel : public QSortFilterProxyModel, public PlaylistInterface
|
class DLLEXPORT TreeProxyModel : public QSortFilterProxyModel, public Tomahawk::PlaylistInterface
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
@@ -27,6 +27,9 @@
|
|||||||
#include "dllmacro.h"
|
#include "dllmacro.h"
|
||||||
#include "result.h"
|
#include "result.h"
|
||||||
|
|
||||||
|
namespace Tomahawk
|
||||||
|
{
|
||||||
|
|
||||||
class DLLEXPORT PlaylistInterface
|
class DLLEXPORT PlaylistInterface
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -70,4 +73,6 @@ private:
|
|||||||
QString m_filter;
|
QString m_filter;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
#endif // PLAYLISTINTERFACE_H
|
#endif // PLAYLISTINTERFACE_H
|
||||||
|
@@ -30,6 +30,8 @@
|
|||||||
|
|
||||||
#define VERSION 3
|
#define VERSION 3
|
||||||
|
|
||||||
|
using namespace Tomahawk;
|
||||||
|
|
||||||
TomahawkSettings* TomahawkSettings::s_instance = 0;
|
TomahawkSettings* TomahawkSettings::s_instance = 0;
|
||||||
|
|
||||||
|
|
||||||
|
@@ -76,8 +76,8 @@ public:
|
|||||||
|
|
||||||
bool shuffleState( const QString& playlistid ) const;
|
bool shuffleState( const QString& playlistid ) const;
|
||||||
void setShuffleState( const QString& playlistid, bool state );
|
void setShuffleState( const QString& playlistid, bool state );
|
||||||
PlaylistInterface::RepeatMode repeatMode( const QString& playlistid );
|
Tomahawk::PlaylistInterface::RepeatMode repeatMode( const QString& playlistid );
|
||||||
void setRepeatMode( const QString& playlistid, PlaylistInterface::RepeatMode mode);
|
void setRepeatMode( const QString& playlistid, Tomahawk::PlaylistInterface::RepeatMode mode );
|
||||||
|
|
||||||
// remove shuffle state and repeat state
|
// remove shuffle state and repeat state
|
||||||
void removePlaylistSettings( const QString& playlistid );
|
void removePlaylistSettings( const QString& playlistid );
|
||||||
|
@@ -72,9 +72,9 @@ public:
|
|||||||
bool isSuperCollectionVisible() const;
|
bool isSuperCollectionVisible() const;
|
||||||
bool isNewPlaylistPageVisible() const;
|
bool isNewPlaylistPageVisible() const;
|
||||||
|
|
||||||
PlaylistInterface* currentPlaylistInterface() const;
|
Tomahawk::PlaylistInterface* currentPlaylistInterface() const;
|
||||||
Tomahawk::ViewPage* currentPage() const;
|
Tomahawk::ViewPage* currentPage() const;
|
||||||
Tomahawk::ViewPage* pageForInterface( PlaylistInterface* interface ) const;
|
Tomahawk::ViewPage* pageForInterface( Tomahawk::PlaylistInterface* interface ) const;
|
||||||
int positionInHistory( Tomahawk::ViewPage* page ) const;
|
int positionInHistory( Tomahawk::ViewPage* page ) const;
|
||||||
|
|
||||||
Tomahawk::ViewPage* show( Tomahawk::ViewPage* page );
|
Tomahawk::ViewPage* show( Tomahawk::ViewPage* page );
|
||||||
@@ -97,13 +97,13 @@ signals:
|
|||||||
void numArtistsChanged( unsigned int artists );
|
void numArtistsChanged( unsigned int artists );
|
||||||
void numShownChanged( unsigned int shown );
|
void numShownChanged( unsigned int shown );
|
||||||
|
|
||||||
void repeatModeChanged( PlaylistInterface::RepeatMode mode );
|
void repeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode mode );
|
||||||
void shuffleModeChanged( bool enabled );
|
void shuffleModeChanged( bool enabled );
|
||||||
|
|
||||||
void statsAvailable( bool b );
|
void statsAvailable( bool b );
|
||||||
void modesAvailable( bool b );
|
void modesAvailable( bool b );
|
||||||
void filterAvailable( bool b );
|
void filterAvailable( bool b );
|
||||||
void modeChanged( PlaylistInterface::ViewMode mode );
|
void modeChanged( Tomahawk::PlaylistInterface::ViewMode mode );
|
||||||
|
|
||||||
void playClicked();
|
void playClicked();
|
||||||
void pauseClicked();
|
void pauseClicked();
|
||||||
@@ -138,10 +138,10 @@ public slots:
|
|||||||
void showQueue();
|
void showQueue();
|
||||||
void hideQueue();
|
void hideQueue();
|
||||||
|
|
||||||
void setRepeatMode( PlaylistInterface::RepeatMode mode );
|
void setRepeatMode( Tomahawk::PlaylistInterface::RepeatMode mode );
|
||||||
void setShuffled( bool enabled );
|
void setShuffled( bool enabled );
|
||||||
|
|
||||||
void playlistInterfaceChanged( PlaylistInterface* );
|
void playlistInterfaceChanged( Tomahawk::PlaylistInterface* );
|
||||||
|
|
||||||
// called by the playlist creation dbcmds
|
// called by the playlist creation dbcmds
|
||||||
void createPlaylist( const Tomahawk::source_ptr& src, const QVariant& contents );
|
void createPlaylist( const Tomahawk::source_ptr& src, const QVariant& contents );
|
||||||
@@ -165,9 +165,9 @@ private:
|
|||||||
void saveCurrentPlaylistSettings();
|
void saveCurrentPlaylistSettings();
|
||||||
void loadCurrentPlaylistSettings();
|
void loadCurrentPlaylistSettings();
|
||||||
|
|
||||||
Tomahawk::playlist_ptr playlistForInterface( PlaylistInterface* interface ) const;
|
Tomahawk::playlist_ptr playlistForInterface( Tomahawk::PlaylistInterface* interface ) const;
|
||||||
Tomahawk::dynplaylist_ptr dynamicPlaylistForInterface( PlaylistInterface* interface ) const;
|
Tomahawk::dynplaylist_ptr dynamicPlaylistForInterface( Tomahawk::PlaylistInterface* interface ) const;
|
||||||
Tomahawk::collection_ptr collectionForInterface( PlaylistInterface* interface ) const;
|
Tomahawk::collection_ptr collectionForInterface( Tomahawk::PlaylistInterface* interface ) const;
|
||||||
|
|
||||||
QWidget* m_widget;
|
QWidget* m_widget;
|
||||||
InfoBar* m_infobar;
|
InfoBar* m_infobar;
|
||||||
|
@@ -38,7 +38,7 @@ public:
|
|||||||
virtual ~ViewPage() {}
|
virtual ~ViewPage() {}
|
||||||
|
|
||||||
virtual QWidget* widget() = 0;
|
virtual QWidget* widget() = 0;
|
||||||
virtual PlaylistInterface* playlistInterface() const = 0;
|
virtual Tomahawk::PlaylistInterface* playlistInterface() const = 0;
|
||||||
|
|
||||||
virtual QString title() const = 0;
|
virtual QString title() const = 0;
|
||||||
virtual QString description() const = 0;
|
virtual QString description() const = 0;
|
||||||
|
@@ -46,7 +46,7 @@ public:
|
|||||||
~SourceInfoWidget();
|
~SourceInfoWidget();
|
||||||
|
|
||||||
virtual QWidget* widget() { return this; }
|
virtual QWidget* widget() { return this; }
|
||||||
virtual PlaylistInterface* playlistInterface() const { return 0; }
|
virtual Tomahawk::PlaylistInterface* playlistInterface() const { return 0; }
|
||||||
|
|
||||||
virtual QString title() const { return m_title; }
|
virtual QString title() const { return m_title; }
|
||||||
virtual QString description() const { return m_description; }
|
virtual QString description() const { return m_description; }
|
||||||
|
@@ -46,7 +46,7 @@ public:
|
|||||||
~NewPlaylistWidget();
|
~NewPlaylistWidget();
|
||||||
|
|
||||||
virtual QWidget* widget() { return this; }
|
virtual QWidget* widget() { return this; }
|
||||||
virtual PlaylistInterface* playlistInterface() const { return 0; }
|
virtual Tomahawk::PlaylistInterface* playlistInterface() const { return 0; }
|
||||||
|
|
||||||
virtual QString title() const { return tr( "Create a new playlist" ); }
|
virtual QString title() const { return tr( "Create a new playlist" ); }
|
||||||
virtual QString description() const { return QString(); }
|
virtual QString description() const { return QString(); }
|
||||||
|
@@ -45,7 +45,7 @@ public:
|
|||||||
~SearchWidget();
|
~SearchWidget();
|
||||||
|
|
||||||
virtual QWidget* widget() { return this; }
|
virtual QWidget* widget() { return this; }
|
||||||
virtual PlaylistInterface* playlistInterface() const { return 0; }
|
virtual Tomahawk::PlaylistInterface* playlistInterface() const { return 0; }
|
||||||
|
|
||||||
virtual QString title() const { return tr( "Search" ); }
|
virtual QString title() const { return tr( "Search" ); }
|
||||||
virtual QString description() const { return tr( "Results for '%1'" ).arg( m_search ); }
|
virtual QString description() const { return tr( "Results for '%1'" ).arg( m_search ); }
|
||||||
|
@@ -44,7 +44,7 @@ signals:
|
|||||||
void emptinessChanged( bool isEmpty );
|
void emptinessChanged( bool isEmpty );
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void playlistChanged( PlaylistInterface* );
|
void playlistChanged( Tomahawk::PlaylistInterface* );
|
||||||
void onSourceAdded( const Tomahawk::source_ptr& source );
|
void onSourceAdded( const Tomahawk::source_ptr& source );
|
||||||
void onPlaylistsRemoved( QList<Tomahawk::playlist_ptr> );
|
void onPlaylistsRemoved( QList<Tomahawk::playlist_ptr> );
|
||||||
void loadFromSettings();
|
void loadFromSettings();
|
||||||
|
@@ -80,7 +80,7 @@ public:
|
|||||||
~WelcomeWidget();
|
~WelcomeWidget();
|
||||||
|
|
||||||
virtual QWidget* widget() { return this; }
|
virtual QWidget* widget() { return this; }
|
||||||
virtual PlaylistInterface* playlistInterface() const { return 0; }
|
virtual Tomahawk::PlaylistInterface* playlistInterface() const { return 0; }
|
||||||
|
|
||||||
virtual QString title() const { return tr( "Welcome to Tomahawk" ); }
|
virtual QString title() const { return tr( "Welcome to Tomahawk" ); }
|
||||||
virtual QString description() const { return QString(); }
|
virtual QString description() const { return QString(); }
|
||||||
|
Reference in New Issue
Block a user