3 This file is part of Minitube.
4 Copyright 2009, Flavio Tordini <flavio.tordini@gmail.com>
6 Minitube is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 Minitube is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with Minitube. If not, see <http://www.gnu.org/licenses/>.
21 #ifndef SEARCHPARAMS_H
22 #define SEARCHPARAMS_H
26 class SearchParams : public QObject {
29 Q_PROPERTY(int sortBy READ sortBy WRITE setSortBy)
30 Q_PROPERTY(int duration READ duration WRITE setDuration)
31 Q_PROPERTY(int quality READ quality WRITE setQuality)
32 Q_PROPERTY(int time READ time WRITE setTime)
62 SearchParams(QObject *parent = 0);
64 const QString keywords() const { return m_keywords; }
65 void setKeywords( QString keywords ) { m_keywords = keywords; }
67 const QString author() const { return m_author; }
68 void setAuthor( QString author ) { m_author = author; }
70 int sortBy() const { return m_sortBy; }
71 void setSortBy( int sortBy ) { m_sortBy = sortBy; }
73 int isTransient() const { return m_transient; }
74 void setTransient( int transient ) { m_transient = transient; }
76 int duration() const { return m_duration; }
77 void setDuration( int duration ) { m_duration = duration; }
79 int quality() const { return m_quality; }
80 void setQuality( int quality ) { m_quality = quality; }
82 int time() const { return m_time; }
83 void setTime( int time ) { m_time = time; }
85 bool operator==(const SearchParams &other) const {
86 return m_keywords == other.keywords() &&
87 m_author == other.author();
91 void setParam(QString name, QVariant value);
104 #endif // SEARCHPARAMS_H