dialog.h00001
00022 #ifndef KSPELL_DIALOG_H
00023 #define KSPELL_DIALOG_H
00024
00025 #include <kdialogbase.h>
00026
00027 namespace KSpell2
00028 {
00029 class Filter;
00030 class BackgroundChecker;
00031 class KDE_EXPORT Dialog : public KDialogBase
00032 {
00033 Q_OBJECT
00034 public:
00035 Dialog( BackgroundChecker *checker,
00036 QWidget *parent, const char *name=0 );
00037 ~Dialog();
00038
00039 QString originalBuffer() const;
00040 QString buffer() const;
00041
00042 void show();
00043 void activeAutoCorrect( bool _active );
00044
00045 public slots:
00046 void setBuffer( const QString& );
00047 void setFilter( Filter* filter );
00048
00049 signals:
00050 void done( const QString& newBuffer );
00051 void misspelling( const QString& word, int start );
00052 void replace( const QString& oldWord, int start,
00053 const QString& newWord );
00054
00055 void stop();
00056 void cancel();
00057 void autoCorrect( const QString & currentWord, const QString & replaceWord );
00058 private slots:
00059 void slotMisspelling(const QString& word, int start );
00060 void slotDone();
00061
00062 void slotFinished();
00063 void slotCancel();
00064
00065 void slotAddWord();
00066 void slotReplaceWord();
00067 void slotReplaceAll();
00068 void slotSkip();
00069 void slotSkipAll();
00070 void slotSuggest();
00071 void slotChangeLanguage( const QString& );
00072 void slotSelectionChanged( QListViewItem * );
00073 void slotAutocorrect();
00074
00075 private:
00076 void updateDialog( const QString& word );
00077 void fillSuggestions( const QStringList& suggs );
00078 void initConnections();
00079 void initGui();
00080 void continueChecking();
00081
00082 private:
00083 class Private;
00084 Private *d;
00085 };
00086 }
00087
00088 #endif
|