KParts

guiactivateevent.cpp
1 /*
2  This file is part of the KDE project
3  SPDX-FileCopyrightText: 1999 Simon Hausmann <hausmann@kde.org>
4  SPDX-FileCopyrightText: 1999 David Faure <faure@kde.org>
5 
6  SPDX-License-Identifier: LGPL-2.0-or-later
7 */
8 
9 #include "guiactivateevent.h"
10 
11 using namespace KParts;
12 
13 class KParts::GUIActivateEventPrivate
14 {
15 public:
16  GUIActivateEventPrivate(bool activated)
17  : m_bActivated(activated)
18  {
19  }
20  const bool m_bActivated;
21 };
22 
23 const QEvent::Type GUIActivateEventType = (QEvent::Type)1970;
24 
25 GUIActivateEvent::GUIActivateEvent(bool activated)
26  : QEvent(GUIActivateEventType)
27  , d(new GUIActivateEventPrivate(activated))
28 {
29 }
30 
31 GUIActivateEvent::~GUIActivateEvent() = default;
32 
33 bool GUIActivateEvent::activated() const
34 {
35  return d->m_bActivated;
36 }
37 
38 bool GUIActivateEvent::test(const QEvent *event)
39 {
40  return event->type() == GUIActivateEventType;
41 }
The KParts namespace,.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Thu Feb 15 2024 03:48:58 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.