libkonq
konq_events.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 #ifndef __konq_events_h__
00022 #define __konq_events_h__
00023
00024 #include <kparts/event.h>
00025 #include <QtCore/QList>
00026 #include <libkonq_export.h>
00027 #include <kfileitem.h>
00028
00029 namespace KParts
00030 {
00031 class ReadOnlyPart;
00032 }
00033
00034 class KConfig;
00035
00036 class LIBKONQ_EXPORT KonqFileSelectionEvent : public KParts::Event
00037 {
00038 public:
00039 KonqFileSelectionEvent( const KFileItemList&selection, KParts::ReadOnlyPart *part ) : KParts::Event( s_fileItemSelectionEventName ), m_selection( selection ), m_part( part ) {}
00040
00041 KFileItemList selection() const { return m_selection; }
00042 KParts::ReadOnlyPart *part() const { return m_part; }
00043
00044 static bool test( const QEvent *event ) { return KParts::Event::test( event, s_fileItemSelectionEventName ); }
00045
00046 private:
00047 static const char *s_fileItemSelectionEventName;
00048
00049 KFileItemList m_selection;
00050 KParts::ReadOnlyPart *m_part;
00051 };
00052
00053 class LIBKONQ_EXPORT KonqFileMouseOverEvent : public KParts::Event
00054 {
00055 public:
00056 KonqFileMouseOverEvent( const KFileItem& item, KParts::ReadOnlyPart *part ) : KParts::Event( s_fileItemMouseOverEventName ), m_item( item ), m_part( part ) {}
00057
00058 const KFileItem& item() const { return m_item; }
00059 KParts::ReadOnlyPart *part() const { return m_part; }
00060
00061 static bool test( const QEvent *event ) { return KParts::Event::test( event, s_fileItemMouseOverEventName ); }
00062
00063 private:
00064 static const char *s_fileItemMouseOverEventName;
00065
00066 KFileItem m_item;
00067 KParts::ReadOnlyPart *m_part;
00068 };
00069
00070 class LIBKONQ_EXPORT KonqConfigEvent : public KParts::Event
00071 {
00072 public:
00073 KonqConfigEvent( KConfigBase *config, const QString &prefix, bool save ) : KParts::Event( s_configEventName ), m_config( config ), m_prefix( prefix ), m_save( save ) {}
00074
00075 KConfigBase * config() const { return m_config; }
00076 QString prefix() const { return m_prefix; }
00077 bool save() const { return m_save; }
00078
00079 static bool test( const QEvent *event ) { return KParts::Event::test( event, s_configEventName ); }
00080 private:
00081 static const char *s_configEventName;
00082
00083 KConfigBase *m_config;
00084 QString m_prefix;
00085 bool m_save;
00086 };
00087
00088 #endif