View widget for pixmaps.
More...
#include <bpspixmapwidget.h>
List of all members.
Public Slots |
|
void | emitStatus () |
| | Emit all status signals.
|
| void | setFitBoth (bool aEnable) |
| | Enable/disable fitting the pixmap in both directions.
|
| void | setFitWidth (bool aEnable) |
| | Enable/disable fitting the pixmap width into the widget.
|
| void | setZoom (qreal aZoom) |
| | Set the zoom factor, where 1.0 equals 100%.
|
Signals |
| void | fitBothEnabled (bool aEnabled) |
| | This signal is emitted when page fitting is enabled or disabled.
|
| void | fitWidthEnabled (bool aEnabled) |
| | This signal is emitted when width fitting is enabled or disabled.
|
| void | zoomChanged (qreal aZoom) |
| | This signal is emitted when the zoom factor changes.
|
Public Member Functions |
| | BpsPixmapWidget (QWidget *aParent=0) |
| | Default constructor.
|
| bool | isFitBoth () const |
| bool | isFitWidth () const |
| int | margin () const |
| qreal | maxZoom () const |
| QPixmap | pixmap () const |
|
void | scalePixmap () |
| | Rescale the pixmap, for example after resizing, maximizing and restoring.
|
| void | setMargin (int aMargin) |
| | Set the margin (pixels) to keep around the pixmap within the widget.
|
| void | setMaxZoom (qreal aZoom) |
| | Set the maximum zoom factor.
|
| void | setPixmap (const QPixmap &aPixmap) |
| | Set the pixmap to be displayed.
|
| qreal | zoom () const |
| | Get the current zoom factor.
|
Detailed Description
View widget for pixmaps.
The pixmap gets scaled according to the available space. This is the naked view window without controls.
Constructor & Destructor Documentation
| BpsPixmapWidget::BpsPixmapWidget |
( |
QWidget * |
aParent = 0 | ) |
|
Default constructor.
- Parameters:
-
| [in] | aParent | The parent widget. |
Member Function Documentation
| void BpsPixmapWidget::fitBothEnabled |
( |
bool |
aEnabled | ) |
[signal] |
This signal is emitted when page fitting is enabled or disabled.
- Parameters:
-
| [in] | aEnabled | The new state. |
| void BpsPixmapWidget::fitWidthEnabled |
( |
bool |
aEnabled | ) |
[signal] |
This signal is emitted when width fitting is enabled or disabled.
- Parameters:
-
| [in] | aEnabled | The new state. |
| bool BpsPixmapWidget::isFitBoth |
( |
| ) |
const |
- Returns:
- True if mode is fit both, width and height.
| bool BpsPixmapWidget::isFitWidth |
( |
| ) |
const |
- Returns:
- True if mode is fit width.
| int BpsPixmapWidget::margin |
( |
| ) |
const |
- Returns:
- Returns the current margin.
| qreal BpsPixmapWidget::maxZoom |
( |
| ) |
const |
- Returns:
- The current maximum zoom factor.
| QPixmap BpsPixmapWidget::pixmap |
( |
| ) |
const |
- Returns:
- The currently displayed pixmap.
| void BpsPixmapWidget::setFitBoth |
( |
bool |
aEnable | ) |
[slot] |
Enable/disable fitting the pixmap in both directions.
Enabling all fitting automatically disables width fitting.
- Parameters:
-
| [in] | aEnable | True to enable, false to disable page fitting. |
| void BpsPixmapWidget::setFitWidth |
( |
bool |
aEnable | ) |
[slot] |
Enable/disable fitting the pixmap width into the widget.
Enabling width fitting automatically disables allover fitting.
- Parameters:
-
| [in] | aEnable | True to enable, false to disable both fitting. |
| void BpsPixmapWidget::setMargin |
( |
int |
aMargin | ) |
|
Set the margin (pixels) to keep around the pixmap within the widget.
The default margin is 0.
- Parameters:
-
| [in] | aMargin | The new margin to set. |
| void BpsPixmapWidget::setMaxZoom |
( |
qreal |
aZoom | ) |
|
Set the maximum zoom factor.
The default maximum zoom factor is 1.0.
- Parameters:
-
| [in] | aZoom | The new maximum zoom factor to set. |
| void BpsPixmapWidget::setPixmap |
( |
const QPixmap & |
aPixmap | ) |
|
Set the pixmap to be displayed.
- Parameters:
-
| [in] | aPixmap | The pixmap to display. |
| void BpsPixmapWidget::setZoom |
( |
qreal |
aZoom | ) |
[slot] |
Set the zoom factor, where 1.0 equals 100%.
This function does nothing if both or width fitting is enabled.
- Parameters:
-
| [in] | aZoom | The new zoom factor to set. |
| qreal BpsPixmapWidget::zoom |
( |
| ) |
const |
Get the current zoom factor.
If neither isFitPage() nor isFitWidth() is true, the zoom factor stays constant when resizing the widget.
- Returns:
- The current zoom factor.
| void BpsPixmapWidget::zoomChanged |
( |
qreal |
aZoom | ) |
[signal] |
This signal is emitted when the zoom factor changes.
- Parameters:
-
| [in] | aZoom | The new zoom factor. |
The documentation for this class was generated from the following file: