#include </home/clem/local/src/opie/libopie2/opiemm/oimagezoomer.h>
Public Slots | |
| void | setImageSize (const QSize &) |
| set the page/image size Tell us the QSize of the Data you show to the user. We need this to do the calculations | |
| void | setViewPortSize (const QSize &) |
| Set the size of the viewport Tell us the QSize of the viewport. The viewport is the part of the widget which is exposed on the screen. | |
| void | setVisiblePoint (const QPoint &) |
| the point in the topleft corner which is currently visible Set the visible point. This most of the times relate to QScrollView::contentsX() and QScrollView::contentsY() | |
| void | setVisiblePoint (int x, int y) |
| void | setImage (const QImage &) |
| void | setImage (const QPixmap &) |
Signals | |
| void | zoomAreaRel (int x, int y) |
| void | zoomArea (int x, int y) |
Public Member Functions | |
| OImageZoomer (QWidget *parent=0, const char *name=0, WFlags fl=0) | |
| The most simple c'tor The main c'tor. You still need to set a QPixmap/QIMage, setImageSize,setViewPortSize,setVisiblePoint. | |
| OImageZoomer (const QPixmap &, QWidget *parent=0, const char *name=0, WFlags fl=0) | |
| This c'tor takes a QPixmap additional. | |
| OImageZoomer (const QImage &, QWidget *parent=0, const char *name=0, WFlags fl=0) | |
| This c'tor takes a QImage instead You just provide a QImage which is saved. It behaves the same as the others. | |
| OImageZoomer (const QSize &, const QSize &, QWidget *par, const char *, WFlags fl) | |
| overloaded c'tor | |
| ~OImageZoomer () | |
| void | resizeEvent (QResizeEvent *) |
Protected Member Functions | |
| void | drawContents (QPainter *p) |
| virtual void | mousePressEvent (QMouseEvent *ev) |
| virtual void | mouseMoveEvent (QMouseEvent *ev) |
| virtual void | mouseReleaseEvent (QMouseEvent *ev) |
Private Member Functions | |
| void | init () |
Private Attributes | |
| QImage | m_img |
| QSize | m_imgSize |
| QSize | m_visSize |
| QPoint | m_visPt |
| int | m_mouseX |
| int | m_mouseY |
| bool | m_mevent |
This class represents your page but smaller. It can draw a Rect on top of an Image/Pixmap you supply and you can allow the user easily zooming/moving over your widget. All you need to do is to supply a image/pixmap, the visible size and the original image/pixmap size and the current visible top/left position.
This Image works perfectly with QScrollView as you can connect QScrollView::contentsMoving to setVisiblePoint slot and the zoomAreRel to the QScrollView::scrollBy slot. Now you would only need to watch the resize event anf give us the new information about QScrollView::viewport
You need to position and set the size of this widget! using setFixedSize() is quite a good idea for this widget
QScrollView::viewport()
Definition at line 40 of file oimagezoomer.h.
|
||||||||||||||||
|
The most simple c'tor The main c'tor. You still need to set a QPixmap/QIMage, setImageSize,setViewPortSize,setVisiblePoint.
Definition at line 25 of file oimagezoomer.cpp. References init(). |
|
||||||||||||||||||||
|
This c'tor takes a QPixmap additional. You initially set the QPixmap but you still need to provide the additional data to make this widget useful
Definition at line 42 of file oimagezoomer.cpp. References init(), and setImage(). |
|
||||||||||||||||||||
|
This c'tor takes a QImage instead You just provide a QImage which is saved. It behaves the same as the others.
Definition at line 58 of file oimagezoomer.cpp. References init(), and setImage(). |
|
||||||||||||||||||||||||
|
overloaded c'tor This differs only in the arguments it takes
Definition at line 77 of file oimagezoomer.cpp. References init(). |
|
|
d'tor Definition at line 86 of file oimagezoomer.cpp. |
|
|
make sure to call these if you reimplement For internal use only.
Definition at line 162 of file oimagezoomer.cpp. References len, m_imgSize, m_visPt, m_visSize, Qt::red, Opie::MM::x, and Opie::MM::y. |
|
|
For internal use only.
Definition at line 90 of file oimagezoomer.cpp. References m_mevent. Referenced by OImageZoomer(). |
|
|
make sure to call these if you reimplement For internal use only.
Definition at line 216 of file oimagezoomer.cpp. References height, m_imgSize, m_mevent, m_mouseX, m_mouseY, width, and zoomAreaRel(). |
|
|
make sure to call these if you reimplememt For internal use only.
Definition at line 201 of file oimagezoomer.cpp. |
|
|
make sure to call these if you reimplement For internal use only.
Definition at line 206 of file oimagezoomer.cpp. References height, m_imgSize, m_mevent, width, and zoomArea(). |
|
|
make sure to call these if you reimplement For internal use only.
Definition at line 154 of file oimagezoomer.cpp. References height, m_img, pix, size, and width. Referenced by setImage(). |
|
|
overloaded function it calls the QImage version Definition at line 150 of file oimagezoomer.cpp. References setImage(). |
|
|
Set the Image. The image will be resized on resizeEvent and it'll set the QPixmap background
Definition at line 141 of file oimagezoomer.cpp. References m_img, and resizeEvent(). Referenced by Opie::MM::OImageScrollView::generateImage(), OImageZoomer(), and setImage(). |
|
|
set the page/image size Tell us the QSize of the Data you show to the user. We need this to do the calculations
Definition at line 103 of file oimagezoomer.cpp. References m_imgSize. |
|
|
Set the size of the viewport Tell us the QSize of the viewport. The viewport is the part of the widget which is exposed on the screen.
Definition at line 117 of file oimagezoomer.cpp. References m_visSize. |
|
||||||||||||
|
This slot is present for convience. You can connect the QScrollView::contentsMoved to this slot and it calls the QPoint version for you This realtes to QScrollView::contentsX() and QScrollView::contentsY()
Definition at line 135 of file oimagezoomer.h. References setVisiblePoint(). |
|
|
the point in the topleft corner which is currently visible Set the visible point. This most of the times relate to QScrollView::contentsX() and QScrollView::contentsY()
Definition at line 129 of file oimagezoomer.cpp. References m_visPt. Referenced by setVisiblePoint(). |
|
||||||||||||
|
Here you get absolute coordinates. This slot will be emitted from within the mouseReleaseEvent of this widget. if no mouse move where done. So you may not delete this widget
Referenced by mouseReleaseEvent(). |
|
||||||||||||
|
Relative movement in the coordinates of the viewport This signal can easily be connected to QScrollView::scrollBy. This signal is emitted from within the mouseMoveEvent of this widget
Referenced by mouseMoveEvent(). |
|
|
Definition at line 119 of file oimagezoomer.h. Referenced by resizeEvent(), and setImage(). |
|
|
Definition at line 120 of file oimagezoomer.h. Referenced by drawContents(), mouseMoveEvent(), mouseReleaseEvent(), and setImageSize(). |
|
|
Definition at line 123 of file oimagezoomer.h. Referenced by init(), mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent(). |
|
|
Definition at line 122 of file oimagezoomer.h. Referenced by mouseMoveEvent(), and mousePressEvent(). |
|
|
Definition at line 122 of file oimagezoomer.h. Referenced by mouseMoveEvent(), and mousePressEvent(). |
|
|
Definition at line 121 of file oimagezoomer.h. Referenced by drawContents(), and setVisiblePoint(). |
|
|
Definition at line 120 of file oimagezoomer.h. Referenced by drawContents(), and setViewPortSize(). |
1.4.2