diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-06-04 06:58:53 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-06-04 06:58:53 +0000 |
| commit | 2a34d37f69c21224a1f0795aa802b75300aa96da (patch) | |
| tree | 5b8ae885b48c3a2a0f876079f2dfb95258949786 /pokemodr/PokeModrPreferences.cpp | |
| parent | 9180817f1d52ffe67ea30ec07ebc87d8a274319c (diff) | |
[FIX] URLs now accepted on the command line
[FIX] Now remembers splitter position
[FIX] Remembers opened files (via options)
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@192 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemodr/PokeModrPreferences.cpp')
| -rw-r--r-- | pokemodr/PokeModrPreferences.cpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/pokemodr/PokeModrPreferences.cpp b/pokemodr/PokeModrPreferences.cpp new file mode 100644 index 00000000..ca720077 --- /dev/null +++ b/pokemodr/PokeModrPreferences.cpp @@ -0,0 +1,41 @@ +/* + * Copyright 2008 Ben Boeckel <MathStuf@gmail.com> + * + * This program 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. + * + * This program 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 this program. If not, see <http://www.gnu.org/licenses/>. + */ + +// Header include +#include "PokeModrPreferences.h" + +// Qt includes +#include <QCheckBox> + +// KDE includes +#include <KConfigGroup> + +PokeModrPreferences::PokeModrPreferences(QWidget* parent, KConfigGroup& config) : + KDialog(parent), + m_config(config) +{ + setCaption(QString::fromUtf8("PokéModr Preferences")); + setButtons(KDialog::Ok | KDialog::Cancel); + varReloadOnOpen = new QCheckBox("Reload files on open"); + varReloadOnOpen->setChecked(m_config.readEntry("reloadOnStart", false) ? Qt::Checked : Qt::Unchecked); + setMainWidget(varReloadOnOpen); +} + +void PokeModrPreferences::save() +{ + m_config.writeEntry("reloadOnStart", varReloadOnOpen->isChecked()); +} |
