File indexing completed on 2024-12-22 04:12:45

0001 /* This file is part of the KDE project
0002    SPDX-FileCopyrightText: 2017 Nikita Vertikov <kitmouse.nikita@gmail.com>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 #ifndef KISQTWIDGETTWEAKER_H
0007 #define KISQTWIDGETTWEAKER_H
0008 
0009 #include <QObject>
0010 #include "kritaui_export.h"
0011 
0012 class QEvent;
0013 
0014 /**
0015  * KisQtWidgetsTweaker is used to make minor adjustments to
0016  * "native" qt widgets' behavior application-wise
0017  * by filtering events addressed to them
0018  * It expected to be installed on the application
0019  */
0020 class KRITAUI_EXPORT KisQtWidgetsTweaker : public QObject
0021 {
0022     Q_OBJECT
0023 public:
0024     KisQtWidgetsTweaker(QObject* parent = nullptr);
0025     ~KisQtWidgetsTweaker();
0026     bool eventFilter(QObject *receiver, QEvent* event) override;
0027     static KisQtWidgetsTweaker *instance();
0028 
0029 private:
0030     struct Private;
0031     Private* d;
0032 };
0033 
0034 
0035 #endif //KISQTWIDGETTWEAKER_H