1 /** Aesalon, a tool to visualize program behaviour in real time.
2 Copyright (C) 2009-2011, Aesalon development team.
4 Aesalon is distributed under the terms of the GNU GPLv3. See
5 the included file LICENSE for more information.
7 @file include/artisan/gviewport/BasicViewport.h
10 #ifndef AesalonArtisan_GViewport_BasicViewport_H
11 #define AesalonArtisan_GViewport_BasicViewport_H
13 #include "artisan/Viewport.h"
17 #include "RenderedImage.h"
24 class BasicViewport
: public Viewport
{ Q_OBJECT
27 RenderedImage m_image
;
32 BasicViewport(Data
*data
);
33 virtual ~BasicViewport();
35 Data
*data() const { return m_data
; }
37 Rect
rangeLimit() const { return m_rangeLimit
; }
38 void limitRange(const Rect
&newLimit
) { m_rangeLimit
= newLimit
; }
40 void acceptRenderedImage(RenderedImage
*image
);
41 void translate(const Point
&by
);
42 void setViewport(const Rect
&range
);
43 void updateRange(const Rect
&range
);
45 virtual void resizeEvent(QResizeEvent
*event
);
46 virtual void paintEvent(QPaintEvent
*event
);
47 virtual void mouseMoveEvent(QMouseEvent
*event
);
48 virtual void mousePressEvent(QMouseEvent
*event
);
49 virtual void wheelEvent(QWheelEvent
*event
);
51 void enqueue(const Rect
&range
);
54 } // namespace GViewport
55 } // namespace Artisan