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