VR-Forces 4.0.4 Class Documentation
include/symbology/nameLabelSymbol.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2003 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: nameLabelSymbol.h,v $ $Revision: 1.26 $ $State: Exp $
00007 *********************************************************************/
00008 
00011 
00012 #ifndef NAMELABELSYMBOL_H
00013 #define NAMELABELSYMBOL_H
00014 
00015 #include "symbology/compositeSymbol.h"
00016 
00017 #include <QtGui/QColor>
00018 
00019 class DtTTSSymbol;
00020 class QFont;
00021 
00022 #include "symbology/symbologyDefines.h"
00023 class DT_DLL_symbology DtNameLabelSymbol : public DtCompositeSymbol
00024 {
00025 
00026 public:
00027 
00029    DtNameLabelSymbol();
00030    DtNameLabelSymbol(DtSymbolDrawer& d);
00031 
00033    virtual ~DtNameLabelSymbol();
00034 
00036    DtNameLabelSymbol(const DtNameLabelSymbol& orig);
00037 
00039    DtNameLabelSymbol& operator=(const DtNameLabelSymbol& rhs);
00040 
00041    virtual DtSymbol* clone() const;
00042 
00043    virtual DtTTSSymbol* name();
00044    virtual void setName(DtTTSSymbol* s);
00045 
00046    virtual DtTTSSymbol* label();
00047    virtual void setLabel(DtTTSSymbol* s);
00048 
00049    virtual DtTTSSymbol* layer();
00050    virtual void setLayer(DtTTSSymbol* s);
00051 
00052    virtual int resetLabelPositions() const;
00053    
00056    virtual bool offsetFromBottom() const;
00057    virtual void setOffsetFromBottom(bool b);
00058 
00060    virtual void setColor(const QColor& col);
00061 
00063    virtual void setMainSymbolColor(const QColor& col);
00064    virtual QColor* mainSymbolColor() const;
00065 
00067    virtual void setPenColor(const QColor& col);
00068    virtual QColor penColor() const;
00069 
00070    virtual void setNeedsLabelUpdate(bool b);
00071    virtual bool needsLabelUpdate() const;
00072 
00073    virtual bool addNameLabel() const;
00074    virtual bool addLabelLabel() const;
00075    virtual bool addLayerLabel() const;
00076 
00080    virtual bool canChangeFont() const;
00081 
00082    virtual void setName(const QString& name);
00083    virtual QString getName() const;
00084 
00085    virtual void setLabel(const QString& label);
00086    virtual QString getLabel() const;
00087 
00088    virtual void setLayer(const QString& label);
00089    virtual QString getLayer() const;
00090 
00091    virtual const QFont* font() const;
00092    virtual void setFontname(const QString& font);
00093 
00094    virtual bool adjustPoints(QPolygon& pnts, bool constrain);
00095 
00096    virtual void setEditable(bool b);
00097    virtual bool editable() const;
00098    
00100    virtual void setAllowEditOnSelection(bool b);
00101 
00104    virtual bool supportsRightClickDialog() const;
00105 
00107    virtual bool freehand() const;
00108 
00110    virtual DtTTSSymbol* createNameSymbol();
00111    virtual DtTTSSymbol* createLabelSymbol();
00112    virtual void setLabelDrawer(DtSymbolDrawer* drawer);
00113 
00114    void setPositionLabelChildren(bool);
00115    bool positionLabelChildren() const;
00116 
00117    virtual void copyDataFrom(const DtSymbol* symbol);
00118 
00119    virtual void clearColor();
00120    virtual void clearMainSymbolColor();
00121 
00122 public:
00123    static DtSymbol* create(DtSymbolDrawer& drawer);
00124 
00125 protected:
00126    virtual DtTTSSymbol* createTextSymbol();
00127 
00128 protected:
00129 
00130    DtTTSSymbol* myName;
00131    DtTTSSymbol* myLabel;
00132    DtTTSSymbol* myLayer;
00133 
00134    QColor myLabelColor;
00135    bool myNeedsLabelUpdate;
00136    bool myOffsetFromBottom;
00137 
00138    QString myFontname;
00139 
00140    DtSymbolDrawer*   myLabelDrawer;
00141 
00142    bool myPositionLabelChildren;
00143 };
00144 
00145 inline void DtNameLabelSymbol::setPositionLabelChildren(bool b)
00146 {
00147    myPositionLabelChildren = b;
00148 }
00149 
00150 inline bool DtNameLabelSymbol::positionLabelChildren() const
00151 {
00152    return myPositionLabelChildren;
00153 }
00154 
00155 #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)