1
/* smplayer, GUI front-end for mplayer.
2
Copyright (C) 2006-2009 Ricardo Villalba <rvm@escomposlinux.org>
4
This program is free software; you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation; either version 2 of the License, or
7
(at your option) any later version.
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
14
You should have received a copy of the GNU General Public License
15
along with this program; if not, write to the Free Software
16
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22
Filters::Filters(QObject * parent) : QObject(parent)
27
void Filters::init() {
31
list["noise"] = Filter(tr("add noise"), "noise", "9ah:5ah");
32
list["deblock"] = Filter(tr("deblock"), "pp", "vb/hb");
33
list["denoise_normal"] = Filter(tr("normal denoise"), "hqdn3d");
34
list["denoise_soft"] = Filter(tr("soft denoise"), "hqdn3d", "2:1:2");
37
list["volnorm"] = Filter(tr("volume normalization"), "volnorm", "1");
40
Filter Filters::item(const QString & key) {
44
void Filters::save(QSettings *set) {
45
set->beginGroup("filter_options");
47
QMap<QString, Filter>::iterator i;
48
for (i = list.begin(); i != list.end(); ++i) {
49
set->setValue(i.key(), i.value().options());
55
void Filters::load(QSettings *set) {
56
set->beginGroup("filter_options");
58
QMap<QString, Filter>::iterator i;
59
for (i = list.begin(); i != list.end(); ++i) {
60
i.value().setOptions( set->value(i.key(), i.value().options()).toString() );
66
#include "moc_filters.cpp"