mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-10 16:14:40 +02:00
Cleanup Playlist.h
This commit is contained in:
@@ -783,3 +783,129 @@ Playlist::playlistInterface()
|
||||
|
||||
return m_playlistInterface;
|
||||
}
|
||||
|
||||
|
||||
QString
|
||||
Playlist::currentrevision() const
|
||||
{
|
||||
return m_currentrevision;
|
||||
}
|
||||
|
||||
|
||||
QString
|
||||
Playlist::title() const
|
||||
{
|
||||
return m_title;
|
||||
}
|
||||
|
||||
|
||||
QString
|
||||
Playlist::info() const
|
||||
{
|
||||
return m_info;
|
||||
}
|
||||
|
||||
|
||||
QString
|
||||
Playlist::creator() const
|
||||
{
|
||||
return m_creator;
|
||||
}
|
||||
|
||||
|
||||
QString
|
||||
Playlist::guid() const
|
||||
{
|
||||
return m_guid;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
Playlist::shared() const
|
||||
{
|
||||
return m_shared;
|
||||
}
|
||||
|
||||
|
||||
unsigned int
|
||||
Playlist::lastmodified() const
|
||||
{
|
||||
return m_lastmodified;
|
||||
}
|
||||
|
||||
|
||||
uint
|
||||
Playlist::createdOn() const
|
||||
{
|
||||
return m_createdOn;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
Playlist::busy() const
|
||||
{
|
||||
return m_busy;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
Playlist::loaded() const
|
||||
{
|
||||
return m_loaded;
|
||||
}
|
||||
|
||||
|
||||
const QList<plentry_ptr>&
|
||||
Playlist::entries()
|
||||
{
|
||||
return m_entries;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Playlist::setCurrentrevision( const QString& s )
|
||||
{
|
||||
m_currentrevision = s;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Playlist::setInfo( const QString& s )
|
||||
{
|
||||
m_info = s;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Playlist::setCreator( const QString& s )
|
||||
{
|
||||
m_creator = s;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Playlist::setGuid( const QString& s )
|
||||
{
|
||||
m_guid = s;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Playlist::setShared( bool b )
|
||||
{
|
||||
m_shared = b;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Playlist::setCreatedOn( uint createdOn )
|
||||
{
|
||||
m_createdOn = createdOn;
|
||||
}
|
||||
|
||||
|
||||
QList<PlaylistUpdaterInterface *>
|
||||
Playlist::updaters() const
|
||||
{
|
||||
return m_updaters;
|
||||
}
|
||||
|
@@ -29,8 +29,6 @@
|
||||
|
||||
#include "Typedefs.h"
|
||||
#include "PlaylistEntry.h"
|
||||
#include "PlaylistInterface.h"
|
||||
#include "playlist/PlaylistUpdaterInterface.h"
|
||||
#include "Query.h"
|
||||
|
||||
#include "DllMacro.h"
|
||||
@@ -113,31 +111,31 @@ public:
|
||||
virtual void loadRevision( const QString& rev = "" );
|
||||
|
||||
source_ptr author() const;
|
||||
QString currentrevision() const { return m_currentrevision; }
|
||||
QString title() const { return m_title; }
|
||||
QString info() const { return m_info; }
|
||||
QString creator() const { return m_creator; }
|
||||
QString guid() const { return m_guid; }
|
||||
bool shared() const { return m_shared; }
|
||||
unsigned int lastmodified() const { return m_lastmodified; }
|
||||
uint createdOn() const { return m_createdOn; }
|
||||
QString currentrevision() const;
|
||||
QString title() const;
|
||||
QString info() const;
|
||||
QString creator() const;
|
||||
QString guid() const;
|
||||
bool shared() const;
|
||||
unsigned int lastmodified() const;
|
||||
uint createdOn() const;
|
||||
|
||||
bool busy() const { return m_busy; }
|
||||
bool loaded() const { return m_loaded; }
|
||||
bool busy() const;
|
||||
bool loaded() const;
|
||||
|
||||
const QList< plentry_ptr >& entries() { return m_entries; }
|
||||
const QList< plentry_ptr >& entries();
|
||||
|
||||
// <IGNORE hack="true">
|
||||
// these need to exist and be public for the json serialization stuff
|
||||
// you SHOULD NOT call them. They are used for an alternate CTOR method from json.
|
||||
// maybe friend QObjectHelper and make them private?
|
||||
explicit Playlist( const source_ptr& author );
|
||||
void setCurrentrevision( const QString& s ) { m_currentrevision = s; }
|
||||
void setInfo( const QString& s ) { m_info = s; }
|
||||
void setCreator( const QString& s ) { m_creator = s; }
|
||||
void setGuid( const QString& s ) { m_guid = s; }
|
||||
void setShared( bool b ) { m_shared = b; }
|
||||
void setCreatedOn( uint createdOn ) { m_createdOn = createdOn; }
|
||||
void setCurrentrevision( const QString& s );
|
||||
void setInfo( const QString& s );
|
||||
void setCreator( const QString& s );
|
||||
void setGuid( const QString& s );
|
||||
void setShared( bool b );
|
||||
void setCreatedOn( uint createdOn );
|
||||
void setTitle( const QString& s );
|
||||
// </IGNORE>
|
||||
|
||||
@@ -145,7 +143,7 @@ public:
|
||||
|
||||
void addUpdater( PlaylistUpdaterInterface* updater );
|
||||
void removeUpdater( PlaylistUpdaterInterface* updater );
|
||||
QList<PlaylistUpdaterInterface*> updaters() const { return m_updaters; }
|
||||
QList<PlaylistUpdaterInterface*> updaters() const;
|
||||
|
||||
/**
|
||||
* Some updaters might have custom deleters in order to perform more actions that require
|
||||
@@ -162,10 +160,14 @@ public:
|
||||
Tomahawk::playlistinterface_ptr playlistInterface();
|
||||
|
||||
signals:
|
||||
/// emitted when the playlist revision changes (whenever the playlist changes)
|
||||
/**
|
||||
* emitted when the playlist revision changes (whenever the playlist changes)
|
||||
*/
|
||||
void revisionLoaded( Tomahawk::PlaylistRevision );
|
||||
|
||||
/// watch for this to see when newly created playlist is synced to DB (if you care)
|
||||
/**
|
||||
* watch for this to see when newly created playlist is synced to DB (if you care)
|
||||
*/
|
||||
void created();
|
||||
|
||||
/// renamed etc.
|
||||
@@ -173,23 +175,29 @@ signals:
|
||||
void renamed( const QString& newTitle, const QString& oldTitle );
|
||||
|
||||
/**
|
||||
* delete command is scheduled but not completed. Do not call remove() again once this
|
||||
* is emitted.
|
||||
* Delete command is scheduled but not completed. Do not call remove() again once this
|
||||
* is emitted.
|
||||
*/
|
||||
void aboutToBeDeleted( const Tomahawk::playlist_ptr& pl );
|
||||
|
||||
/// was deleted, eh?
|
||||
void deleted( const Tomahawk::playlist_ptr& pl );
|
||||
|
||||
/// Notification for tracks being inserted at a specific point
|
||||
/// Contiguous range from startPosition
|
||||
/**
|
||||
* Notification for tracks being inserted at a specific point
|
||||
* Contiguous range from startPosition
|
||||
*/
|
||||
void tracksInserted( const QList< Tomahawk::plentry_ptr >& tracks, int startPosition );
|
||||
|
||||
/// Notification for tracks being removed from playlist
|
||||
/**
|
||||
* Notification for tracks being removed from PlaylistModel
|
||||
*/
|
||||
void tracksRemoved( const QList< Tomahawk::query_ptr >& tracks );
|
||||
|
||||
/// Notification for tracks being moved in a playlist. List is of new tracks, and new position of first track
|
||||
/// Contiguous range from startPosition
|
||||
/**
|
||||
* Notification for tracks being moved in a playlist. List is of new tracks, and new position of first track
|
||||
* Contiguous range from startPosition
|
||||
*/
|
||||
void tracksMoved( const QList< Tomahawk::plentry_ptr >& tracks, int startPosition );
|
||||
|
||||
public slots:
|
||||
|
@@ -19,8 +19,6 @@
|
||||
|
||||
#include "Query.h"
|
||||
|
||||
#include <QtAlgorithms>
|
||||
|
||||
#include "audio/AudioEngine.h"
|
||||
#include "collection/Collection.h"
|
||||
#include "database/Database.h"
|
||||
@@ -31,13 +29,15 @@
|
||||
#include "database/DatabaseCommand_SocialAction.h"
|
||||
#include "database/DatabaseCommand_TrackStats.h"
|
||||
#include "resolvers/Resolver.h"
|
||||
#include "utils/Logger.h"
|
||||
|
||||
#include "Album.h"
|
||||
#include "Pipeline.h"
|
||||
#include "Result.h"
|
||||
#include "SourceList.h"
|
||||
|
||||
#include "utils/Logger.h"
|
||||
#include <QtAlgorithms>
|
||||
#include <QDebug>
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
|
@@ -21,11 +21,12 @@
|
||||
#include "SpotifyPlaylistUpdater.h"
|
||||
|
||||
#include "accounts/AccountManager.h"
|
||||
#include "SpotifyAccount.h"
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "SpotifyAccount.h"
|
||||
#include "Track.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <QApplication>
|
||||
#include <QMessageBox>
|
||||
|
||||
using namespace Tomahawk;
|
||||
using namespace Accounts;
|
||||
|
@@ -20,13 +20,13 @@
|
||||
#ifndef DATABASECOMMAND_LOADPLAYLIST_H
|
||||
#define DATABASECOMMAND_LOADPLAYLIST_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QVariantMap>
|
||||
|
||||
#include "DatabaseCommand.h"
|
||||
#include "DllMacro.h"
|
||||
#include "Playlist.h"
|
||||
|
||||
#include "DllMacro.h"
|
||||
#include <QObject>
|
||||
#include <QStringList>
|
||||
#include <QVariantMap>
|
||||
|
||||
class DLLEXPORT DatabaseCommand_LoadPlaylistEntries : public DatabaseCommand
|
||||
{
|
||||
|
@@ -25,6 +25,7 @@
|
||||
#include "DatabaseImpl.h"
|
||||
#include "Source.h"
|
||||
#include "TomahawkSqlQuery.h"
|
||||
#include "Track.h"
|
||||
|
||||
#include <qjson/parser.h>
|
||||
#include <qjson/serializer.h>
|
||||
|
@@ -20,20 +20,21 @@
|
||||
|
||||
#include "DatabaseImpl.h"
|
||||
|
||||
#include <QtAlgorithms>
|
||||
#include <QCoreApplication>
|
||||
#include <QFile>
|
||||
#include <QRegExp>
|
||||
#include <QStringList>
|
||||
#include <QtAlgorithms>
|
||||
#include <QFile>
|
||||
#include <QTimer>
|
||||
|
||||
#include "database/Database.h"
|
||||
#include "FuzzyIndex.h"
|
||||
#include "SourceList.h"
|
||||
#include "Result.h"
|
||||
#include "Artist.h"
|
||||
#include "Album.h"
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "Album.h"
|
||||
#include "Artist.h"
|
||||
#include "FuzzyIndex.h"
|
||||
#include "Result.h"
|
||||
#include "SourceList.h"
|
||||
|
||||
/* !!!! You need to manually generate Schema.sql.h when the schema changes:
|
||||
cd src/libtomahawk/database
|
||||
|
@@ -20,6 +20,7 @@
|
||||
|
||||
#include <QDir>
|
||||
#include <QTime>
|
||||
#include <QTimer>
|
||||
|
||||
#include <CLucene.h>
|
||||
#include <CLucene/queryParser/MultiFieldQueryParser.h>
|
||||
|
@@ -36,6 +36,7 @@
|
||||
#include <boost/function.hpp>
|
||||
|
||||
#include <QFile>
|
||||
#include <QTimer>
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
|
@@ -19,19 +19,20 @@
|
||||
|
||||
#include "JspfLoader.h"
|
||||
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/NetworkReply.h"
|
||||
#include "utils/TomahawkUtils.h"
|
||||
|
||||
#include "Playlist.h"
|
||||
#include "SourceList.h"
|
||||
#include "Track.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDomDocument>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include <qjson/parser.h>
|
||||
|
||||
#include "SourceList.h"
|
||||
#include "Playlist.h"
|
||||
|
||||
#include "utils/NetworkReply.h"
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "utils/Logger.h"
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
|
||||
|
@@ -19,15 +19,16 @@
|
||||
|
||||
#include "XspfGenerator.h"
|
||||
|
||||
#include "utils/Logger.h"
|
||||
#include "Playlist.h"
|
||||
#include "Query.h"
|
||||
#include "Source.h"
|
||||
#include "Track.h"
|
||||
|
||||
#include <QXmlStreamWriter>
|
||||
#include <QDateTime>
|
||||
#include <QTimer>
|
||||
|
||||
#include "Playlist.h"
|
||||
#include "Query.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "Source.h"
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
|
||||
|
@@ -26,15 +26,16 @@
|
||||
#include "jobview/ErrorStatusMessage.h"
|
||||
#endif
|
||||
|
||||
#include "SourceList.h"
|
||||
#include "Playlist.h"
|
||||
#include "playlist/XspfUpdater.h"
|
||||
#include "Pipeline.h"
|
||||
|
||||
#include "utils/NetworkReply.h"
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "utils/Logger.h"
|
||||
|
||||
#include "Pipeline.h"
|
||||
#include "Playlist.h"
|
||||
#include "SourceList.h"
|
||||
#include "Track.h"
|
||||
|
||||
#include <QDomDocument>
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
@@ -25,9 +25,11 @@
|
||||
#include "playlist/dynamic/DynamicPlaylist.h"
|
||||
#include "utils/Logger.h"
|
||||
|
||||
#include "TomahawkSettings.h"
|
||||
#include "SourceList.h"
|
||||
#include "Playlist.h"
|
||||
#include "PlaylistInterface.h"
|
||||
#include "SourceList.h"
|
||||
#include "TomahawkSettings.h"
|
||||
#include "Track.h"
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
|
@@ -20,14 +20,15 @@
|
||||
#include "SocialWidget.h"
|
||||
#include "ui_SocialWidget.h"
|
||||
|
||||
#include "GlobalActionManager.h"
|
||||
#include "Source.h"
|
||||
|
||||
#include "utils/ImageRegistry.h"
|
||||
#include "utils/TomahawkStyle.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "utils/Logger.h"
|
||||
|
||||
#include "GlobalActionManager.h"
|
||||
#include "Source.h"
|
||||
#include "Track.h"
|
||||
|
||||
#include <QPainter>
|
||||
#include <QDialog>
|
||||
#include <QPropertyAnimation>
|
||||
|
@@ -19,17 +19,19 @@
|
||||
|
||||
#include "TomahawkTrayIcon.h"
|
||||
|
||||
#include "Artist.h"
|
||||
#include "audio/AudioEngine.h"
|
||||
#include "TomahawkApp.h"
|
||||
#include "TomahawkWindow.h"
|
||||
#include "Query.h"
|
||||
#include "Source.h"
|
||||
#include "collection/Collection.h"
|
||||
#include "ActionCollection.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
|
||||
#include "ActionCollection.h"
|
||||
#include "Artist.h"
|
||||
#include "Query.h"
|
||||
#include "Source.h"
|
||||
#include "TomahawkApp.h"
|
||||
#include "TomahawkWindow.h"
|
||||
#include "Track.h"
|
||||
|
||||
#include <QWheelEvent>
|
||||
|
||||
TomahawkTrayIcon::TomahawkTrayIcon( QObject* parent )
|
||||
|
Reference in New Issue
Block a user