JKQTPlotter trunk/v5.0.0
an extensive Qt5+Qt6 Plotter framework (including a feature-richt plotter widget, a speed-optimized, but limited variant and a LaTeX equation renderer!), written fully in C/C++ and without external dependencies
Loading...
Searching...
No Matches

plot a horizontal scale bar More...

#include <jkqtfastplotter.h>

Inheritance diagram for JKQTFPQScaleBarXPlot:
[legend]
Collaboration diagram for JKQTFPQScaleBarXPlot:
[legend]

Public Types

enum  Position {
  TopLeft =0 ,
  TopRight =1 ,
  BottomLeft =2 ,
  BottomRight =3
}
 

Public Slots

void setPosition (int pos)
 
- Public Slots inherited from JKQTFPPlot
void setVisible (bool visible)
 

Public Member Functions

 JKQTFPQScaleBarXPlot (JKQTFastPlotter *parent, double width=1, const QString &label=QString("%1"), QColor color=QColor("grey"), double lineWidth=2)
 class constructor
 
virtual void drawGraph (QPainter &painter) override
 draw the graph
 
QColor getColor () const
 color of scale bar
 
QFont getFont () const
 font of scale bar
 
QString getLabel () const
 scale bar label (use %1 to include value of width)
 
double getLineWidth () const
 line width of scale bar, given in pt
 
Position getPosition () const
 scale bar position
 
double getWidth () const
 width of scale bar
 
void setColor (const QColor &__value)
 color of scale bar
 
void setFont (const QFont &__value)
 font of scale bar
 
void setLabel (const QString &__value)
 scale bar label (use %1 to include value of width)
 
void setLineWidth (double __value)
 line width of scale bar, given in pt
 
void setPosition (const Position &__value)
 scale bar position
 
void setWidth (double __value)
 width of scale bar
 
- Public Member Functions inherited from JKQTFPPlot
 JKQTFPPlot (JKQTFastPlotter *parent)
 class constructor
 
virtual ~JKQTFPPlot ()
 virtual class destructor
 
bool isVisible () const
 returns whether this graph is visible inside the plot
 
void paint (QPainter &painter)
 draw the graph
 
void replot ()
 start a replot of the parent widget
 
void setParent (JKQTFastPlotter *parent)
 set the parent of the plot
 

Protected Attributes

QColor color
 color of scale bar
 
QFont font
 font of scale bar
 
QString label
 scale bar label (use %1 to include value of width)
 
double lineWidth
 line width of scale bar, given in pt
 
Position position
 scale bar position
 
double width
 width of scale bar
 
- Protected Attributes inherited from JKQTFPPlot
JKQTFastPlotterparent
 parent class, i.e. the plotter to plot on
 
bool visible
 indicates whether the plot is visible or not
 

Detailed Description

plot a horizontal scale bar

Deprecated:
The class JKQTFastPlotter and all its support classes are deprecated and will be removed in future versions.

Member Enumeration Documentation

◆ Position

Enumerator
TopLeft 
TopRight 
BottomLeft 
BottomRight 

Constructor & Destructor Documentation

◆ JKQTFPQScaleBarXPlot()

JKQTFPQScaleBarXPlot::JKQTFPQScaleBarXPlot ( JKQTFastPlotter parent,
double  width = 1,
const QString &  label = QString("%1"),
QColor  color = QColor("grey"),
double  lineWidth = 2 
)
explicit

class constructor

Member Function Documentation

◆ drawGraph()

virtual void JKQTFPQScaleBarXPlot::drawGraph ( QPainter &  painter)
overridevirtual

draw the graph

Implements JKQTFPPlot.

◆ getColor()

QColor JKQTFPQScaleBarXPlot::getColor ( ) const
inline

color of scale bar

◆ getFont()

QFont JKQTFPQScaleBarXPlot::getFont ( ) const
inline

font of scale bar

◆ getLabel()

QString JKQTFPQScaleBarXPlot::getLabel ( ) const
inline

scale bar label (use %1 to include value of width)

◆ getLineWidth()

double JKQTFPQScaleBarXPlot::getLineWidth ( ) const
inline

line width of scale bar, given in pt

◆ getPosition()

Position JKQTFPQScaleBarXPlot::getPosition ( ) const
inline

scale bar position

◆ getWidth()

double JKQTFPQScaleBarXPlot::getWidth ( ) const
inline

width of scale bar

◆ setColor()

void JKQTFPQScaleBarXPlot::setColor ( const QColor &  __value)
inline

color of scale bar

◆ setFont()

void JKQTFPQScaleBarXPlot::setFont ( const QFont &  __value)
inline

font of scale bar

◆ setLabel()

void JKQTFPQScaleBarXPlot::setLabel ( const QString &  __value)
inline

scale bar label (use %1 to include value of width)

◆ setLineWidth()

void JKQTFPQScaleBarXPlot::setLineWidth ( double  __value)
inline

line width of scale bar, given in pt

◆ setPosition() [1/2]

void JKQTFPQScaleBarXPlot::setPosition ( const Position __value)
inline

scale bar position

◆ setPosition [2/2]

void JKQTFPQScaleBarXPlot::setPosition ( int  pos)
inlineslot

◆ setWidth()

void JKQTFPQScaleBarXPlot::setWidth ( double  __value)
inline

width of scale bar

Member Data Documentation

◆ color

QColor JKQTFPQScaleBarXPlot::color
protected

color of scale bar

◆ font

QFont JKQTFPQScaleBarXPlot::font
protected

font of scale bar

◆ label

QString JKQTFPQScaleBarXPlot::label
protected

scale bar label (use %1 to include value of width)

◆ lineWidth

double JKQTFPQScaleBarXPlot::lineWidth
protected

line width of scale bar, given in pt

◆ position

Position JKQTFPQScaleBarXPlot::position
protected

scale bar position

◆ width

double JKQTFPQScaleBarXPlot::width
protected

width of scale bar


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