Logo Search packages:      
Sourcecode: labplot version File versions

Qwt3D::Axis Class Reference

#include <qwt3d_axis.h>

Inheritance diagram for Qwt3D::Axis:


List of all members.

Detailed Description

Autoscalable axis with caption.

Axes are highly customizable especially in terms of labeling and scaling.

Definition at line 17 of file qwt3d_axis.h.

Public Member Functions

void adjustLabel (int val)
 Shifts label in device coordinates dependent on anchor;.
void adjustNumbers (int val)
 Shifts axis numbers in device coordinates dependent on anchor;.
void attach (Drawable *)
bool autoScale () const
 actual Autoscaling mode
 Axis (Qwt3D::Triple beg, Qwt3D::Triple end)
 Constructs a new axis with specified limits.
 Axis ()
 Constructs standard axis.
Qwt3D::Triple begin () const
 Returns axis' beginning position.
void detach (Drawable *)
void detachAll ()
virtual void draw ()
 Draws axis.
Qwt3D::Triple end () const
 Returns axis' ending position.
QFont const & labelFont () const
 Returns current label font.
double length () const
 Returns axis' length.
void limits (double &start, double &stop) const
 Returns axis interval.
double lineWidth () const
 Returns line width for axis body.
double majLineWidth () const
 Returns Line width for major tics.
Qwt3D::TripleField const & majorPositions () const
 Returns positions for actual major tics (also if invisible).
int majors () const
 Returns number of major intervals.
double minLineWidth () const
 Returns Line width for minor tics.
Qwt3D::TripleField const & minorPositions () const
 Returns positions for actual minor tics (also if invisible).
int minors () const
 Returns number of minor intervals.
Qwt3D::RGBA numberColor () const
QFont const & numberFont () const
 Returns current numbering font.
bool numbers () const
 Returns, if number drawing is on or off.
void position (Qwt3D::Triple &beg, Qwt3D::Triple &end) const
 Returns axis' position.
void recalculateTics ()
 Enforces recalculation of ticmark positions.
Qwt3D::Triple relativePosition (Qwt3D::Triple rel)
virtual void restoreGLState ()
virtual void saveGLState ()
bool scaling () const
 Returns, if scale drawing is on or off.
void setAutoScale (bool val=true)
 Turns Autoscaling on or off.
virtual void setColor (Qwt3D::RGBA rgba)
virtual void setColor (double r, double g, double b, double a=1)
void setLabel (bool d)
 Turns label drawing on or off.
void setLabelColor (Qwt3D::RGBA col)
 Sets color for label.
void setLabelFont (QFont const &font)
 Sets font for axis label.
void setLabelFont (QString const &family, int pointSize, int weight=QFont::Normal, bool italic=false)
 Sets font for axis label.
void setLabelPosition (const Qwt3D::Triple &pos, Qwt3D::ANCHOR)
void setLabelString (QString const &name)
 Sets label content.
void setLimits (double start, double stop)
 Sets interval.
void setLineWidth (double val, double majfac=0.9, double minfac=0.5)
 Sets line width for axis components.
void setMajors (int val)
 Requests major intervals (maybe changed, if autoscaling is present).
void setMinors (int val)
 Requests minor intervals.
void setNumberAnchor (Qwt3D::ANCHOR a)
 Sets anchor position for numbers.
void setNumberColor (Qwt3D::RGBA col)
 Sets the color for axes numbers.
void setNumberFont (QFont const &)
 Overloaded member, works like the above function.
void setNumberFont (QString const &family, int pointSize, int weight=QFont::Normal, bool italic=false)
 Sets font for numbering.
void setNumbers (bool d)
 Turns number drawing on or off.
void setPosition (const Qwt3D::Triple &beg, const Qwt3D::Triple &end)
 Positionate axis.
void setScale (Scale *item)
void setScale (Qwt3D::SCALETYPE)
void setScaling (bool d)
 Turns scale drawing on or off.
void setSymmetricTics (bool b)
 Sets two-sided tics (default is false).
void setTicLength (double majorl, double minorl)
void setTicOrientation (const Qwt3D::Triple &val)
 Same function as above.
void setTicOrientation (double tx, double ty, double tz)
 Sets tic orientation.
void ticLength (double &majorl, double &minorl) const
 Returns tics lengths.
Qwt3D::Triple ticOrientation () const
 Returns tic orientation.

Protected Member Functions

void Enable (GLenum what, GLboolean val)
Qwt3D::Triple ViewPort2World (Qwt3D::Triple win, bool *err=0)
 simplified glut routine (glUnProject): windows coordinates_p --> object coordinates_p
Qwt3D::Triple World2ViewPort (Qwt3D::Triple obj, bool *err=0)
 simplified glut routine (glProject): object coordinates_p --> windows coordinates_p

Protected Attributes

Qwt3D::RGBA color
GLdouble modelMatrix [16]
GLdouble projMatrix [16]
GLint viewport [4]

Private Member Functions

Qwt3D::Triple biggestNumberString ()
void drawBase ()
void drawLabel ()
Qwt3D::Triple drawTic (Qwt3D::Triple nadir, double length)
void drawTicLabel (Qwt3D::Triple Pos, int mtic)
void drawTics ()
void init ()
bool prepTicCalculation (Triple &startpoint)

Private Attributes

bool autoscale_
double autostart_
double autostop_
Qwt3D::Triple beg_
bool drawLabel_
bool drawNumbers_
bool drawTics_
Qwt3D::Triple end_
Qwt3D::Label label_
QFont labelfont_
int labelgap_
double lineWidth_
double lmaj_
double lmin_
double majLineWidth_
int majorintervals_
Qwt3D::TripleField majorpos_
std::vector< Qwt3D::LabelmarkerLabel_
double minLineWidth_
int minorintervals_
Qwt3D::TripleField minorpos_
Qwt3D::Triple ncube_beg_
 vectors, holding major resp. minor tic positions;
Qwt3D::Triple ncube_end_
 enclosing parallelepiped for axis numbering
Qwt3D::RGBA numbercolor_
QFont numberfont_
int numbergap_
Qwt3D::Triple orientation_
Qwt3D::qwt3d_ptr< Qwt3D::Scalescale_
Qwt3D::ANCHOR scaleNumberAnchor_
double start_
double stop_
bool symtics_

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index