mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-17 03:24:15 +02:00
Add ExternalResolverPlaylistUpdater* skeletons
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
#include "ExternalResolverPlaylistUpdater.h"
|
||||||
|
|
||||||
|
namespace Tomahawk {
|
||||||
|
|
||||||
|
ExternalResolverPlaylistUpdater::ExternalResolverPlaylistUpdater( const playlist_ptr& pl, Resolver* resolver )
|
||||||
|
: PlaylistUpdaterInterface( pl )
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace Tomahawk
|
@@ -0,0 +1,64 @@
|
|||||||
|
#ifndef TOMAHAWK_EXTERNALRESOLVERPLAYLISTUPDATER_H
|
||||||
|
#define TOMAHAWK_EXTERNALRESOLVERPLAYLISTUPDATER_H
|
||||||
|
|
||||||
|
#include "playlist/PlaylistUpdaterInterface.h"
|
||||||
|
|
||||||
|
namespace Tomahawk {
|
||||||
|
|
||||||
|
class ExternalResolverPlaylistUpdater : public PlaylistUpdaterInterface
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit ExternalResolverPlaylistUpdater( const playlist_ptr& pl, Resolver* resolver );
|
||||||
|
|
||||||
|
virtual ~ExternalResolverPlaylistUpdater();
|
||||||
|
|
||||||
|
// What type you are. If you add a new updater, add the creation code as well.
|
||||||
|
// virtual QString type() const = 0;
|
||||||
|
|
||||||
|
// Small widget to show in playlist header that configures the updater
|
||||||
|
// virtual QWidget* configurationWidget() const = 0;
|
||||||
|
|
||||||
|
// Small overlay over playlist icon in the sidebar to indicate that it has this updater type
|
||||||
|
// Should be around 16x16 or something
|
||||||
|
// virtual QPixmap typeIcon() const { return QPixmap(); }
|
||||||
|
|
||||||
|
// void remove();
|
||||||
|
|
||||||
|
// playlist_ptr playlist() const { return m_playlist; }
|
||||||
|
|
||||||
|
// virtual bool sync() const { return false; }
|
||||||
|
// virtual void setSync( bool ) {}
|
||||||
|
|
||||||
|
// virtual bool canSubscribe() const { return false; }
|
||||||
|
// virtual bool subscribed() const { return false; }
|
||||||
|
// virtual void setSubscribed( bool ) {}
|
||||||
|
// virtual void setCollaborative( bool ) {}
|
||||||
|
// virtual bool collaborative() const { return false; }
|
||||||
|
|
||||||
|
// The int data value associated with each question must be unique across *all* playlist updaters,
|
||||||
|
// as setQuestionResults is called with all questions from all updaters.
|
||||||
|
// virtual bool hasCustomDeleter() const { return false; }
|
||||||
|
// virtual PlaylistDeleteQuestions deleteQuestions() const { return PlaylistDeleteQuestions(); }
|
||||||
|
// virtual void setQuestionResults( const QMap< int, bool > ) {}
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
// virtual void updateNow() {}
|
||||||
|
|
||||||
|
// void save();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// virtual void aboutToDelete() {}
|
||||||
|
|
||||||
|
// QVariantHash settings() const;
|
||||||
|
// void saveSettings( const QVariantHash& settings );
|
||||||
|
|
||||||
|
signals:
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace Tomahawk
|
||||||
|
|
||||||
|
#endif // TOMAHAWK_EXTERNALRESOLVERPLAYLISTUPDATER_H
|
@@ -0,0 +1,54 @@
|
|||||||
|
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||||
|
*
|
||||||
|
* Copyright 2014, Uwe L. Korn <uwelk@xhochy.com>
|
||||||
|
*
|
||||||
|
* Tomahawk is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Tomahawk is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "ExternalResolverPlaylistUpdaterFactory.h"
|
||||||
|
|
||||||
|
#include "Pipeline.h"
|
||||||
|
|
||||||
|
namespace Tomahawk {
|
||||||
|
|
||||||
|
ExternalResolverPlaylistUpdaterFactory::ExternalResolverPlaylistUpdaterFactory()
|
||||||
|
{
|
||||||
|
connect( Pipeline::instance(), SIGNAL( resolverAdded(Tomahawk::Resolver* ) ),
|
||||||
|
SLOT( resolverAdded( Tomahawk::Resolver* ) ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
ExternalResolverPlaylistUpdaterFactory::~ExternalResolverPlaylistUpdaterFactory()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString
|
||||||
|
ExternalResolverPlaylistUpdaterFactory::type() const
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PlaylistUpdaterInterface*
|
||||||
|
ExternalResolverPlaylistUpdaterFactory::create( const playlist_ptr& playlist, const QVariantHash& settings )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
ExternalResolverPlaylistUpdaterFactory::resolverAdded( Resolver* resolver )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} // namespace Tomahawk
|
@@ -0,0 +1,45 @@
|
|||||||
|
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||||
|
*
|
||||||
|
* Copyright 2014, Uwe L. Korn <uwelk@xhochy.com>
|
||||||
|
*
|
||||||
|
* Tomahawk is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Tomahawk is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef TOMAHAWK_EXTERNALRESOLVERPLAYLISTUPDATERFACTORY_H
|
||||||
|
#define TOMAHAWK_EXTERNALRESOLVERPLAYLISTUPDATERFACTORY_H
|
||||||
|
|
||||||
|
#include "playlist/PlaylistUpdaterInterface.h"
|
||||||
|
|
||||||
|
#include "DllMacro.h"
|
||||||
|
|
||||||
|
namespace Tomahawk {
|
||||||
|
|
||||||
|
class DLLEXPORT ExternalResolverPlaylistUpdaterFactory : public PlaylistUpdaterFactory
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
ExternalResolverPlaylistUpdaterFactory();
|
||||||
|
virtual ~ExternalResolverPlaylistUpdaterFactory();
|
||||||
|
|
||||||
|
QString type() const Q_DECL_OVERRIDE;
|
||||||
|
PlaylistUpdaterInterface* create( const playlist_ptr&, const QVariantHash& settings ) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void resolverAdded( Tomahawk::Resolver* resolver );
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace Tomahawk
|
||||||
|
|
||||||
|
#endif // TOMAHAWK_EXTERNALRESOLVERPLAYLISTUPDATERFACTORY_H
|
Reference in New Issue
Block a user