nodefilter.h

00001 /*
00002  * Silence
00003  *
00004  * Copyright (C) 2009 Manuel Unglaub
00005  *
00006  * This file is part of Silence.
00007  *
00008  * Silence is free software: you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation, version GPLv2 only of the License.
00011  *
00012  * Silence is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016 
00017  * You should have received a copy of the GNU General Public License
00018  * along with Silence.  If not, see <http://www.gnu.org/licenses/>.
00019  */
00020 
00021 #ifndef NODEFILTER_H
00022 #define NODEFILTER_H
00023 
00024 #include <QString>
00025 #include <QStringList>
00026 #include <QDate>
00027 #include "src/data/node/node.h"
00028 
00029 
00030 class NodeFilter
00031 {
00032     public:
00033         NodeFilter(Node* root);
00034         ~NodeFilter();
00035         
00036         void setFilterString(QString filterstring);
00037         void enableFulltext(bool enabled);
00038         void setCreationDateFilter(QDate from, QDate to);
00039         void setModificationDateFilter(QDate from, QDate to);
00040         void setLabelFilter(QStringList labels);
00041         void setNoLabelFilter(QStringList nolabels);
00042         void setMimeTypFilter(QString mimetype);
00043 
00044         void printNodes();
00045     private:
00046         QList<Node*> nodes;
00047         bool    fulltext,
00048                 filterCreationDate,
00049                 filterModificationDate,
00050                 filterLabels,
00051                 filterNolabels,
00052                 filterMimetype;
00053 
00054         QString filterstring,
00055                 mimetype;
00056         QDate   creationDateFrom,
00057                 creationDateTo,
00058                 modificationDateFrom,
00059                 modificationDateTo;
00060         QStringList labels,
00061                     nolabels;
00062 
00063         void filterNodes();
00064 };
00065 
00066 #endif // NODEFILTER_H
00067 
00068 
00069 
Generated on Fri May 14 19:12:50 2010 for Silence by  doxygen 1.6.3