You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
115 lines
3.8 KiB
115 lines
3.8 KiB
13 years ago
|
//
|
||
|
// Copyright 2006 Jim Bublitz <jbublitz@nwinternet.com>
|
||
|
// Earlier copyrights 1998 - 2005 Jim Bublitz and/or Phil Thompson
|
||
|
// may also apply
|
||
|
|
||
|
|
||
|
// Generated by preSip
|
||
12 years ago
|
// module tdespell version KDE 3.5.3
|
||
13 years ago
|
|
||
|
|
||
|
// This software is free software; you can redistribute it and/or
|
||
|
// modify it under the terms of the GNU General Public License as
|
||
|
// published by the Free Software Foundation; either version 2 of
|
||
|
// the License, or (at your option) any later version.
|
||
|
//
|
||
|
// This software 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 General Public License for more details.
|
||
|
//
|
||
|
// You should have received a copy of the GNU General Public
|
||
|
// License along with this library; see the file COPYING.
|
||
|
// If not, write to the Free Software Foundation, Inc.,
|
||
|
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||
|
|
||
|
|
||
|
%If ( KDE_3_2_0 - )
|
||
|
|
||
13 years ago
|
class KSyntaxHighlighter : TQSyntaxHighlighter
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
|
#include <ksyntaxhighlighter.h>
|
||
|
%End
|
||
|
|
||
|
|
||
|
public:
|
||
|
|
||
|
enum SyntaxMode
|
||
|
{
|
||
|
PlainTextMode,
|
||
|
RichTextMode
|
||
|
};
|
||
|
|
||
13 years ago
|
KSyntaxHighlighter (TQTextEdit*, bool = 0, const TQColor& = TQt ::black , const TQColor& = TQColor (0x00 ,0x80 ,0x00 ), const TQColor& = TQColor (0x00 ,0x80 ,0x00 ), const TQColor& = TQColor (0x00 ,0x80 ,0x00 ), KSyntaxHighlighter::SyntaxMode = PlainTextMode );
|
||
|
int highlightParagraph (const TQString&, int);
|
||
13 years ago
|
|
||
|
}; // class KSyntaxHighlighter
|
||
|
|
||
|
%End
|
||
|
|
||
|
|
||
|
%If ( KDE_3_2_0 - )
|
||
|
|
||
|
class KSpellingHighlighter : KSyntaxHighlighter
|
||
|
{
|
||
|
%TypeHeaderCode
|
||
|
#include <ksyntaxhighlighter.h>
|
||
|
%End
|
||
|
|
||
|
|
||
|
public:
|
||
13 years ago
|
KSpellingHighlighter (TQTextEdit*, const TQColor& = TQt ::red , bool = 0, const TQColor& = TQt ::black , const TQColor& = TQColor (0x00 ,0x80 ,0x00 ), const TQColor& = TQColor (0x00 ,0x80 ,0x00 ), const TQColor& = TQColor (0x00 ,0x80 ,0x00 ));
|
||
|
virtual int highlightParagraph (const TQString&, int);
|
||
|
virtual bool isMisspelled (const TQString&) = 0;
|
||
13 years ago
|
bool intraWordEditing () const;
|
||
|
void setIntraWordEditing (bool);
|
||
13 years ago
|
static TQStringList personalWords ();
|
||
13 years ago
|
|
||
|
}; // class KSpellingHighlighter
|
||
|
|
||
|
%End
|
||
|
|
||
|
|
||
|
%If ( KDE_3_2_0 - )
|
||
|
|
||
13 years ago
|
class KDictSpellingHighlighter : TQObject, KSpellingHighlighter
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
|
#include <ksyntaxhighlighter.h>
|
||
|
%End
|
||
|
|
||
|
|
||
|
public:
|
||
13 years ago
|
KDictSpellingHighlighter (TQTextEdit*, bool = 1, bool = 1, const TQColor& = TQt ::red , bool = 0, const TQColor& = TQt ::black , const TQColor& = TQColor (0x00 ,0x80 ,0x00 ), const TQColor& = TQColor (0x00 ,0x70 ,0x00 ), const TQColor& = TQColor (0x00 ,0x60 ,0x00 ), KSpellConfig* = 0);
|
||
|
virtual bool isMisspelled (const TQString&);
|
||
13 years ago
|
static void dictionaryChanged ();
|
||
|
void restartBackgroundSpellCheck ();
|
||
|
void setActive (bool);
|
||
|
bool isActive () const;
|
||
|
void setAutomatic (bool);
|
||
|
bool automatic () const;
|
||
|
|
||
|
signals:
|
||
13 years ago
|
void activeChanged (const TQString&);
|
||
|
void newSuggestions (const TQString&, const TQStringList&, uint);
|
||
13 years ago
|
|
||
|
protected:
|
||
13 years ago
|
TQString spellKey ();
|
||
|
bool eventFilter (TQObject*, TQEvent*);
|
||
13 years ago
|
|
||
|
protected slots:
|
||
13 years ago
|
void slotMisspelling (const TQString&, const TQStringList&, uint);
|
||
|
void slotCorrected (const TQString&, const TQString&, uint);
|
||
13 years ago
|
void slotRehighlight ();
|
||
|
void slotDictionaryChanged ();
|
||
|
void slotSpellReady (KSpell*);
|
||
|
void slotAutoDetection ();
|
||
|
void slotLocalSpellConfigChanged ();
|
||
|
void slotKSpellNotResponding ();
|
||
|
|
||
|
}; // class KDictSpellingHighlighter
|
||
|
|
||
|
%End
|
||
|
|