~ubuntu-branches/debian/sid/kdesvn/sid

« back to all changes in this revision

Viewing changes to src/svnfrontend/models/svnsortfilter.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2009-04-18 21:41:53 UTC
  • mfrom: (1.3.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090418214153-bdc4nd10fs47i8jp
Tags: 1.3.0-1
* New upstream release.
* debian/control
  - Bump Standards-Version to 3.8.1. No further changes.
  - Change Section of kdesvn-dbg to debug.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *   Free Software Foundation, Inc.,                                       *
18
18
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
19
19
 ***************************************************************************/
 
20
#ifndef SVNSORTFILTER_H
 
21
#define SVNSORTFILTER_H
 
22
 
20
23
#include <QSortFilterProxyModel>
21
24
 
22
 
#ifndef _SVNSORTFILTER_H
23
 
#define _SVNSORTFILTER_H
24
 
 
25
 
class SvnItemModel;
 
25
#include "svnitemmodelfwd.h"
26
26
 
27
27
class SvnSortFilterProxy:public QSortFilterProxyModel
28
28
{
35
35
    virtual void setSourceSvnModel(SvnItemModel* sourceModel);
36
36
    virtual void sort(int column,Qt::SortOrder order = Qt::AscendingOrder);
37
37
 
 
38
    enum ShowType {
 
39
        None = 0x0,
 
40
        Dir  = 1,
 
41
        File = 2,
 
42
        All = Dir|File
 
43
    };
 
44
 
 
45
    Q_DECLARE_FLAGS(TypeFlag, ShowType)
 
46
 
 
47
    void setShowFilter(svnmodel::ItemTypeFlag);
 
48
    svnmodel::ItemTypeFlag showFilter()const
 
49
    {
 
50
        return m_ShowFilter;
 
51
    }
 
52
 
38
53
protected:
39
54
    virtual bool lessThan(const QModelIndex & left,const QModelIndex & right)const;
40
55
    virtual bool filterAcceptsRow(int source_row, const QModelIndex & source_parent )const;
41
56
 
42
 
private:
43
57
    SvnItemModel*m_sourceModel;
44
58
    Qt::SortOrder m_order;
 
59
    svnmodel::ItemTypeFlag m_ShowFilter;
45
60
};
46
61
 
47
62
#endif