• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kparts
 

kparts

  • kparts
event.cpp
1 /* This file is part of the KDE project
2  Copyright (C) 1999 Simon Hausmann <hausmann@kde.org>
3  (C) 1999 David Faure <faure@kde.org>
4 
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.
9 
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.
14 
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.
19 */
20 #include <kparts/event.h>
21 
22 using namespace KParts;
23 
24 //the answer!
25 #define KPARTS_EVENT_MAGIC 42
26 
27 Event::Event( const char *eventName )
28  : TQCustomEvent( (TQEvent::Type)(TQEvent::User + KPARTS_EVENT_MAGIC), (void *)eventName )
29 {
30 }
31 
32 const char *Event::eventName() const
33 {
34  if ( !test( this ) )
35  return 0L;
36 
37  return (const char *)data();
38 }
39 
40 bool Event::test( const TQEvent *event )
41 {
42  if ( !event )
43  return false;
44 
45  return ( event->type() == (TQEvent::Type)(TQEvent::User + KPARTS_EVENT_MAGIC ) );
46 }
47 
48 bool Event::test( const TQEvent *event, const char *name )
49 {
50  if ( !test( event ) )
51  return false;
52 
53  return ( strcmp( name, (const char *)((TQCustomEvent *)event)->data() ) == 0 );
54 }
55 
56 const char *GUIActivateEvent::s_strGUIActivateEvent = "KParts/GUIActivate";
57 const char *PartActivateEvent::s_strPartActivateEvent = "KParts/PartActivateEvent";
58 const char *PartSelectEvent::s_strPartSelectEvent = "KParts/PartSelectEvent";
KParts
Definition: browserextension.cpp:64

kparts

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

kparts

Skip menu "kparts"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kparts by doxygen 1.8.8
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |