border, one can use a QFrame parent of the Qt_widget. It will be probably
more efficient. Thank to Radu for not having agreed to easily: it
prevended my from doing an error. ;-)
functions set ranges (xmin,ymin,xmax,ymax) with constant center. Arguments
where always equal to xcenter, ycenter thus they were uneeded.
- Use drawContents(QPainter*), the protected method of QFrame called by
QFrame::paintEvent(...). paintEvent(...) is no longer overridden.
- Added comments in include/CGAL/IO/Qt_widget.h to explain the role of
private functions. It was increasingly difficult to understand the code.
- New void Qt_widget::frameChanged() function, that resize the pixmap if
the frame border is changed.
- It now derives from QToolBar, as it should have since the beginning.
- The constructor has now additional facultative parameters:
Dock = DockTop,
bool newLine = true,
const char* name = 0
With Qt-3, the first parameter is
QMainWindow::ToolBarDock=QMainWindow::Top
- The header file has been cleaned from uneeded includes or pointer
declarations.
- The backward compatibility has been preserved by adapted default values.
- I have filled bug #36 for as a reminder for documentation changes.
but is quite small actually:
Qt_widget now derives from QFrame instead of QWidget. The differences are
that:
- the Qt_widget can have a border, like a QFrame
- the drawing area is not the whole Qt_widget but the contentsRect()
rectangle, which is the widget without its border.
As, by default, the border is null, it should change anything for
compatibility. By default, a QFrame is like a QWidget.
Solved bug in output operator for segment in Qt_widget. The operator compute the intersection between the segment and the iso_rectangle using Simple_cartesian<double> kernel.
bool does_eat_events;
When you use attach_standard for attaching a layer, this field is true.
The show_mouse_coordinates have this member made false by the standard toolbar.
The widget send the events to the other active layers attached only if there is no other standard_layer active that eat events.
< R::FT xr1, yr1, xr2, yr2;
---
> typename R::FT xr1, yr1, xr2, yr2;
These lines will have to be fixed soon because
FT xr1=w.x_real(0)
assumes that R::FT has a constructor from a double, whereas it is not in
the FT concept!
use the old x_real function because the new one is too slow in doing the transformation (use GMP if CGAL_USE_GMP is defined)
we should document the old one too, it will never be removed.
set_scales() was using geometry() whereas geometry() is not sure to be correct
when the widget is not visible.
Here are the explainations, in french:
-------------
> Dans Qt_widget::set_scales(), Radu se base sur geometry() pour modifier
> xmin, xmax, etc., mais malheureusement geometry() n'a pas forc�ment de
> sens quand le widget n'est pas visible (avant le premier show()
> appell�).
Le principe du patch c'est que set_scale() ne fait rien si le widget
n'est pas visible, mais met un bool�en (set_scale_must_be_done) � true.
Quand le widget apparait, la m�thode showEvent regarde si
set_scale_must_be_done=true, et appelle set_scale(). De plus,
set_scale_center() ne fait rien si set_scale_must_be_done=true car
set_scales() doit toujours avoir �t� appell� avant de bouger le centre.
for compatibility.
Move the template function definition to Qt_widget.h and remove it from
Qt_widget.C and let the specialisation for Gmpz into the .C file
Those 2 return an Gmpq object. The conversion between screen coordinates and real world coordinates return a more simple number (rational), a Gmpq object.
I put that in the doc either.
The conversion from screen coordinates in real word coordinates could be
done via x_real_rational or x_real. Those functions try to use simplest rational in interval.