image_scene.hh 886 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//
// Document layout viewer.
//
// Copyright (C) 2009 Florent D'Halluin.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// The complete GNU General Public Licence Notice can be found as the
// `COPYING' file in the root directory.
//

#ifndef   	IMAGE_SCENE_HH_
# define   	IMAGE_SCENE_HH_

# include <QtGui>

class ImageRegion;

class ImageScene
  : public QGraphicsScene
{
  Q_OBJECT

public:
  ImageScene();
  ~ImageScene();

  void mousePressEvent(QGraphicsSceneMouseEvent* event);
  void clear();

signals:
  void selected(const QModelIndex& index);
  void deselected(const QModelIndex& index);

private:
  ImageRegion* selected_;
};

#endif	    /* !IMAGE_SCENE_HH_ */