Cute Chess  0.1
Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
QCPLabelPainterPrivate Class Reference

Classes

struct  CachedLabel
 
struct  LabelData
 

Public Types

enum  AnchorMode { amRectangular, amSkewedUpright, amSkewedRotated }
 
enum  AnchorReferenceType { artNormal, artTangent }
 
enum  AnchorSide {
  asLeft, asRight, asTop, asBottom,
  asTopLeft, asTopRight, asBottomRight, asBottomLeft
}
 

Public Member Functions

bool abbreviateDecimalPowers () const
 
AnchorMode anchorMode () const
 
QPointF anchorReference () const
 
AnchorReferenceType anchorReferenceType () const
 
AnchorSide anchorSide () const
 
int cacheSize () const
 
void clearCache ()
 
QColor color () const
 
void drawTickLabel (QCPPainter *painter, const QPointF &tickPos, const QString &text)
 
QFont font () const
 
QChar multiplicationSymbol () const
 
int padding () const
 
 QCPLabelPainterPrivate (QCustomPlot *parentPlot)
 
double rotation () const
 
void setAbbreviateDecimalPowers (bool enabled)
 
void setAnchorMode (AnchorMode mode)
 
void setAnchorReference (const QPointF &pixelPoint)
 
void setAnchorReferenceType (AnchorReferenceType type)
 
void setAnchorSide (AnchorSide side)
 
void setCacheSize (int labelCount)
 
void setColor (const QColor &color)
 
void setFont (const QFont &font)
 
void setMultiplicationSymbol (QChar symbol)
 
void setPadding (int padding)
 
void setRotation (double rotation)
 
void setSubstituteExponent (bool enabled)
 
bool substituteExponent () const
 

Static Public Attributes

static const QChar SymbolCross
 
static const QChar SymbolDot
 

Protected Member Functions

void analyzeFontMetrics ()
 
void applyAnchorTransform (LabelData &labelData) const
 
QByteArray cacheKey (const QString &text, const QColor &color, double rotation, AnchorSide side) const
 
CachedLabelcreateCachedLabel (const LabelData &labelData) const
 
virtual void drawLabelMaybeCached (QCPPainter *painter, const QFont &font, const QColor &color, const QPointF &pos, AnchorSide side, double rotation, const QString &text)
 
void drawText (QCPPainter *painter, const QPointF &pos, const LabelData &labelData) const
 
virtual QByteArray generateLabelParameterHash () const
 
QPointF getAnchorPos (const QPointF &tickPos)
 
LabelData getTickLabelData (const QFont &font, const QColor &color, double rotation, AnchorSide side, const QString &text) const
 
AnchorSide rotationCorrectedSide (AnchorSide side, double rotation) const
 
AnchorSide skewedAnchorSide (const QPointF &tickPos, double sideExpandHorz, double sideExpandVert) const
 

Protected Attributes

bool mAbbreviateDecimalPowers
 
AnchorMode mAnchorMode
 
QPointF mAnchorReference
 
AnchorReferenceType mAnchorReferenceType
 
AnchorSide mAnchorSide
 
QRect mAxisSelectionBox
 
QColor mColor
 
QFont mFont
 
QCache< QString, CachedLabelmLabelCache
 
QByteArray mLabelParameterHash
 
QRect mLabelSelectionBox
 
int mLetterCapHeight
 
int mLetterDescent
 
QChar mMultiplicationSymbol
 
int mPadding
 
QCustomPlotmParentPlot
 
double mRotation
 
bool mSubstituteExponent
 
QRect mTickLabelsSelectionBox
 

Member Enumeration Documentation

◆ AnchorMode

TODO

◆ AnchorReferenceType

TODO

◆ AnchorSide

TODO

Constructor & Destructor Documentation

◆ QCPLabelPainterPrivate()

QCPLabelPainterPrivate::QCPLabelPainterPrivate ( QCustomPlot parentPlot)
explicit

Constructs a QCPLabelPainterPrivate instance. Make sure to not create a new instance on every redraw, to utilize the caching mechanisms.

the parentPlot does not take ownership of the label painter. Make sure to delete it appropriately.


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