Chris@668: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@668: Chris@668: /* Chris@668: Vect Chris@668: An experimental audio player for plural recordings of a work Chris@668: Centre for Digital Music, Queen Mary, University of London. Chris@668: Chris@668: This file is taken from Rosegarden, a MIDI and audio sequencer and Chris@668: musical notation editor. Copyright 2000-2018 the Rosegarden Chris@668: development team. Thorn style developed in stylesheet form by Chris@668: D. Michael McIntyre and reimplemented as a class by David Faure. Chris@668: Chris@668: This program is free software; you can redistribute it and/or Chris@668: modify it under the terms of the GNU General Public License as Chris@668: published by the Free Software Foundation; either version 2 of the Chris@668: License, or (at your option) any later version. See the file Chris@668: COPYING included with this distribution for more information. Chris@668: */ Chris@668: Chris@668: #ifndef SV_THORN_STYLE_APPEVENT_FILTER_H Chris@668: #define SV_THORN_STYLE_APPEVENT_FILTER_H Chris@668: Chris@668: #include "ThornStyle.h" Chris@668: Chris@668: /** Chris@668: * The AppEventFilter class is notified when a new widget is created Chris@668: * and can decide whether to apply the Thorn Style to it or not. Chris@668: */ Chris@668: class AppEventFilter : public QObject Chris@668: { Chris@668: Q_OBJECT Chris@668: Chris@668: public: Chris@668: AppEventFilter(); Chris@668: bool eventFilter(QObject *watched, QEvent *event) override; Chris@668: bool shouldIgnoreThornStyle(QWidget *widget) const; Chris@668: void polishWidget(QWidget *widget); Chris@668: Chris@668: private: Chris@668: ThornStyle m_style; Chris@668: QPalette m_systemPalette; Chris@668: QStyle *m_systemStyle; Chris@668: }; Chris@668: Chris@668: #endif