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#ifndef __kparts_guiactivateevent_h__
10#define __kparts_guiactivateevent_h__
11
12#include <QEvent>
13#include <memory>
14
15#include <kparts/kparts_export.h>
16
17namespace KParts
18{
19class GUIActivateEventPrivate;
20/**
21 * @class GUIActivateEvent guiactivateevent.h <KParts/GUIActivateEvent>
22 *
23 * @short This event is sent to a Part when its GUI has been activated or deactivated.
24 * This is related to PartActivateEvent, but the difference is that
25 * GUIActivateEvent happens later (when the GUI is actually built),
26 * only for parts that have GUI elements, and only if using KParts::MainWindow.
27 * @see KParts::Part::guiActivateEvent()
28 */
29class KPARTS_EXPORT GUIActivateEvent : public QEvent
30{
31public:
32 GUIActivateEvent(bool activated);
33 ~GUIActivateEvent() override;
34
35 bool activated() const;
36
37 static bool test(const QEvent *event);
38
39private:
40 const std::unique_ptr<GUIActivateEventPrivate> d;
41};
42
43} // namespace
44
45#endif
46

source code of kparts/src/guiactivateevent.h