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
11using namespace KParts;
12
13class KParts::GUIActivateEventPrivate
14{
15public:
16 GUIActivateEventPrivate(bool activated)
17 : m_bActivated(activated)
18 {
19 }
20 const bool m_bActivated;
21};
22
23const QEvent::Type GUIActivateEventType = (QEvent::Type)1970;
24
25GUIActivateEvent::GUIActivateEvent(bool activated)
26 : QEvent(GUIActivateEventType)
27 , d(new GUIActivateEventPrivate(activated))
28{
29}
30
31GUIActivateEvent::~GUIActivateEvent() = default;
32
33bool GUIActivateEvent::activated() const
34{
35 return d->m_bActivated;
36}
37
38bool GUIActivateEvent::test(const QEvent *event)
39{
40 return event->type() == GUIActivateEventType;
41}
42

source code of kparts/src/guiactivateevent.cpp