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.
te::qt::widgets::colorbar::ColorBar::ColorBar |
( |
QWidget * |
parent = 0 | ) |
|
It initializes a new ColorBar.
- Parameters
-
te::qt::widgets::colorbar::ColorBar::~ColorBar |
( |
| ) |
|
void te::qt::widgets::colorbar::ColorBar::addPin |
( |
| ) |
|
|
protectedslot |
void te::qt::widgets::colorbar::ColorBar::buildColorBar |
( |
| ) |
|
|
protected |
It build and paint the colorbar.
void te::qt::widgets::colorbar::ColorBar::colorBarChanged |
( |
| ) |
|
|
signal |
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
void te::qt::widgets::colorbar::ColorBar::editPin |
( |
| ) |
|
|
protectedslot |
void te::qt::widgets::colorbar::ColorBar::equalStep |
( |
| ) |
|
|
protectedslot |
It changes the pins positions for an equal distribution.
It returns the colorbar.
- Returns
- Current color bar.
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.
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.
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.
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.
virtual void te::qt::widgets::colorbar::ColorBar::paintEvent |
( |
QPaintEvent * |
e | ) |
|
|
protectedvirtual |
Inherit of QEvent, receive events to paint e update widgets.
- Parameters
-
void te::qt::widgets::colorbar::ColorBar::removePin |
( |
| ) |
|
|
protectedslot |
It remove a colorbar pin.
void te::qt::widgets::colorbar::ColorBar::setClickPrecision |
( |
double |
precision | ) |
|
It sets the precision of mouse click.
- Parameters
-
double | precision of click. |
It sets the color bar.
- Parameters
-
te::color::colorBar | to paint in the colorbar. |
- Note
- This class takes the ownership of the colorbar pointer.
void te::qt::widgets::colorbar::ColorBar::setHeight |
( |
int |
value | ) |
|
Sets the height of colobar.
- Parameters
-
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. |
void te::qt::widgets::colorbar::ColorBar::setScaleEngine |
( |
| ) |
|
|
protected |
Sets the transformation and the scale of colorbar values.
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.
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.
QWidgetAction* te::qt::widgets::colorbar::ColorBar::m_addPinAction |
|
protected |
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.
Color map information.
Definition at line 256 of file ColorBar.h.
QMenu* te::qt::widgets::colorbar::ColorBar::m_colorBarMenu |
|
protected |
Popup menu for Pin on color bar.
Definition at line 268 of file ColorBar.h.
Color picker for colorbar menu.
Definition at line 272 of file ColorBar.h.
double te::qt::widgets::colorbar::ColorBar::m_currentPinPos |
|
protected |
Value of the current Pin position.
Definition at line 266 of file ColorBar.h.
QWidgetAction* te::qt::widgets::colorbar::ColorBar::m_editPinAction |
|
protected |
QAction* te::qt::widgets::colorbar::ColorBar::m_equalStepAction |
|
protected |
Equal Step Pin Action.
Definition at line 282 of file ColorBar.h.
int te::qt::widgets::colorbar::ColorBar::m_height |
|
protected |
double te::qt::widgets::colorbar::ColorBar::m_initialXPos |
|
protected |
Position initial to move color.
Definition at line 262 of file ColorBar.h.
QwtInterval te::qt::widgets::colorbar::ColorBar::m_interval |
|
protected |
QMenu* te::qt::widgets::colorbar::ColorBar::m_pinMenu |
|
protected |
Popup menu for Pin on color bar.
Definition at line 270 of file ColorBar.h.
Color picker for pin menu.
Definition at line 274 of file ColorBar.h.
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/terralib5/src/terralib/qt/widgets/colorbar/ColorBar.h