Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

ViewBase Class Reference

Inheritance diagram for ViewBase:

Inheritance graph
[legend]
Collaboration diagram for ViewBase:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 18 of file ViewBase.sip.

Public Member Functions

 ViewBase ()
 The default constructor.
 ViewBase (PlotterBase *)
 The following constructor takes a plotter as an argument to use with a drawing.
 ViewBase (const ViewBase &)
 The copy constructor.
virtual ~ViewBase ()
 The virtual destructor.
virtual void setPlotter (PlotterBase *)
 Sets the PlotterBase object to plotter.
PlotterBasegetPlotter () const
 Returns the plotter used by this view.
PlotterBasegetPlotter ()
 Returns the plotter used by this view.
virtual void update (const Observable *)=0
 Implements the update method of the Observer pattern.
virtual void drawSelf ()
 Draws itself.
virtual void initPlot (double)=0
 Initializes a view before drawing.
virtual void endPlot ()=0
 Finalizes a view when all drawing has been done.
virtual void drawUserText (const std::string &, float, float, float, float, char, char)=0
 Draws a text string at a point in the data coordinate system.
virtual void drawMag (float, float, int, float)=0
 Draws the exponent on the axis label.
virtual void drawSquare (double, double, double, double, int, int, int)=0
 Draws a colored square.
virtual void drawViewSquare (float, float, float, float, int, int, int)=0
 Draws a colored square in view space.
virtual void setDrawRect (float, float, float, float)=0
 Sets the drawing Rectangle in the devices coordinate system.
virtual float userToDrawX (double) const =0
 Converts a coordinate in user space to drawing space along the X axis.
virtual float userToDrawY (double) const =0
 Converts a coordinate in user space to drawing space along the Y axis.
virtual float userToDrawColor (double) const =0
 Converts a coordinate in user space to drawing space along the color (X) axis.
virtual double getAspectRatio () const
 Get the aspect ratio.


Constructor & Destructor Documentation

ViewBase::ViewBase  ) 
 

The default constructor.

ViewBase::ViewBase PlotterBase  ) 
 

The following constructor takes a plotter as an argument to use with a drawing.

ViewBase::ViewBase const ViewBase  ) 
 

The copy constructor.

virtual ViewBase::~ViewBase  )  [virtual]
 

The virtual destructor.


Member Function Documentation

virtual void ViewBase::drawMag float  ,
float  ,
int  ,
float 
[pure virtual]
 

Draws the exponent on the axis label.

The arguments stand for the starting position of the writing ( x, y ), for the value of the magnitude ( mag ), and for the font ( fontsize ).

Bug:
@@ This method should not exist.
The x, y coordinates of the position of the magnitude should be calculated in the AxisRepBase class and that class should use drawText.

Implemented in QtViewImp.

virtual void ViewBase::drawSelf  )  [virtual]
 

Draws itself.

virtual void ViewBase::drawSquare double  ,
double  ,
double  ,
double  ,
int  ,
int  ,
int 
[pure virtual]
 

Draws a colored square.

Used for shading on the cuts and the gray plot.

Implemented in QtViewImp.

virtual void ViewBase::drawUserText const std::string &  ,
float  ,
float  ,
float  ,
float  ,
char  ,
char 
[pure virtual]
 

Draws a text string at a point in the data coordinate system.

Bug:
Is this function used somewhere?

Implemented in QtViewImp.

virtual void ViewBase::drawViewSquare float  ,
float  ,
float  ,
float  ,
int  ,
int  ,
int 
[pure virtual]
 

Draws a colored square in view space.

Used for shading on the cuts and the gray plot.

Implemented in QtViewImp.

virtual void ViewBase::endPlot  )  [pure virtual]
 

Finalizes a view when all drawing has been done.

Implemented in QtView, and QtViewImp.

virtual double ViewBase::getAspectRatio  )  const [virtual]
 

Get the aspect ratio.

PlotterBase* ViewBase::getPlotter  ) 
 

Returns the plotter used by this view.

PlotterBase* ViewBase::getPlotter  )  const
 

Returns the plotter used by this view.

virtual void ViewBase::initPlot double   )  [pure virtual]
 

Initializes a view before drawing.

The view should check it size. The parameter aspect, if greater than 0.0, sets the aspect ratio of the view, i.e. the ratio of the width to the height.

Implemented in QtView.

virtual void ViewBase::setDrawRect float  ,
float  ,
float  ,
float 
[pure virtual]
 

Sets the drawing Rectangle in the devices coordinate system.

Implemented in QtView.

virtual void ViewBase::setPlotter PlotterBase  )  [virtual]
 

Sets the PlotterBase object to plotter.

The ViewBase object does not own the plotter. If the plotter is being changed, it is up to client code to decide to destroy the previous plotter or not.

virtual void ViewBase::update const Observable  )  [pure virtual]
 

Implements the update method of the Observer pattern.

Derived classes should send a message to what ever object is the parent of this ViewBase object.

Implements Observer.

Implemented in QtView.

virtual float ViewBase::userToDrawColor double   )  const [pure virtual]
 

Converts a coordinate in user space to drawing space along the color (X) axis.

Implemented in QtViewImp.

virtual float ViewBase::userToDrawX double   )  const [pure virtual]
 

Converts a coordinate in user space to drawing space along the X axis.

Implemented in QtViewImp.

virtual float ViewBase::userToDrawY double   )  const [pure virtual]
 

Converts a coordinate in user space to drawing space along the Y axis.

Implemented in QtViewImp.


The documentation for this class was generated from the following file:
Generated on Wed Sep 7 14:52:00 2005 for SiHippo by  doxygen 1.4.3