ktextedit.h
/* This file is part of the KDE libraries
Copyright (C) 2002 Carsten Pfeiffer <pfeiffer@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KTEXTEDIT_H
#define KTEXTEDIT_H
#include <qtextedit.h>
#include <kdelibs_export.h>
class KSpell;
class KDEUI_EXPORT KTextEdit : public QTextEdit
{
Q_OBJECT
public:
KTextEdit( const QString& text,
const QString& context = QString::null,
QWidget * parent = 0, const char *name = 0 );
KTextEdit( QWidget *parent = 0L, const char *name = 0 );
~KTextEdit();
virtual void setReadOnly (bool readOnly);
virtual void setPalette( const QPalette& palette );
void setCheckSpellingEnabled( bool check );
bool checkSpellingEnabled() const;
void highLightWord( unsigned int length, unsigned int pos );
public slots:
void checkSpelling();
protected:
virtual void keyPressEvent( QKeyEvent * );
virtual void focusInEvent( QFocusEvent * );
virtual void contentsWheelEvent( QWheelEvent * );
virtual void deleteWordBack();
virtual void deleteWordForward();
virtual QPopupMenu *createPopupMenu( const QPoint &pos );
virtual QPopupMenu *createPopupMenu();
protected:
virtual void virtual_hook( int id, void* data );
private slots:
void slotSpellCheckReady( KSpell *s );
void slotSpellCheckDone( const QString &s );
void spellCheckerMisspelling( const QString &text, const QStringList &, unsigned int pos);
void spellCheckerCorrected( const QString &, const QString &, unsigned int );
void spellCheckerFinished();
void toggleAutoSpellCheck();
void slotAllowTab();
private:
void posToRowCol( unsigned int pos, unsigned int &line, unsigned int &col );
class KTextEditPrivate;
KTextEditPrivate *d;
};
#endif // KTEXTEDIT_H
KSpell
KDE Spellchecker
Definition: kspell.h:46
KTextEdit
A KDE'ified QTextEdit.
Definition: ktextedit.h:43

KDE Home | KDE Accessibility Home | Description of Access Keys