KDE 4.5 PyKDE API Reference
  • KDE's Python API
  • Overview
  • PyKDE Home
  • Sitemap
  • Contact Us
 

Dialog Class Reference

from PyKDE4.kdeui import *

Inherits: KDialog → QDialog → QWidget → QObject
Namespace: Sonnet

Detailed Description

Spellcheck dialog

 Sonnet.Dialog dlg = new Sonnet.Dialog(
       new Sonnet.BackgroundChecker(this), this);
 //connect signals
 ...
 dlg->setBuffer( someText );
 dlg->show();

You can change buffer inside a slot connected to done() signal and spellcheck will continue with new data automatically.


Signals

 autoCorrect (QString currentWord, QString replaceWord)
 cancel ()
 done (QString newBuffer)
 languageChanged (QString language)
 misspelling (QString word, int start)
 replace (QString oldWord, int start, QString newWord)
 spellCheckStatus (QString a0)
 stop ()

Methods

 __init__ (self, Sonnet.BackgroundChecker checker, QWidget parent)
 __init__ (self, Sonnet.Dialog a0)
 activeAutoCorrect (self, bool _active)
QString buffer (self)
QString originalBuffer (self)
 setBuffer (self, QString a0)
 setSpellCheckContinuedAfterReplacement (self, bool b)
 show (self)
 showProgressDialog (self, int timeout=500)
 showSpellCheckCompletionMessage (self, bool b=1)

Signal Documentation

autoCorrect ( QString  currentWord,
QString  replaceWord
)
Signal syntax:
QObject.connect(source, SIGNAL("autoCorrect(const QString&, const QString&)"), target_slot)
cancel (   )
Signal syntax:
QObject.connect(source, SIGNAL("cancel()"), target_slot)
done ( QString  newBuffer
)

The dialog won't be closed if you setBuffer() in slot connected to this signal

Also emitted after stop() signal

Signal syntax:
QObject.connect(source, SIGNAL("done(const QString&)"), target_slot)
languageChanged ( QString  language
)

Emitted when the user changes the language used for spellchecking, which is shown in a combobox of this dialog.

Parameters:
dictionary  the new language the user selected

Since:
4.1

Signal syntax:
QObject.connect(source, SIGNAL("languageChanged(const QString&)"), target_slot)
misspelling ( QString  word,
int  start
)
Signal syntax:
QObject.connect(source, SIGNAL("misspelling(const QString&, int)"), target_slot)
replace ( QString  oldWord,
int  start,
QString  newWord
)
Signal syntax:
QObject.connect(source, SIGNAL("replace(const QString&, int, const QString&)"), target_slot)
spellCheckStatus ( QString  a0
)

Signal sends when spell checking is finished/stopped/completed

Since:
4.1

Signal syntax:
QObject.connect(source, SIGNAL("spellCheckStatus(const QString&)"), target_slot)
stop (   )
Signal syntax:
QObject.connect(source, SIGNAL("stop()"), target_slot)

Method Documentation

__init__ (  self,
Sonnet.BackgroundChecker  checker,
QWidget  parent
)
__init__ (  self,
Sonnet.Dialog  a0
)
activeAutoCorrect (  self,
bool  _active
)
QString buffer (   self )
QString originalBuffer (   self )
setBuffer (  self,
QString  a0
)
setSpellCheckContinuedAfterReplacement (  self,
bool  b
)

Controls whether the spell checking is continued after the replacement of a misspelled word has been performed. By default it is continued.

Since:
4.4

show (   self )
showProgressDialog (  self,
int  timeout=500
)

Controls whether an (indefinite) progress dialog is shown when the spell checking takes longer than the given time to complete. By default no progress dialog is shown. If the progress dialog is set to be shown, no time consuming operation (for example, showing a notification message) should be performed in a slot connected to the 'done' signal as this might trigger the progress dialog unnecessarily.

Parameters:
timeout  time after which the progress dialog should appear; a negative value can be used to hide it

Since:
4.4

showSpellCheckCompletionMessage (  self,
bool  b=1
)

Controls whether a message box indicating the completion of the spell checking is shown or not. By default it is not shown.

Since:
4.4

  • Full Index

Modules

  • akonadi
  • dnssd
  • kdecore
  • kdeui
  • khtml
  • kio
  • knewstuff
  • kparts
  • kutils
  • nepomuk
  • phonon
  • plasma
  • polkitqt
  • solid
  • soprano
This documentation is maintained by Simon Edwards.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal