#include <Txq2dCanvas.h>
Inheritance diagram for Txq2dCanvas::

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... | |
| TxqViewPort* | getView () |
| 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... | |
| Txq2dAxis* | getXaxis () |
| Get the X-axis object contained in the canvas. More... | |
| Txq2dAxis* | getYaxis () |
| 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 | |
| TxqViewPort* | view |
| 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<QColor> | colors |
| The color list. More... | |
| int | currentColor |
| The index to the current color. More... | |
| TxqClickListener | l |
| The click listner. More... | |
| TxqLogViewPort* | logView |
| The log view port. More... | |
| TxqLinLogViewPort* | linlogView |
| The X-linear Y-log view port. More... | |
| TxqLogLinViewPort* | loglinView |
| The X-log Y-linear view port. More... | |
| TxqLinViewPort* | linView |
| The linear view port. More... | |
| TxqLinViewPort* | titleView |
| 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... | |
| Txq2dAxis* | xAxis |
| The X-axis contained within the canvas. More... | |
| Txq2dAxis* | yAxis |
| 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... | |
Copyright 2000 by Tech-X Corporation
Definition at line 65 of file Txq2dCanvas.h.
|
|
The constructor for a Txq2dCanvas.
|
|
|
The desctructor.
|
|
|
Overload the add method from the base class to remove compiler warnings. Adds the TxqAxis
Reimplemented from TxqCanvas. Definition at line 343 of file Txq2dCanvas.h. |
|
|
add the Txq2dAxis.
|
|
|
add the canvas drawables.
Reimplemented from TxqCanvas. |
|
|
add a mouseClick listener to listen for canvas clicks.
|
|
|
clears the pixmap.
|
|
|
The clearPixmapSignal is emitted whenever the clearPixmap is invoked.
|
|
|
the close event.
|
|
|
Draws this pixmap to the screen using bit blt's.
|
|
|
Draw the pixmap to the screen using bit blt transfer from a QPixmap.
|
|
|
dump the Txq2dDrawable contents to a QTextStream.
|
|
|
get the pixmap color.
Definition at line 284 of file Txq2dCanvas.h. |
|
|
get the current pixmap.
Definition at line 306 of file Txq2dCanvas.h. |
|
|
get the pixmap color.
Definition at line 276 of file Txq2dCanvas.h. Referenced by getColor().
|
|
|
get the pixmap size.
Definition at line 312 of file Txq2dCanvas.h. |
|
|
Get the title label.
|
|
|
Get the title label color.
|
|
|
Get the title label font.
|
|
|
Get the viewport pointer.
Definition at line 87 of file Txq2dCanvas.h. |
|
|
Get the X-axis object contained in the canvas.
Definition at line 382 of file Txq2dCanvas.h. |
|
|
get the X maximum value of the plot region.
Definition at line 101 of file Txq2dCanvas.h. |
|
|
get the X minimum value of the plot region.
Definition at line 94 of file Txq2dCanvas.h. |
|
|
Get the Y-axis object contained in the canvas.
Definition at line 388 of file Txq2dCanvas.h. |
|
|
get the Y maximum value of the plot region.
Definition at line 115 of file Txq2dCanvas.h. |
|
|
get the Y minimum value of the plot region.
Definition at line 108 of file Txq2dCanvas.h. |
|
|
determines if an X-axis is present.
|
|
|
determines if an Y-axis is present.
|
|
|
The clicked signal is emitted whenever the mouse is pressed in the plot widget. The QPoint is passed.
|
|
|
The clicked signal is emitted whenever the mouse is pressed in the plot widget. The QMouseEvent is passed.
|
|
|
The clicked signal is emitted whenever the mouse is pressed in the plot widget.
|
|
|
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.
|
|
|
|
|
|
The signal is emitted whenever the middle mouse button is pressed in the plot widget.
|
|
|
mouse move method Txq2dCanvas reimplements mouseMoveEvent so that a rectangle can be drawn if the middle mouse button is pushed.
|
|
|
mouse event pressed method Txq2dCanvas reimplements mousePressEvent so that the mouseClick() signal is emmited with the plot coordinates of the mouseEvent.
|
|
|
mouse release method Txq2dCanvas reimplements the mouseReleaseEvent to reset flags.
|
|
|
The signal is emitted whenever the right mouse button is pressed in the plot widget.
|
|
|
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.
|
|
|
The signal newData() is emitted whenever data is added to the plot, This is useful for linking updates to the plot to other events.
|
|
|
The paint event for the Txq2dCanvas. This method does all the work to draw all the TxqDrawable objects.
Reimplemented in Txq2dPrintCanvas. |
|
|
Convert the pixel to the plot x value.
Definition at line 123 of file Txq2dCanvas.h. |
|
|
Convert the pixel to the plot y value.
Definition at line 131 of file Txq2dCanvas.h. |
|
|
remove all axes.
Reimplemented from TxqCanvas. Definition at line 360 of file Txq2dCanvas.h. |
|
|
Forward the overloaded method to prevent compiler warnings.
Reimplemented from TxqCanvas. Definition at line 355 of file Txq2dCanvas.h. |
|
|
remove the canvas axis.
Reimplemented from TxqCanvas. |
|
|
resize the canvas.
|
|
|
The resizeCanvas() signal is emitted whenever the canvas is resized.
|
|
|
the Resize event.
|
|
|
Set the axes min and max values.
|
|
|
Set the cache bool value. Set to true if caching the axes draws.
|
|
|
set the pixmap color.
Definition at line 260 of file Txq2dCanvas.h. |
|
|
Set the cross hair cursor.
|
|
|
Set the pixmap with the new pixmap pointer.
Definition at line 297 of file Txq2dCanvas.h. |
|
|
set the pixmap color from an index.
Definition at line 268 of file Txq2dCanvas.h. |
|
|
set the pixmap color from a QColor.
Definition at line 251 of file Txq2dCanvas.h. Referenced by setColor().
|
|
|
Set the plot attributes.
|
|
|
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
|
|
|
Set the plot border percent The plot will always be centered if a resize event occurs.
|
|
|
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.
|
|
|
set the x and y range.
Definition at line 205 of file Txq2dCanvas.h. |
|
|
Set the scale 0 is linear 1 is log.
|
|
|
Set the size values.
|
|
|
Set the title label.
|
|
|
Set the title label.
|
|
|
Set the title label color.
|
|
|
Set the title label font.
|
|
|
set the X maximum value of the plot region.
Definition at line 181 of file Txq2dCanvas.h. |
|
|
set the X minimum value of the plot region.
Definition at line 175 of file Txq2dCanvas.h. |
|
|
set the Y maximum value of the plot region.
Definition at line 193 of file Txq2dCanvas.h. |
|
|
set the Y minimum value of the plot region.
Definition at line 187 of file Txq2dCanvas.h. |
|
|
Set the zoom option value, ZOOM_IN or ZOOM_OUT.
|
|
|
the size hint overloaded method.
|
|
|
update the plot attributes with new values.
|
|
|
Convert the x coordinate on the plot to a x pixel value. Larger valued x pixels are to the right on the screen.
Definition at line 149 of file Txq2dCanvas.h. |
|
|
Convert the x,y plot cordinates to a screen pixel point.
Definition at line 140 of file Txq2dCanvas.h. |
|
|
Convert the y coordinate on the plot to a y pixel value. Larger valued y pixels are lower on the screen.
Definition at line 158 of file Txq2dCanvas.h. |
|
|
slot to zoom in the canvas invoked by the Zoom in menu item.
|
|
|
slot to zoom out the canvas invoked by the Zoom out menu item.
|
|
|
The zoomOutSignal is emitted whenever the zoom is finished.
|
|
|
The cache pixmap.
Definition at line 644 of file Txq2dCanvas.h. |
|
|
true if caching.
Definition at line 786 of file Txq2dCanvas.h. |
|
|
A black pixmap.
Definition at line 639 of file Txq2dCanvas.h. |
|
|
the pixmap color.
Definition at line 687 of file Txq2dCanvas.h. |
|
|
The color list.
Definition at line 697 of file Txq2dCanvas.h. |
|
|
the cross hair boolean flag true if using cross hair.
Definition at line 868 of file Txq2dCanvas.h. |
|
|
The index to the current color.
Definition at line 702 of file Txq2dCanvas.h. |
|
|
true if the canvas title has been set.
Definition at line 482 of file Txq2dCanvas.h. |
|
|
true if the canvas title location has been set.
Definition at line 820 of file Txq2dCanvas.h. |
|
|
the height percentages of the plot region This is for resizing.
Definition at line 749 of file Txq2dCanvas.h. |
|
|
true if an X-axis is present.
Definition at line 796 of file Txq2dCanvas.h. |
|
|
true if an Y-axis is present.
Definition at line 801 of file Txq2dCanvas.h. |
|
|
The click listner.
Definition at line 707 of file Txq2dCanvas.h. |
|
|
The linear view port.
Definition at line 727 of file Txq2dCanvas.h. |
|
|
The X-linear Y-log view port.
Definition at line 717 of file Txq2dCanvas.h. |
|
|
The log view port.
Definition at line 712 of file Txq2dCanvas.h. |
|
|
The X-log Y-linear view port.
Definition at line 722 of file Txq2dCanvas.h. |
|
|