• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.10.4 API Reference
  • KDE Home
  • Contact Us
 

KDEUI

  • kdeui
  • sonnet
configdialog.cpp
Go to the documentation of this file.
1 
21 #include "configdialog.h"
22 #include "configwidget.h"
23 
24 #include <klocale.h>
25 
26 #include <kvbox.h>
27 
28 using namespace Sonnet;
29 
30 class ConfigDialog::Private
31 {
32 public:
33  Private( ConfigDialog *parent )
34  : q( parent ) {}
35  ConfigWidget *ui;
36  ConfigDialog *q;
37  void slotConfigChanged();
38 };
39 
40 void ConfigDialog::Private::slotConfigChanged()
41 {
42  emit q->languageChanged( ui->language() );
43 }
44 
45 ConfigDialog::ConfigDialog(KConfig *config, QWidget *parent)
46  : KDialog(parent),
47  d(new Private(this))
48 {
49  setObjectName( "SonnetConfigDialog" );
50  setModal( true );
51  setCaption( i18n( "Spell Checking Configuration" ) );
52  setButtons( Help | Ok /*| Apply*/ | Cancel );
53  setDefaultButton( Ok );
54 
55  init(config);
56 }
57 
58 ConfigDialog::~ConfigDialog()
59 {
60  delete d;
61 }
62 
63 void ConfigDialog::init(KConfig *config)
64 {
65  d->ui = new ConfigWidget(config, this);
66  setMainWidget(d->ui);
67  setHelp(QString(),"kcontrol/spellchecking");
68  connect(this, SIGNAL(okClicked()),
69  this, SLOT(slotOk()));
70  /*
71  connect(this, SIGNAL(applyClicked()),
72  this, SLOT(slotApply()));
73  */
74  connect(d->ui, SIGNAL(configChanged()),
75  this, SLOT(slotConfigChanged()));
76 
77  connect(d->ui, SIGNAL(configChanged()),
78  this, SIGNAL(configChanged()));
79 }
80 
81 void ConfigDialog::slotOk()
82 {
83  d->ui->save();
84  accept();
85 }
86 
87 void ConfigDialog::slotApply()
88 {
89  d->ui->save();
90 }
91 
92 void ConfigDialog::setLanguage( const QString &language )
93 {
94  d->ui->setLanguage( language );
95 }
96 
97 QString ConfigDialog::language() const
98 {
99  return d->ui->language();
100 }
101 
102 #include "configdialog.moc"
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Wed Jun 5 2013 18:37:29 by doxygen 1.8.3.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

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

kdelibs-4.10.4 API Reference

Skip menu "kdelibs-4.10.4 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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