Go to the documentation of this file.00001
00004 #ifndef BPSPIXMAPWIDGET_H
00005 #define BPSPIXMAPWIDGET_H
00006
00007 #include "bpsgui_global.h"
00008 #include <QScrollArea>
00009
00010 class QPixmap;
00011
00017 class BPSGUI_EXPORT BpsPixmapWidget : public QScrollArea
00018 {
00019 Q_OBJECT
00020 BPS_PRIVATE(BpsPixmapWidget)
00021
00022 public:
00027 BpsPixmapWidget(QWidget* aParent = 0);
00028
00030 virtual ~BpsPixmapWidget();
00031 virtual QSize sizeHint() const;
00033
00039 void setMargin(int aMargin);
00040
00044 int margin() const;
00045
00050 void setPixmap(const QPixmap& aPixmap);
00051
00055 QPixmap pixmap() const;
00056
00060 bool isFitBoth() const;
00061
00065 bool isFitWidth() const;
00066
00072 qreal zoom() const;
00073
00079 void setMaxZoom(qreal aZoom);
00080
00084 qreal maxZoom() const;
00085
00089 void scalePixmap();
00090
00091 public slots:
00092
00098 void setFitBoth(bool aEnable);
00099
00105 void setFitWidth(bool aEnable);
00106
00112 void setZoom(qreal aZoom);
00113
00117 void emitStatus();
00118
00119 signals:
00120
00125 void fitBothEnabled(bool aEnabled);
00126
00131 void fitWidthEnabled(bool aEnabled);
00132
00137 void zoomChanged(qreal aZoom);
00138 };
00139
00140 #endif // BPSPIXMAPWIDGET_H