VR-Forces 4.0.4 Class Documentation
include/symbolDrawerInterface/symbolDrawer.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2001 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: symbolDrawer.h,v $ $Revision: 1.16 $ $State: Exp $
00007 *********************************************************************/
00008 
00011 
00012 #ifndef DtSymbolDrawerInterface_H_
00013 #define DtSymbolDrawerInterface_H_
00014 
00015 #include "symbolDrawerInterface/symbolDrawerInterfaceDefines.h"
00016 
00017 #include <QtCore/QSize>
00018 #include <QtCore/QRect>
00019 #include <QtCore/QObject>
00020 #include <QtGui/QColor>
00021 
00022 class DtSymbol;
00023 class QPaintDevice;
00024 class QPainter;
00025 
00035 
00036 class DT_DLL_symbolDrawerInterface DtSymbolDrawer : public QObject
00037 {
00038 public:
00039    DtSymbolDrawer();
00040    virtual ~DtSymbolDrawer();
00041 
00044    virtual bool doDrawing(QPainter& paint, 
00045                           const DtSymbol * const symbol);
00046 
00047    virtual QSize calcBBox( const DtSymbol * const symbol ) const = 0;
00048    virtual QRect calcBRect( const DtSymbol * const symbol) const;
00049 
00053    virtual bool forceUpdate(const DtSymbol* const symbol) const;
00054 
00057    virtual bool endTransparentDraw(QPainter& paint,
00058                     const DtSymbol * const symbol) const;
00059 
00062    virtual void processHiddenSymbolAction(QPainter& paint, const DtSymbol * const symbol);
00063 
00064 public:
00070    static double drawScalingFactor();
00071    static void setDrawScalingFactor(double d);
00072 
00073    virtual bool      draw(QPainter& paint, 
00074                           const DtSymbol * const symbol ) const = 0;
00075 
00076    static void setHighlightColor(const QColor& color);
00077    static const QColor& highlightColor();
00078 
00079 protected:
00081    DtSymbolDrawer(const DtSymbolDrawer& orig);
00082 
00084    DtSymbolDrawer& operator=(const DtSymbolDrawer& orig);
00085 
00086 protected:
00087    static double gDrawScalingFactor;
00088    static QColor theHighlightColor;
00089 };
00090 
00091 typedef DtSymbolDrawer* (*DtSymbolDrawerCreatorFcn)();
00092 
00093 #endif
00094 

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)