00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __TDESPELLDLG_H__
00021 #define __TDESPELLDLG_H__
00022
00023 #include <kdialogbase.h>
00024
00025 class TQStringList;
00026 class TQLabel;
00027 class TQListViewItem;
00028 class TQPushButton;
00029 class TDEListBox;
00030 class KLineEdit;
00031 class KProgress;
00032
00033
00034 enum KS_RESULT {
00035 KS_CANCEL= 0,
00036 KS_REPLACE= 1,
00037 KS_REPLACEALL= 2,
00038 KS_IGNORE= 3,
00039 KS_IGNOREALL= 4,
00040 KS_ADD= 5,
00041 KS_STOP= 7,
00042 KS_SUGGEST= 8,
00043 KS_CONFIG= 9
00044 };
00045
00046 class TDEUI_EXPORT KSpellDlg : public KDialogBase
00047 {
00048 Q_OBJECT
00049
00050 class KSpellDlgPrivate;
00051 KSpellDlgPrivate *d;
00052 KLineEdit *editbox;
00053 KProgress *progbar;
00054 TDEListBox *listbox;
00055 TQStringList *sugg;
00056 TQPushButton *qpbrep, *qpbrepa;
00057 TQLabel *wordlabel;
00058 TQString word, newword;
00059 bool progressbar;
00060
00061 public:
00062 KSpellDlg( TQWidget *parent, const char *name,
00063 bool _progressbar = false, bool _modal = false );
00064 ~KSpellDlg();
00065
00066 TQString replacement() const
00067 { return newword; }
00068
00074 void init( const TQString& _word, TQStringList* _sugg );
00075 void init( const TQString& _word, TQStringList* _sugg,
00076 const TQString& context );
00077
00078 void standby() { emit ready( false ); }
00079
00080 public slots:
00084 void slotProgress( unsigned int p );
00085
00086 protected:
00087 virtual void closeEvent( TQCloseEvent * e );
00088 void done( int i );
00089
00090 signals:
00094 void command( int );
00095
00096 void ready( bool );
00097
00098 protected slots:
00099 void ignore();
00100 void add();
00101 void ignoreAll();
00102 void cancel();
00103 void replace();
00104 void replaceAll();
00105 void suggest();
00106 void stop();
00107 void slotConfigChanged();
00108
00109 void textChanged( const TQString & );
00110
00111 void slotSelectionChanged( TQListViewItem* item );
00112 };
00113
00114 #endif