2
* This file Copyright (C) 2009 Charles Kerr <charles@transmissionbt.com>
4
* This file is licensed by the GPL version 2. Works owned by the
5
* Transmission project are granted a special exemption to clause 2(b)
6
* so that the bulk of its code can remain under the MIT license.
7
* This exemption does not extend to derived works not owned by
8
* the Transmission project.
13
#ifndef QTR_TORRENT_FILTER_H
14
#define QTR_TORRENT_FILTER_H
16
#include <QSortFilterProxyModel>
24
class TorrentFilter: public QSortFilterProxyModel
29
TorrentFilter( Prefs& prefs );
30
virtual ~TorrentFilter( );
33
enum TextMode { FILTER_BY_NAME, FILTER_BY_FILES, FILTER_BY_TRACKER };
34
TextMode getTextMode( ) const { return myTextMode; }
35
int hiddenRowCount( ) const;
38
void setTextMode( int textMode );
39
void setText( QString );
42
void refreshPref( int key );
45
virtual bool filterAcceptsRow( int, const QModelIndex& ) const;
46
virtual bool lessThan( const QModelIndex&, const QModelIndex& ) const;