Sayonara Player
Filter.h
1 /* Filter.h
2 
3  * Copyright (C) 2011-2019 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 "Utils/Pimpl.h"
30 #include "Utils/Library/SearchMode.h"
31 
32 namespace Library
33 {
34  class DateFilter;
39  class Filter
40  {
41  PIMPL(Filter)
42 
43  public:
44 
45  enum Mode
46  {
47  Fulltext=0,
48  Filename,
49  Genre,
50  Invalid
51  };
52 
53  Filter();
54  ~Filter();
55 
56  Filter(const Filter& other);
57  Filter& operator=(const Filter& other);
58 
59  bool operator==(const Filter& other);
60 
61  QStringList filtertext(bool with_percent) const;
62  QStringList search_mode_filtertext(bool with_percent) const;
63  void set_filtertext(const QString& str, SearchModeMask search_mode);
64 
65  Filter::Mode mode() const;
66  void set_mode(Filter::Mode mode);
67 
68  void clear();
69  bool cleared() const;
70 
71  void set_invalid_genre(bool b);
72  bool is_invalid_genre() const;
73 
74  static QString get_text(Mode mode);
75  };
76 }
77 
78 #endif /* FILTER_H_ */
The Filter class.
Definition: Filter.h:39
Definition: Genre.h:30
An interface class needed when implementing a library plugin.
Definition: CachingThread.h:29