KDEUI
dialog.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef SONNET_DIALOG_H
00024 #define SONNET_DIALOG_H
00025
00026 #include <kdialog.h>
00027
00028 class QListWidgetItem;
00029 class QModelIndex;
00030
00031 namespace Sonnet
00032 {
00033 class BackgroundChecker;
00034
00050 class KDEUI_EXPORT Dialog : public KDialog
00051 {
00052 Q_OBJECT
00053 public:
00054 Dialog(BackgroundChecker *checker,
00055 QWidget *parent);
00056 ~Dialog();
00057
00058 QString originalBuffer() const;
00059 QString buffer() const;
00060
00061 void show();
00062 void activeAutoCorrect(bool _active);
00063
00064
00065 using KDialog::done;
00066
00079 void showProgressDialog(int timeout = 500);
00080
00087 void showSpellCheckCompletionMessage( bool b = true );
00088
00095 void setSpellCheckContinuedAfterReplacement( bool b );
00096
00097 public Q_SLOTS:
00098 void setBuffer(const QString &);
00099
00100 Q_SIGNALS:
00106 void done( const QString& newBuffer );
00107 void misspelling( const QString& word, int start );
00108 void replace( const QString& oldWord, int start,
00109 const QString& newWord );
00110
00111 void stop();
00112 void cancel();
00113 void autoCorrect( const QString & currentWord, const QString & replaceWord );
00114
00119 void spellCheckStatus(const QString &);
00120
00128 void languageChanged( const QString &language );
00129
00130 private Q_SLOTS:
00131 void slotMisspelling(const QString& word, int start );
00132 void slotDone();
00133
00134 void slotFinished();
00135 void slotCancel();
00136
00137 void slotAddWord();
00138 void slotReplaceWord();
00139 void slotReplaceAll();
00140 void slotSkip();
00141 void slotSkipAll();
00142 void slotSuggest();
00143 void slotChangeLanguage( const QString& );
00144 void slotSelectionChanged(const QModelIndex &);
00145 void slotAutocorrect();
00146
00147 void setGuiEnabled(bool b);
00148 void setProgressDialogVisible(bool b);
00149
00150 private:
00151 void updateDialog( const QString& word );
00152 void updateDictionaryComboBox();
00153 void fillSuggestions( const QStringList& suggs );
00154 void initConnections();
00155 void initGui();
00156 void continueChecking();
00157
00158 private:
00159 class Private;
00160 Private* const d;
00161 Q_DISABLE_COPY( Dialog )
00162 };
00163 }
00164
00165 #endif