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

Txq2dFrame Class Reference

A Qt wdiget which adds a Txq2dCanvas and TxqListener to the TxqFrame. More...

#include <Txq2dFrame.h>

Inheritance diagram for Txq2dFrame::

TxqFrame QFrame Txq2dPlotFrame List of all members.

Public Slots

virtual void setGeometry (int x, int y, int w, int h)
 slot to set the geometry. More...

virtual void setGeometry (const QRect &r)
 Forward the overloaded method to prevent compiler warnings. More...

virtual void crossHair (int number)
 slot to select the cross hair option. More...

virtual void writeStatus (double x, double y)
 slot to write the cross hair status given and x and y value. More...


Signals

virtual void setOptionsSignal ()
 signal emitted whenever the setOptions is invoked for the options dialog. More...


Public Methods

 Txq2dFrame (QWidget *parent=0, const char *nm=0, WFlags f=WType_TopLevel)
 The Txq2dFrame constructor takes a QFrame w a name nm and a window flag f All other options must be set from member methods. More...

virtual ~Txq2dFrame ()
 The Txq2dFrame destructor. More...

void addCanvas (Txq2dCanvas *newCanvas)
 Add a canvas to the frame. More...

Txq2dCanvasgetCanvas ()
 get the canvas pointer @retun the canvas pointer. More...

virtual void plot (bool updateFlag)
 Plot all the Txq2dDrwable data. More...

void setCrossHair (bool flag)
 Set the cross hair option with bool flag. More...

void setOptionsClearPixmap (bool f)
 Set the options clear flag The options clear flag if true will clear the canvas pixmap before repainting. More...

void writeImage (QString fileName, QString ext)
 write the pixmap as an image file to a filename given an extension type. More...


Protected Slots

bool copy ()
 copy the selection to the window manager clipboard. More...

void applyOptions ()
 slot to get the plot attributes after the Apply or Ok buton has been pressed on the options Dialog. More...

void setOptions ()
 slot to set the options. More...

void saveAs ()
 slot to save the pixmap. More...

void dumpData ()
 slot to dump the contents of the frame to an ASCII file. More...

void print ()
 slot to print the canvas. More...

void printPreview ()
 slot to preview the print canvas. More...

virtual void zoomIn (int id)
 slot to zoom in the canvas. More...

virtual void zoomOut (int id)
 slot to zoom out the canvas. More...

virtual void zoomOutFinished ()
 The zoomOutFinished slot is used whenever the canvas zoom is finished. More...


Protected Methods

void createTxq2dCanvas ()
 Create a canvas. More...

void resizeEvent (QResizeEvent *event)
 Overload the resizeEvent in order to set the canvas size. More...

void createPlotAttribs ()
 Create the plot attributes and set with default items. More...

virtual void addFileMenuItems ()
 Add to the base File menu. More...

void addEditMenuItems ()
 Add to the base Edit menu. More...

void addViewMenuItems ()
 Add to the base View menu. More...

void addCrossHairMenuItem ()
 Add the cross hair item. More...

void addOptionsMenuItem ()
 Add the Options menu item to View. More...

virtual void addZoomMenuItem ()
 Add the Zoom menu item to View. More...

virtual void addWidgets ()
 Adds all the widgets to the layout This method is to be used in polish to add any created widgets to the layout manager. More...

void createOptionsMenu ()
 Create the Options dialog. More...

bool getCrossHair ()
 Get the cross hair bool flag. More...

void setCrossHair (int id)
 Set the cross hair option. More...


Protected Attributes

int ziId
 The zoom in id number. More...

int zoId
 The zoom out id number. More...

bool zi
 The zoom in boolean flags Set to true if zoom in. More...

bool zo
 The zoom out boolean flags Set to true if zoom out. More...

int crossHairId
 The cross hair id number. More...

bool optionsClearPixmap
 The options clear pixmap flag. More...

TxqPlotAttribsplotAttribs
 The plot attributes. More...

TxqOptionsDlogoptionsDlog
 The options dialog. More...


Private Attributes

Txq2dCanvascanvas
 The Txq2dCanvas. More...

std::vector<Txq2dCanvas*> canvasVector
 A vector of Txq2dCanvas. More...


Detailed Description

A Qt wdiget which adds a Txq2dCanvas and TxqListener to the TxqFrame.

This class creates a two dimensional Qt frame for scientific plotting.

Copyright 1998, 1999, 2000 by Tech-X Corporation

Author:
Kelly G. Luetkemeyer

Version:
Id:
Txq2dFrame.h,v 1.35 2001/10/12 18:58:11 kgl Exp

Definition at line 48 of file Txq2dFrame.h.


Constructor & Destructor Documentation

Txq2dFrame::Txq2dFrame ( QWidget * parent = 0,
const char * nm = 0,
WFlags f = WType_TopLevel )
 

The Txq2dFrame constructor takes a QFrame w a name nm and a window flag f All other options must be set from member methods.

Parameters:
parent   The parent Qt widget.
nm   The name of the Qt widget.
f   The window flags.

Txq2dFrame::~Txq2dFrame ( ) [virtual]
 

The Txq2dFrame destructor.


Member Function Documentation

void Txq2dFrame::addCanvas ( Txq2dCanvas * newCanvas )
 

Add a canvas to the frame.

Parameters:
newCanvas   the new canvas poitner to add to this frame.

void Txq2dFrame::addCrossHairMenuItem ( ) [protected]
 

Add the cross hair item.

void Txq2dFrame::addEditMenuItems ( ) [protected, virtual]
 

Add to the base Edit menu.

Reimplemented from TxqFrame.

Reimplemented in Txq2dPlotFrame.

void Txq2dFrame::addFileMenuItems ( ) [protected, virtual]
 

Add to the base File menu.

Reimplemented from TxqFrame.

Reimplemented in Txq2dPlotFrame.

void Txq2dFrame::addOptionsMenuItem ( ) [protected]
 

Add the Options menu item to View.

void Txq2dFrame::addViewMenuItems ( ) [protected, virtual]
 

Add to the base View menu.

Reimplemented from TxqFrame.

Reimplemented in Txq2dPlotFrame.

void Txq2dFrame::addWidgets ( ) [protected, virtual]
 

Adds all the widgets to the layout This method is to be used in polish to add any created widgets to the layout manager.

Reimplemented from TxqFrame.

Reimplemented in Txq2dPlotFrame.

void Txq2dFrame::addZoomMenuItem ( ) [protected, virtual]
 

Add the Zoom menu item to View.

void Txq2dFrame::applyOptions ( ) [protected, slot]
 

slot to get the plot attributes after the Apply or Ok buton has been pressed on the options Dialog.

Reimplemented in Txq2dPlotFrame.

bool Txq2dFrame::copy ( ) [protected, virtual, slot]
 

copy the selection to the window manager clipboard.

Reimplemented from TxqFrame.

void Txq2dFrame::createOptionsMenu ( ) [protected]
 

Create the Options dialog.

void Txq2dFrame::createPlotAttribs ( ) [protected]
 

Create the plot attributes and set with default items.

void Txq2dFrame::createTxq2dCanvas ( ) [protected]
 

Create a canvas.

void Txq2dFrame::crossHair ( int number ) [virtual, slot]
 

slot to select the cross hair option.

Parameters:
number   the view menu item number for this option

Reimplemented in Txq2dPlotFrame.

void Txq2dFrame::dumpData ( ) [protected, virtual, slot]
 

slot to dump the contents of the frame to an ASCII file.

Reimplemented from TxqFrame.

Reimplemented in Txq2dPlotFrame.

Txq2dCanvas * Txq2dFrame::getCanvas ( ) [inline]
 

get the canvas pointer @retun the canvas pointer.

Definition at line 81 of file Txq2dFrame.h.

bool Txq2dFrame::getCrossHair ( ) [protected]
 

Get the cross hair bool flag.

void Txq2dFrame::plot ( bool updateFlag ) [inline, virtual]
 

Plot all the Txq2dDrwable data.

Parameters:
the   update flag

Reimplemented in Txq2dPlotFrame.

Definition at line 87 of file Txq2dFrame.h.

void Txq2dFrame::print ( ) [protected, virtual, slot]
 

slot to print the canvas.

Reimplemented from TxqFrame.

void Txq2dFrame::printPreview ( ) [protected, virtual, slot]
 

slot to preview the print canvas.

Reimplemented from TxqFrame.

void Txq2dFrame::resizeEvent ( QResizeEvent * event ) [protected]
 

Overload the resizeEvent in order to set the canvas size.

Reimplemented in Txq2dPlotFrame.

void Txq2dFrame::saveAs ( ) [protected, virtual, slot]
 

slot to save the pixmap.

Reimplemented from TxqFrame.

void Txq2dFrame::setCrossHair ( int id ) [protected]
 

Set the cross hair option.

void Txq2dFrame::setCrossHair ( bool flag )
 

Set the cross hair option with bool flag.

Parameters:
flag   the cross hair bool. If true, turn on the cross hair cursor.

void Txq2dFrame::setGeometry ( const QRect & r ) [inline, virtual, slot]
 

Forward the overloaded method to prevent compiler warnings.

Definition at line 124 of file Txq2dFrame.h.

void Txq2dFrame::setGeometry ( int x,
int y,
int w,
int h ) [virtual, slot]
 

slot to set the geometry.

Parameters:
x   the x location
y   the y location
w   the width
h   the height

void Txq2dFrame::setOptions ( ) [protected, slot]
 

slot to set the options.

void Txq2dFrame::setOptionsClearPixmap ( bool f ) [inline]
 

Set the options clear flag The options clear flag if true will clear the canvas pixmap before repainting.

Parameters:
f   the bool flag

Definition at line 101 of file Txq2dFrame.h.

void Txq2dFrame::setOptionsSignal ( ) [virtual, signal]
 

signal emitted whenever the setOptions is invoked for the options dialog.

void Txq2dFrame::writeImage ( QString fileName,
QString ext )
 

write the pixmap as an image file to a filename given an extension type.

Parameters:
fileName   the filename to write the pixmap
ext   the extension type, ie PPM for ppm format image

void Txq2dFrame::writeStatus ( double x,
double y ) [virtual, slot]
 

slot to write the cross hair status given and x and y value.

Parameters:
x   the status bar will print X = <this value>
y   the status bar will print Y = <this value>

Reimplemented in Txq2dPlotFrame.

void Txq2dFrame::zoomIn ( int id ) [protected, virtual, slot]
 

slot to zoom in the canvas.

Parameters:
id   the view menu item number for this option

Reimplemented in Txq2dPlotFrame.

void Txq2dFrame::zoomOut ( int id ) [protected, virtual, slot]
 

slot to zoom out the canvas.

Parameters:
id   the view menu item number for this option

Reimplemented in Txq2dPlotFrame.

void Txq2dFrame::zoomOutFinished ( ) [protected, virtual, slot]
 

The zoomOutFinished slot is used whenever the canvas zoom is finished.

Reimplemented in Txq2dPlotFrame.


Member Data Documentation

Txq2dCanvas * Txq2dFrame::canvas [private]
 

The Txq2dCanvas.

Reimplemented in Txq2dPlotFrame.

Definition at line 325 of file Txq2dFrame.h.

std::vector< Txq2dCanvas *> Txq2dFrame::canvasVector [private]
 

A vector of Txq2dCanvas.

Definition at line 330 of file Txq2dFrame.h.

int Txq2dFrame::crossHairId [protected]
 

The cross hair id number.

Definition at line 235 of file Txq2dFrame.h.

bool Txq2dFrame::optionsClearPixmap [protected]
 

The options clear pixmap flag.

Definition at line 240 of file Txq2dFrame.h.

TxqOptionsDlog * Txq2dFrame::optionsDlog [protected]
 

The options dialog.

Definition at line 317 of file Txq2dFrame.h.

TxqPlotAttribs * Txq2dFrame::plotAttribs [protected]
 

The plot attributes.

Definition at line 312 of file Txq2dFrame.h.

bool Txq2dFrame::zi [protected]
 

The zoom in boolean flags Set to true if zoom in.

Definition at line 224 of file Txq2dFrame.h.

int Txq2dFrame::ziId [protected]
 

The zoom in id number.

Definition at line 214 of file Txq2dFrame.h.

bool Txq2dFrame::zo [protected]
 

The zoom out boolean flags Set to true if zoom out.

Definition at line 230 of file Txq2dFrame.h.

int Txq2dFrame::zoId [protected]
 

The zoom out id number.

Definition at line 218 of file Txq2dFrame.h.


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