KDEUI
dialog.h
Go to the documentation of this file.00001
00022 #ifndef SONNET_DIALOG_H
00023 #define SONNET_DIALOG_H
00024
00025 #include <kdialog.h>
00026
00027 class QListWidgetItem;
00028
00029 namespace Sonnet
00030 {
00031 class BackgroundChecker;
00032
00048 class KDEUI_EXPORT Dialog : public KDialog
00049 {
00050 Q_OBJECT
00051 public:
00052 Dialog(BackgroundChecker *checker,
00053 QWidget *parent);
00054 ~Dialog();
00055
00056 QString originalBuffer() const;
00057 QString buffer() const;
00058
00059 void show();
00060 void activeAutoCorrect(bool _active);
00061
00062 public Q_SLOTS:
00063 void setBuffer(const QString &);
00064
00065 Q_SIGNALS:
00071 void done( const QString& newBuffer );
00072 void misspelling( const QString& word, int start );
00073 void replace( const QString& oldWord, int start,
00074 const QString& newWord );
00075
00076 void stop();
00077 void cancel();
00078 void autoCorrect( const QString & currentWord, const QString & replaceWord );
00079 private Q_SLOTS:
00080 void slotMisspelling(const QString& word, int start );
00081 void slotDone();
00082
00083 void slotFinished();
00084 void slotCancel();
00085
00086 void slotAddWord();
00087 void slotReplaceWord();
00088 void slotReplaceAll();
00089 void slotSkip();
00090 void slotSkipAll();
00091 void slotSuggest();
00092 void slotChangeLanguage( const QString& );
00093 void slotSelectionChanged( QListWidgetItem * );
00094 void slotAutocorrect();
00095
00096 private:
00097 void updateDialog( const QString& word );
00098 void fillSuggestions( const QStringList& suggs );
00099 void initConnections();
00100 void initGui();
00101 void continueChecking();
00102
00103 private:
00104 class Private;
00105 Private* const d;
00106 Q_DISABLE_COPY( Dialog )
00107 };
00108 }
00109
00110 #endif