1 // File: GLViewer_AspectLine.h
2 // Created: November, 2004
4 // Copyright (C) CEA 2004
6 #ifndef GLVIEWER_ASPECTLINE_H
7 #define GLVIEWER_ASPECTLINE_H
14 #pragma warning( disable:4251 )
18 * Class GLViewer_AspectLine
19 * Substitution of Prs2d_AspectLine for OpenGL
22 class GLVIEWER_API GLViewer_AspectLine
25 //! A default constructor
27 * Normal color is white
28 * Highlight color is cyan
31 GLViewer_AspectLine();
32 //! A conctructor by type and width of line
34 \param theType equals 0 for normal line and 1 for strip line
35 \param theWidth is a width of new line
37 GLViewer_AspectLine( int theType, float theWidth );
40 ~GLViewer_AspectLine();
42 //! A function for installing the line colors
44 \param nc is normal color
45 \param hc is highlight color
46 \param sc is select color
48 void setLineColors( QColor nc = Qt::black,
50 QColor sc = Qt::red );
51 //! A function for installing the line width
52 int setLineWidth( const float theWidth );
53 //! A function for installing the line type
55 \param theType equals 0 for normal line and 1 for strip line
57 int setLineType( const int theType );
59 //! A function for getting line colors information
61 \param theNC is normal color
62 \param theHC is highlight color
63 \param theSC is select color
65 void getLineColors( QColor& theNC, QColor& theHC, QColor& theSC ) const;
66 //! A function for getting information about line width
67 float getLineWidth() const { return myLineWidth; };
68 //! A function for getting information about line type
69 int getLineType() const { return myLineType; };
71 //! A function for coding object to the byte copy
73 A function is used for copy-past technollogy in copy method
75 QByteArray getByteCopy() const;
77 //! A function for decoding object from the byte copy
79 A function is used for copy-past technollogy in past method
81 static GLViewer_AspectLine* fromByteCopy( QByteArray );
93 /*! equals 0 for normal line and 1 for strip line */
98 #pragma warning ( default:4251 )