Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
radial_menu_rviz::HorizontalImageDrawer Class Reference

#include <horizontal_image_drawer.hpp>

Public Member Functions

QImage draw () const
 
 HorizontalImageDrawer (const radial_menu_model::ModelConstPtr &model, const HorizontalDrawingProperty &prop)
 
void setModel (const radial_menu_model::ModelConstPtr &model)
 
void setProperty (const HorizontalDrawingProperty &prop)
 
virtual ~HorizontalImageDrawer ()
 

Protected Types

enum  ElementType { TitleElement, SelectedElement, PointedElement }
 

Protected Member Functions

void drawBackground (QPainter *const painter, const QRgb &rgb, const QRect &rect) const
 
void drawForeground (QPainter *const painter, const QRgb &rgb, const QRect &rect, const radial_menu_model::ItemConstPtr &item) const
 
void elementLayout (const radial_menu_model::ItemConstPtr &item, QRect *const bg_rect, QRect *const fg_rect) const
 
void imageLayout (QSize *const image_size, std::vector< ElementType > *const element_types, std::vector< QRect > *const bg_rects, std::vector< QRect > *const fg_rects, std::vector< radial_menu_model::ItemConstPtr > *const items) const
 

Static Protected Member Functions

static QColor makeColor (const QRgb &rgb, const int alpha)
 
static int textWidth (const QFont &font, const QString &text)
 
static QMargins uniformMargins (const int margin)
 

Protected Attributes

radial_menu_model::ModelConstPtr model_
 
HorizontalDrawingProperty prop_
 

Detailed Description

Definition at line 29 of file horizontal_image_drawer.hpp.

Member Enumeration Documentation

◆ ElementType

Enumerator
TitleElement 
SelectedElement 
PointedElement 

Definition at line 82 of file horizontal_image_drawer.hpp.

Constructor & Destructor Documentation

◆ HorizontalImageDrawer()

radial_menu_rviz::HorizontalImageDrawer::HorizontalImageDrawer ( const radial_menu_model::ModelConstPtr model,
const HorizontalDrawingProperty prop 
)
inline

Definition at line 31 of file horizontal_image_drawer.hpp.

◆ ~HorizontalImageDrawer()

virtual radial_menu_rviz::HorizontalImageDrawer::~HorizontalImageDrawer ( )
inlinevirtual

Definition at line 37 of file horizontal_image_drawer.hpp.

Member Function Documentation

◆ draw()

QImage radial_menu_rviz::HorizontalImageDrawer::draw ( ) const
inline

Definition at line 43 of file horizontal_image_drawer.hpp.

◆ drawBackground()

void radial_menu_rviz::HorizontalImageDrawer::drawBackground ( QPainter *const  painter,
const QRgb &  rgb,
const QRect &  rect 
) const
inlineprotected

Definition at line 218 of file horizontal_image_drawer.hpp.

◆ drawForeground()

void radial_menu_rviz::HorizontalImageDrawer::drawForeground ( QPainter *const  painter,
const QRgb &  rgb,
const QRect &  rect,
const radial_menu_model::ItemConstPtr item 
) const
inlineprotected

Definition at line 225 of file horizontal_image_drawer.hpp.

◆ elementLayout()

void radial_menu_rviz::HorizontalImageDrawer::elementLayout ( const radial_menu_model::ItemConstPtr item,
QRect *const  bg_rect,
QRect *const  fg_rect 
) const
inlineprotected

Definition at line 175 of file horizontal_image_drawer.hpp.

◆ imageLayout()

void radial_menu_rviz::HorizontalImageDrawer::imageLayout ( QSize *const  image_size,
std::vector< ElementType > *const  element_types,
std::vector< QRect > *const  bg_rects,
std::vector< QRect > *const  fg_rects,
std::vector< radial_menu_model::ItemConstPtr > *const  items 
) const
inlineprotected

Definition at line 87 of file horizontal_image_drawer.hpp.

◆ makeColor()

static QColor radial_menu_rviz::HorizontalImageDrawer::makeColor ( const QRgb &  rgb,
const int  alpha 
)
inlinestaticprotected

Definition at line 247 of file horizontal_image_drawer.hpp.

◆ setModel()

void radial_menu_rviz::HorizontalImageDrawer::setModel ( const radial_menu_model::ModelConstPtr model)
inline

Definition at line 39 of file horizontal_image_drawer.hpp.

◆ setProperty()

void radial_menu_rviz::HorizontalImageDrawer::setProperty ( const HorizontalDrawingProperty prop)
inline

Definition at line 41 of file horizontal_image_drawer.hpp.

◆ textWidth()

static int radial_menu_rviz::HorizontalImageDrawer::textWidth ( const QFont &  font,
const QString &  text 
)
inlinestaticprotected

Definition at line 208 of file horizontal_image_drawer.hpp.

◆ uniformMargins()

static QMargins radial_menu_rviz::HorizontalImageDrawer::uniformMargins ( const int  margin)
inlinestaticprotected

Definition at line 212 of file horizontal_image_drawer.hpp.

Member Data Documentation

◆ model_

radial_menu_model::ModelConstPtr radial_menu_rviz::HorizontalImageDrawer::model_
protected

Definition at line 255 of file horizontal_image_drawer.hpp.

◆ prop_

HorizontalDrawingProperty radial_menu_rviz::HorizontalImageDrawer::prop_
protected

Definition at line 256 of file horizontal_image_drawer.hpp.


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


radial_menu_rviz
Author(s):
autogenerated on Mon Feb 28 2022 23:22:04