2011-01-15 18:51:55 +01:00
|
|
|
/*
|
|
|
|
* Copyright 2011 Marco Martin <mart@kde.org>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Library General Public License as
|
|
|
|
* published by the Free Software Foundation; either version 2, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this program; if not, write to the
|
|
|
|
* Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef BLURWATCHER_H
|
|
|
|
#define BLURWATCHER_H
|
|
|
|
|
2012-11-23 20:09:15 +01:00
|
|
|
#include <QObject>
|
|
|
|
|
|
|
|
#include <QAbstractNativeEventFilter>
|
2011-01-15 18:51:55 +01:00
|
|
|
|
|
|
|
namespace Plasma
|
|
|
|
{
|
|
|
|
|
2012-11-23 20:09:15 +01:00
|
|
|
class EffectWatcher: public QObject, public QAbstractNativeEventFilter
|
2011-01-15 18:51:55 +01:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2012-11-23 20:09:15 +01:00
|
|
|
EffectWatcher(const QString& property, QObject *parent = 0);
|
2011-01-15 18:51:55 +01:00
|
|
|
|
|
|
|
protected:
|
2011-01-20 10:41:10 +01:00
|
|
|
bool isEffectActive() const;
|
2012-11-23 20:09:15 +01:00
|
|
|
|
|
|
|
bool nativeEventFilter(const QByteArray& eventType, void *message, long *result) Q_DECL_OVERRIDE;
|
2011-01-15 18:51:55 +01:00
|
|
|
|
|
|
|
Q_SIGNALS:
|
2011-12-08 11:04:12 +01:00
|
|
|
void effectChanged(bool on);
|
2011-01-15 18:51:55 +01:00
|
|
|
|
|
|
|
private:
|
2011-01-16 18:25:28 +01:00
|
|
|
QString m_property;
|
2011-01-15 18:51:55 +01:00
|
|
|
bool m_effectActive;
|
|
|
|
};
|
|
|
|
|
2012-11-23 20:09:15 +01:00
|
|
|
} // namespace Plasma
|
2011-01-15 18:51:55 +01:00
|
|
|
|
2012-11-23 20:09:15 +01:00
|
|
|
#endif
|