Logo Search packages:      
Sourcecode: udav version File versions  Download package

Public Slots | Signals | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Attributes | Friends

QMGLCanvas Class Reference

Class for displaying the result of MGL script parsing. More...

#include <qmglcanvas.h>

Collaboration diagram for QMGLCanvas:
Collaboration graph
[legend]

List of all members.

Public Slots

void copy ()
 copy graphics to clipboard
void execute (mglGraph *gr=0)
 Execute script (and update picture)
void exportBPS (QString fname="")
 export to bitmap EPS file
void exportCPP (QString fname="")
 export to CPP file
void exportEPS (QString fname="")
 export to vector EPS file
void exportGIF (QString fname="")
 export to GIF file
void exportIDTF (QString fname="")
 export to IDTF file
void exportJPG (QString fname="")
 export to JPEG file
void exportPNG (QString fname="")
 export to PNG file
void exportPNGs (QString fname="")
 export to PNG file (no transparency)
void exportSVG (QString fname="")
 export to SVG file
void reload ()
 Reload data and execute script.
void restore ()
 Restore zoom and rotation to default values.
void setAlpha (bool a)
 Switch on/off transparency.
void setLight (bool l)
 Switch on/off lightning.
void setMGLFont (QString path)
 restore/load font for graphics
void setPer (int p)
 Set perspective value.
void setPhi (int p)
 Set Phi-angle value.
void setRotate (bool r)
 Switch on/off mouse rotation.
void setTet (int t)
 Set Theta-angle value.
void setZoom (bool z)
 Switch on/off mouse zooming.
void shiftDown ()
 Shift graphics to down direction.
void shiftLeft ()
 Shift graphics to left direction.
void shiftRight ()
 Shift graphics to right direction.
void shiftUp ()
 Shift graphics to up direction.
void stop ()
 Stop execution.
void zoomIn ()
 Zoom in graphics.
void zoomOut ()
 Zoom out graphics.

Signals

void alphaChanged (bool)
void lightChanged (bool)
void perChanged (int)
void phiChanged (int)
void posChanged (QString message)
 user click to show mouse position
void refreshData ()
void rotateChanged (bool)
void tetChanged (int)
void zoomChanged (bool)

Public Member Functions

double getRatio ()
 QMGLCanvas (QWidget *parent=0, Qt::WindowFlags f=0)
QString run (const QString &text, bool showm=true, mglGraph *gr=0)
 Execute script from string.
void setPopup (QMenu *p)
void setSize (int w, int h)

Public Attributes

QString appName
 Application name for message boxes.
bool autoResize
 Allow auto resizing (default is false)
mglGraphAB * graph
 Built-in mglGraph-er instance (used by default)
QString scriptName
 Default script name which used for exporting.
QTextEdit * textMGL
 Editor with MGL script body.
QTextEdit * warnMGL
 Buffer for messages and warnings.

Protected Member Functions

void mouseMoveEvent (QMouseEvent *)
void mousePressEvent (QMouseEvent *)
void mouseReleaseEvent (QMouseEvent *)
void paintEvent (QPaintEvent *)
void resizeEvent (QResizeEvent *)

Protected Attributes

bool alpha
 Transparency state.
bool light
 Lightning state.
double per
 Value of perspective ( must be in [0,1) )
double phi
 Rotation angles.
QPixmap pic
 Pixmap for drawing (changed by update)
QMenu * popup
 Pointer to pop-up menu.
bool rotate
 Mouse rotation state.
bool showMessage
 Flag for showing messages (enabled by each execute())
double tet
MGLThreadthr
 Thread for making picture.
float x1
float x2
float y1
float y2
 Zoom in region.
bool zoom
 Mouse zoom state.

Private Attributes

QString defText
 Default text for execution.
uchar * grBuf
int x0
int xe
int y0
int ye
 Temporary variables for mouse.

Friends

class MGLThread

Detailed Description

Class for displaying the result of MGL script parsing.

Definition at line 44 of file qmglcanvas.h.


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

Generated by  Doxygen 1.6.0   Back to index