// $Id: fgl_stardata.h $ // ================================================================= // This code is distributed under the terms and conditions of the // CCP4 Program Suite Licence Agreement as 'Part 2' (Annex 2) // software. A copy of the CCP4 licence can be obtained by writing // to CCP4, Research Complex at Harwell, Rutherford Appleton // Laboratory, Didcot OX11 0FA, UK, or from // http://www.ccp4.ac.uk/ccp4license.php. // ================================================================= // // 30.01.14 <-- Date of Last Modification. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ---------------------------------------------------------------- // // **** Module : fgl_stardata // ~~~~~~~~~ // **** Project : QtLibs/FGL - plotting in Qt // ~~~~~~~~~ // **** Classes : fgl::StarData // ~~~~~~~~~ // // (C) E. Krissinel 2012-2014 // // ================================================================= // #ifndef FGL_STARDATA_H #define FGL_STARDATA_H #include #include #include QT_BEGIN_NAMESPACE class QPainter; QT_END_NAMESPACE namespace fgl { class Scene; class StarData { public: StarData (); ~StarData(); void clear(); void setY ( const qreal *v, const int npoints ); inline void setY ( const QVector & v ) { y = v; } inline void setLineWidth ( const qreal lw ) { lineWidth = lw; } inline QVector & getY() { return y; } inline qreal getY ( int n ) { return y[n]; } inline QPen & getPen() { return pen; } inline QBrush & getBrush() { return brush; } inline qreal getLineWidth() { return lineWidth; } inline int size() { return y.size(); } protected: QVector y; //!< nodes QPen pen; //!< pen properties QBrush brush; //!< brush properties qreal lineWidth; //!< relative line width }; } #endif // FGL_STARDATA_H