00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
#ifndef QjPIXMAPVIEW_H
00025
#define QjPIXMAPVIEW_H
00026
00027
#include <qscrollview.h>
00028
#include <qpixmap.h>
00029
#include <qpoint.h>
00030
00031
class QPainter;
00032
struct QjPixmapViewPrivate;
00033
00040 class QjPixmapView :
public QScrollView
00041 {
00042 Q_OBJECT
00043
00044
public:
00046
QjPixmapView( QWidget *parent = 0,
char *name = 0 );
00048
QjPixmapView(
const QPixmap &pm, QWidget *parent = 0,
char *name = 0 );
00050
QjPixmapView(
double zoom,
const QPixmap &pm, QWidget *parent = 0,
char *name = 0 );
00051 ~
QjPixmapView();
00052
00054
void clear();
00055
00057
void setPixmap(
const QPixmap &pm );
00059
void setPixmapAndZoom(
double zoom,
const QPixmap &pm );
00060
00061
public slots:
00063
void setZoom(
double zoom );
00064
00065
protected:
00067 QPoint
pmToViewport(
const QPoint &p );
00069 QPoint
viewportToPm(
const QPoint &p );
00070
00071 signals:
00073
void zoomChanged(
double );
00074
00075
protected:
00077
virtual void drawContents( QPainter *p,
int clipx,
int clipy,
int clipw,
int cliph );
00078
00079
private:
00080 QjPixmapViewPrivate *pd;
00081 };
00082
00083
#endif // QjPIXMAPVIEW_H