It QWidget implementation of color bar.
More...
#include <ColorBar.h>
|
|
Methods used to manange colors and events.
|
void | setScaleEngine () |
| Sets the transformation and the scale of colorbar values. More...
|
|
void | buildColorBar () |
| It build and paint the colorbar. More...
|
|
double | getPin (int pos) |
| It returns the pin based on mouse click and the click precision. More...
|
|
double | convert2toolbarPos (int pos) |
| It convert a mouse position to a toolbar position. More...
|
|
virtual void | paintEvent (QPaintEvent *e) |
| Inherit of QEvent, receive events to paint e update widgets. More...
|
|
virtual void | mousePressEvent (QMouseEvent *e) |
| It waits a pressEvent from mouse to do something. More...
|
|
virtual void | mouseReleaseEvent (QMouseEvent *e) |
| It waits a releaseEvent from mouse to do something. More...
|
|
virtual void | mouseMoveEvent (QMouseEvent *e) |
| It waits a moveEvent from mouse to do something. More...
|
|
virtual void | wheelEvent (QWheelEvent *e) |
| It waits the wheel from mouse to do something. More...
|
|
It QWidget implementation of color bar.
It is used to construct color bar.
Definition at line 67 of file ColorBar.h.
◆ ColorBar()
te::qt::widgets::colorbar::ColorBar::ColorBar |
( |
QWidget * |
parent = 0 | ) |
|
It initializes a new ColorBar.
- Parameters
-
◆ ~ColorBar()
te::qt::widgets::colorbar::ColorBar::~ColorBar |
( |
| ) |
|
◆ addPin
void te::qt::widgets::colorbar::ColorBar::addPin |
( |
| ) |
|
|
protectedslot |
◆ buildColorBar()
void te::qt::widgets::colorbar::ColorBar::buildColorBar |
( |
| ) |
|
|
protected |
It build and paint the colorbar.
◆ colorBarChanged
void te::qt::widgets::colorbar::ColorBar::colorBarChanged |
( |
| ) |
|
|
signal |
◆ convert2toolbarPos()
double te::qt::widgets::colorbar::ColorBar::convert2toolbarPos |
( |
int |
pos | ) |
|
|
protected |
It convert a mouse position to a toolbar position.
- Parameters
-
pos | Mouse click X on toolbar |
- Returns
- Toolbar position
◆ editPin
void te::qt::widgets::colorbar::ColorBar::editPin |
( |
| ) |
|
|
protectedslot |
◆ equalStep
void te::qt::widgets::colorbar::ColorBar::equalStep |
( |
| ) |
|
|
protectedslot |
It changes the pins positions for an equal distribution.
◆ getColorBar()
It returns the colorbar.
- Returns
- Current color bar.
◆ getPin()
double te::qt::widgets::colorbar::ColorBar::getPin |
( |
int |
pos | ) |
|
|
protected |
It returns the pin based on mouse click and the click precision.
- Parameters
-
pos | Mouse click X on toolbar |
- Returns
- Pin found or -1, if not found.
◆ mouseMoveEvent()
virtual void te::qt::widgets::colorbar::ColorBar::mouseMoveEvent |
( |
QMouseEvent * |
e | ) |
|
|
protectedvirtual |
It waits a moveEvent from mouse to do something.
- Parameters
-
- Note
- In this case, it treat the moce of colorStops.
◆ mousePressEvent()
virtual void te::qt::widgets::colorbar::ColorBar::mousePressEvent |
( |
QMouseEvent * |
e | ) |
|
|
protectedvirtual |
It waits a pressEvent from mouse to do something.
- Parameters
-
- Note
- In this case, it treat the remove colorStops funciontion
-
and sets the start position to move stops.
◆ mouseReleaseEvent()
virtual void te::qt::widgets::colorbar::ColorBar::mouseReleaseEvent |
( |
QMouseEvent * |
e | ) |
|
|
protectedvirtual |
It waits a releaseEvent from mouse to do something.
- Parameters
-
- Note
- In this case, it treat the finalization of move colorStops.
◆ paintEvent()
virtual void te::qt::widgets::colorbar::ColorBar::paintEvent |
( |
QPaintEvent * |
e | ) |
|
|
protectedvirtual |
Inherit of QEvent, receive events to paint e update widgets.
- Parameters
-
◆ removePin
void te::qt::widgets::colorbar::ColorBar::removePin |
( |
| ) |
|
|
protectedslot |
It remove a colorbar pin.
◆ setClickPrecision()
void te::qt::widgets::colorbar::ColorBar::setClickPrecision |
( |
double |
precision | ) |
|
It sets the precision of mouse click.
- Parameters
-
double | precision of click. |
◆ setColorBar()
It sets the color bar.
- Parameters
-
te::color::colorBar | to paint in the colorbar. |
- Note
- This class takes the ownership of the colorbar pointer.
◆ setHeight()
void te::qt::widgets::colorbar::ColorBar::setHeight |
( |
int |
value | ) |
|
Sets the height of colobar.
- Parameters
-
◆ setInterval()
void te::qt::widgets::colorbar::ColorBar::setInterval |
( |
double |
min, |
|
|
double |
max |
|
) |
| |
It sets the min e max value of colorbar.
- Parameters
-
Minimum | value. |
Maximum | value. |
◆ setScaleEngine()
void te::qt::widgets::colorbar::ColorBar::setScaleEngine |
( |
| ) |
|
|
protected |
Sets the transformation and the scale of colorbar values.
◆ setScaleVisible()
void te::qt::widgets::colorbar::ColorBar::setScaleVisible |
( |
bool |
flag | ) |
|
Sets scale of color bar visibility.
- Parameters
-
flag | Boolean value to set the scale of color bar visibility. |
- Note
- TRUE is the defaul behavior.
◆ wheelEvent()
virtual void te::qt::widgets::colorbar::ColorBar::wheelEvent |
( |
QWheelEvent * |
e | ) |
|
|
protectedvirtual |
It waits the wheel from mouse to do something.
- Parameters
-
- Note
- In this case, it change the color lightness.
◆ m_addPinAction
QWidgetAction* te::qt::widgets::colorbar::ColorBar::m_addPinAction |
|
protected |
◆ m_clickPrecision
double te::qt::widgets::colorbar::ColorBar::m_clickPrecision |
|
protected |
Precision of click to get a color stop.
Definition at line 264 of file ColorBar.h.
◆ m_colorBar
Color map information.
Definition at line 256 of file ColorBar.h.
◆ m_colorBarMenu
QMenu* te::qt::widgets::colorbar::ColorBar::m_colorBarMenu |
|
protected |
Popup menu for Pin on color bar.
Definition at line 268 of file ColorBar.h.
◆ m_colorBarPicker
Color picker for colorbar menu.
Definition at line 272 of file ColorBar.h.
◆ m_currentPinPos
double te::qt::widgets::colorbar::ColorBar::m_currentPinPos |
|
protected |
Value of the current Pin position.
Definition at line 266 of file ColorBar.h.
◆ m_editPinAction
QWidgetAction* te::qt::widgets::colorbar::ColorBar::m_editPinAction |
|
protected |
◆ m_equalStepAction
QAction* te::qt::widgets::colorbar::ColorBar::m_equalStepAction |
|
protected |
Equal Step Pin Action.
Definition at line 282 of file ColorBar.h.
◆ m_height
int te::qt::widgets::colorbar::ColorBar::m_height |
|
protected |
◆ m_initialXPos
double te::qt::widgets::colorbar::ColorBar::m_initialXPos |
|
protected |
Position initial to move color.
Definition at line 262 of file ColorBar.h.
◆ m_interval
QwtInterval te::qt::widgets::colorbar::ColorBar::m_interval |
|
protected |
◆ m_pinMenu
QMenu* te::qt::widgets::colorbar::ColorBar::m_pinMenu |
|
protected |
Popup menu for Pin on color bar.
Definition at line 270 of file ColorBar.h.
◆ m_pinPicker
Color picker for pin menu.
Definition at line 274 of file ColorBar.h.
◆ m_removePinAction
QAction* te::qt::widgets::colorbar::ColorBar::m_removePinAction |
|
protected |
The documentation for this class was generated from the following file:
- /home/castejon/castejon_files/develop/terralib5/git_master/src/terralib/qt/widgets/colorbar/ColorBar.h