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

A flat color legend 更多...

#include <qwt3d_colorlegend.h>

类 Qwt3D::ColorLegend 继承关系图:
Qwt3D::Drawable

class  PrivateData
 

Public 类型

enum  SCALEPOSITION { Top , Bottom , Left , Right }
 
enum  ORIENTATION { BottomTop , LeftRight }
 

Public 成员函数

 ColorLegend ()
 Constructs a legend object with an axis at the left side
 
virtual void draw () override
 Draws the color legend
 
void setRelPosition (Qwt3D::Tuple relMin, Qwt3D::Tuple relMax)
 Sets relative position of the legend within the plot area
 
void setOrientation (ORIENTATION, SCALEPOSITION)
 Sets the legend orientation and axis scale position
 
void setLimits (double start, double stop)
 Sets axis scale limits
 
void setMajors (int)
 Sets number of major intervals
 
void setMinors (int)
 Sets number of minor intervals
 
void drawScale (bool val)
 
void drawNumbers (bool val)
 
void setAutoScale (bool val)
 Enables or disables auto-scaling
 
void setScale (Qwt3D::Scale *scale)
 Sets a user-defined scale object
 
void setScale (Qwt3D::SCALETYPE)
 Sets predefined scale type
 
void setTitleString (QString const &s)
 
void setTitleFont (QString const &family, int pointSize, int weight=QFont::Normal, bool italic=false)
 Sets the legend title font
 
- Public 成员函数 继承自 Qwt3D::Drawable
virtual void saveGLState ()
 
virtual void restoreGLState ()
 
void attach (Drawable *)
 
void detach (Drawable *)
 
void detachAll ()
 
virtual void setColor (double r, double g, double b, double a=1)
 
virtual void setColor (Qwt3D::RGBA rgba)
 
Qwt3D::Triple relativePosition (Qwt3D::Triple rel)
 Calculates world coordinates from relative viewport position
 

Public 属性

Qwt3D::ColorVector colors
 

额外继承的成员函数

- Protected 成员函数 继承自 Qwt3D::Drawable
void Enable (GLenum what, GLboolean val)
 
Qwt3D::Triple ViewPort2World (Qwt3D::Triple win, bool *err=nullptr)
 Converts viewport coordinates to world coordinates (glUnProject)
 
Qwt3D::Triple World2ViewPort (Qwt3D::Triple obj, bool *err=nullptr)
 Converts world coordinates to viewport coordinates (glProject)
 
 Drawable (Drawable &&other) noexcept
 
Drawableoperator= (Drawable &&other) noexcept
 
- Protected 属性 继承自 Qwt3D::Drawable
Qwt3D::RGBA color
 
GLdouble modelMatrix [16]
 
GLdouble projMatrix [16]
 
GLint viewport [4]
 

详细描述

A flat color legend

The class visualizes a ColorVector together with a scale (axis) and a caption. ColorLegends are vertical or horizontal.

构造及析构函数说明

◆ ColorLegend()

ColorLegend::ColorLegend ( )

Constructs a legend object with an axis at the left side

The legend resides in the top-right area and has no caption. Scale numbering is shown.

Sets the legend title string

参数
sTitle text string

成员函数说明

◆ draw()

void ColorLegend::draw ( )
overridevirtual

Draws the color legend

Renders the color legend including color bar, axis, and caption.

重载 Qwt3D::Drawable .

◆ setAutoScale()

void ColorLegend::setAutoScale ( bool  val)

Enables or disables auto-scaling

参数
valTrue to enable auto-scaling, false to disable

◆ setLimits()

void ColorLegend::setLimits ( double  start,
double  stop 
)

Sets axis scale limits

参数
startStart value
stopStop value

◆ setMajors()

void ColorLegend::setMajors ( int  majors)

Sets number of major intervals

参数
majorsNumber of major intervals

◆ setMinors()

void ColorLegend::setMinors ( int  minors)

Sets number of minor intervals

参数
minorsNumber of minor intervals

◆ setOrientation()

void ColorLegend::setOrientation ( ORIENTATION  orientation,
SCALEPOSITION  pos 
)

Sets the legend orientation and axis scale position

参数
orientationLegend orientation (BottomTop or TopBottom)
posAxis scale position (Left, Right, Top, or Bottom)

◆ setRelPosition()

void ColorLegend::setRelPosition ( Qwt3D::Tuple  relMin,
Qwt3D::Tuple  relMax 
)

Sets relative position of the legend within the plot area

参数
relMinMinimum relative position (x,y)
relMaxMaximum relative position (x,y)

◆ setScale() [1/2]

void ColorLegend::setScale ( Qwt3D::Scale scale)

Sets a user-defined scale object

参数
valPointer to a Scale object

◆ setScale() [2/2]

void ColorLegend::setScale ( Qwt3D::SCALETYPE  val)

Sets predefined scale type

参数
valScale type (LINEARSCALE or LOG10SCALE)

◆ setTitleFont()

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

Sets the legend title font

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

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