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  ~PartActivateEvent() override;
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  QT_WARNING_PUSH
44  QT_WARNING_DISABLE_CLANG("-Wunused-private-field")
45  // Unused, kept for ABI compatibility
46  const void *__kparts_d_do_not_use;
47  QT_WARNING_POP
48 #endif
49 };
50 
51 } // namespace
52 
53 #endif
Base class for parts.
Definition: part.h:62
This event is sent by the part manager when the active part changes. Each time the active part change...
The KParts namespace,.
Base class for all KParts events.
Definition: event.h:27
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Dec 7 2023 03:54:24 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.