Public Slots | Public Member Functions | Static Public Member Functions | Protected Slots | Protected Member Functions | Private Attributes | List of all members
rviz::ColorEditor Class Reference

#include <color_editor.h>

Inheritance diagram for rviz::ColorEditor:
Inheritance graph

Public Slots

void parseText ()
void setColor (const QColor &color)

Public Member Functions

 ColorEditor (ColorProperty *property=nullptr, QWidget *parent=nullptr)
- Public Member Functions inherited from rviz::LineEditWithButton
QPushButton * button ()
 LineEditWithButton (QWidget *parent=nullptr)

Static Public Member Functions

static void paintColorBox (QPainter *painter, const QRect &rect, const QColor &color)

Protected Slots

void onButtonClick () override
- Protected Slots inherited from rviz::LineEditWithButton
virtual void onButtonClick ()
 Override this to do something when the button is clicked. More...

Protected Member Functions

void paintEvent (QPaintEvent *event) override
void resizeEvent (QResizeEvent *event) override
- Protected Member Functions inherited from rviz::LineEditWithButton
void resizeEvent (QResizeEvent *event) override
void simulateReturnPressed ()
 Send key events to mimic the "return" key being pressed and released. Useful ending an edit session and sending the data on out. More...

Private Attributes

QColor color_

Detailed Description

Definition at line 38 of file color_editor.h.

Constructor & Destructor Documentation

◆ ColorEditor()

rviz::ColorEditor::ColorEditor ( ColorProperty property = nullptr,
QWidget *  parent = nullptr 

Definition at line 44 of file color_editor.cpp.

Member Function Documentation

◆ onButtonClick

void rviz::ColorEditor::onButtonClick ( )

Definition at line 107 of file color_editor.cpp.

◆ paintColorBox()

void rviz::ColorEditor::paintColorBox ( QPainter *  painter,
const QRect &  rect,
const QColor &  color 

Static function to paint just the color box. Paints it in the left end of rect, size rect.height() by rect.height().

Definition at line 58 of file color_editor.cpp.

◆ paintEvent()

void rviz::ColorEditor::paintEvent ( QPaintEvent *  event)

Call parent version then paint color swatch.

Definition at line 50 of file color_editor.cpp.

◆ parseText

void rviz::ColorEditor::parseText ( )

Definition at line 79 of file color_editor.cpp.

◆ resizeEvent()

void rviz::ColorEditor::resizeEvent ( QResizeEvent *  event)

Definition at line 69 of file color_editor.cpp.

◆ setColor

void rviz::ColorEditor::setColor ( const QColor &  color)

Definition at line 97 of file color_editor.cpp.

Member Data Documentation

◆ color_

QColor rviz::ColorEditor::color_

Definition at line 62 of file color_editor.h.

◆ property_

ColorProperty* rviz::ColorEditor::property_

Definition at line 63 of file color_editor.h.

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

Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Sat May 27 2023 02:06:25