comparison panned.h @ 45:4286836bb3c9

* Some more work on graph layout; ensure LANG is set for parseable UTF8 output when running Hg
author Chris Cannam <cannam@all-day-breakfast.com>
date Wed, 10 Nov 2010 12:44:11 +0000
parents
children 3c46b2ac45d3
comparison
equal deleted inserted replaced
44:bed7ab59f62e 45:4286836bb3c9
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2
3 /*
4 Rosegarden
5 A MIDI and audio sequencer and musical notation editor.
6 Copyright 2000-2010 the Rosegarden development team.
7
8 Other copyrights also apply to some parts of this work. Please
9 see the AUTHORS file and individual file headers for details.
10
11 This program is free software; you can redistribute it and/or
12 modify it under the terms of the GNU General Public License as
13 published by the Free Software Foundation; either version 2 of the
14 License, or (at your option) any later version. See the file
15 COPYING included with this distribution for more information.
16 */
17
18 #ifndef _RG_PANNED_H_
19 #define _RG_PANNED_H_
20
21 #include <QGraphicsView>
22
23 class QWheelEvent;
24 class QEvent;
25
26 class Panned : public QGraphicsView
27 {
28 Q_OBJECT
29
30 public:
31 Panned();
32 virtual ~Panned() { }
33
34 signals:
35 void pannedRectChanged(QRectF);
36 void wheelEventReceived(QWheelEvent *);
37 void pannedContentsScrolled();
38 void mouseLeaves();
39
40 public slots:
41 void slotSetPannedRect(QRectF);
42 void slotEmulateWheelEvent(QWheelEvent *ev);
43
44 protected:
45 QRectF m_pannedRect;
46
47 virtual void paintEvent(QPaintEvent *);
48 virtual void resizeEvent(QResizeEvent *);
49 virtual void drawForeground(QPainter *, const QRectF &);
50 virtual void wheelEvent(QWheelEvent *);
51 virtual void leaveEvent(QEvent *);
52 };
53
54 #endif
55