1 /* This file is part of the KDE project
2 Copyright (C) 2000 Simon Hausmann <hausmann@kde.org>
3 Copyright (C) 2000-2007 David Faure <faure@kde.org>
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
21 #ifndef __konq_events_h__
22 #define __konq_events_h__
24 #include <kparts/event.h>
25 #include <QtCore/QList>
26 #include <libkonq_export.h>
27 #include <kfileitem.h>
36 class LIBKONQ_EXPORT KonqFileSelectionEvent
: public KParts::Event
39 KonqFileSelectionEvent( const KFileItemList
&selection
, KParts::ReadOnlyPart
*part
) : KParts::Event( s_fileItemSelectionEventName
), m_selection( selection
), m_part( part
) {}
41 KFileItemList
selection() const { return m_selection
; }
42 KParts::ReadOnlyPart
*part() const { return m_part
; }
44 static bool test( const QEvent
*event
) { return KParts::Event::test( event
, s_fileItemSelectionEventName
); }
47 static const char *s_fileItemSelectionEventName
;
49 KFileItemList m_selection
;
50 KParts::ReadOnlyPart
*m_part
;
53 class LIBKONQ_EXPORT KonqFileMouseOverEvent
: public KParts::Event
56 KonqFileMouseOverEvent( const KFileItem
& item
, KParts::ReadOnlyPart
*part
) : KParts::Event( s_fileItemMouseOverEventName
), m_item( item
), m_part( part
) {}
58 const KFileItem
& item() const { return m_item
; }
59 KParts::ReadOnlyPart
*part() const { return m_part
; }
61 static bool test( const QEvent
*event
) { return KParts::Event::test( event
, s_fileItemMouseOverEventName
); }
64 static const char *s_fileItemMouseOverEventName
;
67 KParts::ReadOnlyPart
*m_part
;
70 class LIBKONQ_EXPORT KonqConfigEvent
: public KParts::Event
73 KonqConfigEvent( KConfigBase
*config
, const QString
&prefix
, bool save
) : KParts::Event( s_configEventName
), m_config( config
), m_prefix( prefix
), m_save( save
) {}
75 KConfigBase
* config() const { return m_config
; }
76 QString
prefix() const { return m_prefix
; }
77 bool save() const { return m_save
; }
79 static bool test( const QEvent
*event
) { return KParts::Event::test( event
, s_configEventName
); }
81 static const char *s_configEventName
;
83 KConfigBase
*m_config
;