kspelldlg.h
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 #ifndef __KSPELLDLG_H__
00021 #define __KSPELLDLG_H__
00022 
00023 #include <kdialogbase.h>
00024 
00025 class QStringList;
00026 class QLabel;
00027 class QListViewItem;
00028 class QPushButton;
00029 class KListBox;
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 KSpellDlg : public KDialogBase
00047 {
00048   Q_OBJECT
00049 
00050   class KSpellDlgPrivate;
00051   KSpellDlgPrivate *d;
00052   KLineEdit *editbox;
00053   KProgress *progbar;
00054   KListBox *listbox;
00055   QStringList *sugg;
00056   QPushButton *qpbrep, *qpbrepa;
00057   QLabel *wordlabel;
00058   QString word, newword;
00059   bool progressbar;
00060 
00061 public:
00062   KSpellDlg( QWidget *parent, const char *name,
00063          bool _progressbar = false, bool _modal = false );
00064   ~KSpellDlg();
00065 
00066   QString replacement() const
00067     { return newword; }
00068 
00074   void init( const QString& _word, QStringList* _sugg );
00075   void init( const QString& _word, QStringList* _sugg,
00076              const QString& 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( QCloseEvent * 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 QString & );
00110 
00111   void slotSelectionChanged( QListViewItem* item );
00112 };
00113 
00114 #endif
 
This file is part of the documentation for kdeui Library Version 3.2.0.