Salome HOME
new files added
[modules/gui.git] / src / GLViewer / GLViewer_AspectLine.h
1 // File:      GLViewer_AspectLine.h
2 // Created:   November, 2004
3 // Author:    OCC team
4 // Copyright (C) CEA 2004
5
6 #ifndef GLVIEWER_ASPECTLINE_H
7 #define GLVIEWER_ASPECTLINE_H
8
9 #include "GLViewer.h"
10
11 #include <qcolor.h>
12
13 #ifdef WNT
14 #pragma warning( disable:4251 )
15 #endif
16
17 // Class:   GLViewer_AspectLine
18 // Descr:   Substitution of Prs2d_AspectLine for OpenGL
19
20 class GLVIEWER_API GLViewer_AspectLine 
21 {
22 public:
23   GLViewer_AspectLine();
24   GLViewer_AspectLine( int, float );
25   ~GLViewer_AspectLine();
26   
27   void                  setLineColors( QColor nc = Qt::black,
28                                        QColor hc = Qt::cyan,
29                                        QColor sc = Qt::red );
30   int                   setLineWidth( const float );
31   int                   setLineType( const int );
32   
33   void                  getLineColors( QColor&, QColor&, QColor& ) const;
34   float                 getLineWidth() const { return myLineWidth; };
35   int                   getLineType() const { return myLineType; };
36   
37   QByteArray            getByteCopy() const;
38   
39   static GLViewer_AspectLine* fromByteCopy( QByteArray );
40   
41 protected:
42   QColor                myNColor;
43   QColor                myHColor;
44   QColor                mySColor;
45   float                 myLineWidth;
46   int                   myLineType;  // 0 - normal, 1 - strip
47 };
48
49 #ifdef WNT
50 #pragma warning ( default:4251 )
51 #endif
52
53 #endif