• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDEUI

ktextedit.h

Go to the documentation of this file.
00001 /* This file is part of the KDE libraries
00002     Copyright (C) 2002 Carsten Pfeiffer <pfeiffer@kde.org>
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License as published by the Free Software Foundation; either
00007     version 2 of the License, or (at your option) any later version.
00008 
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Library General Public License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public License
00015     along with this library; see the file COPYING.LIB.  If not, write to
00016     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017     Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef KTEXTEDIT_H
00021 #define KTEXTEDIT_H
00022 
00023 #include <kdeui_export.h>
00024 #include <sonnet/highlighter.h>
00025 #include <QtGui/QTextEdit>
00026 
00044 class KDEUI_EXPORT KTextEdit : public QTextEdit
00045 {
00046     Q_OBJECT
00047 
00048   public:
00053     explicit KTextEdit( const QString& text, QWidget *parent = 0 );
00054 
00059     explicit KTextEdit( QWidget *parent = 0 );
00060 
00064     ~KTextEdit();
00065 
00069     virtual void setReadOnly( bool readOnly );
00070 
00082     void setCheckSpellingEnabled( bool check );
00083 
00092     bool checkSpellingEnabled() const;
00093 
00102     void highlightWord( int length, int pos );
00103 
00117     void setSpellCheckingConfigFileName(const QString &fileName);
00118 
00123     void setSpellCheckingLanguage(const QString &language);
00124 
00139     virtual void createHighlighter();
00140 
00149     Sonnet::Highlighter* highlighter() const;
00150 
00164     void setHighlighter(Sonnet::Highlighter *_highLighter);
00165 
00170     QMenu *mousePopupMenu();
00171 
00176     void enableFindReplace( bool enabled);
00177 
00178 
00179   Q_SIGNALS:
00185      void checkSpellingChanged( bool );
00186 
00191      void spellCheckStatus(const QString &);
00192 
00200      void languageChanged(const QString &language);
00201 
00202   public Q_SLOTS:
00207     void checkSpelling();
00208 
00213     void replace();
00214 
00215   protected Q_SLOTS:
00219     void slotDoReplace();
00220     void slotReplaceNext();
00221     void slotDoFind();
00222     void slotFind();
00223     void slotFindNext();
00224     void slotReplace();
00225 
00226 
00227   protected:
00231     virtual bool event(QEvent*);
00232 
00236     virtual void keyPressEvent( QKeyEvent* );
00237 
00242     virtual void focusInEvent( QFocusEvent* );
00243 
00248     virtual void wheelEvent( QWheelEvent* );
00249 
00254     virtual void deleteWordBack();
00255 
00260     virtual void deleteWordForward();
00261 
00266     virtual void contextMenuEvent( QContextMenuEvent* );
00267 
00268   private:
00269     class Private;
00270     Private *const d;
00271 
00272     Q_PRIVATE_SLOT( d, void slotSpellCheckDone( const QString& ) )
00273 
00274     Q_PRIVATE_SLOT( d, void spellCheckerMisspelling( const QString&, int ) )
00275     Q_PRIVATE_SLOT( d, void spellCheckerCorrected(const QString&, int,const QString&) )
00276     Q_PRIVATE_SLOT( d, void spellCheckerCanceled())
00277     Q_PRIVATE_SLOT( d, void spellCheckerAutoCorrect(const QString&,const QString&) )
00278     Q_PRIVATE_SLOT( d, void spellCheckerFinished() )
00279     Q_PRIVATE_SLOT( d, void toggleAutoSpellCheck() )
00280     Q_PRIVATE_SLOT( d, void slotAllowTab() )
00281     Q_PRIVATE_SLOT( d, void menuActivated( QAction* ) )
00282     Q_PRIVATE_SLOT( d, void slotFindHighlight(const QString&, int, int))
00283     Q_PRIVATE_SLOT( d, void slotReplaceText(const QString &, int, int, int))
00284 };
00285 
00286 #endif // KTEXTEDIT_H

KDEUI

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
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