QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
| Public 槽 | 信号 | Public 成员函数 | Protected 成员函数 | 所有成员列表
Qwt3DPlot类 参考

Pure rendering window for 3D plots 更多...

#include <qwt3d_plot.h>

类 Qwt3DPlot 继承关系图:

class  PrivateData
 

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)
 Sets up orthogonal or perspective mode and updates widget
 
void setAspectRatioMode (ASPECTRATIOMODE mode)
 Sets the aspect ratio mode for the 3D coordinate box
 
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)
 Enable or disable lighting
 
void disableLighting (bool val=true)
 
void setLightRotation (double xVal, double yVal, double zVal, unsigned int idx=0)
 Set the rotation angle of the light source
 
void setLightShift (double xVal, double yVal, double zVal, unsigned int idx=0)
 Set the shift in light source (world) coordinates
 
virtual bool savePixmap (QString const &fileName, QString const &format)
 Saves the framebuffer to an image file
 
virtual bool saveVector (QString const &fileName, QString const &format, Qwt3DVectorWriter::TEXTMODE text, Qwt3DVectorWriter::SORTMODE sortmode)
 Writes vector data supported by gl2ps
 
virtual bool save (QString const &fileName, QString const &format)
 Saves content in one of the registered output formats
 

信号

void rotationChanged (double xAngle, double yAngle, double zAngle)
 Signal emitted when the rotation is changed
 
void shiftChanged (double xShift, double yShift, double zShift)
 Signal emitted when the shift is changed
 
void vieportShiftChanged (double xShift, double yShift)
 Signal emitted when the viewport shift is changed
 
void scaleChanged (double xScale, double yScale, double zScale)
 Signal emitted when the scaling is changed
 
void zoomChanged (double)
 Signal emitted when the zoom is changed
 
void projectionChanged (bool)
 Signal emitted when the projection mode is changed
 
void aspectRatioModeChanged (ASPECTRATIOMODE mode)
 Signal emitted when the aspect ratio mode is changed
 

Public 成员函数

 Qwt3DPlot (QWidget *parent=nullptr)
 Constructs a Qwt3DPlot widget
 
QPixmap renderPixmap (int w=0, int h=0, bool useContext=false)
 Renders the plot to a pixmap
 
void createCoordinateSystem (Triple beg, Triple end)
 Creates a coordinate system with generating corners beg and end
 
Qwt3DCoordinateSystemcoordinates ()
 
Qwt3DColorLegendlegend ()
 
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
 
ASPECTRATIOMODE aspectRatioMode () const
 
void setBackgroundColor (RGBA rgba)
 Sets the background color
 
RGBA backgroundRGBAColor () const
 
ParallelEpiped hull () const
 
void showColorLegend (bool)
 Shows or hides the color legend
 
bool isColorLegendShown () const
 返回颜色图例是否显示
 
void setLegendPosition (Qwt3DColorLegend::Position pos)
 
void setLegendAbsolutePosition (const QRectF &pixelRect)
 
void setTitlePosition (double rely, double relx=0.5, ANCHOR=TopCenter)
 Sets relative caption position
 
void setTitleFont (const QString &family, int pointSize, int weight=QFont::Normal, bool italic=false)
 Sets the caption font
 
void setTitleColor (RGBA col)
 
void setTitle (const QString &title)
 
QString title () const
 返回标题文本
 
void setTheme (const Qwt3DTheme &theme)
 
Qwt3DTheme theme () const
 
void applyTheme (Qwt3DTheme::Preset preset)
 
void applyTheme (const QString &presetName)
 
void assignMouse (Qwt3DMouseState xrot, Qwt3DMouseState yrot, Qwt3DMouseState zrot, Qwt3DMouseState xscale, Qwt3DMouseState yscale, Qwt3DMouseState zscale, Qwt3DMouseState zoom, Qwt3DMouseState xshift, Qwt3DMouseState yshift)
 
bool mouseEnabled () const
 
void assignKeyboard (Qwt3DKeyboardState xrot_n, Qwt3DKeyboardState xrot_p, Qwt3DKeyboardState yrot_n, Qwt3DKeyboardState yrot_p, Qwt3DKeyboardState zrot_n, Qwt3DKeyboardState zrot_p, Qwt3DKeyboardState xscale_n, Qwt3DKeyboardState xscale_p, Qwt3DKeyboardState yscale_n, Qwt3DKeyboardState yscale_p, Qwt3DKeyboardState zscale_n, Qwt3DKeyboardState zscale_p, Qwt3DKeyboardState zoom_n, Qwt3DKeyboardState zoom_p, Qwt3DKeyboardState xshift_n, Qwt3DKeyboardState xshift_p, Qwt3DKeyboardState yshift_n, Qwt3DKeyboardState 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 (unsigned int property, double r, double g, double b, double a=1.0)
 Sets material component (RGBA)
 
void setMaterialComponent (unsigned int property, double intensity)
 Sets material component (intensity)
 
void setShininess (double exponent)
 Sets shininess exponent
 
void setLightComponent (unsigned int property, double r, double g, double b, double a=1.0, unsigned light=0)
 Sets light component (RGBA)
 
void setLightComponent (unsigned int property, double intensity, unsigned light=0)
 Sets light component (intensity)
 
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 hasItems () const
 
virtual void attach (Qwt3DPlotItem *item)
 Attach a plot item to this plot
 
virtual void detach (Qwt3DPlotItem *item)
 Detach a plot item from this plot
 
const QList< Qwt3DPlotItem * > & itemList () const
 Returns the list of attached items (sorted by z-order)
 
void itemChanged (Qwt3DPlotItem *item)
 Called by Qwt3DPlotItem when its data or properties change
 
bool initializedGL () const
 
QMatrix4x4 modelViewMatrix () const
 Returns the current model-view matrix
 
QMatrix4x4 projectionMatrix () const
 Returns the current projection matrix
 
QPointF worldToScreen (const Triple &world) const
 Converts a world coordinate to screen (viewport) coordinates
 
Triple screenToWorld (const QPointF &screen) const
 Converts screen (viewport) coordinates to a world coordinate
 
QSize viewportSize () const
 Returns the viewport size in pixels
 
QOpenGLShaderProgram * lineShader () const
 Returns the shared line shader program
 
QOpenGLShaderProgram * pointShader () const
 Returns the shared point shader program
 
QOpenGLShaderProgram * polygonShader () const
 Returns the shared polygon shader program
 
QOpenGLShaderProgram * textShader () const
 Returns the shared text shader program
 

Protected 成员函数

void initializeGL () override
 Sets up the OpenGL rendering state
 
void paintGL () override
 Paints the widget's content
 
void resizeGL (int w, int h) override
 Sets up the OpenGL view port
 
void mousePressEvent (QMouseEvent *e) override
 
void mouseReleaseEvent (QMouseEvent *e) override
 
void mouseMoveEvent (QMouseEvent *e) override
 
void wheelEvent (QWheelEvent *e) override
 
void keyPressEvent (QKeyEvent *e) override
 

详细描述

Pure rendering window for 3D plots

Qwt3DPlot is the central rendering window (a QOpenGLWidget subclass). It manages GL context, view transformation, lighting, coordinate system, legend, title, and mouse/keyboard interaction. It does NOT hold any plotting data — data is managed by Qwt3DPlotItem subclasses that are attached via attach().

The rendering pipeline in paintGL():

  1. Clear color + depth buffer
  2. Calculate view/projection matrices on CPU (QMatrix4x4)
  3. For each attached item (sorted by z): item->draw()
  4. Draw coordinate system (legacy GL temporarily)
  5. Draw legend and title
auto plot = new Qwt3DPlot(parent);
auto item = new MySurfaceItem();
item->attach(plot);
Pure rendering window for 3D plots
Definition qwt3d_plot.h:36

构造及析构函数说明

◆ Qwt3DPlot()

Qwt3DPlot::Qwt3DPlot ( QWidget *  parent = nullptr)

Constructs a Qwt3DPlot widget

参数
parentParent widget

Destructor

成员函数说明

◆ aspectRatioModeChanged

void Qwt3DPlot::aspectRatioModeChanged ( ASPECTRATIOMODE  mode)
signal

Signal emitted when the aspect ratio mode is changed

参数
modeThe new aspect ratio mode (AUTOFILL or DATARATIO)

◆ assignKeyboard()

void Qwt3DPlot::assignKeyboard ( Qwt3DKeyboardState  xrot_n,
Qwt3DKeyboardState  xrot_p,
Qwt3DKeyboardState  yrot_n,
Qwt3DKeyboardState  yrot_p,
Qwt3DKeyboardState  zrot_n,
Qwt3DKeyboardState  zrot_p,
Qwt3DKeyboardState  xscale_n,
Qwt3DKeyboardState  xscale_p,
Qwt3DKeyboardState  yscale_n,
Qwt3DKeyboardState  yscale_p,
Qwt3DKeyboardState  zscale_n,
Qwt3DKeyboardState  zscale_p,
Qwt3DKeyboardState  zoom_n,
Qwt3DKeyboardState  zoom_p,
Qwt3DKeyboardState  xshift_n,
Qwt3DKeyboardState  xshift_p,
Qwt3DKeyboardState  yshift_n,
Qwt3DKeyboardState  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 Qwt3DPlot::assignMouse ( Qwt3DMouseState  xrot,
Qwt3DMouseState  yrot,
Qwt3DMouseState  zrot,
Qwt3DMouseState  xscale,
Qwt3DMouseState  yscale,
Qwt3DMouseState  zscale,
Qwt3DMouseState  zoom,
Qwt3DMouseState  xshift,
Qwt3DMouseState  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

◆ attach()

void Qwt3DPlot::attach ( Qwt3DPlotItem item)
virtual

Attach a plot item to this plot

参数
itemPointer to the item to attach

Inserts the item into the internal list and sorts by z-order. If the item is already attached, it is not duplicated.

◆ blowout()

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

◆ createCoordinateSystem()

void Qwt3DPlot::createCoordinateSystem ( Triple  beg,
Triple  end 
)

Creates a coordinate system with generating corners beg and end

参数
begMinimum vertex of the coordinate system
endMaximum vertex of the coordinate system

◆ detach()

void Qwt3DPlot::detach ( Qwt3DPlotItem item)
virtual

Detach a plot item from this plot

参数
itemPointer to the item to detach

Removes the item from the internal list. Does not delete the item.

◆ disableKeyboard

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

◆ disableMouse

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

◆ enableKeyboard

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

The function has no effect if you derive from Qwt3DPlot 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().

◆ enableLighting

void Qwt3DPlot::enableLighting ( bool  val = true)
slot

Enable or disable lighting

参数
valTrue to enable, false to disable

Lighting parameters are stored on CPU only. No GL_LIGHTING glEnable/glDisable calls are made. Shader-based lighting will use these stored parameters as uniform values.

◆ enableMouse

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

The function has no effect if you derive from Qwt3DPlot 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 Qwt3DPlot::illuminate ( unsigned  light = 0)
参数
lightlight number [0..7]
参见
setLight

◆ initializeGL()

void Qwt3DPlot::initializeGL ( )
overrideprotected

Sets up the OpenGL rendering state

Compiles shared GLSL shaders (line, point, polygon, text) for use by drawables and items. Enables blend and depth test.

◆ isColorLegendShown()

bool Qwt3DPlot::isColorLegendShown ( ) const

返回颜色图例是否显示

返回
true 如果颜色图例已显示

返回 d->m_displayLegend。showColorLegend(bool) 通过 d->m_displayLegend = show 设置,此处返回该值。

◆ itemChanged()

void Qwt3DPlot::itemChanged ( Qwt3DPlotItem item)

Called by Qwt3DPlotItem when its data or properties change

参数
itemThe item that changed

Re-sorts the item list by z-order, recalculates the plot hull as the union of all items' hulls, updates the coordinate system, and triggers a repaint.

◆ modelViewMatrix()

QMatrix4x4 Qwt3DPlot::modelViewMatrix ( ) const

Returns the current model-view matrix

返回
The model-view matrix computed during the last paintGL() call

Items use this matrix in their shader uniforms to transform vertex positions from model space to view space.

◆ mouseMoveEvent()

void Qwt3DPlot::mouseMoveEvent ( QMouseEvent *  e)
overrideprotected

Standard mouse button Function

参见
assignMouse()

◆ mousePressEvent()

void Qwt3DPlot::mousePressEvent ( QMouseEvent *  e)
overrideprotected

Standard mouse button Function. Prepares the call to mouseMoveEvent

参见
mouseMoveEvent()

◆ mouseReleaseEvent()

void Qwt3DPlot::mouseReleaseEvent ( QMouseEvent *  e)
overrideprotected

Standard mouse button Function. Completes the call to mouseMoveEvent

参见
mouseMoveEvent()

◆ paintGL()

void Qwt3DPlot::paintGL ( )
overrideprotected

Paints the widget's content

Uses CPU-side QMatrix4x4 for view/projection calculation. All rendering uses VBO/VAO + GLSL shaders.

◆ projectionChanged

void Qwt3DPlot::projectionChanged ( bool  )
signal

Signal emitted when the projection mode is changed

参数
orthoTrue for orthogonal, false for perspective

◆ projectionMatrix()

QMatrix4x4 Qwt3DPlot::projectionMatrix ( ) const

Returns the current projection matrix

返回
The projection matrix computed during the last paintGL() call

Items use this matrix in their shader uniforms to transform vertex positions from view space to clip space.

◆ renderPixmap()

QPixmap Qwt3DPlot::renderPixmap ( int  w = 0,
int  h = 0,
bool  useContext = false 
)

Renders the plot to a pixmap

参数
wWidth (0 for default)
hHeight (0 for default)
useContextWhether to use existing GL context
返回
QPixmap of the rendered scene

◆ resizeGL()

void Qwt3DPlot::resizeGL ( int  w,
int  h 
)
overrideprotected

Sets up the OpenGL view port

参数
wNew width
hNew height

◆ rotationChanged

void Qwt3DPlot::rotationChanged ( double  xAngle,
double  yAngle,
double  zAngle 
)
signal

Signal emitted when the rotation is changed

参数
xAngleX axis rotation angle
yAngleY axis rotation angle
zAngleZ axis rotation angle

◆ save

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

Saves content in one of the registered output formats

参数
fileNameOutput file name
formatOutput format string
返回
True on success

To modify the behaviour for more complex output handling use Qwt3DIO::outputHandler.

◆ savePixmap

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

Saves the framebuffer to an image file

参数
fileNameOutput file name
formatImage file format supported by Qt
返回
True on success
弃用:
Use Qwt3DPlot::save or Qwt3DIO::save instead.

◆ saveVector

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

Writes vector data supported by gl2ps

参数
fileNameOutput file name
formatOutput format ("EPS", "PS", "PDF", "SVG", or "PGF")
textText handling mode
sortmodeSort mode for polygon ordering
返回
True on success
弃用:
Use Qwt3DPlot::save or Qwt3DIO::save instead.

If zlib has been configured, format types will be extended by "EPS_GZ" and "PS_GZ". Beware: BSPSORT turns out to behave very slowly and memory consuming, especially in cases where many polygons appear. It is still more exact than SIMPLESORT.

◆ scaleChanged

void Qwt3DPlot::scaleChanged ( double  xScale,
double  yScale,
double  zScale 
)
signal

Signal emitted when the scaling is changed

参数
xScaleX axis scale factor
yScaleY axis scale factor
zScaleZ axis scale factor

◆ screenToWorld()

Triple Qwt3DPlot::screenToWorld ( const QPointF &  screen) const

Converts screen (viewport) coordinates to a world coordinate

参数
screenScreen-space point (pixel coordinates)
返回
World-space Triple

Uses the inverse of the CPU-side modelView and projection matrices to unproject screen coordinates. The z-component is determined by the near plane (z=0 in NDC). Replaces the legacy gluUnProject call.

◆ setAspectRatioMode

void Qwt3DPlot::setAspectRatioMode ( ASPECTRATIOMODE  mode)
slot

Sets the aspect ratio mode for the 3D coordinate box

参数
modeAUTOFILL to independently scale each axis to fill the viewport, DATARATIO to preserve original data proportions

In AUTOFILL mode (default), each axis is normalized to the same visual length so the coordinate box appears as a cube, making the plot fill the viewport. In DATARATIO mode, the original data proportions are preserved (equal aspect ratio), similar to matplotlib's plt.axis('equal').

◆ setBackgroundColor()

void Qwt3DPlot::setBackgroundColor ( RGBA  rgba)

Sets the background color

参数
rgbaBackground color as RGBA value

◆ setKeySpeed()

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

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

◆ setLightComponent() [1/2]

void Qwt3DPlot::setLightComponent ( unsigned int  property,
double  intensity,
unsigned  light = 0 
)

Sets light component (intensity)

Convenience function: sets r=g=b=intensity, a=1.0

◆ setLightComponent() [2/2]

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

Sets light component (RGBA)

Parameters are stored on CPU for future shader uniform upload. No glLightfv calls are made.

◆ setLightRotation

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

Set the rotation angle of the light source

参数
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 Qwt3DPlot::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

◆ setMaterialComponent() [1/2]

void Qwt3DPlot::setMaterialComponent ( unsigned int  property,
double  intensity 
)

Sets material component (intensity)

Convenience function: sets r=g=b=intensity, a=1.0

◆ setMaterialComponent() [2/2]

void Qwt3DPlot::setMaterialComponent ( unsigned int  property,
double  r,
double  g,
double  b,
double  a = 1.0 
)

Sets material component (RGBA)

Parameters are stored on CPU for future shader uniform upload. No glMaterialfv calls are made.

◆ setOrtho

void Qwt3DPlot::setOrtho ( bool  val)
slot

Sets up orthogonal or perspective mode and updates widget

参数
valTrue for orthogonal projection, false for perspective

◆ setRotation

void Qwt3DPlot::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 Qwt3DPlot::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;

◆ setShift

void Qwt3DPlot::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 Qwt3DPlot::setShininess ( double  exponent)

Sets shininess exponent

Parameter is stored on CPU for future shader uniform upload. No glMaterialf calls are made.

◆ setTitleFont()

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

Sets the caption font

参数
familyFont family name
pointSizeFont point size
weightFont weight
italicWhether font is italic

◆ setTitlePosition()

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

Sets relative caption position

参数
relyRelative Y position (0-1). (0.5,0.5) means the anchor point lies in the center of the screen.
relxRelative X position (0-1)
anchorAnchor type for title alignment

◆ setViewportShift

void Qwt3DPlot::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 Qwt3DPlot::setZoom ( double  val)
slot

Set the (zoom in addition to scale).

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

◆ shiftChanged

void Qwt3DPlot::shiftChanged ( double  xShift,
double  yShift,
double  zShift 
)
signal

Signal emitted when the shift is changed

参数
xShiftX axis shift value
yShiftY axis shift value
zShiftZ axis shift value

◆ showColorLegend()

void Qwt3DPlot::showColorLegend ( bool  show)

Shows or hides the color legend

参数
showTrue to show, false to hide

The color legend colors are populated from attached items' dataColor functors during paintGL.

◆ title()

QString Qwt3DPlot::title ( ) const

返回标题文本

返回
标题字符串

委托到内部 Qwt3DLabel 的 string() getter。 setTitle() 通过 d->m_title.setString(title) 设置,此处返回 d->m_title.string()。

◆ vieportShiftChanged

void Qwt3DPlot::vieportShiftChanged ( double  xShift,
double  yShift 
)
signal

Signal emitted when the viewport shift is changed

参数
xShiftX viewport shift value
yShiftY viewport shift value

◆ wheelEvent()

void Qwt3DPlot::wheelEvent ( QWheelEvent *  e)
overrideprotected

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

◆ worldToScreen()

QPointF Qwt3DPlot::worldToScreen ( const Triple world) const

Converts a world coordinate to screen (viewport) coordinates

参数
worldWorld-space triple
返回
Screen-space QPointF (pixel coordinates)

Uses the CPU-side modelView and projection matrices to transform world coordinates to normalized device coordinates, then maps to viewport pixels. Replaces the legacy gluProject call.

◆ zoomChanged

void Qwt3DPlot::zoomChanged ( double  )
signal

Signal emitted when the zoom is changed

参数
zoomZoom factor

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