Sayonara Player
Filter.h
1 /* Filter.h
2 
3  * Copyright (C) 2011-2017 Lucio Carreras
4  *
5  * This file is part of sayonara-player
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  * created by Lucio Carreras,
21  * Jul 9, 2012
22  *
23  */
24 
25 #ifndef FILTER_H_
26 #define FILTER_H_
27 
28 
29 #include "Helper/Pimpl.h"
30 
31 class QString;
32 namespace Library
33 {
34  class DateFilter;
35 }
36 
37 namespace Library
38 {
43  class Filter
44  {
45  public:
46 
47  enum Mode
48  {
49  Fulltext=0,
50  Filename,
51  Genre,
52  Date
53  };
54 
55 
56  Filter();
57  ~Filter();
58  void operator=(const Filter& other);
59  Filter(const Filter& other);
60 
61  Library::DateFilter date_filter() const;
62  void set_date_filter(const Library::DateFilter& filter);
63 
64  QString filtertext() const;
65  void set_filtertext(const QString& str);
66 
67  Library::Filter::Mode mode() const;
68  void set_mode(Library::Filter::Mode mode);
69 
70  void clear();
71  bool cleared() const;
72 
73  private:
74  PIMPL(Filter)
75  };
76 }
77 
78 #endif /* FILTER_H_ */
The Filter class.
Definition: Filter.h:43
Definition: Genre.h:29
Definition: DatabaseAlbums.h:29
The DateFilter class.
Definition: DateFilter.h:38