2007-11-27 19:40:25 +00:00
|
|
|
/********************************************************************
|
2007-04-29 17:35:43 +00:00
|
|
|
KWin - the KDE window manager
|
|
|
|
This file is part of the KDE project.
|
|
|
|
|
|
|
|
Copyright (C) 2007 Lubos Lunak <l.lunak@kde.org>
|
|
|
|
|
2007-11-27 19:40:25 +00:00
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, 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 General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*********************************************************************/
|
2007-04-29 17:35:43 +00:00
|
|
|
|
|
|
|
#ifndef KWIN_MOUSEMARK_H
|
|
|
|
#define KWIN_MOUSEMARK_H
|
|
|
|
|
|
|
|
#include <kwineffects.h>
|
|
|
|
#include <kwinglutils.h>
|
|
|
|
|
|
|
|
namespace KWin
|
|
|
|
{
|
|
|
|
|
|
|
|
class MouseMarkEffect
|
|
|
|
: public QObject, public Effect
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
MouseMarkEffect();
|
|
|
|
virtual void paintScreen( int mask, QRegion region, ScreenPaintData& data );
|
|
|
|
virtual void mouseChanged( const QPoint& pos, const QPoint& old,
|
2008-01-02 15:34:12 +00:00
|
|
|
Qt::MouseButtons buttons, Qt::MouseButtons oldbuttons,
|
|
|
|
Qt::KeyboardModifiers modifiers, Qt::KeyboardModifiers oldmodifiers );
|
2007-04-29 17:35:43 +00:00
|
|
|
private slots:
|
|
|
|
void clear();
|
2008-01-08 16:23:56 +00:00
|
|
|
void clearLast();
|
2007-04-29 17:35:43 +00:00
|
|
|
private:
|
|
|
|
typedef QVector< QPoint > Mark;
|
2008-01-08 16:21:04 +00:00
|
|
|
static Mark createArrow( QPoint arrow_start, QPoint arrow_end );
|
2007-04-29 17:35:43 +00:00
|
|
|
QVector< Mark > marks;
|
|
|
|
Mark drawing;
|
2008-01-08 16:21:04 +00:00
|
|
|
QPoint arrow_start;
|
2007-11-24 14:23:04 +00:00
|
|
|
int width;
|
2007-11-24 14:55:46 +00:00
|
|
|
QColor color;
|
2007-04-29 17:35:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
#endif
|