// $Id: fgl_scene.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. // ================================================================= // // 29.08.13 <-- Date of Last Modification. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ---------------------------------------------------------------- // // **** Module : fgl_scene // ~~~~~~~~~ // **** Project : QtLibs/FGL - plotting in Qt // ~~~~~~~~~ // **** Classes : fgl::Scene // ~~~~~~~~~ // // (C) E. Krissinel 2012-2013 // // ================================================================= // #ifndef FGL_SCENE_H #define FGL_SCENE_H #include namespace fgl { class Scene : public QGraphicsScene { Q_OBJECT public: Scene ( QObject *parent=0 ); ~Scene(); void addMargins ( qreal leftMargin, qreal rightMargin, qreal topMargin, qreal bottomMargin ); void paint ( QPainter *painter ); qreal scalePenWidth ( qreal penWidth ); qreal scaleV ( qreal v ); qreal scaleX ( qreal x ); qreal scaleY ( qreal y ); qreal x ( qreal scaledX ); qreal y ( qreal scaledY ); qreal scaleXi ( qreal x ); qreal scaleYi ( qreal y ); private: int lineTypeID,textTypeID,rectTypeID,ellipseTypeID; qreal dx,dy,scale; }; } #endif // FGL_SCENE_H