File indexing completed on 2024-04-28 15:29:20
0001 /* 0002 This file is part of the KDE project 0003 SPDX-FileCopyrightText: 1999 Simon Hausmann <hausmann@kde.org> 0004 SPDX-FileCopyrightText: 1999 David Faure <faure@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.0-or-later 0007 */ 0008 0009 #ifndef __kparts_guiactivateevent_h__ 0010 #define __kparts_guiactivateevent_h__ 0011 0012 #include <kparts/event.h> 0013 0014 namespace KParts 0015 { 0016 class GUIActivateEventPrivate; 0017 /** 0018 * @class GUIActivateEvent guiactivateevent.h <KParts/GUIActivateEvent> 0019 * 0020 * @short This event is sent to a Part when its GUI has been activated or deactivated. 0021 * This is related to PartActivateEvent, but the difference is that 0022 * GUIActivateEvent happens later (when the GUI is actually built), 0023 * only for parts that have GUI elements, and only if using KParts::MainWindow. 0024 * @see KParts::Part::guiActivateEvent() 0025 */ 0026 class KPARTS_EXPORT GUIActivateEvent : public Event 0027 { 0028 public: 0029 GUIActivateEvent(bool activated); 0030 ~GUIActivateEvent() override; 0031 0032 bool activated() const; 0033 0034 static bool test(const QEvent *event); 0035 0036 private: 0037 Q_DECLARE_PRIVATE_D(Event::d, GUIActivateEvent) 0038 #if KPARTS_BUILD_DEPRECATED_SINCE(5, 79) 0039 QT_WARNING_PUSH 0040 QT_WARNING_DISABLE_CLANG("-Wunused-private-field") 0041 // Unused, kept for ABI compatibility 0042 const void *__kparts_d_do_not_use; 0043 QT_WARNING_POP 0044 #endif 0045 }; 0046 0047 } // namespace 0048 0049 #endif