koSpelldlg.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
#ifndef __KOSPELLDLG_H__
00021
#define __KOSPELLDLG_H__
00022
00023
#include <kdialogbase.h>
00024
00025
class QStringList;
00026
class QLabel;
00027
class QPushButton;
00028
class KListBox;
00029
class KLineEdit;
00030
class QComboBox;
00031
class QCheckBox;
00032
00033
00034
enum KOS_RESULT {
00035 KOS_CANCEL= 0,
00036 KOS_REPLACE= 1,
00037 KOS_REPLACEALL= 2,
00038 KOS_IGNORE= 3,
00039 KOS_IGNOREALL= 4,
00040 KOS_ADD= 5,
00041 KOS_STOP= 7,
00042 KOS_CHECKAGAIN =8,
00043 KOS_ADDAUTOCORRECT = 9,
00044 KOS_CHECKAGAINWITHNEWLANGUAGE = 10
00045 };
00046
00047
class KOSpellDlg :
public KDialogBase
00048 {
00049 Q_OBJECT
00050
00051
class KOSpellDlgPrivate;
00052 KOSpellDlgPrivate *d;
00053 KLineEdit *editbox;
00054 KListBox *listbox;
00055
QComboBox *language;
00056
QStringList *sugg;
00057
QPushButton *qpbrep, *qpbrepa;
00058
QLabel *wordlabel;
00059
QString word, newword;
00060
QCheckBox *m_previous;
00061
00062
int m_indexLanguage;
00063
public:
00064 KOSpellDlg (
QWidget *parent,
KOSpellConfig *_ksc,
const char *name,
int indexOfLanguage,
00065
bool _modal = FALSE,
bool _autocorrect =
false );
00066
00067
QString replacement ()
const
00068
{
return newword; }
00069
00075
void init (
const QString& _word,
QStringList *_sugg);
00076
00077
void changeSuggList(
QStringList *_lst );
00078
00079
void standby() { emit(ready(
false)); }
00080
00081
int languageIndex()const {
return m_indexLanguage;}
00082
00083
bool previousWord() const;
00084
00085 protected:
00086 virtual
void closeEvent (
QCloseEvent * e );
00087
void done (
int i);
00088
void changeButtonState(
QStringList * _sugg );
00089
00090 signals:
00094
void command (
int);
00095
00096
void ready(
bool);
00097
00098 protected slots:
00099
void ignore();
00100
void add();
00101
void ignoreAll();
00102
void cancel();
00103
void replace();
00104
void replaceAll();
00105
void stop();
00106
void addToAutoCorrect();
00107
00108
void spellCheckAgain();
00109
void textChanged (const
QString &);
00110
void changeLanguage(
int );
00111
void selected (
int i);
00112
void highlighted (
int i);
00113
00114
00115 };
00116
00117 #endif
This file is part of the documentation for lib Library Version 1.3.5.