SaveAsImageEvent.cxx
Go to the documentation of this file.
1 
11 #include "SaveAsImageEvent.h"
12 
13 #if QT_VERSION < 0x040000
14 #else
15 //Added by the Qt porting tool:
16 #include <QtCore/QCustomEvent>
17 #include <QtCore/QEvent>
18 #endif
19 
20 
21 namespace hippodraw {
22 
24 SaveAsImageEvent ( const PlotterBase * plotter,
25  const std::string & filename )
26  : QCustomEvent ( QEvent::User, const_cast < PlotterBase * > ( plotter ) ),
27  m_filename ( filename )
28 {
29 }
30 
33  : QCustomEvent ( event ),
34  m_filename ( event.m_filename )
35 {
36 }
37 
39 {
40 }
41 
44 plotter ( ) const
45 {
46  void * pointer = data();
47 
48  return reinterpret_cast < PlotterBase * > ( pointer );
49 }
50 
51 const std::string &
53 filename () const
54 {
55  return m_filename;
56 }
57 
58 } // namespace hippodraw
59 
A derived class of QCustomEvent to handle saving a PlotterBase object as image file events...
std::string m_filename
The filename for the image.
SaveAsImageEvent class interface.
The base class for the PlotterBase hierarchy.
Definition: PlotterBase.h:55
SaveAsImageEvent(const PlotterBase *plotter, const std::string &filename)
The constructor taking the plotter object and image filename as arguments.
const std::string & filename() const
Returns the filename for the image.
PlotterBase * plotter() const
Returns the PlotterBase object that created the update event.
virtual ~SaveAsImageEvent()
The required virtual destructor.
data() const

Generated for HippoDraw Class Library by doxygen