moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / kiten / optiondialog.cpp
blob9f2d9d7ee72fc44328413307b3d35e868ae759d1
1 /**
2 This file is part of Kiten, a KDE Japanese Reference Tool...
3 Copyright (C) 2001 Jason Katz-Brown <jason@katzbrown.com>
4 (C) 2005 Paul Temple <paul.temple@gmx.net>
6 This program 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 2 of the License, or
9 (at your option) any later version.
11 This program 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 this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19 USA
20 **/
22 #include <kdebug.h>
23 #include <kapplication.h>
24 #include <qvgroupbox.h>
25 #include <kfontdialog.h>
26 #include <qtextcodec.h>
27 #include <klocale.h>
28 #include <qcombobox.h>
29 #include <kfiledialog.h>
30 #include <kstandarddirs.h>
31 #include <kurllabel.h>
32 #include <krun.h>
34 #include <qlayout.h>
35 #include <qcheckbox.h>
36 #include <qpushbutton.h>
38 #include "optiondialog.h"
39 #include "configfont.h"
40 #include "configlearn.h"
41 #include "configsearching.h"
43 ConfigureDialog::ConfigureDialog(QWidget *parent, const char *name) : KConfigDialog(parent, name, Config::self())
45 configDic = new ConfigDictionaries(0, "dictionaries_page");
46 connect(configDic, SIGNAL(widgetChanged()), this, SLOT(updateButtons()));
47 addPage(configDic, i18n("Dictionaries"), "contents");
48 addPage(new ConfigSearching(0, "searching_page"), i18n("Searching"), "find");
49 addPage(new ConfigLearn(0, "learn_page"), i18n("Learn"), "pencil");
50 ConfigFont* configFont = new ConfigFont(0, "font_page");
51 configFont->kcfg_font->setSampleText(i18n("Result View Font")+QString::fromUtf8(" - いろはにほへと 漢字"));
52 addPage(configFont, i18n("Font"), "fonts");
55 ConfigureDialog::~ConfigureDialog()
60 void ConfigureDialog::updateWidgets()
62 configDic->updateWidgets();
65 void ConfigureDialog::updateWidgetsDefault()
67 configDic->updateWidgetsDefault();
70 void ConfigureDialog::updateSettings()
72 bool changed = hasChanged();
73 configDic->updateSettings();
74 if (changed) KConfigDialog::settingsChangedSlot();
77 //////////////////////////////////////////////////////////////////////
79 bool ConfigureDialog::hasChanged()
81 return configDic->hasChanged();
84 bool ConfigureDialog::isDefault()
86 return configDic->isDefault();
90 #include "optiondialog.moc"