ATLAS Offline Software
IVP12DViewTransformation.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // //
7 // Header file for class IVP12DViewTransformation //
8 // //
9 // Author: Thomas Kittelmann <Thomas.Kittelmann@cern.ch> //
10 // //
11 // Initial version: April 2007 //
12 // //
14 
15 #ifndef IVP12DVIEWTRANSFORMATION_H
16 #define IVP12DVIEWTRANSFORMATION_H
17 
18 #include <QtGlobal>
19 #include <QPainterPath>
20 
21 class QPainter;
22 class QGraphicsItem;
23 
24 //The practically most important thing for performance is that
25 //transformPath() is as efficient as possible!!
26 
28 public:
29 
32 
33  virtual QPointF transform(const QPointF &source) const = 0;
34  virtual QPointF inverseTransform(const QPointF &source) const = 0;
35 
36  //Transform a painter path. The default implementation simply
37  //transforms the positions of each of the elements in the path. For
38  //non-linear transformations this might not be exactly what is
39  //wanted (but might be "good enough":
40  virtual void transformPath(const QPainterPath &source, QPainterPath &target) const;
41  virtual void inverseTransformPath(const QPainterPath &source, QPainterPath &target) const;
42 
43  //The returned rectangle for the next two methods should be the
44  //smallest rectangle that contains all transformed points from the
45  //source rectangle. The default implementation returns the smallest
46  //rectangle that contains all of the four inversely transformed
47  //corners of the original rectangle (for some nonlinear
48  //transformations this might not be a correct solution!):
49  virtual QRectF inverseTransform(const QRectF &source) const;
50  virtual QRectF transform(const QRectF &source) const;
51 
52  //Fixme: Stuff for getting key events delivered (by e.g. registering
53  //that it is interested in Key_Plus+Shift, Key_Minus+Shift). And it
54  //should report back if the view now needs to be updated.
55 
56  //Paint an item transformed:
57  void paintItem(QPainter *, const QGraphicsItem*) const;
58 
59 private:
60 
63 };
64 
65 #endif
IVP12DViewTransformation::IVP12DViewTransformation
IVP12DViewTransformation()
Definition: IVP12DViewTransformation.h:30
IVP12DViewTransformation::transformPath
virtual void transformPath(const QPainterPath &source, QPainterPath &target) const
Definition: IVP12DViewTransformation.cxx:26
IVP12DViewTransformation
Definition: IVP12DViewTransformation.h:27
IVP12DViewTransformation::transform
virtual QPointF transform(const QPointF &source) const =0
IVP12DViewTransformation::inverseTransformPath
virtual void inverseTransformPath(const QPainterPath &source, QPainterPath &target) const
Definition: IVP12DViewTransformation.cxx:38
IVP12DViewTransformation::IVP12DViewTransformation
IVP12DViewTransformation(const IVP12DViewTransformation &)
IVP12DViewTransformation::inverseTransform
virtual QPointF inverseTransform(const QPointF &source) const =0
IVP12DViewTransformation::paintItem
void paintItem(QPainter *, const QGraphicsItem *) const
Definition: IVP12DViewTransformation.cxx:80
IVP12DViewTransformation::~IVP12DViewTransformation
virtual ~IVP12DViewTransformation()
Definition: IVP12DViewTransformation.h:31
IVP12DViewTransformation::operator=
IVP12DViewTransformation & operator=(const IVP12DViewTransformation &)
copySelective.target
string target
Definition: copySelective.py:37
copySelective.source
string source
Definition: copySelective.py:32