VR-Forces 4.0.4 Class Documentation
include/tmqt/tmBackground.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2002 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: tmBackground.h,v $ $Revision: 1.5 $ $State: Exp $
00007 *******************************************************************************/
00008 
00011 
00012 #ifndef TMBACKGROUND_H_
00013 #define TMBACKGROUND_H_
00014 
00015 #include <QtCore/QObject>
00016 #include <QtGui/QPixmap>
00017 
00018 class DtTMArea;
00019 class DtTMViewportExtents;
00020 
00024 #include "tmqt/tmqtDefines.h"
00025 class DT_DLL_tmqt DtTMBackground : public QObject
00026 {
00027 
00028 public:
00029 
00031    DtTMBackground();
00032 
00034    DtTMBackground(const DtTMBackground& orig);
00035 
00037    virtual ~DtTMBackground();
00038 
00040    DtTMBackground& operator=(const DtTMBackground& rhs);
00041 
00044    virtual bool init(DtTMArea* area);
00045       
00047    virtual void draw(QPainter* painter = NULL) = 0;
00048    virtual void clear() = 0;
00049 
00050    virtual const DtTMViewportExtents* viewportExtents() const;
00051    virtual void setViewportExtents(DtTMViewportExtents* v);
00052 
00053    virtual QPixmap* pixmap() const;
00054 
00056    virtual void setPixmap(QPixmap*);
00057 
00058    void setNeedsRedraw(bool);
00059    bool needsRedraw() const;
00060 
00061 protected:
00062    QPixmap* myPixmap;
00063    
00064    DtTMViewportExtents* myViewportExtents;
00065    DtTMArea*            myArea;
00066 
00067    bool                 myNeedsRedraw;
00068 };
00069 
00070 inline void DtTMBackground::setNeedsRedraw(bool b)
00071 {
00072    myNeedsRedraw = b;
00073 }
00074 
00075 inline bool DtTMBackground::needsRedraw() const
00076 {
00077    return myNeedsRedraw;
00078 }
00079 
00080 #endif //TMBACKGROUND_H_

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)