QCP

QCP Namespace Reference

Typedefs

typedef QFlags< AntialiasedElementAntialiasedElements
 
typedef QFlags< InteractionInteractions
 
typedef QFlags< MarginSideMarginSides
 
typedef QFlags< PlottingHintPlottingHints
 

Enumerations

enum  AntialiasedElement {
  aeAxes = 0x0001 , aeGrid = 0x0002 , aeSubGrid = 0x0004 , aeLegend = 0x0008 ,
  aeLegendItems = 0x0010 , aePlottables = 0x0020 , aeItems = 0x0040 , aeScatters = 0x0080 ,
  aeFills = 0x0100 , aeZeroLine = 0x0200 , aeOther = 0x8000 , aeAll = 0xFFFF ,
  aeNone = 0x0000
}
 
enum  ExportPen { epNoCosmetic , epAllowCosmetic }
 
enum  Interaction {
  iNone = 0x000 , iRangeDrag = 0x001 , iRangeZoom = 0x002 , iMultiSelect = 0x004 ,
  iSelectPlottables = 0x008 , iSelectAxes = 0x010 , iSelectLegend = 0x020 , iSelectItems = 0x040 ,
  iSelectOther = 0x080 , iSelectPlottablesBeyondAxisRect = 0x100
}
 
enum  MarginSide {
  msLeft = 0x01 , msRight = 0x02 , msTop = 0x04 , msBottom = 0x08 ,
  msAll = 0xFF , msNone = 0x00
}
 
enum  PlottingHint { phNone = 0x000 , phFastPolylines = 0x001 , phImmediateRefresh = 0x002 , phCacheLabels = 0x004 }
 
enum  ResolutionUnit { ruDotsPerMeter , ruDotsPerCentimeter , ruDotsPerInch }
 
enum  SelectionRectMode { srmNone , srmZoom , srmSelect , srmCustom }
 
enum  SelectionType {
  stNone , stWhole , stSingleData , stDataRange ,
  stMultipleDataRanges
}
 
enum  SignDomain { sdNegative , sdBoth , sdPositive }
 

Functions

int getMarginValue (const QMargins &margins, QCP::MarginSide side)
 
bool isInvalidData (double value)
 
bool isInvalidData (double value1, double value2)
 
void setMarginValue (QMargins &margins, QCP::MarginSide side, int value)
 

Variables

const QMetaObject staticMetaObject
 

Detailed Description

The QCP Namespace contains general enums, QFlags and functions used throughout the QCustomPlot library.

It provides QMetaObject-based reflection of its enums and flags via QCP::staticMetaObject.

Typedef Documentation

◆ AntialiasedElements

Definition at line 227 of file qcustomplot.h.

◆ Interactions

Definition at line 261 of file qcustomplot.h.

◆ MarginSides

Definition at line 202 of file qcustomplot.h.

◆ PlottingHints

Definition at line 241 of file qcustomplot.h.

Enumeration Type Documentation

◆ AntialiasedElement

Defines what objects of a plot can be forcibly drawn antialiased/not antialiased. If an object is neither forcibly drawn antialiased nor forcibly drawn not antialiased, it is up to the respective element how it is drawn. Typically it provides a setAntialiased function for this.

AntialiasedElements is a flag of or-combined elements of this enum type.

See also
QCustomPlot::setAntialiasedElements, QCustomPlot::setNotAntialiasedElements
Enumerator
aeAxes 

0x0001 Axis base line and tick marks

aeGrid 

0x0002 Grid lines

aeSubGrid 

0x0004 Sub grid lines

aeLegend 

0x0008 Legend box

aeLegendItems 

0x0010 Legend items

aePlottables 

0x0020 Main lines of plottables

aeItems 

0x0040 Main lines of items

aeScatters 

0x0080 Scatter symbols of plottables (excluding scatter symbols of type ssPixmap)

aeFills 

0x0100 Borders of fills (e.g. under or between graphs)

aeZeroLine 

0x0200 Zero-lines, see QCPGrid::setZeroLinePen

aeOther 

0x8000 Other elements that don't fit into any of the existing categories

aeAll 

0xFFFF All elements

aeNone 

0x0000 No elements

Definition at line 213 of file qcustomplot.h.

◆ ExportPen

Defines how cosmetic pens (pens with numerical width 0) are handled during export.

See also
QCustomPlot::savePdf
Enumerator
epNoCosmetic 

Cosmetic pens are converted to pens with pixel width 1 when exporting.

epAllowCosmetic 

Cosmetic pens are exported normally (e.g. in PDF exports, cosmetic pens always appear as 1 pixel on screen, independent of viewer zoom level)

Definition at line 174 of file qcustomplot.h.

◆ Interaction

Defines the mouse interactions possible with QCustomPlot.

Interactions is a flag of or-combined elements of this enum type.

See also
QCustomPlot::setInteractions
Enumerator
iNone 

0x000 None of the interactions are possible

iRangeDrag 

0x001 Axis ranges are draggable (see QCPAxisRect::setRangeDrag, QCPAxisRect::setRangeDragAxes)

iRangeZoom 

0x002 Axis ranges are zoomable with the mouse wheel (see QCPAxisRect::setRangeZoom, QCPAxisRect::setRangeZoomAxes)

iMultiSelect 

0x004 The user can select multiple objects by holding the modifier set by QCustomPlot::setMultiSelectModifier while clicking

iSelectPlottables 

0x008 Plottables are selectable (e.g. graphs, curves, bars,... see QCPAbstractPlottable)

iSelectAxes 

0x010 Axes are selectable (or parts of them, see QCPAxis::setSelectableParts)

iSelectLegend 

0x020 Legends are selectable (or their child items, see QCPLegend::setSelectableParts)

iSelectItems 

0x040 Items are selectable (Rectangles, Arrows, Textitems, etc. see QCPAbstractItem)

iSelectOther 

0x080 All other objects are selectable (e.g. your own derived layerables, other layout elements,...)

iSelectPlottablesBeyondAxisRect 

0x100 When performing plottable selection/hit tests, this flag extends the sensitive area beyond the axis rect

Definition at line 250 of file qcustomplot.h.

◆ MarginSide

Defines the sides of a rectangular entity to which margins can be applied.

See also
QCPLayoutElement::setAutoMargins, QCPAxisRect::setAutoMargins
Enumerator
msLeft 

0x01 left margin

msRight 

0x02 right margin

msTop 

0x04 top margin

msBottom 

0x08 bottom margin

msAll 

0xFF all margins

msNone 

0x00 no margin

Definition at line 195 of file qcustomplot.h.

◆ PlottingHint

Defines plotting hints that control various aspects of the quality and speed of plotting.

See also
QCustomPlot::setPlottingHints
Enumerator
phNone 

0x000 No hints are set

phFastPolylines 

0x001 Graph/Curve lines are drawn with a faster method.

This reduces the quality especially of the line segment joins, thus is most effective for pen sizes larger than 1. It is only used for solid line pens.

phImmediateRefresh 

0x002 causes an immediate repaint() instead of a soft update() when QCustomPlot::replot() is called with parameter QCustomPlot::rpRefreshHint.

This is set by default to prevent the plot from freezing on fast consecutive replots (e.g. user drags ranges with mouse).

phCacheLabels 

0x004 axis (tick) labels will be cached as pixmaps, increasing replot performance.

Definition at line 234 of file qcustomplot.h.

◆ ResolutionUnit

Defines the different units in which the image resolution can be specified in the export functions.

See also
QCustomPlot::savePng, QCustomPlot::saveJpg, QCustomPlot::saveBmp, QCustomPlot::saveRastered
Enumerator
ruDotsPerMeter 

Resolution is given in dots per meter (dpm)

ruDotsPerCentimeter 

Resolution is given in dots per centimeter (dpcm)

ruDotsPerInch 

Resolution is given in dots per inch (DPI/PPI)

Definition at line 164 of file qcustomplot.h.

◆ SelectionRectMode

Defines the behaviour of the selection rect.

See also
QCustomPlot::setSelectionRectMode, QCustomPlot::selectionRect, QCPSelectionRect
Enumerator
srmNone 

The selection rect is disabled, and all mouse events are forwarded to the underlying objects, e.g. for axis range dragging.

srmZoom 

When dragging the mouse, a selection rect becomes active. Upon releasing, the axes that are currently set as range zoom axes (QCPAxisRect::setRangeZoomAxes) will have their ranges zoomed accordingly.

srmSelect 

When dragging the mouse, a selection rect becomes active. Upon releasing, plottable data points that were within the selection rect are selected, if the plottable's selectability setting permits. (See data selection mechanism for details.)

srmCustom 

When dragging the mouse, a selection rect becomes active. It is the programmer's responsibility to connect according slots to the selection rect's signals (e.g. QCPSelectionRect::accepted) in order to process the user interaction.

Definition at line 268 of file qcustomplot.h.

◆ SelectionType

Defines the different ways a plottable can be selected. These images show the effect of the different selection types, when the indicated selection rect was dragged:

stNone
stWhole
stSingleData
stDataRange
stMultipleDataRanges
See also
QCPAbstractPlottable::setSelectable, QCPDataSelection::enforceType
Enumerator
stNone 

The plottable is not selectable.

stWhole 

Selection behaves like stMultipleDataRanges, but if there are any data points selected, the entire plottable is drawn as selected.

stSingleData 

One individual data point can be selected at a time.

stDataRange 

Multiple contiguous data points (a data range) can be selected.

stMultipleDataRanges 

Any combination of data points/ranges can be selected.

Definition at line 292 of file qcustomplot.h.

◆ SignDomain

Represents negative and positive sign domain, e.g. for passing to QCPAbstractPlottable::getKeyRange and QCPAbstractPlottable::getValueRange.

This is primarily needed when working with logarithmic axis scales, since only one of the sign domains can be visible at a time.

Enumerator
sdNegative 

The negative sign domain, i.e. numbers smaller than zero.

sdBoth 

Both sign domains, including zero, i.e. all numbers.

sdPositive 

The positive sign domain, i.e. numbers greater than zero.

Definition at line 185 of file qcustomplot.h.

Function Documentation

◆ getMarginValue()

int QCP::getMarginValue ( const QMargins & margins,
QCP::MarginSide side )
inline

Returns the value of the specified side of margins. If side is QCP::msNone or QCP::msAll, returns 0.

See also
setMarginValue

Definition at line 346 of file qcustomplot.h.

◆ isInvalidData() [1/2]

bool QCP::isInvalidData ( double value)
inline

Returns whether the specified value is considered an invalid data value for plottables (i.e. is nan or +/-inf). This function is used to check data validity upon replots, when the compiler flag QCUSTOMPLOT_CHECK_DATA is set.

Definition at line 305 of file qcustomplot.h.

◆ isInvalidData() [2/2]

bool QCP::isInvalidData ( double value1,
double value2 )
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Checks two arguments instead of one.

Definition at line 315 of file qcustomplot.h.

◆ setMarginValue()

void QCP::setMarginValue ( QMargins & margins,
QCP::MarginSide side,
int value )
inline

Sets the specified side of margins to value

See also
getMarginValue

Definition at line 326 of file qcustomplot.h.

This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Sep 27 2024 12:02:41 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.