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
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}
The KParts namespace,.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:51:19 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.