• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

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 <qevent.h>
00024 
00025 #include <kdelibs_export.h>
00026 
00027 class QWidget;
00028 
00029 namespace KParts
00030 {
00031 class Part;
00032 
00036 class KPARTS_EXPORT Event : public QCustomEvent
00037 {
00038 public:
00039   Event( const char *eventName );
00040 
00041   virtual const char *eventName() const;
00042 
00043   static bool test( const QEvent *event );
00044   static bool test( const QEvent *event, const char *name );
00045 };
00046 
00054 class KPARTS_EXPORT GUIActivateEvent : public Event
00055 {
00056 public:
00057   GUIActivateEvent( bool activated ) : Event( s_strGUIActivateEvent ), m_bActivated( activated ) {}
00058 
00059   bool activated() const { return m_bActivated; }
00060 
00061   static bool test( const QEvent *event ) { return Event::test( event, s_strGUIActivateEvent ); }
00062 
00063 private:
00064   static const char *s_strGUIActivateEvent;
00065   bool m_bActivated;
00066 };
00067 
00076 class KPARTS_EXPORT PartActivateEvent : public Event
00077 {
00078 public:
00079   PartActivateEvent( bool activated, Part *part, QWidget *widget ) : Event( s_strPartActivateEvent ), m_bActivated( activated ), m_part( part ), m_widget( widget ) {}
00080 
00081   bool activated() const { return m_bActivated; }
00082 
00083   Part *part() const { return m_part; }
00084   QWidget *widget() const { return m_widget; }
00085 
00086   static bool test( const QEvent *event ) { return Event::test( event, s_strPartActivateEvent ); }
00087 
00088 private:
00089   static const char *s_strPartActivateEvent;
00090   bool m_bActivated;
00091   Part *m_part;
00092   QWidget *m_widget;
00093 };
00094 
00099 class KPARTS_EXPORT PartSelectEvent : public Event
00100 {
00101 public:
00102   PartSelectEvent( bool selected, Part *part, QWidget *widget ) : Event( s_strPartSelectEvent ), m_bSelected( selected ), m_part( part ), m_widget( widget ) {}
00103 
00104   bool selected() const { return m_bSelected; }
00105 
00106   Part *part() const { return m_part; }
00107   QWidget *widget() const { return m_widget; }
00108 
00109   static bool test( const QEvent *event ) { return Event::test( event, s_strPartSelectEvent ); }
00110 
00111 private:
00112   static const char *s_strPartSelectEvent;
00113   bool m_bSelected;
00114   Part *m_part;
00115   QWidget *m_widget;
00116 };
00117 
00118 } // namespace
00119 
00120 #endif

KParts

Skip menu "KParts"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal