QWT API (English) 7.3.0
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
Qwt3DColorLegend Class Reference

A flat color legend. More...

#include <qwt3d_colorlegend.h>

Inheritance diagram for Qwt3DColorLegend:
Qwt3DDrawable

Classes

class  PrivateData
 

Public Types

enum  SCALEPOSITION { Top , Bottom , Left , Right }
 
enum  ORIENTATION { BottomTop , LeftRight }
 
enum  Position {
  PosTopLeft , PosTopCenter , PosTopRight , PosLeftCenter ,
  PosCenter , PosRightCenter , PosBottomLeft , PosBottomCenter ,
  PosBottomRight , PosCustom
}
 

Public Member Functions

void draw (const Qwt3DRenderContext &ctx) override
 Draws the color legend using VBO + polygon/line shaders.
 
void setRelPosition (Tuple relMin, Tuple relMax)
 
void setPosition (Position pos)
 
void setAbsolutePosition (const QRectF &pixelRect)
 
Position position () const
 
QRectF absolutePosition () const
 返回绝对像素位置
 
bool useAbsolutePosition () const
 返回是否使用绝对定位
 
ORIENTATION orientation () const
 返回图例方向
 
SCALEPOSITION scalePosition () const
 返回刻度位置
 
bool drawScale () const
 返回是否绘制刻度
 
void limits (double &start, double &stop) const
 返回刻度范围
 
int majors () const
 返回主刻度数
 
int minors () const
 返回次刻度数
 
QString titleString () const
 返回图例标题文本
 
void setOrientation (ORIENTATION, SCALEPOSITION)
 
void setLimits (double start, double stop)
 
void setMajors (int)
 
void setMinors (int)
 
void drawScale (bool val)
 
void drawNumbers (bool val)
 
void setAutoScale (bool val)
 
void setScale (Qwt3DScale *scale)
 
void setScale (SCALETYPE)
 
void setTitleString (QString const &s)
 
void setTitleFont (QString const &family, int pointSize, int weight=QFont::Normal, bool italic=false)
 
- Public Member Functions inherited from Qwt3DDrawable
void attach (Qwt3DDrawable *)
 
void detach (Qwt3DDrawable *)
 
void detachAll ()
 
virtual void setColor (double r, double g, double b, double a=1)
 
virtual void setColor (RGBA rgba)
 
RGBA color () const
 Returns the drawable's color.
 

Public Attributes

ColorVector colors
 

Additional Inherited Members

- Protected Member Functions inherited from Qwt3DDrawable
 Qwt3DDrawable (Qwt3DDrawable &&other) noexcept
 
Qwt3DDrawableoperator= (Qwt3DDrawable &&other) noexcept
 
- Protected Attributes inherited from Qwt3DDrawable
RGBA m_color
 

Detailed Description

A flat color legend.

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

Member Function Documentation

◆ absolutePosition()

QRectF Qwt3DColorLegend::absolutePosition ( ) const

返回绝对像素位置

Returns
绝对像素矩形

◆ draw()

void Qwt3DColorLegend::draw ( const Qwt3DRenderContext ctx)
overridevirtual

Draws the color legend using VBO + polygon/line shaders.

Parameters
ctxRender context providing shaders, matrices, and coordinate conversion

Renders the color bar as a set of quads using VBO + polygon shader, the border outline using VBO + line shader, then delegates axis and caption drawing to their respective draw() methods.

Reimplemented from Qwt3DDrawable.

◆ drawScale()

bool Qwt3DColorLegend::drawScale ( ) const

返回是否绘制刻度

Returns
true 如果绘制刻度

◆ limits()

void Qwt3DColorLegend::limits ( double &  start,
double &  stop 
) const

返回刻度范围

Parameters
[out]start起始值
[out]stop终止值

◆ majors()

int Qwt3DColorLegend::majors ( ) const

返回主刻度数

Returns
主刻度数

◆ minors()

int Qwt3DColorLegend::minors ( ) const

返回次刻度数

Returns
次刻度数

◆ orientation()

Qwt3DColorLegend::ORIENTATION Qwt3DColorLegend::orientation ( ) const

返回图例方向

Returns
ORIENTATION 枚举值

◆ scalePosition()

Qwt3DColorLegend::SCALEPOSITION Qwt3DColorLegend::scalePosition ( ) const

返回刻度位置

Returns
SCALEPOSITION 枚举值

◆ titleString()

QString Qwt3DColorLegend::titleString ( ) const

返回图例标题文本

Returns
标题字符串

◆ useAbsolutePosition()

bool Qwt3DColorLegend::useAbsolutePosition ( ) const

返回是否使用绝对定位

Returns
true 如果使用绝对像素坐标定位

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