Signals | Public Member Functions | Protected Slots | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
rqt_image_view::RatioLayoutedFrame Class Reference

#include <ratio_layouted_frame.h>

Inheritance diagram for rqt_image_view::RatioLayoutedFrame:
Inheritance graph
[legend]

Signals

void delayed_update ()
 
void mouseLeft (int x, int y)
 

Public Member Functions

QRect getAspectRatioCorrectPaintArea ()
 
const QImage & getImage () const
 
QImage getImageCopy () const
 
 RatioLayoutedFrame (QWidget *parent, Qt::WindowFlags flags=0)
 
void resizeToFitAspectRatio ()
 
void setImage (const QImage &image)
 
void setInnerFrameFixedSize (const QSize &size)
 
void setInnerFrameMaximumSize (const QSize &size)
 
void setInnerFrameMinimumSize (const QSize &size)
 
void setOuterLayout (QHBoxLayout *outer_layout)
 
virtual ~RatioLayoutedFrame ()
 

Protected Slots

void onSmoothImageChanged (bool checked)
 

Protected Member Functions

void paintEvent (QPaintEvent *event)
 
void setAspectRatio (unsigned short width, unsigned short height)
 

Private Member Functions

void mousePressEvent (QMouseEvent *mouseEvent)
 

Static Private Member Functions

static int greatestCommonDivisor (int a, int b)
 

Private Attributes

QSize aspect_ratio_
 
QHBoxLayout * outer_layout_
 
QImage qimage_
 
QMutex qimage_mutex_
 
bool smoothImage_
 

Detailed Description

RatioLayoutedFrame is a layout containing a single frame with a fixed aspect ratio. The default aspect ratio is 4:3.

Definition at line 51 of file ratio_layouted_frame.h.

Constructor & Destructor Documentation

◆ RatioLayoutedFrame()

rqt_image_view::RatioLayoutedFrame::RatioLayoutedFrame ( QWidget *  parent,
Qt::WindowFlags  flags = 0 
)

Definition at line 40 of file ratio_layouted_frame.cpp.

◆ ~RatioLayoutedFrame()

rqt_image_view::RatioLayoutedFrame::~RatioLayoutedFrame ( )
virtual

Definition at line 49 of file ratio_layouted_frame.cpp.

Member Function Documentation

◆ delayed_update

void rqt_image_view::RatioLayoutedFrame::delayed_update ( )
signal

◆ getAspectRatioCorrectPaintArea()

QRect rqt_image_view::RatioLayoutedFrame::getAspectRatioCorrectPaintArea ( )

◆ getImage()

const QImage & rqt_image_view::RatioLayoutedFrame::getImage ( ) const

Definition at line 53 of file ratio_layouted_frame.cpp.

◆ getImageCopy()

QImage rqt_image_view::RatioLayoutedFrame::getImageCopy ( ) const

Definition at line 58 of file ratio_layouted_frame.cpp.

◆ greatestCommonDivisor()

int rqt_image_view::RatioLayoutedFrame::greatestCommonDivisor ( int  a,
int  b 
)
staticprivate

Definition at line 188 of file ratio_layouted_frame.cpp.

◆ mouseLeft

void rqt_image_view::RatioLayoutedFrame::mouseLeft ( int  x,
int  y 
)
signal

◆ mousePressEvent()

void rqt_image_view::RatioLayoutedFrame::mousePressEvent ( QMouseEvent *  mouseEvent)
private

Definition at line 197 of file ratio_layouted_frame.cpp.

◆ onSmoothImageChanged

void rqt_image_view::RatioLayoutedFrame::onSmoothImageChanged ( bool  checked)
protectedslot

Definition at line 206 of file ratio_layouted_frame.cpp.

◆ paintEvent()

void rqt_image_view::RatioLayoutedFrame::paintEvent ( QPaintEvent *  event)
protected

Definition at line 156 of file ratio_layouted_frame.cpp.

◆ resizeToFitAspectRatio()

void rqt_image_view::RatioLayoutedFrame::resizeToFitAspectRatio ( )

Definition at line 76 of file ratio_layouted_frame.cpp.

◆ setAspectRatio()

void rqt_image_view::RatioLayoutedFrame::setAspectRatio ( unsigned short  width,
unsigned short  height 
)
protected

Definition at line 147 of file ratio_layouted_frame.cpp.

◆ setImage()

void rqt_image_view::RatioLayoutedFrame::setImage ( const QImage &  image)

Definition at line 67 of file ratio_layouted_frame.cpp.

◆ setInnerFrameFixedSize()

void rqt_image_view::RatioLayoutedFrame::setInnerFrameFixedSize ( const QSize &  size)

Definition at line 141 of file ratio_layouted_frame.cpp.

◆ setInnerFrameMaximumSize()

void rqt_image_view::RatioLayoutedFrame::setInnerFrameMaximumSize ( const QSize &  size)

Definition at line 132 of file ratio_layouted_frame.cpp.

◆ setInnerFrameMinimumSize()

void rqt_image_view::RatioLayoutedFrame::setInnerFrameMinimumSize ( const QSize &  size)

Definition at line 123 of file ratio_layouted_frame.cpp.

◆ setOuterLayout()

void rqt_image_view::RatioLayoutedFrame::setOuterLayout ( QHBoxLayout *  outer_layout)

Definition at line 118 of file ratio_layouted_frame.cpp.

Member Data Documentation

◆ aspect_ratio_

QSize rqt_image_view::RatioLayoutedFrame::aspect_ratio_
private

Definition at line 105 of file ratio_layouted_frame.h.

◆ outer_layout_

QHBoxLayout* rqt_image_view::RatioLayoutedFrame::outer_layout_
private

Definition at line 103 of file ratio_layouted_frame.h.

◆ qimage_

QImage rqt_image_view::RatioLayoutedFrame::qimage_
private

Definition at line 107 of file ratio_layouted_frame.h.

◆ qimage_mutex_

QMutex rqt_image_view::RatioLayoutedFrame::qimage_mutex_
mutableprivate

Definition at line 108 of file ratio_layouted_frame.h.

◆ smoothImage_

bool rqt_image_view::RatioLayoutedFrame::smoothImage_
private

Definition at line 110 of file ratio_layouted_frame.h.


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


rqt_image_view
Author(s): Dirk Thomas , Mabel Zhang
autogenerated on Fri May 26 2023 02:31:55