Salome HOME
Initial version
[modules/gui.git] / src / GLViewer / GLViewer_Object.h
1 // File:      GLViewer_Object.h
2 // Created:   November, 2004
3 // Author:    OCC team
4 // Copyright (C) CEA 2004
5
6 #ifndef GLVIEWER_OBJECT_H
7 #define GLVIEWER_OBJECT_H
8
9 #ifdef WNT
10 #include <windows.h>
11 #endif
12
13 #include "GLViewer.h"
14 #include "GLViewer_Defs.h"
15
16 #include <GL/gl.h>
17
18 #include <qfont.h>
19 #include <qobject.h>
20 #include <qstring.h>
21 #include <qcolor.h>
22 #include <qmime.h>
23 #include <qrect.h>
24 #include <qvaluelist.h>
25
26 #include <TColStd_SequenceOfInteger.hxx>
27
28 class QFile;
29
30 #ifdef WNT
31 #pragma warning( disable:4251 )
32 #endif
33
34 class GLVIEWER_EXPORT GLViewer_Pnt
35 {
36 public:
37   GLViewer_Pnt() : myX( 0. ), myY( 0. ) {}
38   GLViewer_Pnt( GLfloat theX, GLfloat theY ) : myX( theX ), myY( theY ) {}
39   
40   GLfloat x() const { return myX; }
41   GLfloat y() const { return myY; }
42   void    setX( GLfloat theX ) { myX = theX; }
43   void    setY( GLfloat theY ) { myY = theY; }
44   void    setXY( GLfloat theX, GLfloat theY ) { myX = theX; myY = theY; }
45   void    move( GLfloat theDX, GLfloat theDY ) { myX += theDX; myY += theDY; }
46   
47 private:
48   GLfloat myX;
49   GLfloat myY;
50 };
51
52 typedef QValueList<GLViewer_Pnt> GLViewer_PntList;
53
54 /***************************************************************************
55 **  Class:   GLViewer_Rect
56 **  Descr:   Substitution of QRect for OpenGL
57 **  Module:  GLViewer
58 **  Created: UI team, 19.04.04
59 ****************************************************************************/
60 class GLVIEWER_EXPORT GLViewer_Rect
61 {
62 public:
63   GLViewer_Rect(): myLeft(0.0), myRight(0.0), myTop(0.0), myBottom(0.0){}
64   GLViewer_Rect( float theLeft, float theRight, float theTop, float theBottom )
65     : myLeft(theLeft), myRight(theRight), myTop(theTop), myBottom(theBottom) {}
66   GLViewer_Rect( QRect theRect ) {
67     myLeft = ( float )theRect.left(); myRight = ( float )theRect.right();
68     myTop = ( float )theRect.top(); myBottom = ( float )theRect.bottom(); }
69   
70   
71   float       left() const { return myLeft; }
72   float       right() const { return myRight; }
73   float       top() const { return myTop; }
74   float       bottom() const { return myBottom; }
75   
76   void        setLeft( float theLeft ) { myLeft = theLeft; }
77   void        setRight( float theRight ) { myRight = theRight; }
78   void        setTop( float theTop ) { myTop = theTop; }
79   void        setBottom( float theBottom ) { myBottom = theBottom; }
80   
81   void        setCoords( float theLeft, float theRight, float theTop, float theBottom )
82     { myLeft = theLeft; myRight = theRight; myTop = theTop; myBottom = theBottom; }
83
84   QRect*      toQRect() { return new QRect( ( int )myLeft, ( int )myBottom,
85                                             ( int )( myRight - myLeft ), ( int )( myTop - myBottom ) ); }
86
87   bool        isNull() const { return myLeft == myRight || myTop == myBottom; }
88   bool        isValid() const { return !( myLeft > myRight || myTop < myBottom ); }
89   
90   bool        contains( GLViewer_Pnt pnt ) { return ( pnt.x() > left() &&
91     pnt.x() < right() &&
92     pnt.y() > top() &&
93     pnt.y() < bottom() ); } 
94   
95 protected:
96   float       myLeft;
97   float       myRight;
98   float       myTop;
99   float       myBottom;
100 };
101
102 /***************************************************************************
103 **  Class:   GLViewer_Text
104 **  Descr:   Substitution of Prs3d_Text for OpenGL
105 **  Module:  GLViewer
106 **  Created: UI team, 10.07.03
107 ****************************************************************************/
108 class GLVIEWER_EXPORT GLViewer_Text
109 {
110 public:
111   GLViewer_Text( const QString&, float xPos = 0.0, float yPos = 0.0, const QColor& color = QColor( 0, 255, 0 ) );
112   GLViewer_Text( const QString&, float xPos, float yPos, const QColor& , QFont, int );
113   ~GLViewer_Text();
114   
115   void                  setText( const QString& text ) { myText = text; }
116   QString               getText() const { return myText; }
117   
118   void                  setPosition( float xPos, float yPos ) { myXPos = xPos; myYPos = yPos; }
119   void                  getPosition( float& xPos, float& yPos ) { xPos = myXPos; yPos = myYPos; }
120   
121   void                  setColor( const QColor& color ) { myColor = color; }
122   QColor                getColor() const { return myColor; }
123   
124   void                  setFont( const QFont theQFont) { myQFont = theQFont; }
125   QFont                 getFont() const { return myQFont; }
126   
127   int                   getSeparator(){ return mySeparator; }
128   void                  setSeparator( int theSep ){ mySeparator = theSep; }
129   
130   int                   getWidth();
131   int                   getHeight();
132   
133   QByteArray            getByteCopy() const;
134   
135   static GLViewer_Text* fromByteCopy( QByteArray );
136   
137   DisplayTextFormat     getDisplayTextFormat() const { return myDTF; }
138   void                  setTextDisplayFormat( DisplayTextFormat theDTF ) { myDTF = theDTF; }
139   
140 protected:
141   QString            myText;
142   float              myXPos;
143   float              myYPos;
144   QColor             myColor;
145   QFont              myQFont;
146   int                mySeparator;
147   DisplayTextFormat  myDTF;
148 };
149
150 /***************************************************************************
151 **  Class:   GLViewer_CoordSystem
152 **  Descr:   
153 **  Module:  GLViewer
154 **  Created: UI team, 02.09.02
155 ****************************************************************************/
156 class GLVIEWER_EXPORT GLViewer_CoordSystem
157 {
158 public:
159   enum CSType { Cartesian, Polar };
160   
161 private:
162   double myX0, myY0;       //The coordinates of origin in the reference CS
163   double myXUnit, myYUnit; //The lengths of axis units in the reference unit
164   double myRotation;       //The rotation in radians relative to reference CS
165   
166   //!!! In the polar CS myYUnit is ignored, but myXUnit is the unit of polar radius
167   
168   CSType myType;
169   
170 public:
171   GLViewer_CoordSystem( CSType aType, double X0 = 0.0, double Y0 = 0.0, 
172                         double XUnit = 1.0, double YUnit = 1.0, 
173                         double Rotation = 0.0 );
174   
175   void getOrigin( double& x, double& y ) const;
176   void setOrigin( double x, double y );
177   
178   void getUnits( double& x, double& y ) const;
179   void setUnits( double x, double y );
180   
181   double getRotation() const;
182   void   setRotation( double rotation );
183   
184   CSType getType() const;
185   void setType( CSType type );
186   
187   void transform( GLViewer_CoordSystem& aSystem, double& x, double& y );
188   //Transform the coordinates x, y from current CS to aSystem
189   
190   virtual void getStretching( GLViewer_CoordSystem& aSystem, double& theX, double& theY );
191   //Return how many times line width in aSystem system bigger than in current
192   
193 protected:
194   virtual void toReference( double& x, double& y );
195   virtual void fromReference( double& x, double& y );
196 };
197
198 /***************************************************************************
199 **  Class:   GLViewer_Object
200 **  Descr:   OpenGL Object
201 **  Module:  GLViewer
202 **  Created: UI team, 02.09.02
203 ****************************************************************************/
204 #ifdef WNT
205 #include <windows.h>
206 #endif
207
208 class GLViewer_Drawer;
209 class GLViewer_AspectLine;
210 class GLViewer_Owner;
211 class GLViewer_Group;
212
213 class GLVIEWER_EXPORT GLViewer_Object : public QObject
214 {
215     Q_OBJECT
216
217 public:
218     GLViewer_Object();
219     virtual ~GLViewer_Object();
220   
221     virtual void              compute() = 0;
222     virtual GLViewer_Drawer*  createDrawer() = 0;
223     GLViewer_Drawer*          getDrawer(){ return myDrawer; }
224     virtual void              setDrawer( GLViewer_Drawer* theDrawer ) { myDrawer = theDrawer; }
225     
226     virtual GLboolean         highlight( GLfloat x, GLfloat y, GLfloat tol, GLboolean isCircle = GL_FALSE ) = 0;
227     virtual GLboolean         unhighlight() = 0;
228     virtual GLboolean         select( GLfloat x, GLfloat y, GLfloat tol, GLViewer_Rect rect, GLboolean isFull = GL_FALSE,
229                                       GLboolean isCircle = GL_FALSE, GLboolean isShift = GL_FALSE ) = 0;
230     virtual GLboolean         unselect() = 0;
231     
232     virtual GLboolean         isInside( GLViewer_Rect );
233     
234     virtual bool              portContains( GLViewer_Pnt ) { return false; }
235     virtual bool              startPulling( GLViewer_Pnt ) { return false; }
236     virtual void              pull( GLViewer_Pnt, GLViewer_Object* ) {}
237     virtual void              finishPulling() {}
238     virtual bool              isPulling() { return false; }
239     
240     virtual void              setRect( GLViewer_Rect* rect) { myRect = rect; }
241     virtual GLViewer_Rect*    getRect() const { return myRect; }
242     virtual GLViewer_Rect*    getUpdateRect() = 0;
243     
244     virtual void              setScale( GLfloat xScale, GLfloat yScale ) { myXScale = xScale; myYScale = yScale; }
245     virtual void              getScale( GLfloat& xScale, GLfloat& yScale ) const { xScale = myXScale; yScale = myYScale;}
246     
247     virtual GLboolean         setZoom( GLfloat zoom, GLboolean = GL_FALSE );
248     virtual GLfloat           getZoom() const { return myZoom; }
249     virtual GLboolean         updateZoom( bool zoomIn );
250     
251     virtual GLboolean         isHighlighted() const { return myIsHigh; }
252     virtual GLboolean         isSelected() const { return myIsSel; }  
253     virtual void              setSelected( GLboolean state ) { myIsSel = state; }
254     
255     void                      setGLText( GLViewer_Text* glText ) { myGLText = glText; }
256     GLViewer_Text*            getGLText() const { return myGLText; }
257     
258     virtual void              setAspectLine ( GLViewer_AspectLine* aspect ) { myAspectLine = aspect; }
259     virtual GLViewer_AspectLine* getAspectLine() const { return myAspectLine; }
260     
261     QString                   getObjectType() const { return myType; } 
262     
263     void                      setName( QString name ) { myName = name; } 
264     QString                   getName() const { return myName; } 
265     
266     virtual void              moveObject( float, float, bool fromGroup = false ) = 0;
267     virtual void              finishMove() {}
268     
269     bool                      getVisible(){ return myIsVisible; }
270     void                      setVisible( bool theStatus ){ myIsVisible = theStatus; }
271     
272     void                      setToolTipText( QString str ){ myToolTipText = str; }
273     virtual QString           getToolTipText(){ return myToolTipText; }
274     
275     bool                      isTooTipHTML() const { return isToolTipHTML; }
276     void                      setToolTipFormat( bool isHTML ) { isToolTipHTML = isHTML; }
277   
278     virtual QByteArray        getByteCopy();
279     virtual bool              initializeFromByteCopy( QByteArray );
280     
281     virtual bool              translateToPS( QFile& hFile, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aPSCS ) = 0;
282     virtual bool              translateToHPGL( QFile& hFile, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aHPGLCS ) = 0;  
283     
284 #ifdef WIN32
285     virtual bool              translateToEMF( HDC dc, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aEMFCS ) = 0;
286 #endif
287
288     GLViewer_Owner*           owner() const;
289     void                      setOwner( GLViewer_Owner* );
290     
291     void                      setGroup( GLViewer_Group* );
292     GLViewer_Group*           getGroup() const;
293     
294 protected:
295     QString                   myName;
296     QString                   myType;
297     
298     GLViewer_Rect*            myRect;
299     GLfloat                   myXScale;
300     GLfloat                   myYScale;
301     GLfloat                   myXGap;
302     GLfloat                   myYGap;
303     
304     GLfloat                   myZoom;
305
306     GLboolean                 myIsHigh;
307     GLboolean                 myIsSel;
308     GLViewer_Text*            myGLText;
309
310     GLViewer_Drawer*          myDrawer;
311     GLViewer_AspectLine*      myAspectLine;
312     QString                   myToolTipText;  
313     bool                      isToolTipHTML;
314     
315     bool                      myIsVisible;
316     GLViewer_Owner*           myOwner;
317     GLViewer_Group*           myGroup;
318 };
319
320 /***************************************************************************
321 **  Class:   GLViewer_Owner
322 **  Descr:   
323 **  Module:  GLViewer
324 **  Created: UI team, 15.12.04
325 ****************************************************************************/
326 #include <SUIT_DataOwner.h>
327
328 class GLVIEWER_EXPORT GLViewer_Owner: public SUIT_DataOwner
329 {
330 public:
331   GLViewer_Owner():SUIT_DataOwner() {};
332   ~GLViewer_Owner() {};
333   
334 public:
335   int                     getIndex() const { return myIndex; }
336   
337 protected:
338   int                     myIndex;
339 };
340
341 /***************************************************************************
342 **  Class:   GLViewer_MarkerSet
343 **  Descr:   OpenGL MarkerSet
344 **  Module:  GLViewer
345 **  Created: UI team, 03.09.02
346 ****************************************************************************/
347 class GLVIEWER_EXPORT GLViewer_MarkerSet: public GLViewer_Object
348 {
349   Q_OBJECT
350     
351 public:
352   GLViewer_MarkerSet( int number = 1, float size = 5.0, const QString& toolTip = "GLMarker" );
353   ~GLViewer_MarkerSet();
354   
355   virtual void            compute();
356   virtual GLViewer_Drawer* createDrawer();
357   
358   virtual GLboolean       highlight( GLfloat x, GLfloat y, GLfloat tol = 15.0, GLboolean isCircle = GL_FALSE );
359   virtual GLboolean       unhighlight();
360   virtual GLboolean       select( GLfloat x, GLfloat y, GLfloat tol, GLViewer_Rect rect, GLboolean isFull = GL_FALSE,
361                                   GLboolean isCircle = GL_FALSE, GLboolean isShift = GL_FALSE );
362   virtual GLboolean       unselect();
363   
364   virtual GLViewer_Rect*  getUpdateRect();
365   
366   void                    setXCoord( GLfloat* xCoord, int size );
367   void                    setYCoord( GLfloat* yCoord, int size );
368   GLfloat*                getXCoord() const { return myXCoord; }
369   GLfloat*                getYCoord() const { return myYCoord; }
370   void                    setNumMarkers( GLint );
371   GLint                   getNumMarkers() const { return myNumber; };
372   
373   void                    setMarkerSize( const float size ) { myMarkerSize = size; }
374   float                   getMarkerSize() const { return myMarkerSize; }
375   
376   void                    exportNumbers( QValueList<int>&, QValueList<int>& , QValueList<int>&, QValueList<int>& );
377   
378   QValueList<int>         getSelectedElements() { return mySelNumbers; }
379   bool                    addOrRemoveSelected( int index );
380   void                    addSelected( const TColStd_SequenceOfInteger& );
381   void                    setSelected( const TColStd_SequenceOfInteger& );
382   
383   virtual void            moveObject( float, float, bool fromGroup = false );
384   
385   virtual QByteArray      getByteCopy();
386   virtual bool            initializeFromByteCopy( QByteArray );
387   
388   virtual bool            translateToPS( QFile& hFile, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aPSCS );
389   virtual bool            translateToHPGL( QFile& hFile, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aHPGLCS );    
390   
391 #ifdef WIN32
392   virtual bool            translateToEMF( HDC dc, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aEMFCS );
393 #endif
394   
395 protected slots:
396   void                    onSelectionDone( bool );
397   void                    onSelectionCancel();
398   
399 signals:
400   void                    dvMarkersSelected( const TColStd_SequenceOfInteger& );
401   
402 protected:
403   GLint                   myNumber;
404   GLfloat*                myXCoord;
405   GLfloat*                myYCoord;    
406   GLfloat                 myMarkerSize;
407   QValueList<int>         myHNumbers;
408   QValueList<int>         myUHNumbers;
409   QValueList<int>         mySelNumbers;
410   QValueList<int>         myCurSelNumbers;
411   QValueList<int>         myUSelNumbers;
412   QValueList<int>         myPrevHNumbers;
413   TColStd_SequenceOfInteger mySelectedIndexes;
414 };
415
416 /***************************************************************************
417 **  Class:   GLViewer_Polyline
418 **  Descr:   OpenGL Polyline
419 **  Module:  GLViewer
420 **  Created: UI team, 03.09.02
421 ****************************************************************************/
422 class GLVIEWER_EXPORT GLViewer_Polyline: public GLViewer_Object
423 {
424   Q_OBJECT
425     
426 public:
427   GLViewer_Polyline( int number = 1, float size = 5.0, const QString& toolTip = "GLPolyline" );
428   ~GLViewer_Polyline();
429   
430   virtual void            compute();
431   virtual GLViewer_Drawer* createDrawer();
432   
433   virtual GLboolean       highlight( GLfloat x, GLfloat y, GLfloat tol = 15.0, GLboolean isCircle = GL_FALSE );
434   virtual GLboolean       unhighlight();
435   virtual GLboolean       select( GLfloat x, GLfloat y, GLfloat tol,  GLViewer_Rect rect, GLboolean isFull = GL_FALSE,
436                                   GLboolean isCircle = GL_FALSE, GLboolean isShift = GL_FALSE );
437   virtual GLboolean       unselect();
438   
439   virtual GLViewer_Rect*  getUpdateRect();
440   
441   void                    setXCoord( GLfloat* xCoord, int size );
442   void                    setYCoord( GLfloat* yCoord, int size );
443   GLfloat*                getXCoord() const { return myXCoord; }
444   GLfloat*                getYCoord() const { return myYCoord; }
445   void                    setNumber( GLint );
446   GLint                   getNumber() const { return myNumber; };
447   
448   void                    setClosed( GLboolean closed ) { myIsClosed = closed; }
449   GLboolean               isClosed() const { return myIsClosed; }
450   
451   void                    setHighSelAll( GLboolean highSelAll ) { myHighSelAll = highSelAll; }
452   GLboolean               isHighSelAll() const { return myHighSelAll; }
453   
454   void                    exportNumbers( QValueList<int>&, QValueList<int>& , QValueList<int>&, QValueList<int>& );
455   
456   QValueList<int>         getSelectedElements() { return mySelNumbers; }
457   
458   virtual void            moveObject( float, float, bool fromGroup = false );
459   
460   virtual QByteArray      getByteCopy();
461   virtual bool            initializeFromByteCopy( QByteArray );
462   
463   virtual bool            translateToPS( QFile& hFile, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aPSCS );
464   virtual bool            translateToHPGL( QFile& hFile, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aHPGLCS );    
465   
466 #ifdef WIN32
467   virtual bool            translateToEMF( HDC dc, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aEMFCS );
468 #endif
469   
470 protected slots:
471   void                    onSelectionDone( bool );
472   void                    onSelectionCancel();
473   
474 protected:
475   GLfloat*                myXCoord;
476   GLfloat*                myYCoord;
477   GLint                   myNumber;
478   GLboolean               myIsClosed;
479   GLboolean               myHighSelAll;
480   
481   QValueList<int>         myHNumbers;
482   QValueList<int>         myUHNumbers;
483   QValueList<int>         mySelNumbers;
484   QValueList<int>         myUSelNumbers;
485   QValueList<int>         myCurSelNumbers;
486   QValueList<int>         myPrevHNumbers;
487   TColStd_SequenceOfInteger mySelectedIndexes;
488   
489   GLboolean               myHighFlag;
490 };
491
492
493 /***************************************************************************
494 **  Class:   GLViewer_TextObject
495 **  Descr:   Text as Object for OpenGL
496 **  Module:  GLViewer
497 **  Created: UI team, 27.02.04
498 ****************************************************************************/
499 class GLVIEWER_EXPORT GLViewer_TextObject : public GLViewer_Object
500 {
501   Q_OBJECT
502     
503 public:  
504   GLViewer_TextObject( const QString&, float xPos = 0, float yPos = 0, 
505                        const QColor& color = QColor( 0, 255, 0 ), const QString& toolTip = "GLText" );
506   ~GLViewer_TextObject();
507   
508   virtual void              compute();
509   virtual GLViewer_Drawer*  createDrawer();
510   
511   virtual void              setDrawer( GLViewer_Drawer* theDrawer );
512   
513   virtual GLboolean         highlight( GLfloat x, GLfloat y, GLfloat tol, GLboolean isCircle = GL_FALSE );
514   virtual GLboolean         unhighlight();
515   virtual GLboolean         select( GLfloat x, GLfloat y, GLfloat tol, GLViewer_Rect rect, GLboolean isFull = GL_FALSE,
516                                     GLboolean isCircle = GL_FALSE, GLboolean isShift = GL_FALSE );
517   virtual GLboolean         unselect();
518   
519   virtual GLViewer_Rect*    getUpdateRect();
520   
521   virtual void              moveObject( float, float, bool fromGroup = false );
522   
523   virtual QByteArray        getByteCopy();
524   virtual bool              initializeFromByteCopy( QByteArray );
525   
526   virtual bool              translateToPS( QFile& hFile, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aPSCS );
527   virtual bool              translateToHPGL( QFile& hFile, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aHPGLCS );  
528   
529 #ifdef WIN32
530   virtual bool              translateToEMF( HDC dc, GLViewer_CoordSystem* aViewerCS, GLViewer_CoordSystem* aEMFCS );
531 #endif
532   
533   int                       getWidth(){ return myWidth; }
534   int                       getHeight(){ return myWidth; }
535   void                      setWidth( int w ){ myWidth=w; }
536   void                      setHeight( int h ){ myHeight=h; }
537   
538 protected:
539   bool                      myHighFlag;
540   int                       myWidth;
541   int                       myHeight;
542 };
543
544
545 /***************************************************************************
546 **  Class:   GLViewer_AspectLine
547 **  Descr:   Substitution of Prs2d_AspectLine for OpenGL
548 **  Module:  GLViewer
549 **  Created: UI team, 05.11.02
550 ****************************************************************************/
551 class GLVIEWER_EXPORT GLViewer_AspectLine 
552 {
553 public:
554   GLViewer_AspectLine();
555   GLViewer_AspectLine( int, float );
556   ~GLViewer_AspectLine();
557   
558   void                  setLineColors( QColor nc = QColor( 0, 0, 0 ),
559                                        QColor hc = QColor( 0, 255, 255 ),
560                                        QColor sc = QColor( 255, 0, 0 ) );
561   int                   setLineWidth( const float );
562   int                   setLineType( const int );
563   
564   void                  getLineColors( QColor&, QColor&, QColor& ) const;
565   float                 getLineWidth() const { return myLineWidth; };
566   int                   getLineType() const { return myLineType; };
567   
568   QByteArray            getByteCopy() const;
569   
570   static GLViewer_AspectLine* fromByteCopy( QByteArray );
571   
572 protected:
573   QColor                myNColor;
574   QColor                myHColor;
575   QColor                mySColor;
576   float                 myLineWidth;
577   int                   myLineType;  // 0 - normal, 1 - strip (not support in markers)
578 };
579
580 /***************************************************************************
581 **  Class:   GLViewer_MimeSource
582 **  Descr:   Needs for a work with QClipboard
583 **  Module:  GLViewer
584 **  Created: UI team, 22.03.04
585 ****************************************************************************/
586 class GLVIEWER_EXPORT GLViewer_MimeSource: public QMimeSource
587 {
588 public:
589   GLViewer_MimeSource():QMimeSource(){};
590   ~GLViewer_MimeSource();
591   
592   bool                                setObjects( QValueList<GLViewer_Object*> );
593   static QValueList<GLViewer_Object*> getObjects( QByteArray, QString );
594   static GLViewer_Object*             getObject( QByteArray, QString );
595   
596   virtual const char*                 format( int theIndex = 0 ) const;
597   virtual QByteArray                  encodedData( const char* ) const;
598   
599 private:
600   QByteArray                          myByteArray;
601 };
602
603 #ifdef WNT
604 #pragma warning ( default:4251 )
605 #endif
606
607 #endif // GLVIEWER_OBJECT_H