QtViewFactory.cxx
Go to the documentation of this file.
1 
12 #ifdef _MSC_VER
13 #include "msdevstudio/MSconfig.h"
14 #endif
15 
16 #include "QtViewFactory.h"
17 
18 #include "QtFont.h"
19 #include "QtView.h"
20 
21 #include "plotters/PlotterBase.h"
22 
23 namespace hippodraw {
24 
26  : ViewFactory()
27 {
28 }
29 
31 {
32  if ( m_instance == 0 ) {
33  m_instance = new QtViewFactory ();
34  }
35 
36  return m_instance;
37 }
38 
39 ViewBase *
41 createView ( PlotterBase * plotter ) const
42 {
43  QtView * view = new QtView ( plotter );
44 
45  return view;
46 }
47 
48 FontBase *
50 createFont () const
51 {
52  return new QtFont ();
53 }
54 
55 } // namespace hippodraw
56 
QtViewFactory class interface.
QtViewFactory()
The default constructor.
An implementation of FontBase that uses a Qt QFont as implementation.
Definition: QtFont.h:28
static ViewFactory * m_instance
An instance of the default view factory.
Definition: ViewFactory.h:42
virtual ViewBase * createView(PlotterBase *plotter) const
Creates a view for the plotter.
A abstract base class for font handling.
Definition: FontBase.h:32
QtFont class interface.
The base class for the PlotterBase hierarchy.
Definition: PlotterBase.h:55
static ViewFactory * instance()
hippodraw::QtView class interface
The class of derived from ViewBase and QCanvasRectangle for drawing on a QCanvas. ...
Definition: QtView.h:41
The abstract base class for a factory that creates objects closely related to the graphics subsystem ...
Definition: ViewFactory.h:35
The abstract base class for views.
Definition: ViewBase.h:62
virtual FontBase * createFont() const
Creates a default FontBase object.
hippodraw::PlotterBase class interface.

Generated for HippoDraw Class Library by doxygen