Main Page | Class List | File List | Class Members

QjPixmapView Class Reference

The JPixmapView shows a zoomable pixmap in a scrollable area. More...

#include <qjpixmapview.h>

List of all members.

Public Slots

void setZoom (double zoom)

Signals

void zoomChanged (double)

Public Member Functions

 QjPixmapView (QWidget *parent=0, char *name=0)
 QjPixmapView (const QPixmap &pm, QWidget *parent=0, char *name=0)
 QjPixmapView (double zoom, const QPixmap &pm, QWidget *parent=0, char *name=0)
void clear ()
void setPixmap (const QPixmap &pm)
void setPixmapAndZoom (double zoom, const QPixmap &pm)

Protected Member Functions

QPoint pmToViewport (const QPoint &p)
QPoint viewportToPm (const QPoint &p)
virtual void drawContents (QPainter *p, int clipx, int clipy, int clipw, int cliph)


Detailed Description

The JPixmapView shows a zoomable pixmap in a scrollable area.

jpmv.png
JPixmapView can be used to show a pixmap in a srcollable area. The view can be zoomed and clicks can be traces to and from the pixmap coordinates.


Constructor & Destructor Documentation

QjPixmapView::QjPixmapView QWidget *  parent = 0,
char *  name = 0
 

Creates and empty pixmap view.

QjPixmapView::QjPixmapView const QPixmap &  pm,
QWidget *  parent = 0,
char *  name = 0
 

Creates a pixmap view at 1:1 zoom factor.

QjPixmapView::QjPixmapView double  zoom,
const QPixmap &  pm,
QWidget *  parent = 0,
char *  name = 0
 

Creates a pixmap view with a custom zoom factor.


Member Function Documentation

void QjPixmapView::clear  ) 
 

Clears the pixmap view.

void QjPixmapView::drawContents QPainter *  p,
int  clipx,
int  clipy,
int  clipw,
int  cliph
[protected, virtual]
 

Draws the actual contents.

QPoint QjPixmapView::pmToViewport const QPoint &  p  )  [protected]
 

Converts a point (i.e. a co-ordinate) from pixmap co-ordinates to viewportco-ordinates. By converting a viewport coordinate to a pixmap coordinate and then back again the coordinate will snap to pixel boundaries.

void QjPixmapView::setPixmap const QPixmap &  pm  ) 
 

Assigns the view with a new pixmap.

void QjPixmapView::setPixmapAndZoom double  zoom,
const QPixmap &  pm
 

Assigns the view with a new pixmap and sets the zoom factor.

void QjPixmapView::setZoom double  zoom  )  [slot]
 

Alters the zoom factor.

QPoint QjPixmapView::viewportToPm const QPoint &  p  )  [protected]
 

Converts a point( i.e. a co-ordinate) from viewport co-ordinates to pixmap co-ordinates.

void QjPixmapView::zoomChanged double   )  [signal]
 

Emitted when the zoom factor is altered.


The documentation for this class was generated from the following files:
Generated on Thu Jul 15 14:25:47 2004 for JSeries by doxygen 1.3.7