Began implementing Artisan::GViewport.
[aesalon.git] / include / artisan / gviewport / Object.h
blob01f4208b5e68af4d7d91e83ad489b1a71be73375
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/Object.h
8 */
10 #ifndef AesalonArtisan_GViewport_Object_H
11 #define AesalonArtisan_GViewport_Object_H
13 #include <QPainter>
15 #include "TreeType.h"
16 #include "CoordinateMapper.h"
18 namespace Artisan {
19 namespace GViewport {
21 class Object {
22 protected:
23 TreeType::Bound m_bound;
24 public:
25 virtual ~Object() {}
27 const TreeType::Bound &bound() const { return m_bound; }
28 TreeType::Range &layerRange() { return m_bound.range(0); }
29 TreeType::Range &xRange() { return m_bound.range(1); }
30 TreeType::Range &yRange() { return m_bound.range(2); }
32 virtual void render(CoordinateMapper &mapper, QPainter &painter) = 0;
35 } // namespace GViewport
36 } // namespace Artisan
38 #endif