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
00063 using KDialog::done;
00064
00065 public Q_SLOTS:
00066 void setBuffer(const QString &);
00067
00068 Q_SIGNALS:
00074 void done( const QString& newBuffer );
00075 void misspelling( const QString& word, int start );
00076 void replace( const QString& oldWord, int start,
00077 const QString& newWord );
00078
00079 void stop();
00080 void cancel();
00081 void autoCorrect( const QString & currentWord, const QString & replaceWord );
00082
00087 void spellCheckStatus(const QString &);
00088
00096 void languageChanged( const QString &language );
00097
00098 private Q_SLOTS:
00099 void slotMisspelling(const QString& word, int start );
00100 void slotDone();
00101
00102 void slotFinished();
00103 void slotCancel();
00104
00105 void slotAddWord();
00106 void slotReplaceWord();
00107 void slotReplaceAll();
00108 void slotSkip();
00109 void slotSkipAll();
00110 void slotSuggest();
00111 void slotChangeLanguage( const QString& );
00112 void slotSelectionChanged( QListWidgetItem * );
00113 void slotAutocorrect();
00114
00115 private:
00116 void updateDialog( const QString& word );
00117 void fillSuggestions( const QStringList& suggs );
00118 void initConnections();
00119 void initGui();
00120 void continueChecking();
00121
00122 private:
00123 class Private;
00124 Private* const d;
00125 Q_DISABLE_COPY( Dialog )
00126 };
00127 }
00128
00129 #endif