2 Gwenview: an image viewer
3 Copyright 2007 Aurélien Gâteau <aurelien.gateau@free.fr>
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #ifndef SORTEDDIRMODEL_H
21 #define SORTEDDIRMODEL_H
24 #include <kdirsortfilterproxymodel.h>
27 #include <lib/gwenviewlib_export.h>
36 class AbstractSemanticInfoBackEnd
;
37 class SortedDirModelPrivate
;
42 * This model makes it possible to show all images in a folder.
43 * It can filter images based on name and metadata.
45 class GWENVIEWLIB_EXPORT SortedDirModel
: public KDirSortFilterProxyModel
{
48 SortedDirModel(QObject
* parent
);
50 KDirLister
* dirLister();
51 KFileItem
itemForIndex(const QModelIndex
& index
) const;
52 QModelIndex
indexForItem(const KFileItem
& item
) const;
53 QModelIndex
indexForUrl(const KUrl
& url
) const;
56 * A list of file extensions we should skip
58 void setBlackListedExtensions(const QStringList
& list
);
60 virtual void setMimeExcludeFilter(const QStringList
&mimeList
);
62 void setTagSetFilter(const TagSet
& tagSet
);
66 AbstractSemanticInfoBackEnd
* semanticInfoBackEnd() const;
69 void setMinimumRating(int);
72 bool filterAcceptsRow(int row
, const QModelIndex
& parent
) const;
75 friend class SortedDirModelPrivate
;
76 SortedDirModelPrivate
* const d
;
81 #endif /* SORTEDDIRMODEL_H */