QWT API (中文) 7.0.1
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
| Public 槽 | 信号 | Public 成员函数 | Protected 类型 | Protected 成员函数 | Protected 属性 | 所有成员列表
Qwt3D::Plot3D类 参考abstract

所有绘图控件的基类 更多...

#include <qwt3d_plot.h>

类 Qwt3D::Plot3D 继承关系图:
Qwt3D::GraphPlot Qwt3D::MultiPlot Qwt3D::SurfacePlot Qwt3D::VolumePlot

Public 槽

void setRotation (double xVal, double yVal, double zVal)
 
void setShift (double xVal, double yVal, double zVal)
 
void setViewportShift (double xVal, double yVal)
 
void setScale (double xVal, double yVal, double zVal)
 
void setZoom (double)
 
void setOrtho (bool)
 设置正交或透视模式并更新控件
 
void enableMouse (bool val=true)
 
void disableMouse (bool val=true)
 
void enableKeyboard (bool val=true)
 
void disableKeyboard (bool val=true)
 
void enableLighting (bool val=true)
 
void disableLighting (bool val=true)
 
void setLightRotation (double xVal, double yVal, double zVal, unsigned int idx=0)
 
void setLightShift (double xVal, double yVal, double zVal, unsigned int idx=0)
 
virtual bool savePixmap (QString const &fileName, QString const &format)
 将帧缓冲区保存为图像文件
 
virtual bool saveVector (QString const &fileName, QString const &format, VectorWriter::TEXTMODE text, VectorWriter::SORTMODE sortmode)
 写入 gl2ps 支持的矢量数据
 
virtual bool save (QString const &fileName, QString const &format)
 以已注册的输出格式之一保存内容
 

信号

void rotationChanged (double xAngle, double yAngle, double zAngle)
 旋转角度变化时发出的信号
 
void shiftChanged (double xShift, double yShift, double zShift)
 位移变化时发出的信号
 
void vieportShiftChanged (double xShift, double yShift)
 视口位移变化时发出的信号
 
void scaleChanged (double xScale, double yScale, double zScale)
 缩放比例变化时发出的信号
 
void zoomChanged (double)
 缩放因子变化时发出的信号
 
void projectionChanged (bool)
 投影模式变化时发出的信号
 

Public 成员函数

 Plot3D (QWidget *parent=0)
 构造 Plot3D 控件
 
virtual ~Plot3D ()
 析构函数 - 释放已分配的资源
 
QPixmap renderPixmap (int w=0, int h=0, bool useContext=false)
 
void updateData ()
 更新 OpenGL 数据表示
 
void createCoordinateSystem (Qwt3D::Triple beg, Qwt3D::Triple end)
 创建具有生成角点 beg 和 end 的坐标系
 
Qwt3D::CoordinateSystemcoordinates ()
 
Qwt3D::ColorLegendlegend ()
 
double xRotation () const
 
double yRotation () const
 
double zRotation () const
 
double xShift () const
 
double yShift () const
 
double zShift () const
 
double xViewportShift () const
 
double yViewportShift () const
 
double xScale () const
 
double yScale () const
 
double zScale () const
 
double zoom () const
 
bool ortho () const
 
void setPlotStyle (Qwt3D::PLOTSTYLE val)
 设置标准绘图类型的绘图样式
 
Qwt3D::EnrichmentsetPlotStyle (Qwt3D::Enrichment const &val)
 将绘图样式设置为 Qwt3D::USER 并关联一个装饰对象
 
Qwt3D::PLOTSTYLE plotStyle () const
 
Qwt3D::EnrichmentuserStyle () const
 
void setShading (Qwt3D::SHADINGSTYLE val)
 设置着色样式
 
Qwt3D::SHADINGSTYLE shading () const
 
void setIsolines (int isolines)
 设置等值线数量
 
int isolines () const
 
void setSmoothMesh (bool val)
 
bool smoothDataMesh () const
 
void setBackgroundColor (Qwt3D::RGBA rgba)
 设置背景颜色
 
Qwt3D::RGBA backgroundRGBAColor () const
 
void setMeshColor (Qwt3D::RGBA rgba)
 设置网格颜色
 
Qwt3D::RGBA meshColor () const
 
void setMeshLineWidth (double lw)
 设置网格线宽
 
double meshLineWidth () const
 
void setDataColor (Color *col)
 为数据分配新的颜色对象
 
const ColordataColor () const
 
virtual Qwt3D::EnrichmentaddEnrichment (Qwt3D::Enrichment const &)
 向绘图添加装饰对象
 
virtual bool degrade (Qwt3D::Enrichment *)
 从绘图中移除装饰对象
 
Qwt3D::ParallelEpiped hull () const
 
void showColorLegend (bool)
 显示或隐藏颜色图例
 
void setCoordinateStyle (Qwt3D::COORDSTYLE st)
 设置坐标系样式
 
void setPolygonOffset (double d)
 设置多边形偏移
 
double polygonOffset () const
 
void setTitlePosition (double rely, double relx=0.5, Qwt3D::ANCHOR=Qwt3D::TopCenter)
 设置标题的相对位置
 
void setTitleFont (const QString &family, int pointSize, int weight=QFont::Normal, bool italic=false)
 设置标题字体
 
void setTitleColor (Qwt3D::RGBA col)
 
void setTitle (const QString &title)
 
void assignMouse (MouseState xrot, MouseState yrot, MouseState zrot, MouseState xscale, MouseState yscale, MouseState zscale, MouseState zoom, MouseState xshift, MouseState yshift)
 
bool mouseEnabled () const
 
void assignKeyboard (KeyboardState xrot_n, KeyboardState xrot_p, KeyboardState yrot_n, KeyboardState yrot_p, KeyboardState zrot_n, KeyboardState zrot_p, KeyboardState xscale_n, KeyboardState xscale_p, KeyboardState yscale_n, KeyboardState yscale_p, KeyboardState zscale_n, KeyboardState zscale_p, KeyboardState zoom_n, KeyboardState zoom_p, KeyboardState xshift_n, KeyboardState xshift_p, KeyboardState yshift_n, KeyboardState yshift_p)
 
bool keyboardEnabled () const
 
void setKeySpeed (double rot, double scale, double shift)
 
void keySpeed (double &rot, double &scale, double &shift) const
 
bool lightingEnabled () const
 
void illuminate (unsigned light=0)
 
void blowout (unsigned light=0)
 
void setMaterialComponent (GLenum property, double r, double g, double b, double a=1.0)
 
void setMaterialComponent (GLenum property, double intensity)
 
void setShininess (double exponent)
 
void setLightComponent (GLenum property, double r, double g, double b, double a=1.0, unsigned light=0)
 
void setLightComponent (GLenum property, double intensity, unsigned light=0)
 
double xLightRotation (unsigned idx=0) const
 
double yLightRotation (unsigned idx=0) const
 
double zLightRotation (unsigned idx=0) const
 
double xLightShift (unsigned idx=0) const
 
double yLightShift (unsigned idx=0) const
 
double zLightShift (unsigned idx=0) const
 
bool hasData () const
 

Protected 类型

enum  OBJECTS { DataObject , LegendObject , NormalObject , DisplayListSize }
 
using EnrichmentList = std::list< Qwt3D::Enrichment * >
 
using ELIT = EnrichmentList::iterator
 

Protected 成员函数

void initializeGL ()
 设置 OpenGL 渲染状态
 
void paintGL ()
 绘制控件内容
 
void resizeGL (int w, int h)
 设置 OpenGL 视口
 
void mousePressEvent (QMouseEvent *e)
 
void mouseReleaseEvent (QMouseEvent *e)
 
void mouseMoveEvent (QMouseEvent *e)
 
void wheelEvent (QWheelEvent *e)
 
void keyPressEvent (QKeyEvent *e)
 
virtual void calculateHull ()=0
 
virtual void createData ()=0
 
virtual void createEnrichment (Qwt3D::Enrichment &)
 
virtual void createEnrichments ()
 
void createCoordinateSystem ()
 从数据创建坐标系
 
void setHull (Qwt3D::ParallelEpiped p)
 
bool initializedGL () const
 

Protected 属性

Qwt3D::CoordinateSystem coordinates_p
 
Qwt3D::Colordatacolor_p
 
Qwt3D::Enrichmentuserplotstyle_p
 
EnrichmentList elist_p
 
std::vector< GLuint > displaylists_p
 
Qwt3D::DataactualData_p
 

详细描述

所有绘图控件的基类

构造及析构函数说明

◆ Plot3D()

Plot3D::Plot3D ( QWidget *  parent = 0)

构造 Plot3D 控件

◆ ~Plot3D()

Plot3D::~Plot3D ( )
virtual

析构函数 - 释放已分配的资源

成员函数说明

◆ addEnrichment()

Enrichment * Plot3D::addEnrichment ( Qwt3D::Enrichment const &  e)
virtual

向绘图添加装饰对象

◆ assignKeyboard()

void Plot3D::assignKeyboard ( KeyboardState  xrot_n,
KeyboardState  xrot_p,
KeyboardState  yrot_n,
KeyboardState  yrot_p,
KeyboardState  zrot_n,
KeyboardState  zrot_p,
KeyboardState  xscale_n,
KeyboardState  xscale_p,
KeyboardState  yscale_n,
KeyboardState  yscale_p,
KeyboardState  zscale_n,
KeyboardState  zscale_p,
KeyboardState  zoom_n,
KeyboardState  zoom_p,
KeyboardState  xshift_n,
KeyboardState  xshift_p,
KeyboardState  yshift_n,
KeyboardState  yshift_p 
)

Sets the keybutton combination for data/coordinatesystem moves inside the widget

default behaviour:

rotate around x axis: [Key_Down, Key_Up]
rotate around y axis: SHIFT+[Key_Right, Key_Left]
rotate around z axis: [Key_Right, Key_Left]
scale x:              ALT+[Key_Right, Key_Left]
scale y:              ALT+[Key_Up, Key_Down]
scale z:              ALT+SHIFT[Key_Down, Key_Up]
zoom:                 ALT+CTRL+[Key_Down, Key_Up]
shifting along x:     CTRL+[Key_Right, Key_Left]
shifting along z:     CTRL+[Key_Down, Key_Up]

◆ assignMouse()

void Plot3D::assignMouse ( MouseState  xrot,
MouseState  yrot,
MouseState  zrot,
MouseState  xscale,
MouseState  yscale,
MouseState  zscale,
MouseState  zoom,
MouseState  xshift,
MouseState  yshift 
)
 Sets the key/mousebutton combination for data/coordinatesystem moves inside the widget\n\n
 default behaviour:\n

 \verbatim
 rotate around x axis: Qt::LeftButton
 rotate around y axis: Qt::LeftButton | Qt::ShiftButton
 rotate around z axis: Qt::LeftButton
 scale x:              Qt::LeftButton | Qt::AltButton
 scale y:              Qt::LeftButton | Qt::AltButton
 scale z:              Qt::LeftButton | Qt::AltButton | Qt::ShiftButton
 zoom:                 Qt::LeftButton | Qt::AltButton | Qt::ControlButton
 shifting along x:     Qt::LeftButton | Qt::ControlButton
 shifting along y:     Qt::LeftButton | Qt::ControlButton
 \endverbatim

 mouseMoveEvent() evaluates this function - if overridden, their usefulness becomes somehow

limited

◆ blowout()

void Plot3D::blowout ( unsigned  light = 0)
参数
lightlight number [0..7]
参见
setLight

◆ calculateHull()

virtual void Qwt3D::Plot3D::calculateHull ( )
protectedpure virtual

Qwt3D::SurfacePlot 内被实现.

◆ createCoordinateSystem() [1/2]

void Plot3D::createCoordinateSystem ( )
protected

从数据创建坐标系

◆ createCoordinateSystem() [2/2]

void Plot3D::createCoordinateSystem ( Qwt3D::Triple  beg,
Qwt3D::Triple  end 
)

创建具有生成角点 beg 和 end 的坐标系

◆ degrade()

bool Plot3D::degrade ( Qwt3D::Enrichment e)
virtual

从绘图中移除装饰对象

◆ disableKeyboard

void Plot3D::disableKeyboard ( bool  val = true)
slot

◆ disableMouse

void Plot3D::disableMouse ( bool  val = true)
slot

◆ enableKeyboard

void Plot3D::enableKeyboard ( bool  val = true)
slot

The function has no effect if you derive from Plot3D and overrides the keyboard Functions too careless. In this case check first against keyboardEnabled() in your version of keyPressEvent() A more fine grained input control can be achieved by combining assignKeyboard() with enableKeyboard().

◆ enableMouse

void Plot3D::enableMouse ( bool  val = true)
slot

The function has no effect if you derive from Plot3D and overrides the mouse Function too careless. In this case check first against mouseEnabled() in your version of mouseMoveEvent() and wheelEvent(). A more fine grained input control can be achieved by combining assignMouse() with enableMouse().

◆ illuminate()

void Plot3D::illuminate ( unsigned  light = 0)
参数
lightlight number [0..7]
参见
setLight

◆ initializeGL()

void Plot3D::initializeGL ( )
protected

设置 OpenGL 渲染状态

◆ mouseMoveEvent()

void Plot3D::mouseMoveEvent ( QMouseEvent *  e)
protected

Standard mouse button Function

参见
assignMouse()

◆ mousePressEvent()

void Plot3D::mousePressEvent ( QMouseEvent *  e)
protected

Standard mouse button Function. Prepares the call to mouseMoveEvent

参见
mouseMoveEvent()

◆ mouseReleaseEvent()

void Plot3D::mouseReleaseEvent ( QMouseEvent *  e)
protected

Standard mouse button Function. Completes the call to mouseMoveEvent

参见
mouseMoveEvent()

◆ paintGL()

void Plot3D::paintGL ( )
protected

绘制控件内容

◆ projectionChanged

void Qwt3D::Plot3D::projectionChanged ( bool  )
signal

投影模式变化时发出的信号

◆ resizeGL()

void Plot3D::resizeGL ( int  w,
int  h 
)
protected

设置 OpenGL 视口

◆ rotationChanged

void Qwt3D::Plot3D::rotationChanged ( double  xAngle,
double  yAngle,
double  zAngle 
)
signal

旋转角度变化时发出的信号

◆ save

bool Plot3D::save ( QString const &  fileName,
QString const &  format 
)
virtualslot

以已注册的输出格式之一保存内容

◆ savePixmap

bool Plot3D::savePixmap ( QString const &  fileName,
QString const &  format 
)
virtualslot

将帧缓冲区保存为图像文件

◆ saveVector

bool Plot3D::saveVector ( QString const &  fileName,
QString const &  format,
VectorWriter::TEXTMODE  text,
VectorWriter::SORTMODE  sortmode 
)
virtualslot

写入 gl2ps 支持的矢量数据

◆ scaleChanged

void Qwt3D::Plot3D::scaleChanged ( double  xScale,
double  yScale,
double  zScale 
)
signal

缩放比例变化时发出的信号

◆ setBackgroundColor()

void Plot3D::setBackgroundColor ( Qwt3D::RGBA  rgba)

设置背景颜色

◆ setCoordinateStyle()

void Plot3D::setCoordinateStyle ( Qwt3D::COORDSTYLE  st)

设置坐标系样式

◆ setDataColor()

void Plot3D::setDataColor ( Color col)

为数据分配新的颜色对象

◆ setIsolines()

void Plot3D::setIsolines ( int  steps)

设置等值线数量

◆ setKeySpeed()

void Plot3D::setKeySpeed ( double  rot,
double  scale,
double  shift 
)

Values < 0 are ignored. Default is (3,5,5)

◆ setLightComponent() [1/2]

void Plot3D::setLightComponent ( GLenum  property,
double  intensity,
unsigned  light = 0 
)

This function is for convenience. It sets GL light properties with the equal r,g,b values and a blending alpha with value 1.0

◆ setLightComponent() [2/2]

void Plot3D::setLightComponent ( GLenum  property,
double  r,
double  g,
double  b,
double  a = 1.0,
unsigned  light = 0 
)

Sets GL light properties for light 'light'

◆ setLightRotation

void Plot3D::setLightRotation ( double  xVal,
double  yVal,
double  zVal,
unsigned int  idx = 0 
)
slot

Set the rotation angle of the light source. If you look along the respective axis towards ascending values, the rotation is performed in mathematical negative sense

参数
xValangle in degree to rotate around the X axis
yValangle in degree to rotate around the Y axis
zValangle in degree to rotate around the Z axis
lightlight number

◆ setLightShift

void Plot3D::setLightShift ( double  xVal,
double  yVal,
double  zVal,
unsigned int  idx = 0 
)
slot

Set the shift in light source (world) coordinates.

参数
xValshift along (world) X axis
yValshift along (world) Y axis
zValshift along (world) Z axis
lightlight number
参见
setViewportShift()

◆ setMaterialComponent() [1/2]

void Plot3D::setMaterialComponent ( GLenum  property,
double  intensity 
)

This function is for convenience. It sets GL material properties with the equal r,g,b values and a blending alpha with value 1.0

◆ setMaterialComponent() [2/2]

void Plot3D::setMaterialComponent ( GLenum  property,
double  r,
double  g,
double  b,
double  a = 1.0 
)

Sets GL material properties

◆ setMeshColor()

void Plot3D::setMeshColor ( Qwt3D::RGBA  rgba)

设置网格颜色

◆ setMeshLineWidth()

void Plot3D::setMeshLineWidth ( double  val)

设置网格线宽

◆ setOrtho

void Plot3D::setOrtho ( bool  val)
slot

设置正交或透视模式并更新控件

◆ setPlotStyle() [1/2]

Qwt3D::Enrichment * Plot3D::setPlotStyle ( Qwt3D::Enrichment const &  obj)

将绘图样式设置为 Qwt3D::USER 并关联一个装饰对象

◆ setPlotStyle() [2/2]

void Plot3D::setPlotStyle ( Qwt3D::PLOTSTYLE  val)

设置标准绘图类型的绘图样式

◆ setPolygonOffset()

void Plot3D::setPolygonOffset ( double  val)

设置多边形偏移

◆ setRotation

void Plot3D::setRotation ( double  xVal,
double  yVal,
double  zVal 
)
slot

Set the rotation angle of the object. If you look along the respective axis towards ascending values, the rotation is performed in mathematical negative sense

参数
xValangle in degree to rotate around the X axis
yValangle in degree to rotate around the Y axis
zValangle in degree to rotate around the Z axis

◆ setScale

void Plot3D::setScale ( double  xVal,
double  yVal,
double  zVal 
)
slot

Set the scale in object (world) coordinates.

参数
xValscaling for X values
yValscaling for Y values
zValscaling for Z values

A respective value of 1 represents no scaling;

◆ setShading()

void Plot3D::setShading ( Qwt3D::SHADINGSTYLE  val)

设置着色样式

◆ setShift

void Plot3D::setShift ( double  xVal,
double  yVal,
double  zVal 
)
slot

Set the shift in object (world) coordinates.

参数
xValshift along (world) X axis
yValshift along (world) Y axis
zValshift along (world) Z axis
参见
setViewportShift()

◆ setShininess()

void Plot3D::setShininess ( double  exponent)

Sets GL shininess

◆ setTitleFont()

void Plot3D::setTitleFont ( const QString &  family,
int  pointSize,
int  weight = QFont::Normal,
bool  italic = false 
)

设置标题字体

◆ setTitlePosition()

void Plot3D::setTitlePosition ( double  rely,
double  relx = 0.5,
Qwt3D::ANCHOR  anchor = Qwt3D::TopCenter 
)

设置标题的相对位置

◆ setViewportShift

void Plot3D::setViewportShift ( double  xVal,
double  yVal 
)
slot

Performs shifting along screen axes. The shift moves points inside a sphere, which encloses the unscaled and unzoomed data by multiples of the spheres diameter

参数
xValshift along (view) X axis
yValshift along (view) Y axis
参见
setShift()

◆ setZoom

void Plot3D::setZoom ( double  val)
slot

Set the (zoom in addition to scale).

参数
valzoom value (value == 1 indicates no zooming)

◆ shiftChanged

void Qwt3D::Plot3D::shiftChanged ( double  xShift,
double  yShift,
double  zShift 
)
signal

位移变化时发出的信号

◆ showColorLegend()

void Plot3D::showColorLegend ( bool  show)

显示或隐藏颜色图例

◆ updateData()

void Plot3D::updateData ( )

更新 OpenGL 数据表示

◆ vieportShiftChanged

void Qwt3D::Plot3D::vieportShiftChanged ( double  xShift,
double  yShift 
)
signal

视口位移变化时发出的信号

◆ wheelEvent()

void Plot3D::wheelEvent ( QWheelEvent *  e)
protected

Standard wheel Function - zoom (wheel only) or z-scale (shift+wheel)

◆ zoomChanged

void Qwt3D::Plot3D::zoomChanged ( double  )
signal

缩放因子变化时发出的信号


该类的文档由以下文件生成: