#include <zoomwindow.h>
Public Member Functions | |
ZoomWindow (const QRect &rect) | |
Constructor using a QRect. | |
~ZoomWindow () | |
Destructor. | |
operator QRect () const | |
Conversion to a QRect. | |
bool | zoom (float factor, float centerX, float centerY) |
Zooms the width and the height of the rectangle by factor and center it on the specified center (centerX , centerY ). | |
bool | zoom (float factor, const QPoint ¢er) |
This is an overloaded member function, provided for convenience. | |
bool | zoom (int firstClickX, int firstClickY, int secondClickX, int secondClickY) |
Zooms on the rectangle specified by two diagonal points (firstClickX,firstClickY) and (secondClickX,secondClickY). | |
bool | zoom (QPoint firstPoint, QPoint secondPoint) |
This is an overloaded member function, provided for convenience. | |
void | reset () |
Resets the zoomWindow to its initialize state. | |
ZoomWindow (const QRect &rect) | |
Constructor using a QRect. | |
~ZoomWindow () | |
Destructor. | |
operator QRect () const | |
Conversion to a QRect. | |
bool | zoom (float factor, float centerX, float centerY) |
Zooms the width and the height of the rectangle by factor and center it on the specified center (centerX , centerY ). | |
bool | zoom (float factor, const QPoint ¢er) |
This is an overloaded member function, provided for convenience. | |
bool | zoom (int firstClickX, int firstClickY, int secondClickX, int secondClickY) |
Zooms on the rectangle specified by two diagonal points (firstClickX,firstClickY) and (secondClickX,secondClickY). | |
bool | zoom (QPoint firstPoint, QPoint secondPoint) |
This is an overloaded member function, provided for convenience. | |
void | reset () |
Resets the zoomWindow to its initialize state. | |
Protected Member Functions | |
void | correctWindow () |
Make sure that the new window remains inside the intial boundaries. | |
void | correctWindow () |
Make sure that the new window remains inside the intial boundaries. |
It computes the dimensions of the QRect (the window of a Qframe) corresponding to the part of the drawing which will actually be drawn onto the widget. The calculs are made in world coordinates system (the drawing coordinates system).
ZoomWindow::ZoomWindow | ( | const QRect & | rect | ) |
Constructor using a QRect.
rect | initial rectangle. |
ZoomWindow::ZoomWindow | ( | const QRect & | rect | ) |
Constructor using a QRect.
rect | initial rectangle. |
bool ZoomWindow::zoom | ( | float | factor, | |
float | centerX, | |||
float | centerY | |||
) |
Zooms the width and the height of the rectangle by factor
and center it on the specified center (centerX
, centerY
).
factor | zoom factor | |
centerX | absciss of the center point for the newly zoomed rectangle | |
centerY | ordinate of the center point for the newly zoomed rectangle |
bool ZoomWindow::zoom | ( | float | factor, | |
const QPoint & | center | |||
) | [inline] |
This is an overloaded member function, provided for convenience.
It behaves essentially like the above function. Zoom the rectangle by factor
and center it on center
.
factor | zoom factor | |
center | center point for the newly zoomed rectangle |
bool ZoomWindow::zoom | ( | int | firstClickX, | |
int | firstClickY, | |||
int | secondClickX, | |||
int | secondClickY | |||
) |
Zooms on the rectangle specified by two diagonal points (firstClickX,firstClickY) and (secondClickX,secondClickY).
firstClickX | absciss of the first selected point | |
firstClickY | ordinate of the first selected point | |
secondClickX | absciss of the second selected point | |
secondClickY | ordinate of the first selected point |
bool ZoomWindow::zoom | ( | QPoint | firstPoint, | |
QPoint | secondPoint | |||
) | [inline] |
This is an overloaded member function, provided for convenience.
It behaves essentially like the above function. Zoom on the rectangle specified by two diagonal points firstPoint
and secondPoint
.
firstPoint | Qpoint of the first selected point | |
secondPoint | Qpoint of the first selected point |
bool ZoomWindow::zoom | ( | float | factor, | |
float | centerX, | |||
float | centerY | |||
) |
Zooms the width and the height of the rectangle by factor
and center it on the specified center (centerX
, centerY
).
factor | zoom factor | |
centerX | absciss of the center point for the newly zoomed rectangle | |
centerY | ordinate of the center point for the newly zoomed rectangle |
bool ZoomWindow::zoom | ( | float | factor, | |
const QPoint & | center | |||
) | [inline] |
This is an overloaded member function, provided for convenience.
It behaves essentially like the above function. Zoom the rectangle by factor
and center it on center
.
factor | zoom factor | |
center | center point for the newly zoomed rectangle |
bool ZoomWindow::zoom | ( | int | firstClickX, | |
int | firstClickY, | |||
int | secondClickX, | |||
int | secondClickY | |||
) |
Zooms on the rectangle specified by two diagonal points (firstClickX,firstClickY) and (secondClickX,secondClickY).
firstClickX | absciss of the first selected point | |
firstClickY | ordinate of the first selected point | |
secondClickX | absciss of the second selected point | |
secondClickY | ordinate of the first selected point |
bool ZoomWindow::zoom | ( | QPoint | firstPoint, | |
QPoint | secondPoint | |||
) | [inline] |
This is an overloaded member function, provided for convenience.
It behaves essentially like the above function. Zoom on the rectangle specified by two diagonal points firstPoint
and secondPoint
.
firstPoint | Qpoint of the first selected point | |
secondPoint | Qpoint of the first selected point |