Qwt User's Guide 6.0.1

- Main Page
- Related Pages
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions

# QwtIntervalSymbol Class Reference

A drawing primitive for displaying an interval like an error bar. More...

`#include <qwt_interval_symbol.h>`

List of all members.

## Public Types
enum | Style { NoSymbol = -1, Bar, Box, UserSymbol = 1000 }
## Public Member Functions
const QBrush & | brush () const
virtual void | draw (QPainter *, Qt::Orientation, const QPointF &from, const QPointF &to) const
bool | operator!= (const QwtIntervalSymbol &) const
QwtIntervalSymbol & | operator= (const QwtIntervalSymbol &)
bool | operator== (const QwtIntervalSymbol &) const
const QPen & | pen () const
| QwtIntervalSymbol (const QwtIntervalSymbol &)
| QwtIntervalSymbol (Style=NoSymbol)
void | setBrush (const QBrush &b)
void | setPen (const QPen &)
void | setStyle (Style)
void | setWidth (int)
Style | style () const
int | width () const
virtual | ~QwtIntervalSymbol ()

## Detailed Description

A drawing primitive for displaying an interval like an error bar.

See also:
  QwtPlotIntervalCurve

## Member Enumeration Documentation

enum QwtIntervalSymbol::Style

Symbol style.

Enumerator:

  NoSymbol | No Style. The symbol cannot be drawn.
  Bar | The symbol displays a line with caps at the beginning/end. The size of the caps depends on the symbol width().
  Box | The symbol displays a plain rectangle using pen() and brush(). The size of the rectangle depends on the translated interval and the width(),
  UserSymbol | Styles >= UserSymbol are reserved for derived classes of QwtIntervalSymbol that overload draw() with additional application specific symbol types.

## Constructor & Destructor Documentation

QwtIntervalSymbol::QwtIntervalSymbol | ( | Style | style = `NoSymbol` | ) |

Constructor

Parameters:

  style | Style of the symbol

See also:
  setStyle(), style(), Style

QwtIntervalSymbol::QwtIntervalSymbol | ( | const QwtIntervalSymbol & | other | ) |

Copy constructor.

QwtIntervalSymbol::~QwtIntervalSymbol | ( |  | ) | `[virtual]`

Destructor.

## Member Function Documentation

const QBrush & QwtIntervalSymbol::brush | ( |  | ) | const

Returns:
  Brush

See also:
  setBrush()

void QwtIntervalSymbol::draw | ( | QPainter * | painter,
|  | Qt::Orientation | orientation,
|  | const QPointF & | from,
|  | const QPointF & | to
| ) |  | const`[virtual]`

Draw a symbol depending on its style

Parameters:

  painter | Painter
  orientation | Orientation
  from | Start point of the interval in target device coordinates
  to | End point of the interval in target device coordinates

See also:
  setStyle()

bool QwtIntervalSymbol::operator!= | ( | const QwtIntervalSymbol & | other | ) | const

Compare two symbols.

QwtIntervalSymbol & QwtIntervalSymbol::operator= | ( | const QwtIntervalSymbol & | other | ) |

Assignment operator.

bool QwtIntervalSymbol::operator== | ( | const QwtIntervalSymbol & | other | ) | const

Compare two symbols.

const QPen & QwtIntervalSymbol::pen | ( |  | ) | const

Returns:
  Pen

See also:
  setPen(), brush()

void QwtIntervalSymbol::setBrush | ( | const QBrush & | brush | ) |

Assign a brush.

The brush is used for the Box style.

Parameters:

  brush | Brush

See also:
  brush()

void QwtIntervalSymbol::setPen | ( | const QPen & | pen | ) |

Assign a pen

Parameters:

  pen | Pen

See also:
  pen(), setBrush()

void QwtIntervalSymbol::setStyle | ( | Style | style | ) |

Specify the symbol style

Parameters:

  style | Style

See also:
  style(), Style

void QwtIntervalSymbol::setWidth | ( | int | width | ) |

Specify the width of the symbol It is used depending on the style.

Parameters:

  width | Width

See also:
  width(), setStyle()

QwtIntervalSymbol::Style QwtIntervalSymbol::style | ( |  | ) | const

Returns:
  Current symbol style

See also:
  setStyle()

int QwtIntervalSymbol::width | ( |  | ) | const

Returns:
  Width of the symbol.

See also:
  setWidth(), setStyle()