X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fsearchparams.cpp;h=be08e72241a6b6e2a2b46afa7d03b4b73cb13c44;hb=7cdd5bd476021ec84d54c4ec5be02280e1e9e548;hp=800e248244ab55992184b8fc66ef69bb96f572e3;hpb=57c25e20a8f10a98a18dbc2b64ce55cf87d4fd7c;p=minitube diff --git a/src/searchparams.cpp b/src/searchparams.cpp index 800e248..be08e72 100644 --- a/src/searchparams.cpp +++ b/src/searchparams.cpp @@ -1,6 +1,34 @@ +/* $BEGIN_LICENSE + +This file is part of Minitube. +Copyright 2009, Flavio Tordini + +Minitube is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Minitube is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Minitube. If not, see . + +$END_LICENSE */ + #include "searchparams.h" -SearchParams::SearchParams() { - m_sortBy = SortByRelevance; +SearchParams::SearchParams(QObject *parent) : QObject(parent) { m_transient = false; + m_sortBy = SortByRelevance; + m_duration = DurationAny; + m_quality = QualityAny; + m_time = TimeAny; +} + +void SearchParams::setParam(QString name, QVariant value) { + bool success = setProperty(name.toUtf8(), value); + if (!success) qWarning() << "Failed to set property" << name << value.toString(); }