konq_events.h
00001 #ifndef __konq_events_h__
00002 #define __konq_events_h__
00003
00004
00005
00006 #include <kparts/event.h>
00007 #include <qptrlist.h>
00008
00009 namespace KParts
00010 {
00011 class ReadOnlyPart;
00012 }
00013
00014 class KConfig;
00015 class KFileItem;
00016 typedef QPtrList<KFileItem> KFileItemList;
00017
00018 class KonqFileSelectionEvent : public KParts::Event
00019 {
00020 public:
00021 KonqFileSelectionEvent( const KFileItemList &selection, KParts::ReadOnlyPart *part ) : KParts::Event( s_fileItemSelectionEventName ), m_selection( selection ), m_part( part ) {}
00022
00023 KFileItemList selection() const { return m_selection; }
00024 KParts::ReadOnlyPart *part() const { return m_part; }
00025
00026 static bool test( const QEvent *event ) { return KParts::Event::test( event, s_fileItemSelectionEventName ); }
00027
00028 private:
00029 static const char *s_fileItemSelectionEventName;
00030
00031 KFileItemList m_selection;
00032 KParts::ReadOnlyPart *m_part;
00033 };
00034
00035 class KonqFileMouseOverEvent : public KParts::Event
00036 {
00037 public:
00038 KonqFileMouseOverEvent( const KFileItem *item, KParts::ReadOnlyPart *part ) : KParts::Event( s_fileItemMouseOverEventName ), m_item( item ), m_part( part ) {}
00039
00040 const KFileItem* item() const { return m_item; }
00041 KParts::ReadOnlyPart *part() const { return m_part; }
00042
00043 static bool test( const QEvent *event ) { return KParts::Event::test( event, s_fileItemMouseOverEventName ); }
00044
00045 private:
00046 static const char *s_fileItemMouseOverEventName;
00047
00048 const KFileItem* m_item;
00049 KParts::ReadOnlyPart *m_part;
00050 };
00051
00052 class KonqConfigEvent : public KParts::Event
00053 {
00054 public:
00055 KonqConfigEvent( KConfig *config, const QString &prefix, bool save ) : KParts::Event( s_configEventName ), m_config( config ), m_prefix( prefix ), m_save( save ) {}
00056
00057 KConfig * config() const { return m_config; }
00058 QString prefix() const { return m_prefix; }
00059 bool save() const { return m_save; }
00060
00061 static bool test( const QEvent *event ) { return KParts::Event::test( event, s_configEventName ); }
00062
00063 private:
00064 static const char *s_configEventName;
00065
00066 KConfig *m_config;
00067 QString m_prefix;
00068 bool m_save;
00069 };
00070
00071 #endif
This file is part of the documentation for libkonq Library Version 3.2.3.