PyCanvas.h
Go to the documentation of this file.
1 /* -*- mode: c++ -*- */
2 
14 #ifndef PyCanvas_H
15 #define PyCanvas_H
16 
17 #include <string>
18 #include <vector>
19 
20 namespace hippodraw {
21 
22  class CanvasViewProxy;
23  class CanvasWindow;
24  class QtDisplay;
25  class QtCut;
26  class QtView;
27  class NTuple;
28 
43 class PyCanvas
44 {
45 
46 private:
47 
52 
58 
61  bool m_has_gui;
62 
64  mutable std::vector<QtDisplay *> m_displays;
65 
69  void check () const;
70 
72  QtView * findSelectedView ( QtDisplay * display );
73 
74 public:
75 
78  PyCanvas ( CanvasWindow * );
79 
81  PyCanvas ();
82 
85  void show ();
86 
89  void close ();
90 
93  void addDisplay ( QtDisplay * display_wrap );
94 
97  void saveAs ( const std::string & filename );
98 
102  QtDisplay * getDisplay ();
103 
105  const std::vector<QtDisplay *> & getDisplays () const;
106 
109  QtCut * getCut();
110 
112  void selectAllDisplays ( bool flag = true );
113 
115  void selectDisplay ( QtDisplay * display );
116 
119  void print ( const std::string & filename );
120 
122  void saveAsImage( QtDisplay * display, const std::string &filename );
123 
125  void saveSelectedImages(const std::string & filename);
126 
128  void removeDisplay ( QtDisplay * display );
129 
132  const std::vector < std::string > & getTextRepTypes () const;
133 
137  void addTextRep ( QtDisplay * display, const std::string & type );
138 
140  void addText( QtDisplay * display, const std::string &text );
141 
145  void addTextAt ( QtDisplay * display, const std::string &text,
146  double xrel, double yrel );
147 
151  void addTextAtAbs ( QtDisplay * display, const std::string &text,
152  double xabs, double yabs );
153 
156  const std::vector<double> & mouseData();
157 
161  void setPlotMatrix ( unsigned int columns, unsigned int rows );
162 
165  void swapOrientation ();
166 
169  void clear ();
170 
173  int getX ( QtDisplay * display ) const;
174 
177  int getY ( QtDisplay * display ) const;
178 
181  void setX ( QtDisplay * display, double value );
182 
185  void setY ( QtDisplay * display, double value );
186 
189  int getHeight ( QtDisplay * display ) const;
190 
193  int getWidth ( QtDisplay * display ) const;
194 
197  void setHeight ( QtDisplay *, double h );
198 
201  void setWidth ( QtDisplay *, double w );
202 
205  NTuple * getSelPickTable ();
206 
209  NTuple * getPickTable ( QtDisplay * );
210 
211 };
212 
213 } // namespace hippodraw
214 
215 #endif // PyCanvas_H

Generated for HippoDraw Class Library by doxygen