mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-11 16:44:05 +02:00
* Removed filter/setFilter methods from PlaylistInterfaces.
This commit is contained in:
@@ -56,8 +56,6 @@ public:
|
|||||||
virtual void setRepeatMode( PlaylistModes::RepeatMode ) {}
|
virtual void setRepeatMode( PlaylistModes::RepeatMode ) {}
|
||||||
virtual void setShuffled( bool ) {}
|
virtual void setShuffled( bool ) {}
|
||||||
|
|
||||||
virtual void setFilter( const QString& /*pattern*/ ) {}
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void tracksLoaded( Tomahawk::ModelMode mode, const Tomahawk::collection_ptr& collection );
|
void tracksLoaded( Tomahawk::ModelMode mode, const Tomahawk::collection_ptr& collection );
|
||||||
|
|
||||||
|
@@ -55,8 +55,6 @@ public:
|
|||||||
virtual void setRepeatMode( PlaylistModes::RepeatMode ) {}
|
virtual void setRepeatMode( PlaylistModes::RepeatMode ) {}
|
||||||
virtual void setShuffled( bool ) {}
|
virtual void setShuffled( bool ) {}
|
||||||
|
|
||||||
virtual void setFilter( const QString& /*pattern*/ ) {}
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void tracksLoaded( Tomahawk::ModelMode mode, const Tomahawk::collection_ptr& collection );
|
void tracksLoaded( Tomahawk::ModelMode mode, const Tomahawk::collection_ptr& collection );
|
||||||
|
|
||||||
|
@@ -66,9 +66,6 @@ public:
|
|||||||
virtual PlaylistModes::LatchMode latchMode() const { return m_latchMode; }
|
virtual PlaylistModes::LatchMode latchMode() const { return m_latchMode; }
|
||||||
virtual void setLatchMode( PlaylistModes::LatchMode latchMode ) { m_latchMode = latchMode; }
|
virtual void setLatchMode( PlaylistModes::LatchMode latchMode ) { m_latchMode = latchMode; }
|
||||||
|
|
||||||
virtual QString filter() const { return m_filter; }
|
|
||||||
virtual void setFilter( const QString& pattern ) { m_filter = pattern; }
|
|
||||||
|
|
||||||
virtual void reset() {}
|
virtual void reset() {}
|
||||||
|
|
||||||
//TODO: Get rid of the next two functions once all playlsitinterfaces are factored out
|
//TODO: Get rid of the next two functions once all playlsitinterfaces are factored out
|
||||||
|
@@ -55,8 +55,6 @@ public:
|
|||||||
virtual PlaylistModes::RepeatMode repeatMode() const { return PlaylistModes::NoRepeat; }
|
virtual PlaylistModes::RepeatMode repeatMode() const { return PlaylistModes::NoRepeat; }
|
||||||
virtual bool shuffled() const { return false; }
|
virtual bool shuffled() const { return false; }
|
||||||
|
|
||||||
virtual void setFilter( const QString& /*pattern*/ ) {}
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
virtual void setRepeatMode( PlaylistModes::RepeatMode ) {}
|
virtual void setRepeatMode( PlaylistModes::RepeatMode ) {}
|
||||||
virtual void setShuffled( bool ) {}
|
virtual void setShuffled( bool ) {}
|
||||||
|
@@ -59,7 +59,6 @@ public:
|
|||||||
virtual void setLatchMode( PlaylistModes::LatchMode latchMode ) { m_latchMode = latchMode; emit latchModeChanged( latchMode ); }
|
virtual void setLatchMode( PlaylistModes::LatchMode latchMode ) { m_latchMode = latchMode; emit latchModeChanged( latchMode ); }
|
||||||
|
|
||||||
virtual bool shuffled() const { return false; }
|
virtual bool shuffled() const { return false; }
|
||||||
virtual void setFilter( const QString& /*pattern*/ ) {}
|
|
||||||
|
|
||||||
virtual QWeakPointer< Tomahawk::Source > source() const;
|
virtual QWeakPointer< Tomahawk::Source > source() const;
|
||||||
|
|
||||||
|
@@ -66,19 +66,6 @@ PlayableProxyModelPlaylistInterface::filter() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
PlayableProxyModelPlaylistInterface::setFilter( const QString& pattern )
|
|
||||||
{
|
|
||||||
if ( m_proxyModel.isNull() )
|
|
||||||
return;
|
|
||||||
|
|
||||||
m_proxyModel.data()->setFilterRegExp( pattern );
|
|
||||||
m_proxyModel.data()->emitFilterChanged( pattern );
|
|
||||||
|
|
||||||
emit trackCountChanged( trackCount() );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
QList< Tomahawk::query_ptr >
|
QList< Tomahawk::query_ptr >
|
||||||
PlayableProxyModelPlaylistInterface::tracks()
|
PlayableProxyModelPlaylistInterface::tracks()
|
||||||
{
|
{
|
||||||
|
@@ -50,7 +50,6 @@ public:
|
|||||||
virtual bool hasNextItem();
|
virtual bool hasNextItem();
|
||||||
|
|
||||||
virtual QString filter() const;
|
virtual QString filter() const;
|
||||||
virtual void setFilter( const QString& pattern );
|
|
||||||
|
|
||||||
virtual PlaylistModes::RepeatMode repeatMode() const { return m_repeatMode; }
|
virtual PlaylistModes::RepeatMode repeatMode() const { return m_repeatMode; }
|
||||||
virtual bool shuffled() const { return m_shuffled; }
|
virtual bool shuffled() const { return m_shuffled; }
|
||||||
|
@@ -56,15 +56,6 @@ TreeProxyModelPlaylistInterface::filter() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
TreeProxyModelPlaylistInterface::setFilter( const QString& pattern )
|
|
||||||
{
|
|
||||||
if ( m_proxyModel.isNull() )
|
|
||||||
return;
|
|
||||||
m_proxyModel.data()->newFilterFromPlaylistInterface( pattern );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
TreeProxyModelPlaylistInterface::unfilteredTrackCount() const
|
TreeProxyModelPlaylistInterface::unfilteredTrackCount() const
|
||||||
{
|
{
|
||||||
|
@@ -50,12 +50,6 @@ public:
|
|||||||
virtual Tomahawk::result_ptr siblingItem( int direction, bool readOnly );
|
virtual Tomahawk::result_ptr siblingItem( int direction, bool readOnly );
|
||||||
|
|
||||||
virtual QString filter() const;
|
virtual QString filter() const;
|
||||||
virtual void setFilter( const QString& pattern );
|
|
||||||
|
|
||||||
virtual QString vanillaFilter() const { return PlaylistInterface::filter(); }
|
|
||||||
virtual void setVanillaFilter( const QString &filter ) { PlaylistInterface::setFilter( filter ); }
|
|
||||||
|
|
||||||
virtual void sendTrackCount() { emit trackCountChanged( trackCount() ); }
|
|
||||||
|
|
||||||
virtual PlaylistModes::RepeatMode repeatMode() const { return m_repeatMode; }
|
virtual PlaylistModes::RepeatMode repeatMode() const { return m_repeatMode; }
|
||||||
virtual bool shuffled() const { return m_shuffled; }
|
virtual bool shuffled() const { return m_shuffled; }
|
||||||
|
Reference in New Issue
Block a user