Warning, file /plasma/oxygen/kstyle/oxygenaddeventfilter.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 #ifndef oxygenaddeventfilter_h
0002 #define oxygenaddeventfilter_h
0003 
0004 //////////////////////////////////////////////////////////////////////////////
0005 // oxygenaddeventfilter.h
0006 // used to block add a child to a widget, blocking AddChild parent events
0007 // -------------------
0008 //
0009 // SPDX-FileCopyrightText: 2010 Hugo Pereira Da Costa <hugo.pereira@free.fr>
0010 //
0011 // Largely inspired from BeSpin style
0012 // SPDX-FileCopyrightText: 2007 Thomas Luebking <thomas.luebking@web.de>
0013 //
0014 // SPDX-License-Identifier: MIT
0015 //////////////////////////////////////////////////////////////////////////////
0016 
0017 #include <QEvent>
0018 #include <QObject>
0019 
0020 namespace Oxygen
0021 {
0022 
0023 class AddEventFilter : public QObject
0024 {
0025 public:
0026     //* constructor
0027     AddEventFilter(void)
0028         : QObject()
0029     {
0030     }
0031 
0032     //* event filter
0033     /*! blocks all AddChild events */
0034     bool eventFilter(QObject *, QEvent *event) override
0035     {
0036         return event->type() == QEvent::ChildAdded;
0037     }
0038 };
0039 }
0040 
0041 #endif