• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • kdeedu
  • Sitemap
  • Contact Us
 

parley

configurepracticedialog.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002 
00003     copyright     : (C) 2007 Frederik Gladhorn <frederik.gladhorn@kdemail.net>
00004 
00005     -----------------------------------------------------------------------
00006 
00007  ***************************************************************************
00008 
00009  ***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #include "configurepracticedialog.h"
00019 
00020 #include "configurepracticewidget.h"
00021 #include "advancedpracticeoptions.h"
00022 #include "thresholdoptions.h"
00023 #include "blockoptions.h"
00024 
00025 #include <KLocale>
00026 
00027 ConfigurePracticeDialog::ConfigurePracticeDialog(KEduVocDocument *doc, QWidget *parent, const QString &name, KConfigSkeleton *config)
00028     :KConfigDialog(parent, name, config)
00029 {
00030     m_config = config;
00031 
00032     setCaption(i18nc("@title:window", "Configure Practice"));
00033     setButtons(Default|Ok|Apply|Cancel|Help);
00034     setDefaultButton(Ok);
00035 
00036     m_configurePracticeWidget= new ConfigurePracticeWidget(doc, this);
00037     addPage(m_configurePracticeWidget, i18nc("@title:group", "Practice"), "practice-start", i18n("Practice options"), true);
00038 
00039     m_blockOptions = new BlockOptions(this);
00040     addPage(m_blockOptions, i18nc("@title:group vocabulary can be set to be blocked for a certain amount of time", "Blocking"), "cards-block", i18n("Blocking Settings"), true);
00041 
00042     m_thresholdOptions = new ThresholdOptions(doc, this);
00043     addPage(m_thresholdOptions, i18nc("@title:group ignore vocabulary based on some properties like word type", "Thresholds"), "practice-setup", i18n("Threshold Settings"), true);
00044 
00045     m_advancedPracticeOptions = new AdvancedPracticeOptions(this);
00046     addPage(m_advancedPracticeOptions, i18nc("@title:group Configure advanced settings for practicing vocabulary, short title in config dialog.", "Advanced"), "advanced-setup", i18nc("Configure advanced settings for practicing vocabulary.", "Advanced Practice Settings"), true);
00047     setHelp(QString(),"parley");
00048 }
00049 
00050 ConfigurePracticeDialog::~ConfigurePracticeDialog()
00051 {
00052 //     KConfigGroup cg(KGlobal::config(), "DocumentPropertiesDialog");
00053 //     KDialog::saveDialogSize(cg);
00054 }
00055 
00056 
00057 bool ConfigurePracticeDialog::hasChanged()
00058 {
00059     return  m_configurePracticeWidget->hasChanged() ||
00060             m_thresholdOptions->hasChanged() ||
00061             m_blockOptions->hasChanged();
00062 }
00063 
00064 bool ConfigurePracticeDialog::isDefault()
00065 {
00066     return m_configurePracticeWidget->isDefault() &&
00067            m_thresholdOptions->isDefault() &&
00068            m_blockOptions->isDefault();
00069 }
00070 
00071 void ConfigurePracticeDialog::updateSettings()
00072 {
00073     m_configurePracticeWidget->updateSettings();
00074     m_thresholdOptions->updateSettings();
00075     m_blockOptions->updateSettings();
00076 }
00077 
00078 void ConfigurePracticeDialog::updateWidgets()
00079 {
00080     m_configurePracticeWidget->updateWidgets();
00081     m_thresholdOptions->updateWidgets();
00082     m_blockOptions->updateWidgets();
00083 }
00084 
00085 void ConfigurePracticeDialog::updateWidgetsDefault()
00086 {
00087     m_config->useDefaults(true);
00088     updateWidgets();
00089     m_config->useDefaults(false);
00090 }
00091 
00092 #include "configurepracticedialog.moc"

parley

Skip menu "parley"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdeedu

Skip menu "kdeedu"
  •     lib
  • kalzium
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  •   stepcore
Generated for kdeedu by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal