tdespell2
dialog.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef TDESPELL_DIALOG_H
00023 #define TDESPELL_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 TQWidget *parent, const char *name=0 );
00037 ~Dialog();
00038
00039 TQString originalBuffer() const;
00040 TQString buffer() const;
00041
00042 void show();
00043 void activeAutoCorrect( bool _active );
00044
00045 public slots:
00046 void setBuffer( const TQString& );
00047 void setFilter( Filter* filter );
00048
00049 signals:
00050 void done( const TQString& newBuffer );
00051 void misspelling( const TQString& word, int start );
00052 void replace( const TQString& oldWord, int start,
00053 const TQString& newWord );
00054
00055 void stop();
00056 void cancel();
00057 void autoCorrect( const TQString & currentWord, const TQString & replaceWord );
00058 private slots:
00059 void slotMisspelling(const TQString& 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 TQString& );
00072 void slotSelectionChanged( TQListViewItem * );
00073 void slotAutocorrect();
00074
00075 private:
00076 void updateDialog( const TQString& word );
00077 void fillSuggestions( const TQStringList& suggs );
00078 void initConnections();
00079 void initGui();
00080 void continueChecking();
00081
00082 private:
00083 class Private;
00084 Private *d;
00085 };
00086 }
00087
00088 #endif