KParts
event.h
Go to the documentation of this file.
00001 /* This file is part of the KDE project 00002 Copyright (C) 1999 Simon Hausmann <hausmann@kde.org> 00003 (C) 1999 David Faure <faure@kde.org> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public License 00016 along with this library; see the file COPYING.LIB. If not, write to 00017 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00018 Boston, MA 02110-1301, USA. 00019 */ 00020 #ifndef __kparts_event_h__ 00021 #define __kparts_event_h__ 00022 00023 #include <QtGui/QKeyEvent> 00024 00025 #include <kparts/kparts_export.h> 00026 00027 class QWidget; 00028 00029 namespace KParts 00030 { 00031 class Part; 00032 00033 class EventPrivate; 00037 class KPARTS_EXPORT Event : public QEvent 00038 { 00039 public: 00040 Event( const char *eventName ); 00041 virtual ~Event(); 00042 virtual const char *eventName() const; 00043 00044 static bool test( const QEvent *event ); 00045 static bool test( const QEvent *event, const char *name ); 00046 00047 private: 00048 EventPrivate * const d; 00049 }; 00050 00051 class GUIActivateEventPrivate; 00059 class KPARTS_EXPORT GUIActivateEvent : public Event 00060 { 00061 public: 00062 GUIActivateEvent( bool activated ); 00063 virtual ~GUIActivateEvent(); 00064 00065 bool activated() const; 00066 00067 static bool test( const QEvent *event ); 00068 00069 private: 00070 GUIActivateEventPrivate * const d; 00071 }; 00072 00073 class PartActivateEventPrivate; 00082 class KPARTS_EXPORT PartActivateEvent : public Event 00083 { 00084 public: 00085 PartActivateEvent( bool activated, Part *part, QWidget *widget ); 00086 virtual ~PartActivateEvent(); 00087 bool activated() const; 00088 00089 Part *part() const; 00090 QWidget *widget() const; 00091 00092 static bool test( const QEvent *event ); 00093 00094 private: 00095 PartActivateEventPrivate * const d; 00096 }; 00097 00098 class PartSelectEventPrivate; 00103 class KPARTS_EXPORT PartSelectEvent : public Event 00104 { 00105 public: 00106 PartSelectEvent( bool selected, Part *part, QWidget *widget ); 00107 virtual ~PartSelectEvent(); 00108 bool selected() const; 00109 00110 Part *part() const; 00111 QWidget *widget() const; 00112 00113 static bool test( const QEvent *event ); 00114 00115 private: 00116 PartSelectEventPrivate * const d; 00117 }; 00118 00119 } // namespace 00120 00121 #endif
KDE 4.6 API Reference