KParts

partactivateevent.h
1 /*
2  This file is part of the KDE project
3  SPDX-FileCopyrightText: 1999 Simon Hausmann <[email protected]>
4  SPDX-FileCopyrightText: 1999 David Faure <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.0-or-later
7 */
8 #ifndef __kparts_partactivateevent_h__
9 #define __kparts_partactivateevent_h__
10 
11 #include <kparts/event.h>
12 
13 namespace KParts
14 {
15 class Part;
16 
17 class PartActivateEventPrivate;
18 /**
19  * @class PartActivateEvent partactivateevent.h <KParts/PartActivateEvent>
20  *
21  * @short This event is sent by the part manager when the active part changes.
22  * Each time the active part changes, it will send first a PartActivateEvent
23  * with activated=false, part=oldActivePart, widget=oldActiveWidget
24  * and then another PartActivateEvent
25  * with activated=true, part=newPart, widget=newWidget.
26  * @see KParts::Part::partActivateEvent
27  */
28 class KPARTS_EXPORT PartActivateEvent : public Event
29 {
30 public:
31  PartActivateEvent(bool activated, Part *part, QWidget *widget);
32  virtual ~PartActivateEvent();
33  bool activated() const;
34 
35  Part *part() const;
36  QWidget *widget() const;
37 
38  static bool test(const QEvent *event);
39 
40 private:
41  Q_DECLARE_PRIVATE_D(Event::d, PartActivateEvent)
42 #if KPARTS_BUILD_DEPRECATED_SINCE(5, 79)
43  // Unused, kept for ABI compatibility
44  const void *__kparts_d_do_not_use;
45 #endif
46 };
47 
48 } // namespace
49 
50 #endif
This event is sent by the part manager when the active part changes.
Base class for parts.
Definition: part.h:62
Base class for all KParts events.
Definition: event.h:27
The KParts namespace,.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Oct 19 2021 22:56:36 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.