]> git.sur5r.net Git - minitube/blob - src/searchparams.h
3717825af68ef4233bd368485c93d74e18819e94
[minitube] / src / searchparams.h
1 #ifndef SEARCHPARAMS_H
2 #define SEARCHPARAMS_H
3
4 #include <QObject>
5
6
7
8 class SearchParams : public QObject {
9
10 public:
11     SearchParams();
12
13     const QString keywords() const { return m_keywords; }
14     void setKeywords( QString keywords ) { m_keywords = keywords; }
15
16     const QString author() const { return m_author; }
17     void setAuthor( QString author ) { m_author = author; }
18
19     int sortBy() const { return m_sortBy; }
20     void setSortBy( int sortBy ) { m_sortBy = sortBy; }
21
22     int isTransient() const { return m_transient; }
23     void setTransient( int transient ) { m_transient = transient; }
24
25     enum SortBy {
26         SortByRelevance = 1,
27         SortByNewest,
28         SortByViewCount
29     };
30
31 private:
32     QString m_keywords;
33     QString m_author;
34     int m_sortBy;
35     bool m_transient;
36
37 };
38
39 #endif // SEARCHPARAMS_H