annotate style/AppEventFilter.h @ 668:dac3781826da thorn-cpp

Experimental branch based on Thorn C++ code from RG
author Chris Cannam
date Tue, 30 Apr 2019 11:36:38 +0100
parents
children
rev   line source
Chris@668 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@668 2
Chris@668 3 /*
Chris@668 4 Vect
Chris@668 5 An experimental audio player for plural recordings of a work
Chris@668 6 Centre for Digital Music, Queen Mary, University of London.
Chris@668 7
Chris@668 8 This file is taken from Rosegarden, a MIDI and audio sequencer and
Chris@668 9 musical notation editor. Copyright 2000-2018 the Rosegarden
Chris@668 10 development team. Thorn style developed in stylesheet form by
Chris@668 11 D. Michael McIntyre and reimplemented as a class by David Faure.
Chris@668 12
Chris@668 13 This program is free software; you can redistribute it and/or
Chris@668 14 modify it under the terms of the GNU General Public License as
Chris@668 15 published by the Free Software Foundation; either version 2 of the
Chris@668 16 License, or (at your option) any later version. See the file
Chris@668 17 COPYING included with this distribution for more information.
Chris@668 18 */
Chris@668 19
Chris@668 20 #ifndef SV_THORN_STYLE_APPEVENT_FILTER_H
Chris@668 21 #define SV_THORN_STYLE_APPEVENT_FILTER_H
Chris@668 22
Chris@668 23 #include "ThornStyle.h"
Chris@668 24
Chris@668 25 /**
Chris@668 26 * The AppEventFilter class is notified when a new widget is created
Chris@668 27 * and can decide whether to apply the Thorn Style to it or not.
Chris@668 28 */
Chris@668 29 class AppEventFilter : public QObject
Chris@668 30 {
Chris@668 31 Q_OBJECT
Chris@668 32
Chris@668 33 public:
Chris@668 34 AppEventFilter();
Chris@668 35 bool eventFilter(QObject *watched, QEvent *event) override;
Chris@668 36 bool shouldIgnoreThornStyle(QWidget *widget) const;
Chris@668 37 void polishWidget(QWidget *widget);
Chris@668 38
Chris@668 39 private:
Chris@668 40 ThornStyle m_style;
Chris@668 41 QPalette m_systemPalette;
Chris@668 42 QStyle *m_systemStyle;
Chris@668 43 };
Chris@668 44
Chris@668 45 #endif