VR-Forces 4.0.4 Class Documentation
include/symbology/ttsSymbol.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2001 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: ttsSymbol.h,v $ $Revision: 1.30 $ $State: Exp $
00007 *********************************************************************/
00008 
00011 
00012 #ifndef DtTTSSymbol_H_
00013 #define DtTTSSymbol_H_
00014 
00016 class DtTTSDrawer;
00017 class DtNullDrawer;
00018 class DtTTSScaleToSize;
00019 class QFont;
00020 
00021 #include "symbology/colorizedSymbol.h"
00022 
00024 #include <QtGui/QColor>
00025 
00026 class QString;
00027 
00028 
00029 
00030 const int TTS_FONT_BOLD       = 0x00000001;
00031 const int TTS_FONT_ITALIC     = 0x00000002;
00032 const int TTS_FONT_UNDERLINE  = 0x00000004;
00033 const int TTS_FONT_STRIKEOUT  = 0x00000008;
00034 
00043 #include "symbology/symbologyDefines.h"
00044 class DT_DLL_symbology DtTTSSymbol : public DtColorizedSymbol
00045 {
00046 public:
00047 
00049    DtTTSSymbol( DtSymbolDrawer & drawer, 
00050                 const QString & string = QString(), 
00051                 const QString & altString = QString() );
00052    DtTTSSymbol( DtNullDrawer & drawer, 
00053                 const QString & string = QString(), 
00054                 const QString & altString = QString() );
00055    DtTTSSymbol( const DtTTSSymbol& orig );
00056    DtTTSSymbol& operator=( const DtTTSSymbol& orig );
00057    virtual ~DtTTSSymbol();
00058    virtual DtSymbol * clone()const;
00059 
00060    enum DtRotationOption 
00061    {  
00062       DtOrigin = 0, 
00063       DtBottomLeft, 
00064       DtCustom 
00065    };
00066 
00068 
00071    virtual const QString &    string() const;
00072    virtual void               setString(const QString & string);
00073 
00074    virtual const QString &    altString() const;
00075    virtual void               setAltString( const QString & name );
00076 
00078    virtual void               setUseAltString( bool value );
00079    virtual bool               useAltString() const;
00080 
00081    virtual Qt::PenStyle       penStyle() const;
00082    virtual void               setPenStyle(const Qt::PenStyle style);
00083 
00084    virtual const QColor &     penColor() const;
00085    virtual void               setPenColor( const QColor & color );
00086 
00088    virtual unsigned           pointSize() const;
00089    virtual void               setScale(const unsigned scale);
00090    virtual void               setPointSize(const unsigned ptSize);
00091 
00093    virtual void               setScaleToSize( DtTTSScaleToSize* scale );
00094    virtual DtTTSScaleToSize*  scaleToSize() const;
00095 
00096    virtual void               setDegreesRotated(double);
00097    virtual double             degreesRotated() const;
00098 
00099    virtual void               setRotationOption(DtRotationOption);
00100    virtual DtRotationOption   rotationOption() const;
00101 
00103    virtual void               setRotationPointOffset(const QPoint&);
00104 
00106    virtual const QPoint       rotationCenter() const;
00107 
00109    virtual const QFont* font() const;
00110    virtual void setFont(const QFont& font);
00111 
00112    virtual void setFontname(const QString& name);
00113    virtual const QString& fontname() const;
00114 
00115    virtual void setConstrainToSize(const QSize& size);
00116    virtual void clearConstrainToSize();
00117 
00118    virtual bool constrainToSize() const;
00119    virtual const QSize& constrainedSize() const;
00120 
00121    virtual bool isScalable() const;
00122 
00123    bool operator==(const DtTTSSymbol& orig) const;
00124    bool operator!=(const DtTTSSymbol& orig) const;
00125 
00126    virtual bool transparentCacheChanged() const;
00127 
00128    virtual void setShadowText(bool);
00129    virtual bool shadowText() const;
00130 
00133    virtual void setFontScalingFactor(double scale);
00134    virtual double fontScalingFactor() const;
00135 
00136    static void setDefaultPenColor(const QColor& c);
00137    static const QColor& defaultPenColor();
00138    virtual const QString& bitmapSymbolCacheKey() const;
00139    virtual void setHighlight(const bool highlight);
00140 
00141 protected:
00142    virtual QString internalBitmapSymbolCacheKey() const;
00143 
00144 private:
00146    DtTTSSymbol();
00147 
00148 protected: 
00149    QString                    myString;
00150    QString                    myAltString;
00151    bool                       myUseAltString;
00152 
00153    Qt::PenStyle               myPenStyle;
00154 
00155    unsigned                   myPointSize;
00156    DtTTSScaleToSize*          myScaleToSize; 
00157 
00158    double                     myDegreesRotated;
00159    QPoint                     myRotationPointOffset;
00160    DtRotationOption           myRotationOption;
00161    QString                    myFontname;
00162 
00163    QFont                      *myFont;
00164 
00165    bool                       myConstrainToSize;
00166    QSize                      myConstrainedSize;
00167 
00168    bool                       myShadowText;
00169    double                     myFontScalingFactor;
00170 
00171    static QColor              gDefaultPenColor;
00172    mutable bool               myRecreateSymbolCacheKey;
00173 };
00174 
00175 #endif

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)