VR-Forces 4.1 Class Documentation
lensArea.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2001 MAK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: lensArea.h,v $ $Revision: 1.23 $ $State: Exp $
7 *********************************************************************/
8 
11 
12 #ifndef DtLensArea_H_
13 #define DtLensArea_H_
14 
15 #include <QtGui/QWidget>
16 #include "ngutil/dtqlist.h"
17 
18 class QPopupMenu;
19 class DtFilterLens;
20 class DtLensGLWidget;
21 
28 {
29  Q_OBJECT
30 public:
31 
33  DtLensArea(QWidget * parent = 0, Qt::WindowFlags flags = 0, bool useOpenGL = false);
34 
36  virtual ~DtLensArea();
37 
39  virtual QPainter* paintDevice();
40 
42  virtual void paint(QPainter* toDevice, bool drawBackground = true);
43 
45  virtual void setUsePixmap(bool b);
46 
48  virtual void updateArea();
49 
51  virtual void repaintArea();
52 
53 signals:
54  void dropEventSignal(QDropEvent*);
55  void dragEnterEventSignal(QDragEnterEvent*);
56  void dragLeaveEventSignal(QDragLeaveEvent*);
57  void dragMoveEventSignal(QDragMoveEvent*);
58 
59  void createdGlobalFilter(DtFilterLens* lens);
60  void deletingGlobalFilter(DtFilterLens* lens);
61 
62  void backgroundDrawn(QPainter* p);
63  void aboutToDraw(QPainter* p);
64 
65 public slots:
66 
68  virtual void createLens(DtFilterLens* lens);
69  virtual void moveToStackTop(DtFilterLens* lens);
70 
71  virtual void deleteLens(DtFilterLens* lens);
72 
74  virtual void removeGlobalFilter(DtFilterLens * lens);
75  virtual void deleteAllGlobalFilters();
76  virtual void deleteGlobalFilter(DtFilterLens * lens);
77  virtual void addGlobalFilter(DtFilterLens * lens);
78  virtual void insertGlobalFilter(int iIndex, DtFilterLens* lens);
79  virtual void moveToGlobal(DtFilterLens * lens);
80 
81  //This function alternates the location betweeen two lenses
82  virtual void reorderGlobalFilter(DtFilterLens * preLens,
83  DtFilterLens * postLens);
84  //background
85  virtual void setBackground(QPixmap* bg);
86  virtual QPixmap* background() const;
87 
88  virtual void setAutoDeleteFilters(bool b);
89 
90  virtual void resizeEvent(QResizeEvent* evnt);
91 
92 protected:
93  //redraw the background
94  virtual void tick();
95 
96  virtual void paintEvent ( QPaintEvent * evnt );
97 
99  virtual void dragEnterEvent( QDragEnterEvent* e);
100  virtual void dragLeaveEvent( QDragLeaveEvent* e);
101  virtual void dragMoveEvent( QDragMoveEvent* e);
102  virtual void dropEvent( QDropEvent* e);
103 
104 private:
106  DtLensArea(const DtLensArea& orig);
107 
109  DtLensArea& operator=(const DtLensArea& orig);
110 
111 protected:
114 
118  QPixmap *myBackground;
119  QPainter *myPaintDevice;
120 
121  QPixmap* myPix;
122 
125 
126  bool myInPaint;
127 
128  DtLensGLWidget* myLensGLWidget;
129 };
130 
131 #endif

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)