File indexing completed on 2024-05-05 04:59:18

0001 /*
0002     This file is part of the KDE project
0003     Copyright (C) 2011 Ernesto Rodriguez Ortiz <eortiz@uci.cu>
0004 
0005     This program is free software: you can redistribute it and/or modify
0006     it under the terms of the GNU General Public License as published by
0007     the Free Software Foundation, either version 3 of the License, or
0008     (at your option) any later version.
0009 
0010     This program is distributed in the hope that it will be useful,
0011     but WITHOUT ANY WARRANTY; without even the implied warranty of
0012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0013     GNU General Public License for more details.
0014 
0015     You should have received a copy of the GNU General Public License
0016     along with this program.  If not, see <http://www.gnu.org/licenses/>.
0017 
0018 */
0019 
0020 #include "dlgmms.h"
0021 #include "kget_macro.h"
0022 #include "mmssettings.h"
0023 
0024 KGET_EXPORT_PLUGIN_CONFIG(DlgMmsSettings)
0025 
0026 DlgMmsSettings::DlgMmsSettings(QObject *parent, const KPluginMetaData &data)
0027     : KCModule(parent, data)
0028 {
0029     ui.setupUi(widget());
0030     connect(ui.numThreadSpinBox, SIGNAL(valueChanged(int)), SLOT(changed()));
0031 }
0032 
0033 void DlgMmsSettings::load()
0034 {
0035     ui.numThreadSpinBox->setValue(MmsSettings::threads());
0036 }
0037 
0038 void DlgMmsSettings::save()
0039 {
0040     qDebug() << "Saving Multithreaded config";
0041     MmsSettings::setThreads(ui.numThreadSpinBox->value());
0042     MmsSettings::self()->save();
0043 }
0044 
0045 #include "dlgmms.moc"
0046 #include "moc_dlgmms.cpp"