Class is Qt widget which display MathGL graphics. It is defined in #include <mgl2/qt.h>.
QMathGL: void setDraw (mglDraw *dr) ¶Sets drawing functions from a class inherited from mglDraw.
QMathGL: void setDraw (int (*draw)(mglBase *gr, void *p), void *par=NULL) ¶QMathGL: void setDraw (int (*draw)(mglGraph *gr)) ¶Sets the drawing function draw. There is support of a list of plots (frames). So as one can prepare a set of frames at first and redraw it fast later (but it requires more memory). Function should return positive number of frames for the list or zero if it will plot directly. Parameter par contains pointer to data for the plotting function draw.
QMathGL: void setGraph (HMGL gr) ¶QMathGL: void setGraph (mglGraph *gr) ¶Set pointer to external grapher (instead of built-in one). Note that QMathGL will automatically delete this object at destruction or at new setGraph() call.
QMathGL: HMGL getGraph () ¶Get pointer to grapher.
QMathGL: void setPopup (QMenu *p) ¶Set popup menu pointer.
QMathGL: void setSize (int w, int h) ¶Set widget/picture sizes
QMathGL: double getRatio () ¶Return aspect ratio of the picture.
QMathGL: int getPer () ¶Get perspective value in percents.
QMathGL: int getPhi () ¶Get Phi-angle value in degrees.
QMathGL: int getTet () ¶Get Theta-angle value in degrees.
QMathGL: bool getAlpha () ¶Get transparency state.
QMathGL: bool getLight () ¶Get lightning state.
QMathGL: bool getZoom () ¶Get mouse zooming state.
QMathGL: bool getRotate () ¶Get mouse rotation state.
QMathGL: void refresh () ¶Redraw saved bitmap without executing drawing function.
QMathGL: void update () ¶Update picture by executing drawing function.
QMathGL: void copy () ¶Copy graphics to clipboard.
QMathGL: void copyClickCoor () ¶Copy coordinates of click (as text).
QMathGL: void print () ¶Print current picture.
QMathGL: void stop () ¶Send signal to stop drawing.
QMathGL: void adjust () ¶Adjust image size to fit whole widget.
QMathGL: void nextSlide () ¶Show next slide.
QMathGL: void prevSlide () ¶Show previous slide.
QMathGL: void animation (bool st=true) ¶Start/stop animation.
QMathGL: void setPer (int val) ¶Set perspective value.
QMathGL: void setPhi (int val) ¶Set Phi-angle value.
QMathGL: void setTet (int val) ¶Set Theta-angle value.
QMathGL: void setAlpha (bool val) ¶Switch on/off transparency.
QMathGL: void setLight (bool val) ¶Switch on/off lightning.
QMathGL: void setGrid (bool val) ¶Switch on/off drawing of grid for absolute coordinates.
QMathGL: void setZoom (bool val) ¶Switch on/off mouse zooming.
QMathGL: void setRotate (bool val) ¶Switch on/off mouse rotation.
QMathGL: void zoomIn () ¶Zoom in graphics.
QMathGL: void zoomOut () ¶Zoom out graphics.
QMathGL: void shiftLeft () ¶Shift graphics to left direction.
QMathGL: void shiftRight () ¶Shift graphics to right direction.
QMathGL: void shiftUp () ¶Shift graphics to up direction.
QMathGL: void shiftDown () ¶Shift graphics to down direction.
QMathGL: void restore () ¶Restore zoom and rotation to default values.
QMathGL: void exportPNG (QString fname="") ¶Export current picture to PNG file.
QMathGL: void exportPNGs (QString fname="") ¶Export current picture to PNG file (no transparency).
QMathGL: void exportJPG (QString fname="") ¶Export current picture to JPEG file.
QMathGL: void exportBPS (QString fname="") ¶Export current picture to bitmap EPS file.
QMathGL: void exportEPS (QString fname="") ¶Export current picture to vector EPS file.
QMathGL: void exportSVG (QString fname="") ¶Export current picture to SVG file.
QMathGL: void exportGIF (QString fname="") ¶Export current picture to GIF file.
QMathGL: void exportTEX (QString fname="") ¶Export current picture to LaTeX/Tikz file.
QMathGL: void exportTGA (QString fname="") ¶Export current picture to TGA file.
QMathGL: void exportXYZ (QString fname="") ¶Export current picture to XYZ/XYZL/XYZF file.
QMathGL: void exportOBJ (QString fname="") ¶Export current picture to OBJ/MTL file.
QMathGL: void exportSTL (QString fname="") ¶Export current picture to STL file.
QMathGL: void exportOFF (QString fname="") ¶Export current picture to OFF file.
QMathGL: voidsetUsePrimitives (bool use) ¶Enable using list of primitives for frames. This allows frames transformation/zoom but requires much more memory. Default value is true.
QMathGL: void setMGLFont (QString path) ¶Restore (path="") or load font for graphics.
QMathGL: void about () ¶Show about information.
QMathGL: void aboutQt () ¶Show information about Qt version.
QMathGL: void phiChanged (int val) ¶Phi angle changed (by mouse or by toolbar).
QMathGL: void tetChanged (int val) ¶Tet angle changed (by mouse or by toolbar).
QMathGL: void perChanged (int val) ¶Perspective changed (by mouse or by toolbar).
QMathGL: void alphaChanged (bool val) ¶Transparency changed (by toolbar).
QMathGL: void lightChanged (bool val) ¶Lighting changed (by toolbar).
QMathGL: void gridChanged (bool val) ¶Grid drawing changed (by toolbar).
QMathGL: void zoomChanged (bool val) ¶Zooming changed (by toolbar).
QMathGL: void rotateChanged (bool val) ¶Rotation changed (by toolbar).
QMathGL: void mouseClick (mreal x, mreal y, mreal z) ¶Mouse click take place at position {x,y,z}.
QMathGL: void frameChanged (int val) ¶Need another frame to show.
QMathGL: void showWarn (QString warn) ¶Need to show warning.
QMathGL: void posChanged (QString pos) ¶Position of mouse click is changed.
QMathGL: void objChanged (int id) ¶Object id is changed (due to mouse click).
QMathGL: void refreshData () ¶Data can be changed (drawing is finished).
QMathGL: QString appName ¶Application name for message boxes.
QMathGL: bool autoResize ¶Allow auto resizing (default is false).