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

parley

  • sources
  • kde-4.14
  • kdeedu
  • parley
  • src
  • settings
parleyprefs.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  parleyprefs.cpp - Parley configuration dialog
3 
4  -------------------
5  begin : Fri Mar 25 2005
6 
7  copyright : (C) 2005, 2007 Peter Hedlund <peter.hedlund@kdemail.net>
8  (C) 2007 Frederik Gladhorn <frederik.gladhorn@kdemail.net>
9 
10  ***************************************************************************/
11 
12 /***************************************************************************
13  * *
14  * This program is free software; you can redistribute it and/or modify *
15  * it under the terms of the GNU General Public License as published by *
16  * the Free Software Foundation; either version 2 of the License, or *
17  * (at your option) any later version. *
18  * *
19  ***************************************************************************/
20 
21 #include "parleyprefs.h"
22 
23 #include "kgametheme/kgamethemeselector.h"
24 #include "generaloptions.h"
25 #include "viewoptions.h"
26 #include <KConfigSkeleton>
27 
28 ParleyPrefs::ParleyPrefs(KEduVocDocument *doc, QWidget *parent, const QString &name, KConfigSkeleton *config)
29  : KConfigDialog(parent, name, config)
30 {
31  setButtons(Default | Ok | Apply | Cancel | Help);
32  setDefaultButton(Ok);
33  setModal(true);
34 
35  m_doc = doc;
36  m_config = config;
37 
38  addPage(new KGameThemeSelector(this, config), i18n("Theme"), "games-config-theme");
39 
40  m_generalOptions = new GeneralOptions(0);
41  addPage(m_generalOptions, i18nc("title:window general settings", "General"), "parley", i18n("General Settings"), true);
42 
43  m_viewOptions = new ViewOptions(0);
44  addPage(m_viewOptions, i18n("View"), "view-choose", i18n("View Settings"), true);
45  setHelp(QString(), "parley");
46 }
47 
48 bool ParleyPrefs::hasChanged()
49 {
50  return m_generalOptions->hasChanged();
51 }
52 
53 bool ParleyPrefs::isDefault()
54 {
55  return m_generalOptions->isDefault();
56 }
57 
58 void ParleyPrefs::updateSettings()
59 {
60  m_generalOptions->updateSettings();
61  emit settingsChanged("");
62 }
63 
64 void ParleyPrefs::updateWidgetsDefault()
65 {
66  m_config->useDefaults(true);
67  m_generalOptions->updateWidgets();
68  m_config->useDefaults(false);
69 }
70 
71 void ParleyPrefs::updateWidgets()
72 {
73  m_generalOptions->updateWidgets();
74 }
75 
76 #include "parleyprefs.moc"
ParleyPrefs::hasChanged
bool hasChanged()
Returns true if the current state of the dialog is different from the saved settings.
Definition: parleyprefs.cpp:48
QWidget
ParleyPrefs::ParleyPrefs
ParleyPrefs(KEduVocDocument *doc, QWidget *parent, const QString &name, KConfigSkeleton *config)
Creates a configuration dialog.
Definition: parleyprefs.cpp:28
GeneralOptions::updateWidgets
void updateWidgets()
Definition: generaloptions.cpp:70
GeneralOptions::updateSettings
void updateSettings()
Definition: generaloptions.cpp:99
ViewOptions
Definition: viewoptions.h:29
kgamethemeselector.h
KConfigSkeleton
ParleyPrefs::updateSettings
void updateSettings()
Called when the user clicks Apply or OK.
Definition: parleyprefs.cpp:58
parleyprefs.h
KConfigDialog
GeneralOptions::hasChanged
bool hasChanged()
Definition: generaloptions.cpp:82
generaloptions.h
QString
GeneralOptions::isDefault
bool isDefault()
Definition: generaloptions.cpp:91
viewoptions.h
ParleyPrefs::updateWidgetsDefault
void updateWidgetsDefault()
Called when the user clicks Default.
Definition: parleyprefs.cpp:64
ParleyPrefs::updateWidgets
void updateWidgets()
Updates dialog widgets.
Definition: parleyprefs.cpp:71
ParleyPrefs::isDefault
bool isDefault()
Returns true if the current state of the dialog represents the default settings.
Definition: parleyprefs.cpp:53
KGameThemeSelector
A widget used to select the game's theme.
Definition: kgamethemeselector.h:48
GeneralOptions
Definition: generaloptions.h:29
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:15:56 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

parley

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

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal