threadevents.h

00001 
00021 #ifndef KSPELL_THREADEVENTS_H
00022 #define KSPELL_THREADEVENTS_H
00023 
00024 #include <qevent.h>
00025 #include <qstring.h>
00026 
00027 namespace KSpell2
00028 {
00029     enum {
00030         FoundMisspelling = 2003,
00031         FinishedChecking  = 2004
00032     };
00033     class MisspellingEvent : public QCustomEvent
00034     {
00035     public:
00036         MisspellingEvent( const QString& word,
00037                          int pos )
00038             : QCustomEvent( FoundMisspelling ), m_word( word ),
00039               m_position( pos )
00040             {}
00041 
00042         QString word() const {
00043             return m_word;
00044         }
00045         int     position() const {
00046             return m_position;
00047         }
00048     private:
00049         QString m_word;
00050         int     m_position;
00051     };
00052     class FinishedCheckingEvent : public QCustomEvent
00053     {
00054     public:
00055         FinishedCheckingEvent()
00056             : QCustomEvent( FinishedChecking )
00057             {}
00058     };
00059 
00060 }
00061 
00062 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys