Public Member Functions | Protected Member Functions | Private Attributes
rviz::ScaledImageWidget Class Reference

A widget for showing a scaled version of an image (QPixmap). More...

#include <scaled_image_widget.h>

List of all members.

Public Member Functions

 ScaledImageWidget (float scale, QWidget *parent=0)
void setImage (QPixmap image)
virtual QSize sizeHint () const
virtual ~ScaledImageWidget ()

Protected Member Functions

virtual void paintEvent (QPaintEvent *event)

Private Attributes

QPixmap image_
float scale_

Detailed Description

A widget for showing a scaled version of an image (QPixmap).

The scale is just a suggestion, given to Qt by calls to sizeHint(), which returns the image size multiplied by the scale. The actual rendered size is the largest that fits the image into the current widget size without changing the aspect ratio. It is always rendered in the center.

Definition at line 47 of file scaled_image_widget.h.


Constructor & Destructor Documentation

rviz::ScaledImageWidget::ScaledImageWidget ( float  scale,
QWidget *  parent = 0 
)

Definition at line 38 of file scaled_image_widget.cpp.

virtual rviz::ScaledImageWidget::~ScaledImageWidget ( ) [inline, virtual]

Definition at line 52 of file scaled_image_widget.h.


Member Function Documentation

void rviz::ScaledImageWidget::paintEvent ( QPaintEvent *  event) [protected, virtual]

Definition at line 55 of file scaled_image_widget.cpp.

void rviz::ScaledImageWidget::setImage ( QPixmap  image)

Definition at line 44 of file scaled_image_widget.cpp.

QSize rviz::ScaledImageWidget::sizeHint ( ) const [virtual]

Definition at line 50 of file scaled_image_widget.cpp.


Member Data Documentation

Definition at line 62 of file scaled_image_widget.h.

Definition at line 63 of file scaled_image_widget.h.


The documentation for this class was generated from the following files:


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Thu Jun 6 2019 18:02:17