Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

TxqAxis Class Reference

A TxqAxis is a base axis class which is described in a real world coordinate system. More...

#include <TxqAxis.h>

Inheritance diagram for TxqAxis::

Txq2dAxis Txq3dAxis List of all members.

Public Methods

 TxqAxis ()
 The constructor is default. More...

virtual ~TxqAxis ()
 The destructor is default. More...

void setOrientation (QString direction)
 Set the orientation of the axis the orientation is either horizontal or vertical and can be specified with these QStrings: HORIZONTAL, H, horizontal, h, X, x VERTICAL, V, vertical, v, Y, y Z, z. More...

QString getOrientation ()
 Return the orientation placement. More...

void setBorderAxes (bool b)
 Sets the border axes in the paint routine. More...

void setScientificNotation (bool f)
 Sets the scientific notation flag. More...

bool getScientificNotation ()
 Get the scientific notation flag. More...

void assign (TxqAxis r)
 Assign the class variables from one axis to another. More...

void autoSelectDataRanges (bool b)
 Set data range auto select with a bool flag. More...

void autoSelectDataRangeMin (bool b)
 Set min data range auto select with a bool flag. More...

void autoSelectDataRangeMax (bool b)
 Set max data range auto select with a bool flag. More...

void setDataRangeMin (double d)
 Set the data range minimum. More...

double getDataRangeMin ()
 Get the data range minimum value. More...

void setDataRangeMax (double d)
 Set the data range max value. More...

double getDataRangeMax ()
 Get the data range maximum value. More...

void setMajorTickIncrement (double r)
 Set the major tick increment. More...

void setMinorTickIncrement (double r)
 Set the minor tick increment. More...

double getMajorTickIncrement ()
 Get the major tick increment value. More...

double getMinorTickIncrement ()
 Get the minor tick increment value. More...

void autoSelectMajorTickIncrement (bool b)
 Select the major tick increment automatically. More...

void autoSelectMinorTickIncrement (bool b)
 Select the minor tick increment automatically. More...

bool isBorderAxes ()
 Get the flag for border axis. More...

bool isAutoSelectedMajorTickIncrement ()
 Get the flag for auto selection of the major tick increment. More...

bool isAutoSelectedMinorTickIncrement ()
 Get the flag for auto selection of the minor tick increment. More...

void setTickType (int t)
 Set the tick type. More...

int getTickType ()
 Get the tick type. More...

void setTickLabelFont (QFont f)
 Set the tick label font. More...

QFont getTickLabelFont ()
 Get the tick label font. More...

void setTickLabelColor (QColor c)
 Set the tick label color. More...

QColor getTickLabelColor ()
 Get the tick label color. More...

void setTickLabelPattern (TxqSciNumberPattern f)
 Set the tick label patern. More...

TxqSciNumberPattern getTickLabelPattern ()
 Get the tick label patern. More...

TxqSciNumberFormat getTickLabelFormat ()
 Get the tick label format. More...

bool insideTick ()
 Get if this is an inside tick mark. More...

bool outsideTick ()
 Get if this is an outside tick mark. More...

virtual void setTitleLabel (QString label)
 Set the title label. More...

virtual void setTitleLabel (QString lablel, double xpos, double ypos)
 Set the title label. More...

virtual QString getTitleLabel ()
 Get the title label. More...

virtual void setTitleLabelFont (QFont f)
 Set the title label font. More...

virtual QFont getTitleLabelFont ()
 Get the title label font. More...

virtual void setTitleLabelColor (QColor c)
 Set the title label color. More...

virtual QColor getTitleLabelColor ()
 Get the title label color. More...

void invertBW (bool white)
 Invert the axis black/white colors. More...

bool isAutoSelectedDataRangeMin ()
 Get if auto data range min is on. More...

bool isAutoSelectedDataRangeMax ()
 Get if auto selected range max is on. More...

void setActualMin (double d)
 Set the actual min of the axis. More...

void setActualMax (double d)
 Set the actual max of the axis. More...

virtual int getAxisMaxWidth ()
 Get the max axis width return of 0 if the axis orientation is VERTICAL. More...

virtual int getAxisMaxHeight ()
 Get the max axis height return of 0 if the axis orientation is HORIZONTAL. More...

void setAutoSize (bool b)
 Set the auto size flag. More...

bool isAutoSize ()
 Get the autosize flag. More...

void setLogScale (bool scale)
 Set the log scale. More...

bool getLogScale ()
 Get the log scale. More...

void setAxisAttribs (const TxqAxisAttribs &a)
 Get the plot attributes of this axis. More...

void updateAxisAttribs (TxqAxisAttribs &a)
 Update the plot attributes with new values. More...


Static Public Attributes

const int NO_TICKS = 0
const int INSIDE_TICK = 1
const int OUTSIDE_TICK = 2

Protected Methods

virtual int getMaxLabelWidth (QFontMetrics fm)
 Get the maximum label width. More...

virtual int getMaxLabelHeight (QFontMetrics fm)
 Get the maximum label height. More...

int tickLength (QFontMetrics fm)
 Get the tick length. More...


Protected Attributes

bool sciNotation
 The Scientific notation flag set to true if using X.XXE+XX notation on the axes. More...

bool autoMajorTickIncr
 The auto major tick increment bool member. More...

bool autoMinorTickIncr
 The auto minor tick increment bool member. More...

double actualMin
 The actual data min value. More...

double actualMax
 The actual data max value. More...

double selectedMin
 The selected data min value. More...

double selectedMax
 The selected data max value. More...

bool autoMin
 The bool member for auto axis minimum. More...

bool autoMax
 The bool member for auto axis maximum. More...

double majorTickIncr
 The major tick increment member. More...

double minorTickIncr
 The minor tick increment member. More...

int tickType
 The tick type, inside or outside. More...

QFont tickLabelFont
 The tick label font. More...

QColor tickLabelColor
 The tick label color. More...

TxqSciNumberPattern tickLabelPattern
 The tick label pattern. More...

QString axisType
 The axis type, vertical or horizontal or other. More...

bool borderAxes
 The bool flag for determing border axes. More...

bool autoSize
 The bool flag for auto sizing the canvas. More...

QFont titleLabelFont
 The title label font. More...

QColor titleLabelColor
 The title label color. More...

bool hasTitleLabel
 The bool flag to determine if contains a title label. More...

bool hasTitleLocation
 The bool flag to determine if have title location. More...

double dmin
 The data min value. More...

double dmax
 The data max value. More...

double dmag
 The data max - min value. More...

int axisLoc
 The specified axis location value. More...

int axis1Loc
 The axis location at top or right. More...

int axis2Loc
 The axis location at bottom or left. More...

QRect plotRect
 The plot rectangle. More...

bool log
 the axis scale True if log. More...

bool xAxis
 The X axis orientation bool flags. More...

bool yAxis
 The Y axis orientation bool flags. More...

bool zAxis
 The Z axis orientation bool flags. More...


Detailed Description

A TxqAxis is a base axis class which is described in a real world coordinate system.

This class provides base functionality for a two or three dimensional axis.

Copyright 2000 by Tech-X Corporation

Author:
Kelly G. Luetkemeyer

Version:
Id:
TxqAxis.h,v 1.19 2001/10/12 18:51:23 kgl Exp

Definition at line 44 of file TxqAxis.h.


Constructor & Destructor Documentation

TxqAxis::TxqAxis ( )
 

The constructor is default.

TxqAxis::~TxqAxis ( ) [virtual]
 

The destructor is default.


Member Function Documentation

void TxqAxis::assign ( TxqAxis r )
 

Assign the class variables from one axis to another.

Parameters:
r   the axis to assign from

void TxqAxis::autoSelectDataRangeMax ( bool b )
 

Set max data range auto select with a bool flag.

Parameters:
b   the bool flag to set auto select on or off for axis max.

void TxqAxis::autoSelectDataRangeMin ( bool b )
 

Set min data range auto select with a bool flag.

Parameters:
b   the bool flag to set auto select on or off for axis min.

void TxqAxis::autoSelectDataRanges ( bool b )
 

Set data range auto select with a bool flag.

Parameters:
b   the bool flag to set auto select on or off.

void TxqAxis::autoSelectMajorTickIncrement ( bool b )
 

Select the major tick increment automatically.

Parameters:
b   input to turn on or off

void TxqAxis::autoSelectMinorTickIncrement ( bool b )
 

Select the minor tick increment automatically.

Parameters:
b   input to turn on or off

int TxqAxis::getAxisMaxHeight ( ) [virtual]
 

Get the max axis height return of 0 if the axis orientation is HORIZONTAL.

Returns:
the height in which the axis will need to paint

Reimplemented in Txq2dAxis, and Txq3dAxis.

int TxqAxis::getAxisMaxWidth ( ) [virtual]
 

Get the max axis width return of 0 if the axis orientation is VERTICAL.

Returns:
the width in which axis will need to paint

Reimplemented in Txq2dAxis, and Txq3dAxis.

double TxqAxis::getDataRangeMax ( )
 

Get the data range maximum value.

double TxqAxis::getDataRangeMin ( )
 

Get the data range minimum value.

Returns:
the data range min value

bool TxqAxis::getLogScale ( )
 

Get the log scale.

Returns:
true if using a log scale

double TxqAxis::getMajorTickIncrement ( )
 

Get the major tick increment value.

Returns:
the increment value

int TxqAxis::getMaxLabelHeight ( QFontMetrics fm ) [protected, virtual]
 

Get the maximum label height.

Parameters:
fm   the font metrics to query for max label height.

int TxqAxis::getMaxLabelWidth ( QFontMetrics fm ) [protected, virtual]
 

Get the maximum label width.

Parameters:
fm   the font metrics to query for max label width.

double TxqAxis::getMinorTickIncrement ( )
 

Get the minor tick increment value.

Returns:
the increment value

QString TxqAxis::getOrientation ( )
 

Return the orientation placement.

Returns:
the orientation placement of the axis X for a horizontal TxqAxis Y for a vertical TxqAxis, Z for a z TxqAxis, the QString representing the direction.

Reimplemented in Txq3dAxis.

bool TxqAxis::getScientificNotation ( )
 

Get the scientific notation flag.

Returns:
the scientific notation flag

QColor TxqAxis::getTickLabelColor ( )
 

Get the tick label color.

Returns:
the tick label color

QFont TxqAxis::getTickLabelFont ( )
 

Get the tick label font.

Returns:
the tick label font

TxqSciNumberFormat TxqAxis::getTickLabelFormat ( )
 

Get the tick label format.

Returns:
the tick label format

TxqSciNumberPattern TxqAxis::getTickLabelPattern ( )
 

Get the tick label patern.

Returns:
the tick label pattern

int TxqAxis::getTickType ( )
 

Get the tick type.

Returns:
the tick type

QString TxqAxis::getTitleLabel ( ) [virtual]
 

Get the title label.

Returns:
the title label

Reimplemented in Txq2dAxis, and Txq3dAxis.

QColor TxqAxis::getTitleLabelColor ( ) [virtual]
 

Get the title label color.

Returns:
the title label color

QFont TxqAxis::getTitleLabelFont ( ) [virtual]
 

Get the title label font.

Returns:
the title label font

bool TxqAxis::insideTick ( )
 

Get if this is an inside tick mark.

Returns:
true if inside tick mark type

void TxqAxis::invertBW ( bool white )
 

Invert the axis black/white colors.

Parameters:
white   true if white is the base background color for the axis

bool TxqAxis::isAutoSelectedDataRangeMax ( )
 

Get if auto selected range max is on.

Returns:
true if auto selected range max is on

bool TxqAxis::isAutoSelectedDataRangeMin ( )
 

Get if auto data range min is on.

Returns:
true if auto data range min is on

bool TxqAxis::isAutoSelectedMajorTickIncrement ( )
 

Get the flag for auto selection of the major tick increment.

Returns:
true or false

bool TxqAxis::isAutoSelectedMinorTickIncrement ( )
 

Get the flag for auto selection of the minor tick increment.

Returns:
true or false

bool TxqAxis::isAutoSize ( )
 

Get the autosize flag.

Returns:
true if auto size is true

bool TxqAxis::isBorderAxes ( )
 

Get the flag for border axis.

Returns:
true if the border axis is desired

bool TxqAxis::outsideTick ( )
 

Get if this is an outside tick mark.

Returns:
true if outside tick mark type

void TxqAxis::setActualMax ( double d )
 

Set the actual max of the axis.

Parameters:
d   the actual data max value

void TxqAxis::setActualMin ( double d )
 

Set the actual min of the axis.

Parameters:
d   the actual data min value

void TxqAxis::setAutoSize ( bool b )
 

Set the auto size flag.

Parameters:
b   true if auto sizing of the axis is desired

void TxqAxis::setAxisAttribs ( const TxqAxisAttribs & a )
 

Get the plot attributes of this axis.

Parameters:
a   the plot attribute in which to set internal data.

void TxqAxis::setBorderAxes ( bool b )
 

Sets the border axes in the paint routine.

Parameters:
b   true if the border axes is desired.

void TxqAxis::setDataRangeMax ( double d )
 

Set the data range max value.

Parameters:
d   the max value

void TxqAxis::setDataRangeMin ( double d )
 

Set the data range minimum.

Parameters:
the   mininum value for the data range.

void TxqAxis::setLogScale ( bool scale )
 

Set the log scale.

Parameters:
scale   true if using a log scale

void TxqAxis::setMajorTickIncrement ( double r )
 

Set the major tick increment.

Parameters:
r   the increment value

void TxqAxis::setMinorTickIncrement ( double r )
 

Set the minor tick increment.

Parameters:
r   the increment value

void TxqAxis::setOrientation ( QString direction )
 

Set the orientation of the axis the orientation is either horizontal or vertical and can be specified with these QStrings: HORIZONTAL, H, horizontal, h, X, x VERTICAL, V, vertical, v, Y, y Z, z.

Parameters:
direction   the orientation direction

Reimplemented in Txq3dAxis.

void TxqAxis::setScientificNotation ( bool f )
 

Sets the scientific notation flag.

Parameters:
f   true if using scientific notation , ie X.XXE+XX on the axes

void TxqAxis::setTickLabelColor ( QColor c )
 

Set the tick label color.

Parameters:
c   the tick label color

void TxqAxis::setTickLabelFont ( QFont f )
 

Set the tick label font.

Parameters:
f   the font for the tick labels

void TxqAxis::setTickLabelPattern ( TxqSciNumberPattern f )
 

Set the tick label patern.

Parameters:
f   the sci number pattern

void TxqAxis::setTickType ( int t )
 

Set the tick type.

Parameters:
i   inside or outside tick

void TxqAxis::setTitleLabel ( QString label,
double xpos,
double ypos ) [virtual]
 

Set the title label.

Parameters:
the   title label
the   x position of the label
the   y position of the label

Reimplemented in Txq2dAxis, and Txq3dAxis.

void TxqAxis::setTitleLabel ( QString lablel ) [virtual]
 

Set the title label.

Parameters:
label   the title label

Reimplemented in Txq2dAxis, and Txq3dAxis.

Referenced by Txq3dAxis::setTitleLabel().

void TxqAxis::setTitleLabelColor ( QColor c ) [virtual]
 

Set the title label color.

Parameters:
c   the title label color

Reimplemented in Txq2dAxis, and Txq3dAxis.

void TxqAxis::setTitleLabelFont ( QFont f ) [virtual]
 

Set the title label font.

Parameters:
the   font for the title labels

Reimplemented in Txq2dAxis, and Txq3dAxis.

int TxqAxis::tickLength ( QFontMetrics fm ) [protected]
 

Get the tick length.

Parameters:
fm   the font metrics to use

void TxqAxis::updateAxisAttribs ( TxqAxisAttribs & a )
 

Update the plot attributes with new values.

Parameters:
a   the plot attribute to use to update.


Member Data Documentation

const int TxqAxis::INSIDE_TICK = 1 [static]
 

Definition at line 383 of file TxqAxis.h.

const int TxqAxis::NO_TICKS = 0 [static]
 

Definition at line 382 of file TxqAxis.h.

const int TxqAxis::OUTSIDE_TICK = 2 [static]
 

Definition at line 384 of file TxqAxis.h.

double TxqAxis::actualMax [protected]
 

The actual data max value.

Definition at line 449 of file TxqAxis.h.

double TxqAxis::actualMin [protected]
 

The actual data min value.

Definition at line 444 of file TxqAxis.h.

bool TxqAxis::autoMajorTickIncr [protected]
 

The auto major tick increment bool member.

Definition at line 434 of file TxqAxis.h.

bool TxqAxis::autoMax [protected]
 

The bool member for auto axis maximum.

Definition at line 469 of file TxqAxis.h.

bool TxqAxis::autoMin [protected]
 

The bool member for auto axis minimum.

Definition at line 464 of file TxqAxis.h.

bool TxqAxis::autoMinorTickIncr [protected]
 

The auto minor tick increment bool member.

Definition at line 439 of file TxqAxis.h.

bool TxqAxis::autoSize [protected]
 

The bool flag for auto sizing the canvas.

Definition at line 515 of file TxqAxis.h.

int TxqAxis::axis1Loc [protected]
 

The axis location at top or right.

Definition at line 560 of file TxqAxis.h.

int TxqAxis::axis2Loc [protected]
 

The axis location at bottom or left.

Definition at line 565 of file TxqAxis.h.

int TxqAxis::axisLoc [protected]
 

The specified axis location value.

Definition at line 555 of file TxqAxis.h.

QString TxqAxis::axisType [protected]
 

The axis type, vertical or horizontal or other.

Definition at line 505 of file TxqAxis.h.

bool TxqAxis::borderAxes [protected]
 

The bool flag for determing border axes.

Definition at line 510 of file TxqAxis.h.

double TxqAxis::dmag [protected]
 

The data max - min value.

Definition at line 550 of file TxqAxis.h.

double TxqAxis::dmax [protected]
 

The data max value.

Definition at line 545 of file TxqAxis.h.

double TxqAxis::dmin [protected]
 

The data min value.

Definition at line 540 of file TxqAxis.h.

bool TxqAxis::hasTitleLabel [protected]
 

The bool flag to determine if contains a title label.

Definition at line 530 of file TxqAxis.h.

bool TxqAxis::hasTitleLocation [protected]
 

The bool flag to determine if have title location.

Definition at line 535 of file TxqAxis.h.

bool TxqAxis::log [protected]
 

the axis scale True if log.

Definition at line 576 of file TxqAxis.h.

double TxqAxis::majorTickIncr [protected]
 

The major tick increment member.

Definition at line 474 of file TxqAxis.h.

double TxqAxis::minorTickIncr [protected]
 

The minor tick increment member.

Definition at line 480 of file TxqAxis.h.

QRect TxqAxis::plotRect [protected]
 

The plot rectangle.

Definition at line 570 of file TxqAxis.h.

bool TxqAxis::sciNotation [protected]
 

The Scientific notation flag set to true if using X.XXE+XX notation on the axes.

Definition at line 428 of file TxqAxis.h.

double TxqAxis::selectedMax [protected]
 

The selected data max value.

Definition at line 459 of file TxqAxis.h.

double TxqAxis::selectedMin [protected]
 

The selected data min value.

Definition at line 454 of file TxqAxis.h.

QColor TxqAxis::tickLabelColor [protected]
 

The tick label color.

Definition at line 495 of file TxqAxis.h.

QFont TxqAxis::tickLabelFont [protected]
 

The tick label font.

Definition at line 490 of file TxqAxis.h.

TxqSciNumberPattern TxqAxis::tickLabelPattern [protected]
 

The tick label pattern.

Definition at line 500 of file TxqAxis.h.

int TxqAxis::tickType [protected]
 

The tick type, inside or outside.

Definition at line 485 of file TxqAxis.h.

QColor TxqAxis::titleLabelColor [protected]
 

The title label color.

Definition at line 525 of file TxqAxis.h.

QFont TxqAxis::titleLabelFont [protected]
 

The title label font.

Definition at line 520 of file TxqAxis.h.

bool TxqAxis::xAxis [protected]
 

The X axis orientation bool flags.

Reimplemented in Txq3dAxis.

Definition at line 581 of file TxqAxis.h.

bool TxqAxis::yAxis [protected]
 

The Y axis orientation bool flags.

Reimplemented in Txq3dAxis.

Definition at line 586 of file TxqAxis.h.

bool TxqAxis::zAxis [protected]
 

The Z axis orientation bool flags.

Reimplemented in Txq3dAxis.

Definition at line 591 of file TxqAxis.h.


The documentation for this class was generated from the following file: Copyright Tech-X Corporation, all rights reserved.