VR-Forces 4.0.4 Class Documentation
include/filterLenses/lensArea.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2001 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: lensArea.h,v $ $Revision: 1.23 $ $State: Exp $
00007 *********************************************************************/
00008 
00011 
00012 #ifndef DtLensArea_H_
00013 #define DtLensArea_H_
00014 
00015 #include <QtGui/QWidget>
00016 #include "ngutil/dtqlist.h"
00017 
00018 class QPopupMenu;
00019 class DtFilterLens;
00020 class DtLensGLWidget;
00021 
00026 #include "filterLenses/filterLensesDefines.h"
00027 class DT_DLL_filterLenses DtLensArea : public QWidget
00028 {
00029    Q_OBJECT
00030 public:
00031 
00033    DtLensArea(QWidget * parent = 0, Qt::WindowFlags flags = 0, bool useOpenGL = false);
00034 
00036    virtual ~DtLensArea();
00037 
00039    virtual QPainter* paintDevice();
00040 
00042    virtual void paint(QPainter* toDevice, bool drawBackground = true);
00043 
00045    virtual void setUsePixmap(bool b);
00046 
00048    virtual void updateArea();
00049 
00051    virtual void repaintArea();
00052 
00053 signals:
00054    void dropEventSignal(QDropEvent*);
00055    void dragEnterEventSignal(QDragEnterEvent*);
00056    void dragLeaveEventSignal(QDragLeaveEvent*);
00057    void dragMoveEventSignal(QDragMoveEvent*);
00058 
00059    void createdGlobalFilter(DtFilterLens* lens);
00060    void deletingGlobalFilter(DtFilterLens* lens);
00061 
00062    void backgroundDrawn(QPainter* p);
00063    void aboutToDraw(QPainter* p);
00064 
00065 public slots:
00066 
00068    virtual void createLens(DtFilterLens* lens);
00069    virtual void moveToStackTop(DtFilterLens* lens);
00070 
00071    virtual void deleteLens(DtFilterLens* lens);
00072 
00074    virtual void removeGlobalFilter(DtFilterLens * lens);
00075    virtual void deleteAllGlobalFilters();
00076    virtual void deleteGlobalFilter(DtFilterLens * lens);
00077    virtual void addGlobalFilter(DtFilterLens * lens);
00078    virtual void insertGlobalFilter(int iIndex, DtFilterLens* lens);
00079    virtual void moveToGlobal(DtFilterLens * lens);
00080 
00081    //This function alternates the location betweeen two lenses
00082    virtual void reorderGlobalFilter(DtFilterLens * preLens,
00083                                     DtFilterLens * postLens);
00084    //background
00085    virtual void setBackground(QPixmap* bg);
00086    virtual QPixmap* background() const;
00087 
00088    virtual void setAutoDeleteFilters(bool b);
00089 
00090    virtual void resizeEvent(QResizeEvent* evnt);
00091 
00092 protected:
00093    //redraw the background
00094    virtual void tick();
00095 
00096    virtual void paintEvent ( QPaintEvent * evnt );
00097 
00099    virtual void dragEnterEvent( QDragEnterEvent* e);
00100    virtual void dragLeaveEvent( QDragLeaveEvent* e);
00101    virtual void dragMoveEvent( QDragMoveEvent* e);
00102    virtual void dropEvent( QDropEvent* e);
00103 
00104 private:
00106    DtLensArea(const DtLensArea& orig);
00107 
00109    DtLensArea& operator=(const DtLensArea& orig);
00110 
00111 protected:
00112    DtPtrQList<DtFilterLens*> * myLensList;
00113    DtPtrQList<DtFilterLens*> * myGlobalLensList;
00114 
00117    DtFilterLens* myDeferredLens; 
00118    QPixmap *myBackground;
00119    QPainter *myPaintDevice;
00120 
00121    QPixmap* myPix;
00122 
00123    bool myAutoDelete;
00124    bool myDrawBackground;
00125 
00126    bool myInPaint;
00127 
00128    DtLensGLWidget*   myLensGLWidget;
00129 };
00130 
00131 #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)