2 Copyright (C) 2004 Bernd Brandstetter <bbrand@freenet.de>
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or ( at your option ) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this library; see the file COPYING. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
20 #ifndef WINDOWGRABBER_H
21 #define WINDOWGRABBER_H
26 class WindowGrabber
: public QDialog
34 static QPixmap
grabCurrent( bool includeDecorations
= true );
35 static QString
lastWindowTitle() { return WindowGrabber::title
; }
36 static QString
lastWindowClass() { return WindowGrabber::windowClass
; }
39 void windowGrabbed( const QPixmap
& );
42 void mousePressEvent( QMouseEvent
* );
43 void mouseReleaseEvent( QMouseEvent
* );
44 void mouseMoveEvent( QMouseEvent
* );
45 void wheelEvent( QWheelEvent
* );
46 void paintEvent( QPaintEvent
* );
49 void increaseScope( const QPoint
& );
50 void decreaseScope( const QPoint
& );
51 int windowIndex( const QPoint
& ) const;
52 std::vector
<QRect
> windows
;
56 static QString windowClass
;
59 #endif // WINDOWGRABBER_H