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 KParts::GUIActivateEvent
22 * \inmodule KParts
23 * \inheaderfile KParts/GUIActivateEvent
24 *
25 * \brief This event is sent to a Part when its GUI has been activated or deactivated.
26 *
27 * This is related to PartActivateEvent, but the difference is that
28 * GUIActivateEvent happens later (when the GUI is actually built),
29 * only for parts that have GUI elements, and only if using KParts::MainWindow.
30 *
31 * \sa KParts::Part::guiActivateEvent()
32 */
33class KPARTS_EXPORT GUIActivateEvent : public QEvent
34{
35public:
36 /*!
37 *
38 */
39 GUIActivateEvent(bool activated);
40 ~GUIActivateEvent() override;
41
42 /*!
43 *
44 */
45 bool activated() const;
46
47 /*!
48 *
49 */
50 static bool test(const QEvent *event);
51
52private:
53 const std::unique_ptr<GUIActivateEventPrivate> d;
54};
55
56} // namespace
57
58#endif
59

source code of kparts/src/guiactivateevent.h