Files
cgal/GraphicsView/include/CGAL/IO/QtPainterOstream.h
T
Laurent Rineau 40f5ba9ec6 Move some header to include/CGAL/IO/, and rename the corresponding classes:
- "Qt" as prefix, instead of a simple "Q",
  - no "_2" suffix.

(Next commit will be the move of some .cpp files to src/CGALQt4/ and the
creation of a new CGAL library.)
2008-06-18 10:57:39 +00:00

30 lines
560 B
C++

#ifndef CGAL_Q_PAINTER_OSTREAM_H
#define CGAL_Q_PAINTER_OSTREAM_H
#include <QPainter>
#include <QPen>
#include <QRectF>
#include <CGAL/IO/QtConverter.h>
namespace CGAL {
template <typename K>
QPainter& operator<<(QPainter& qp, const Point_2<K>& p)
{
QtConverter<K> convert;
qp.drawPoint(convert(p));
return qp;
}
template <typename K>
QPainter& operator<<(QPainter& qp, const Segment_2<K>& s)
{
QtConverter<K> convert;
qp.drawLine(convert(s.source()), convert(s.target()));
return qp;
}
} // namespace CGAL
#endif // CGAL_Q_PAINTER_OSTREAM_H