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

Txq2dCanvas Class Reference

The Txq2dCanvas creates a QWidget to be used for drawing TxqDrawable objects. More...

#include <Txq2dCanvas.h>

Inheritance diagram for Txq2dCanvas::

QWidget TxqCanvas Txq2dPrintCanvas List of all members.

Public Slots

void zoomIn (QPoint p)
 slot to zoom in the canvas invoked by the Zoom in menu item. More...

void zoomOut ()
 slot to zoom out the canvas invoked by the Zoom out menu item. More...

void setSize (QSize s)
 Set the size values. More...

void resizeCanvas (QSize newSize)
 resize the canvas. More...

void setPlotAttribs (TxqPlotAttribs *p)
 Set the plot attributes. More...

void updatePlotAttribs (TxqPlotAttribs *p)
 update the plot attributes with new values. More...


Signals

void mouseClick (double, double)
 The clicked signal is emitted whenever the mouse is pressed in the plot widget. More...

void mouseSelectPoint (double, double)
 The mouseSelectPoint signal is emitted whenever the mouse is pressed in the canvas widget and zoom is set to none. More...

void mouseClick ()
 The clicked signal is emitted whenever the mouse is pressed in the plot widget. More...

void mouseClick (QMouseEvent *)
 The clicked signal is emitted whenever the mouse is pressed in the plot widget. More...

void mouseClick (QPoint)
 The clicked signal is emitted whenever the mouse is pressed in the plot widget. More...

void mouseRightClick ()
 The signal is emitted whenever the right mouse button is pressed in the plot widget. More...

void mouseMiddleClick (int x, int y)
 The signal is emitted whenever the middle mouse button is pressed in the plot widget. More...

void mouseMiddleClick (QPoint)
void newData ()
 The signal newData() is emitted whenever data is added to the plot, This is useful for linking updates to the plot to other events. More...

void resizeCanvasSignal ()
 The resizeCanvas() signal is emitted whenever the canvas is resized. More...

void zoomOutSignal ()
 The zoomOutSignal is emitted whenever the zoom is finished. More...

void clearPixmapSignal ()
 The clearPixmapSignal is emitted whenever the clearPixmap is invoked. More...


Public Methods

 Txq2dCanvas (QWidget *parent=0, const char *nm=0)
 The constructor for a Txq2dCanvas. More...

virtual ~Txq2dCanvas ()
 The desctructor. More...

TxqViewPortgetView ()
 Get the viewport pointer. More...

double getXmin ()
 get the X minimum value of the plot region. More...

double getXmax ()
 get the X maximum value of the plot region. More...

double getYmin ()
 get the Y minimum value of the plot region. More...

double getYmax ()
 get the Y maximum value of the plot region. More...

double pixelToX (const QPoint &p)
 Convert the pixel to the plot x value. More...

double pixelToY (const QPoint &p)
 Convert the pixel to the plot y value. More...

QPoint xyToPixel (double x, double y)
 Convert the x,y plot cordinates to a screen pixel point. More...

short xToPixel (double x)
 Convert the x coordinate on the plot to a x pixel value. More...

short yToPixel (double y)
 Convert the y coordinate on the plot to a y pixel value. More...

void drawPixmap ()
 Draw the pixmap to the screen using bit blt transfer from a QPixmap. More...

void drawPixmap (QPixmap *pm)
 Draws this pixmap to the screen using bit blt's. More...

void setXmin (double val)
 set the X minimum value of the plot region. More...

void setXmax (double val)
 set the X maximum value of the plot region. More...

void setYmin (double val)
 set the Y minimum value of the plot region. More...

void setYmax (double val)
 set the Y maximum value of the plot region. More...

void setRange (double plxmin, double plymin, double plxmax, double plymax)
 set the x and y range. More...

void setPlotRegion (int x, int y, int width, int height)
 set the plot region This method will set the plot region to a specified size which cannot be resized, ie the x,y location will stay fixed as well as the width and height. More...

void setPlotBorder (double percent)
 Set the plot border percent The plot will always be centered if a resize event occurs. More...

void setPlotBorder (int left=0, int bottom=0, int right=0, int top=0)
 Set the plot border The plot will not be centered but can be resized. More...

void setPixmapColor (QColor qcolor)
 set the pixmap color from a QColor. More...

void setColor (QColor color)
 set the pixmap color. More...

void setPixmapColor (int i)
 set the pixmap color from an index. More...

QColor getPixmapColor ()
 get the pixmap color. More...

QColor getColor ()
 get the pixmap color. More...

void clearPixmap ()
 clears the pixmap. More...

void setPixmap (QPixmap *newPixmap)
 Set the pixmap with the new pixmap pointer. More...

QPixmap* getPixmap ()
 get the current pixmap. More...

QSize getPixmapSize ()
 get the pixmap size. More...

void setCache (bool isCache)
 Set the cache bool value. More...

void addMouseClickListener ()
 add a mouseClick listener to listen for canvas clicks. More...

void add (TxqDrawable *drawAble)
 add the canvas drawables. More...

void add (Txq2dAxis *axis)
 add the Txq2dAxis. More...

void add (TxqAxis *axis)
 Overload the add method from the base class to remove compiler warnings. More...

void remove (TxqAxis *axis)
 remove the canvas axis. More...

void remove (TxqDrawable *d)
 Forward the overloaded method to prevent compiler warnings. More...

void remove ()
 remove all axes. More...

void setCrossHairCursor (bool cross)
 Set the cross hair cursor. More...

void setScale (int xscale, int yscale)
 Set the scale 0 is linear 1 is log. More...

Txq2dAxisgetXaxis ()
 Get the X-axis object contained in the canvas. More...

Txq2dAxisgetYaxis ()
 Get the Y-axis object contained in the canvas. More...

bool hasXaxis ()
 determines if an X-axis is present. More...

bool hasYaxis ()
 determines if an Y-axis is present. More...

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

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

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

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

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

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

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

void setZoom (int z)
 Set the zoom option value, ZOOM_IN or ZOOM_OUT. More...

void dump (QTextStream *ts)
 dump the Txq2dDrawable contents to a QTextStream. More...


Public Attributes

TxqViewPortview
 The view port. More...

Txq2dLabel titleLabel
 the title label of the canvas. More...

int titleHalfW
 the half width of the title. More...

double titleHeight
 the title height. More...

bool hasTitleLabel
 true if the canvas title has been set. More...


Protected Methods

QSize sizeHint () const
 the size hint overloaded method. More...

void paintEvent (QPaintEvent *g)
 The paint event for the Txq2dCanvas. More...

void resizeEvent (QResizeEvent *)
 the Resize event. More...

void closeEvent (QCloseEvent *)
 the close event. More...

void mousePressEvent (QMouseEvent *)
 mouse event pressed method Txq2dCanvas reimplements mousePressEvent so that the mouseClick() signal is emmited with the plot coordinates of the mouseEvent. More...

void mouseMoveEvent (QMouseEvent *)
 mouse move method Txq2dCanvas reimplements mouseMoveEvent so that a rectangle can be drawn if the middle mouse button is pushed. More...

void mouseReleaseEvent (QMouseEvent *)
 mouse release method Txq2dCanvas reimplements the mouseReleaseEvent to reset flags. More...


Protected Attributes

QPixmap* pixmap
 The pixmap. More...

QPixmap* clearpm
 A black pixmap. More...

QPixmap* cachepm
 The cache pixmap. More...


Private Methods

void setAxes (double xmin, double ymin, double xmax, double ymax)
 Set the axes min and max values. More...


Private Attributes

QColor color
 the pixmap color. More...

int numColors
 Number of colors. More...

std::vector<QColorcolors
 The color list. More...

int currentColor
 The index to the current color. More...

TxqClickListener l
 The click listner. More...

TxqLogViewPortlogView
 The log view port. More...

TxqLinLogViewPortlinlogView
 The X-linear Y-log view port. More...

TxqLogLinViewPortloglinView
 The X-log Y-linear view port. More...

TxqLinViewPortlinView
 The linear view port. More...

TxqLinViewPorttitleView
 The title view port. More...

bool noRange
 bool flag to determine if the range has been set. More...

double widthPercent
 the widht percentage of the plot region This is needed for resizing. More...

double heightPercent
 the height percentages of the plot region This is for resizing. More...

int plotBorderLeft
 The pixel length for the left border. More...

int plotBorderRight
 The pixel length for the right border. More...

int plotBorderTop
 The pixel length for the top border. More...

int plotBorderBottom
 The pixel length for the bottom border. More...

bool plotBorderPercent
 true if the plot border has been specified via a percentage. More...

bool plotBorderPixel
 true if the plot border has been specified with pixel number. More...

bool plotBorderRegion
 true if the plot border setPlotBorderRegion has been set. More...

bool caching
 true if caching. More...

bool newCache
 true if need to generate new cache pixmap. More...

bool isXaxis
 true if an X-axis is present. More...

bool isYaxis
 true if an Y-axis is present. More...

Txq2dAxisxAxis
 The X-axis contained within the canvas. More...

Txq2dAxisyAxis
 The Y-axis contained within the canvas. More...

bool hasTitleLocation
 true if the canvas title location has been set. More...

QFont titleLabelFont
 the font for the title label. More...

QColor titleLabelColor
 the color of the title label. More...

bool mouseDown
 true if the mouse button is down. More...

int mx
 the mouse middle start positions. More...

int my
 the mouse middle start positions. More...

double xmin
 the canvas range xmin value. More...

double xmax
 the canvas range xmax value. More...

double ymin
 the canvas range ymin value. More...

double ymax
 the canvas range ymax value. More...

int zoom
 the zoom type. More...

bool crossHair
 the cross hair boolean flag true if using cross hair. More...

std::vector<double> vxmin
 vector to hold the zoom xmin values. More...

std::vector<double> vxmax
 vector to hold the zoom xmax values. More...

std::vector<double> vymin
 vector to hold the zoom ymin values. More...

std::vector<double> vymax
 vector to hold the zoom ymax values. More...

int vIndex
 the current vector index of the zoom values. More...

int myWidth
 the width of this canvas. More...

int myHeight
 the height of this canvas. More...

bool painted
 A paint bool to determine if canvas has been painted. More...


Detailed Description

The Txq2dCanvas creates a QWidget to be used for drawing TxqDrawable objects.

Copyright 2000 by Tech-X Corporation

Author:
Kelly G. Luetkemeyer

Version:
Id:
Txq2dCanvas.h,v 1.8 2002/01/04 20:13:39 kgl Exp

Definition at line 65 of file Txq2dCanvas.h.


Constructor & Destructor Documentation

Txq2dCanvas::Txq2dCanvas ( QWidget * parent = 0,
const char * nm = 0 )
 

The constructor for a Txq2dCanvas.

Parameters:
parent   the parent widget defaulted to null
nm   the name for the widget defaulted to null

Txq2dCanvas::~Txq2dCanvas ( ) [virtual]
 

The desctructor.


Member Function Documentation

void Txq2dCanvas::add ( TxqAxis * axis ) [inline, virtual]
 

Overload the add method from the base class to remove compiler warnings.

Adds the TxqAxis

Parameters:
axis   the TxqAxis pointer to add.

Reimplemented from TxqCanvas.

Definition at line 343 of file Txq2dCanvas.h.

void Txq2dCanvas::add ( Txq2dAxis * axis )
 

add the Txq2dAxis.

Parameters:
axis   the Txq2dAxis pointer to add.

void Txq2dCanvas::add ( TxqDrawable * drawAble ) [virtual]
 

add the canvas drawables.

Parameters:
drawAble   the drawAble pointer to add to the canvas.

Reimplemented from TxqCanvas.

void Txq2dCanvas::addMouseClickListener ( )
 

add a mouseClick listener to listen for canvas clicks.

void Txq2dCanvas::clearPixmap ( )
 

clears the pixmap.

void Txq2dCanvas::clearPixmapSignal ( ) [signal]
 

The clearPixmapSignal is emitted whenever the clearPixmap is invoked.

void Txq2dCanvas::closeEvent ( QCloseEvent * ) [protected]
 

the close event.

void Txq2dCanvas::drawPixmap ( QPixmap * pm )
 

Draws this pixmap to the screen using bit blt's.

Parameters:
pm   the QPixmap pointer to use

void Txq2dCanvas::drawPixmap ( )
 

Draw the pixmap to the screen using bit blt transfer from a QPixmap.

void Txq2dCanvas::dump ( QTextStream * ts )
 

dump the Txq2dDrawable contents to a QTextStream.

Parameters:
ts   the QTextStream to dump the contents.

QColor Txq2dCanvas::getColor ( ) [inline]
 

get the pixmap color.

Returns:
the color of the pixmap

Definition at line 284 of file Txq2dCanvas.h.

QPixmap * Txq2dCanvas::getPixmap ( ) [inline]
 

get the current pixmap.

Returns:
the current pixmap

Definition at line 306 of file Txq2dCanvas.h.

QColor Txq2dCanvas::getPixmapColor ( ) [inline]
 

get the pixmap color.

Returns:
the color of the pixmap

Definition at line 276 of file Txq2dCanvas.h.

Referenced by getColor().

QSize Txq2dCanvas::getPixmapSize ( ) [inline]
 

get the pixmap size.

Returns:
the pixmap size

Definition at line 312 of file Txq2dCanvas.h.

QString Txq2dCanvas::getTitleLabel ( )
 

Get the title label.

Returns:
the title label

QColor Txq2dCanvas::getTitleLabelColor ( )
 

Get the title label color.

Returns:
the title label color

QFont Txq2dCanvas::getTitleLabelFont ( )
 

Get the title label font.

Returns:
the title label font

TxqViewPort * Txq2dCanvas::getView ( ) [inline]
 

Get the viewport pointer.

Returns:
the TxqViewPort of the canvas.

Definition at line 87 of file Txq2dCanvas.h.

Txq2dAxis * Txq2dCanvas::getXaxis ( ) [inline]
 

Get the X-axis object contained in the canvas.

Returns:
the Txq2dAxis pointer.

Definition at line 382 of file Txq2dCanvas.h.

double Txq2dCanvas::getXmax ( ) [inline]
 

get the X maximum value of the plot region.

Returns:
the value for the right edge of the plot.

Definition at line 101 of file Txq2dCanvas.h.

double Txq2dCanvas::getXmin ( ) [inline]
 

get the X minimum value of the plot region.

Returns:
the value for the left edge of the plot.

Definition at line 94 of file Txq2dCanvas.h.

Txq2dAxis * Txq2dCanvas::getYaxis ( ) [inline]
 

Get the Y-axis object contained in the canvas.

Returns:
the Txq2dAxis pointer.

Definition at line 388 of file Txq2dCanvas.h.

double Txq2dCanvas::getYmax ( ) [inline]
 

get the Y maximum value of the plot region.

Returns:
the value for the top edge of the plot.

Definition at line 115 of file Txq2dCanvas.h.

double Txq2dCanvas::getYmin ( ) [inline]
 

get the Y minimum value of the plot region.

Returns:
the value for the bottom edge of the plot.

Definition at line 108 of file Txq2dCanvas.h.

bool Txq2dCanvas::hasXaxis ( )
 

determines if an X-axis is present.

Returns:
true if the canvas has an X-axis object

bool Txq2dCanvas::hasYaxis ( )
 

determines if an Y-axis is present.

Returns:
true if the canvas has an Y-axis object

void Txq2dCanvas::mouseClick ( QPoint ) [signal]
 

The clicked signal is emitted whenever the mouse is pressed in the plot widget.

The QPoint is passed.

Parameters:
the   QMouseEvent

void Txq2dCanvas::mouseClick ( QMouseEvent * ) [signal]
 

The clicked signal is emitted whenever the mouse is pressed in the plot widget.

The QMouseEvent is passed.

Parameters:
the   QMouseEvent

void Txq2dCanvas::mouseClick ( ) [signal]
 

The clicked signal is emitted whenever the mouse is pressed in the plot widget.

void Txq2dCanvas::mouseClick ( double,
double ) [signal]
 

The clicked signal is emitted whenever the mouse is pressed in the plot widget.

The signal has the values xval and yval of the location of the mouse in plot coordinates.

Parameters:
xval   the x plot cordinate
yval   the y plot cordinate

void Txq2dCanvas::mouseMiddleClick ( QPoint ) [signal]
 

void Txq2dCanvas::mouseMiddleClick ( int x,
int y ) [signal]
 

The signal is emitted whenever the middle mouse button is pressed in the plot widget.

Parameters:
the   x location of the mouse
the   y location of the mouse

void Txq2dCanvas::mouseMoveEvent ( QMouseEvent * ) [protected]
 

mouse move method Txq2dCanvas reimplements mouseMoveEvent so that a rectangle can be drawn if the middle mouse button is pushed.

Parameters:
e   the QMouseEvent pointer

void Txq2dCanvas::mousePressEvent ( QMouseEvent * ) [protected]
 

mouse event pressed method Txq2dCanvas reimplements mousePressEvent so that the mouseClick() signal is emmited with the plot coordinates of the mouseEvent.

Parameters:
e   the QMouseEvent pointer

void Txq2dCanvas::mouseReleaseEvent ( QMouseEvent * ) [protected]
 

mouse release method Txq2dCanvas reimplements the mouseReleaseEvent to reset flags.

Parameters:
e   the QMouseEvent pointer

void Txq2dCanvas::mouseRightClick ( ) [signal]
 

The signal is emitted whenever the right mouse button is pressed in the plot widget.

void Txq2dCanvas::mouseSelectPoint ( double,
double ) [signal]
 

The mouseSelectPoint signal is emitted whenever the mouse is pressed in the canvas widget and zoom is set to none.

The signal has the values xval and yval of the location of the mouse in plot coordinates. This signal is useful for selecting points when the zoom feature is off.

Parameters:
xval   the x plot cordinate
yval   the y plot cordinate

void Txq2dCanvas::newData ( ) [signal]
 

The signal newData() is emitted whenever data is added to the plot, This is useful for linking updates to the plot to other events.

void Txq2dCanvas::paintEvent ( QPaintEvent * g ) [protected]
 

The paint event for the Txq2dCanvas.

This method does all the work to draw all the TxqDrawable objects.

Parameters:
g   the paint device

Reimplemented in Txq2dPrintCanvas.

double Txq2dCanvas::pixelToX ( const QPoint & p ) [inline]
 

Convert the pixel to the plot x value.

Returns:
the plot x coordinate for a given screen pixel p.
Parameters:
p   the pixel point.

Definition at line 123 of file Txq2dCanvas.h.

double Txq2dCanvas::pixelToY ( const QPoint & p ) [inline]
 

Convert the pixel to the plot y value.

Returns:
the plot y coordinate for a given screen pixel p.
Parameters:
p   the pixel point.

Definition at line 131 of file Txq2dCanvas.h.

void Txq2dCanvas::remove ( ) [inline, virtual]
 

remove all axes.

Reimplemented from TxqCanvas.

Definition at line 360 of file Txq2dCanvas.h.

void Txq2dCanvas::remove ( TxqDrawable * d ) [inline, virtual]
 

Forward the overloaded method to prevent compiler warnings.

Parameters:
d   the TxqDrawable pointer to remove.

Reimplemented from TxqCanvas.

Definition at line 355 of file Txq2dCanvas.h.

void Txq2dCanvas::remove ( TxqAxis * axis )
 

remove the canvas axis.

Parameters:
axis   the TxqAxis pointer to remove.

Reimplemented from TxqCanvas.

void Txq2dCanvas::resizeCanvas ( QSize newSize ) [slot]
 

resize the canvas.

Parameters:
newSize   the new size value for the canvas.

void Txq2dCanvas::resizeCanvasSignal ( ) [signal]
 

The resizeCanvas() signal is emitted whenever the canvas is resized.

void Txq2dCanvas::resizeEvent ( QResizeEvent * ) [protected]
 

the Resize event.

void Txq2dCanvas::setAxes ( double xmin,
double ymin,
double xmax,
double ymax ) [private]
 

Set the axes min and max values.

Parameters:
xmin   the value for the left edge of the plot.
ymin   the value for the bottom edge of the plot.
xmax   the value for the right edge of the plot.
ymax   the value for the top edge of the plot.

void Txq2dCanvas::setCache ( bool isCache )
 

Set the cache bool value.

Set to true if caching the axes draws.

Parameters:
isCache   the cache bool value

void Txq2dCanvas::setColor ( QColor color ) [inline]
 

set the pixmap color.

Parameters:
color   the color to set the pixmap

Definition at line 260 of file Txq2dCanvas.h.

void Txq2dCanvas::setCrossHairCursor ( bool cross )
 

Set the cross hair cursor.

Parameters:
cross   the bool value for setting the cross hair cursor, true if it is on

void Txq2dCanvas::setPixmap ( QPixmap * newPixmap ) [inline]
 

Set the pixmap with the new pixmap pointer.

Parameters:
newPixmap   the new pixmap to set

Definition at line 297 of file Txq2dCanvas.h.

void Txq2dCanvas::setPixmapColor ( int i ) [inline]
 

set the pixmap color from an index.

Parameters:
i   the color index

Definition at line 268 of file Txq2dCanvas.h.

void Txq2dCanvas::setPixmapColor ( QColor qcolor ) [inline]
 

set the pixmap color from a QColor.

Parameters:
qcolor   the color to set the pixmap

Definition at line 251 of file Txq2dCanvas.h.

Referenced by setColor().

void Txq2dCanvas::setPlotAttribs ( TxqPlotAttribs * p ) [slot]
 

Set the plot attributes.

Parameters:
p   the TxqPlotAttribs pointer to use to set the plot attributes from.

void Txq2dCanvas::setPlotBorder ( int left = 0,
int bottom = 0,
int right = 0,
int top = 0 )
 

Set the plot border The plot will not be centered but can be resized.

The plot border is designated with the desired number of pixels for each left,bottom,right,top sides. During a resize event, these border pixels will stay fixed. All inputs are defaulted to 0

Parameters:
left   the left number of pixels for the border
bottom   the bottom number of pixels for the border
right   the right number of pixels for the border
top   the top number of pixels for the border

void Txq2dCanvas::setPlotBorder ( double percent )
 

Set the plot border percent The plot will always be centered if a resize event occurs.

Parameters:
percent   the percentage desired for the border

void Txq2dCanvas::setPlotRegion ( int x,
int y,
int width,
int height )
 

set the plot region This method will set the plot region to a specified size which cannot be resized, ie the x,y location will stay fixed as well as the width and height.

Parameters:
x   the value for the left edge of the plot.
y   the value for the bottom edge of the plot.
width   the width of the plot region
height   the height of the plot region

void Txq2dCanvas::setRange ( double plxmin,
double plymin,
double plxmax,
double plymax ) [inline]
 

set the x and y range.

Parameters:
plxmin   the value for the left edge of the plot.
plymin   the value for the bottom edge of the plot.
plxmax   the value for the right edge of the plot.
plymax   the value for the top edge of the plot.

Definition at line 205 of file Txq2dCanvas.h.

void Txq2dCanvas::setScale ( int xscale,
int yscale )
 

Set the scale 0 is linear 1 is log.

Parameters:
xscale   the desired xscale
yscale   the desired yscale

void Txq2dCanvas::setSize ( QSize s ) [slot]
 

Set the size values.

Parameters:
s   the new size values

void Txq2dCanvas::setTitleLabel ( QString lablel,
double xpos,
double ypos )
 

Set the title label.

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

void Txq2dCanvas::setTitleLabel ( QString lablel )
 

Set the title label.

Parameters:
label   the title label

void Txq2dCanvas::setTitleLabelColor ( QColor c )
 

Set the title label color.

Parameters:
c   the title label color

void Txq2dCanvas::setTitleLabelFont ( QFont f )
 

Set the title label font.

Parameters:
f   the font for the title labels

void Txq2dCanvas::setXmax ( double val ) [inline]
 

set the X maximum value of the plot region.

Parameters:
val   the value for the right edge of the plot.

Definition at line 181 of file Txq2dCanvas.h.

void Txq2dCanvas::setXmin ( double val ) [inline]
 

set the X minimum value of the plot region.

Parameters:
val   the value for the left edge of the plot.

Definition at line 175 of file Txq2dCanvas.h.

void Txq2dCanvas::setYmax ( double val ) [inline]
 

set the Y maximum value of the plot region.

Parameters:
val   the value for the top edge of the plot.

Definition at line 193 of file Txq2dCanvas.h.

void Txq2dCanvas::setYmin ( double val ) [inline]
 

set the Y minimum value of the plot region.

Parameters:
val   the value for the bottom edge of the plot.

Definition at line 187 of file Txq2dCanvas.h.

void Txq2dCanvas::setZoom ( int z )
 

Set the zoom option value, ZOOM_IN or ZOOM_OUT.

Parameters:
z   the zoom option value

QSize Txq2dCanvas::sizeHint ( ) const [protected]
 

the size hint overloaded method.

void Txq2dCanvas::updatePlotAttribs ( TxqPlotAttribs * p ) [slot]
 

update the plot attributes with new values.

Parameters:
p   the plot attributes are updated with the values from this pointer.

short Txq2dCanvas::xToPixel ( double x ) [inline]
 

Convert the x coordinate on the plot to a x pixel value.

Larger valued x pixels are to the right on the screen.

Returns:
the x pixel
Parameters:
x   the plot coordinate x

Definition at line 149 of file Txq2dCanvas.h.

QPoint Txq2dCanvas::xyToPixel ( double x,
double y ) [inline]
 

Convert the x,y plot cordinates to a screen pixel point.

Returns:
the screen pixel point
Parameters:
x   the plot coordinate x
y   the plot coordinate y

Definition at line 140 of file Txq2dCanvas.h.

short Txq2dCanvas::yToPixel ( double y ) [inline]
 

Convert the y coordinate on the plot to a y pixel value.

Larger valued y pixels are lower on the screen.

Returns:
the y pixel
Parameters:
y   the plot coordinate y

Definition at line 158 of file Txq2dCanvas.h.

void Txq2dCanvas::zoomIn ( QPoint p ) [slot]
 

slot to zoom in the canvas invoked by the Zoom in menu item.

Parameters:
p   the mouse location to start to draw the surrounding rectangle.

void Txq2dCanvas::zoomOut ( ) [slot]
 

slot to zoom out the canvas invoked by the Zoom out menu item.

void Txq2dCanvas::zoomOutSignal ( ) [signal]
 

The zoomOutSignal is emitted whenever the zoom is finished.


Member Data Documentation

QPixmap * Txq2dCanvas::cachepm [protected]
 

The cache pixmap.

Definition at line 644 of file Txq2dCanvas.h.

bool Txq2dCanvas::caching [private]
 

true if caching.

Definition at line 786 of file Txq2dCanvas.h.

QPixmap * Txq2dCanvas::clearpm [protected]
 

A black pixmap.

Definition at line 639 of file Txq2dCanvas.h.

QColor Txq2dCanvas::color [private]
 

the pixmap color.

Definition at line 687 of file Txq2dCanvas.h.

std::vector< QColor > Txq2dCanvas::colors [private]
 

The color list.

Definition at line 697 of file Txq2dCanvas.h.

bool Txq2dCanvas::crossHair [private]
 

the cross hair boolean flag true if using cross hair.

Definition at line 868 of file Txq2dCanvas.h.

int Txq2dCanvas::currentColor [private]
 

The index to the current color.

Definition at line 702 of file Txq2dCanvas.h.

bool Txq2dCanvas::hasTitleLabel
 

true if the canvas title has been set.

Definition at line 482 of file Txq2dCanvas.h.

bool Txq2dCanvas::hasTitleLocation [private]
 

true if the canvas title location has been set.

Definition at line 820 of file Txq2dCanvas.h.

double Txq2dCanvas::heightPercent [private]
 

the height percentages of the plot region This is for resizing.

Definition at line 749 of file Txq2dCanvas.h.

bool Txq2dCanvas::isXaxis [private]
 

true if an X-axis is present.

Definition at line 796 of file Txq2dCanvas.h.

bool Txq2dCanvas::isYaxis [private]
 

true if an Y-axis is present.

Definition at line 801 of file Txq2dCanvas.h.

TxqClickListener Txq2dCanvas::l [private]
 

The click listner.

Definition at line 707 of file Txq2dCanvas.h.

TxqLinViewPort * Txq2dCanvas::linView [private]
 

The linear view port.

Definition at line 727 of file Txq2dCanvas.h.

TxqLinLogViewPort * Txq2dCanvas::linlogView [private]
 

The X-linear Y-log view port.

Definition at line 717 of file Txq2dCanvas.h.

TxqLogViewPort * Txq2dCanvas::logView [private]
 

The log view port.

Definition at line 712 of file Txq2dCanvas.h.

TxqLogLinViewPort * Txq2dCanvas::loglinView [private]
 

The X-log Y-linear view port.

Definition at line 722 of file Txq2dCanvas.h.