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

kparts

  • kparts
event.h
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 #ifndef __kparts_event_h__
21 #define __kparts_event_h__
22 
23 #include <tqevent.h>
24 
25 #include <kdelibs_export.h>
26 
27 class TQWidget;
28 
29 namespace KParts
30 {
31 class Part;
32 
36 class KPARTS_EXPORT Event : public TQCustomEvent
37 {
38 public:
39  Event( const char *eventName );
40 
41  virtual const char *eventName() const;
42 
43  static bool test( const TQEvent *event );
44  static bool test( const TQEvent *event, const char *name );
45 };
46 
54 class KPARTS_EXPORT GUIActivateEvent : public Event
55 {
56 public:
57  GUIActivateEvent( bool activated ) : Event( s_strGUIActivateEvent ), m_bActivated( activated ) {}
58 
59  bool activated() const { return m_bActivated; }
60 
61  static bool test( const TQEvent *event ) { return Event::test( event, s_strGUIActivateEvent ); }
62 
63 private:
64  static const char *s_strGUIActivateEvent;
65  bool m_bActivated;
66 };
67 
76 class KPARTS_EXPORT PartActivateEvent : public Event
77 {
78 public:
79  PartActivateEvent( bool activated, Part *part, TQWidget *widget ) : Event( s_strPartActivateEvent ), m_bActivated( activated ), m_part( part ), m_widget( widget ) {}
80 
81  bool activated() const { return m_bActivated; }
82 
83  Part *part() const { return m_part; }
84  TQWidget *widget() const { return m_widget; }
85 
86  static bool test( const TQEvent *event ) { return Event::test( event, s_strPartActivateEvent ); }
87 
88 private:
89  static const char *s_strPartActivateEvent;
90  bool m_bActivated;
91  Part *m_part;
92  TQWidget *m_widget;
93 };
94 
99 class KPARTS_EXPORT PartSelectEvent : public Event
100 {
101 public:
102  PartSelectEvent( bool selected, Part *part, TQWidget *widget ) : Event( s_strPartSelectEvent ), m_bSelected( selected ), m_part( part ), m_widget( widget ) {}
103 
104  bool selected() const { return m_bSelected; }
105 
106  Part *part() const { return m_part; }
107  TQWidget *widget() const { return m_widget; }
108 
109  static bool test( const TQEvent *event ) { return Event::test( event, s_strPartSelectEvent ); }
110 
111 private:
112  static const char *s_strPartSelectEvent;
113  bool m_bSelected;
114  Part *m_part;
115  TQWidget *m_widget;
116 };
117 
118 } // namespace
119 
120 #endif
KParts::Event
Base class for all KParts events.
Definition: event.h:37
KParts::GUIActivateEvent
This event is sent to a Part when its GUI has been activated or deactivated.
Definition: event.h:55
KParts::PartActivateEvent
This event is sent by the part manager when the active part changes.
Definition: event.h:77
KParts::PartSelectEvent
This event is sent when a part is selected or deselected.
Definition: event.h:100
KParts::Part
Base class for parts.
Definition: part.h:182

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.9.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |