![]() |
VR-Forces 4.0.4 Class Documentation
|
This class contains the data to draw a string with a true type font. More...

Public Types | |
| enum | DtRotationOption { DtOrigin = 0, DtBottomLeft, DtCustom } |
Public Member Functions | |
| DtTTSSymbol (DtSymbolDrawer &drawer, const QString &string=QString(), const QString &altString=QString()) | |
| Constructors / assignment operator / destructor. | |
| DtTTSSymbol (DtNullDrawer &drawer, const QString &string=QString(), const QString &altString=QString()) | |
| DtTTSSymbol (const DtTTSSymbol &orig) | |
| DtTTSSymbol & | operator= (const DtTTSSymbol &orig) |
| virtual | ~DtTTSSymbol () |
| virtual DtSymbol * | clone () const |
| Returns an instance of a symbol which is a copy of this. | |
| virtual const QString & | string () const |
| member data i/o | |
| virtual void | setString (const QString &string) |
| virtual const QString & | altString () const |
| virtual void | setAltString (const QString &name) |
| virtual void | setUseAltString (bool value) |
| Use the alt name if it exists. | |
| virtual bool | useAltString () const |
| virtual Qt::PenStyle | penStyle () const |
| virtual void | setPenStyle (const Qt::PenStyle style) |
| virtual const QColor & | penColor () const |
| virtual void | setPenColor (const QColor &color) |
| virtual unsigned | pointSize () const |
| Size can be set by point size or a conversion scale. | |
| virtual void | setScale (const unsigned scale) |
| virtual void | setPointSize (const unsigned ptSize) |
| virtual void | setScaleToSize (DtTTSScaleToSize *scale) |
| Set function that converts scale to point size. | |
| virtual DtTTSScaleToSize * | scaleToSize () const |
| virtual void | setDegreesRotated (double) |
| virtual double | degreesRotated () const |
| virtual void | setRotationOption (DtRotationOption) |
| virtual DtRotationOption | rotationOption () const |
| virtual void | setRotationPointOffset (const QPoint &) |
| Set custom rotation point relative to origin. | |
| virtual const QPoint | rotationCenter () const |
| Returned value is calculated based on rotation option etc. | |
| virtual const QFont * | font () const |
| Gets/sets font. | |
| virtual void | setFont (const QFont &font) |
| virtual void | setFontname (const QString &name) |
| virtual const QString & | fontname () const |
| virtual void | setConstrainToSize (const QSize &size) |
| virtual void | clearConstrainToSize () |
| virtual bool | constrainToSize () const |
| virtual const QSize & | constrainedSize () const |
| virtual bool | isScalable () const |
| Return true/false if this is a scalable symbol. By default returns false. | |
| bool | operator== (const DtTTSSymbol &orig) const |
| bool | operator!= (const DtTTSSymbol &orig) const |
| virtual bool | transparentCacheChanged () const |
| virtual void | setShadowText (bool) |
| virtual bool | shadowText () const |
| virtual void | setFontScalingFactor (double scale) |
| Scale is between 0 and 1, and is multiplied against the current font size to get a new font size. | |
| virtual double | fontScalingFactor () const |
| virtual const QString & | bitmapSymbolCacheKey () const |
| Returns a cache key that can be used to lookup in a bitmap cache. | |
| virtual void | setHighlight (const bool highlight) |
| Set/get the highlight flag (whether the symbol should be drawn highlighted). | |
Static Public Member Functions | |
| static void | setDefaultPenColor (const QColor &c) |
| static const QColor & | defaultPenColor () |
Protected Member Functions | |
| virtual QString | internalBitmapSymbolCacheKey () const |
Protected Attributes | |
| QString | myString |
| data members | |
| QString | myAltString |
| bool | myUseAltString |
| Qt::PenStyle | myPenStyle |
| unsigned | myPointSize |
| DtTTSScaleToSize * | myScaleToSize |
| double | myDegreesRotated |
| QPoint | myRotationPointOffset |
| DtRotationOption | myRotationOption |
| QString | myFontname |
| QFont * | myFont |
| bool | myConstrainToSize |
| QSize | myConstrainedSize |
| bool | myShadowText |
| double | myFontScalingFactor |
| bool | myRecreateSymbolCacheKey |
Static Protected Attributes | |
| static QColor | gDefaultPenColor |
Private Member Functions | |
| DtTTSSymbol () | |
| Not implemented. Private to ensure it is only constructed with a drawer. | |
This class contains the data to draw a string with a true type font.
An optional alternative string representation may be set. For example, labels might use the primary string as the long name, and the alternative as the short name. Similarly, military symbols might use the primary string as the ranked symbol, and the alternative as a rank-less symbol.
| DtTTSSymbol::DtTTSSymbol | ( | DtSymbolDrawer & | drawer, |
| const QString & | string = QString(), |
||
| const QString & | altString = QString() |
||
| ) |
Constructors / assignment operator / destructor.
| DtTTSSymbol::DtTTSSymbol | ( | DtNullDrawer & | drawer, |
| const QString & | string = QString(), |
||
| const QString & | altString = QString() |
||
| ) |
| DtTTSSymbol::DtTTSSymbol | ( | const DtTTSSymbol & | orig | ) |
| virtual DtTTSSymbol::~DtTTSSymbol | ( | ) | [virtual] |
| DtTTSSymbol::DtTTSSymbol | ( | ) | [private] |
Not implemented. Private to ensure it is only constructed with a drawer.
| DtTTSSymbol& DtTTSSymbol::operator= | ( | const DtTTSSymbol & | orig | ) |
| virtual DtSymbol* DtTTSSymbol::clone | ( | ) | const [virtual] |
Returns an instance of a symbol which is a copy of this.
The caller is responsible for freeing the memory.
Reimplemented from DtColorizedSymbol.
Reimplemented in DtMMMSymbol, and DtTTFUnitSymbol.
| virtual const QString& DtTTSSymbol::string | ( | ) | const [virtual] |
member data i/o
Return the alt name if useAltString has been set AND the alt name is not null. Otherwise return the long name.
| virtual void DtTTSSymbol::setString | ( | const QString & | string | ) | [virtual] |
| virtual const QString& DtTTSSymbol::altString | ( | ) | const [virtual] |
| virtual void DtTTSSymbol::setAltString | ( | const QString & | name | ) | [virtual] |
| virtual void DtTTSSymbol::setUseAltString | ( | bool | value | ) | [virtual] |
Use the alt name if it exists.
| virtual bool DtTTSSymbol::useAltString | ( | ) | const [virtual] |
| virtual Qt::PenStyle DtTTSSymbol::penStyle | ( | ) | const [virtual] |
| virtual void DtTTSSymbol::setPenStyle | ( | const Qt::PenStyle | style | ) | [virtual] |
| virtual const QColor& DtTTSSymbol::penColor | ( | ) | const [virtual] |
| virtual void DtTTSSymbol::setPenColor | ( | const QColor & | color | ) | [virtual] |
| virtual unsigned DtTTSSymbol::pointSize | ( | ) | const [virtual] |
Size can be set by point size or a conversion scale.
| virtual void DtTTSSymbol::setScale | ( | const unsigned | scale | ) | [virtual] |
| virtual void DtTTSSymbol::setPointSize | ( | const unsigned | ptSize | ) | [virtual] |
Reimplemented in DtTTFUnitSymbol.
| virtual void DtTTSSymbol::setScaleToSize | ( | DtTTSScaleToSize * | scale | ) | [virtual] |
Set function that converts scale to point size.
| virtual DtTTSScaleToSize* DtTTSSymbol::scaleToSize | ( | ) | const [virtual] |
| virtual void DtTTSSymbol::setDegreesRotated | ( | double | ) | [virtual] |
| virtual double DtTTSSymbol::degreesRotated | ( | ) | const [virtual] |
| virtual void DtTTSSymbol::setRotationOption | ( | DtRotationOption | ) | [virtual] |
| virtual DtRotationOption DtTTSSymbol::rotationOption | ( | ) | const [virtual] |
| virtual void DtTTSSymbol::setRotationPointOffset | ( | const QPoint & | ) | [virtual] |
Set custom rotation point relative to origin.
| virtual const QPoint DtTTSSymbol::rotationCenter | ( | ) | const [virtual] |
Returned value is calculated based on rotation option etc.
| virtual const QFont* DtTTSSymbol::font | ( | ) | const [virtual] |
Gets/sets font.
| virtual void DtTTSSymbol::setFont | ( | const QFont & | font | ) | [virtual] |
Reimplemented in DtTTFUnitSymbol.
| virtual void DtTTSSymbol::setFontname | ( | const QString & | name | ) | [virtual] |
| virtual const QString& DtTTSSymbol::fontname | ( | ) | const [virtual] |
| virtual void DtTTSSymbol::setConstrainToSize | ( | const QSize & | size | ) | [virtual] |
| virtual void DtTTSSymbol::clearConstrainToSize | ( | ) | [virtual] |
| virtual bool DtTTSSymbol::constrainToSize | ( | ) | const [virtual] |
| virtual const QSize& DtTTSSymbol::constrainedSize | ( | ) | const [virtual] |
| virtual bool DtTTSSymbol::isScalable | ( | ) | const [virtual] |
Return true/false if this is a scalable symbol. By default returns false.
Reimplemented from DtSymbol.
| bool DtTTSSymbol::operator== | ( | const DtTTSSymbol & | orig | ) | const |
| bool DtTTSSymbol::operator!= | ( | const DtTTSSymbol & | orig | ) | const |
| virtual bool DtTTSSymbol::transparentCacheChanged | ( | ) | const [virtual] |
Reimplemented from DtColorizedSymbol.
| virtual void DtTTSSymbol::setShadowText | ( | bool | ) | [virtual] |
| virtual bool DtTTSSymbol::shadowText | ( | ) | const [virtual] |
| virtual void DtTTSSymbol::setFontScalingFactor | ( | double | scale | ) | [virtual] |
Scale is between 0 and 1, and is multiplied against the current font size to get a new font size.
| virtual double DtTTSSymbol::fontScalingFactor | ( | ) | const [virtual] |
| static void DtTTSSymbol::setDefaultPenColor | ( | const QColor & | c | ) | [static] |
| static const QColor& DtTTSSymbol::defaultPenColor | ( | ) | [static] |
| virtual const QString& DtTTSSymbol::bitmapSymbolCacheKey | ( | ) | const [virtual] |
Returns a cache key that can be used to lookup in a bitmap cache.
Default returns "Symbol". Might be recalculated when called
Reimplemented from DtSymbol.
| virtual void DtTTSSymbol::setHighlight | ( | const bool | highlight | ) | [virtual] |
Set/get the highlight flag (whether the symbol should be drawn highlighted).
Reimplemented from DtSymbol.
| virtual QString DtTTSSymbol::internalBitmapSymbolCacheKey | ( | ) | const [protected, virtual] |
Reimplemented in DtTTFUnitSymbol, and DtMMMSymbol.
QString DtTTSSymbol::myString [protected] |
data members
QString DtTTSSymbol::myAltString [protected] |
bool DtTTSSymbol::myUseAltString [protected] |
Qt::PenStyle DtTTSSymbol::myPenStyle [protected] |
unsigned DtTTSSymbol::myPointSize [protected] |
DtTTSScaleToSize* DtTTSSymbol::myScaleToSize [protected] |
double DtTTSSymbol::myDegreesRotated [protected] |
QPoint DtTTSSymbol::myRotationPointOffset [protected] |
DtRotationOption DtTTSSymbol::myRotationOption [protected] |
QString DtTTSSymbol::myFontname [protected] |
QFont* DtTTSSymbol::myFont [protected] |
bool DtTTSSymbol::myConstrainToSize [protected] |
QSize DtTTSSymbol::myConstrainedSize [protected] |
bool DtTTSSymbol::myShadowText [protected] |
double DtTTSSymbol::myFontScalingFactor [protected] |
QColor DtTTSSymbol::gDefaultPenColor [static, protected] |
bool DtTTSSymbol::myRecreateSymbolCacheKey [mutable, protected] |