KParts

guiactivateevent.cpp
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 
9 #include "guiactivateevent.h"
10 #include "event_p.h"
11 
12 using namespace KParts;
13 
14 class KParts::GUIActivateEventPrivate : public KParts::EventPrivate
15 {
16 public:
17  GUIActivateEventPrivate(bool activated, const char *eventName)
18  : EventPrivate(eventName)
19  , m_bActivated(activated)
20  {
21  }
22  static const char s_strGUIActivateEvent[];
23  const bool m_bActivated;
24 };
25 
26 const char GUIActivateEventPrivate::s_strGUIActivateEvent[] = "KParts/GUIActivate";
27 
28 GUIActivateEvent::GUIActivateEvent(bool activated)
29  : Event(*new GUIActivateEventPrivate(activated, GUIActivateEventPrivate::s_strGUIActivateEvent))
30 {
31 }
32 
33 GUIActivateEvent::~GUIActivateEvent() = default;
34 
35 bool GUIActivateEvent::activated() const
36 {
37  Q_D(const GUIActivateEvent);
38 
39  return d->m_bActivated;
40 }
41 
42 bool GUIActivateEvent::test(const QEvent *event)
43 {
44  return Event::test(event, GUIActivateEventPrivate::s_strGUIActivateEvent);
45 }
This event is sent to a Part when its GUI has been activated or deactivated. This is related to PartA...
The KParts namespace,.
Q_D(Todo)
Base class for all KParts events.
Definition: event.h:27
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sun Jun 26 2022 03:48:07 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.