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