![]() |
VR-Forces 4.3 Class Documentation
|
A widget class for editing ranges. More...

Public Slots | |
| virtual void | decorate () |
| Line up everything properly when first shown. | |
Public Member Functions | |
| DtRangeEditorWidget (DtDe &de, QWidget *parent=0, Qt::WindowFlags flags=0) | |
| CTOR. | |
| virtual | ~DtRangeEditorWidget () |
| DTOR. | |
| virtual void | resizeEvent (QResizeEvent *event) |
| Reimplementation of QWidget::resizeEvent() to redraw the gradient preview. | |
| virtual void | clearGradient () |
| Blank the currently-set gradient. | |
| virtual void | setValueUnits (const QString &units) |
| Set the units for the altitude label. | |
| virtual void | setValueDecimals (int decimals) |
| Set the decimals for the altitude label. | |
| virtual void | setRangeBackgroundColor (const QColor &color) |
| Set the background color to display outside of ranges. | |
| virtual QColor | rangeBackgroundColor () const |
| Get the background color for the ranges. | |
| virtual void | getRange (int index, float &rangeStart, float &rangeEnd, QColor &color) const |
| Get information about the given range. | |
| virtual int | numRanges () const |
| Get the number of ranges. | |
| virtual void | addControlPoint (double rangeStart, double rangeEnd, double red, double green, double blue, double alpha=1.0) |
| Add a single control point to the currently-set gradient. | |
| virtual void | addControlPoint (DtRangeEditorInterface::ControlPoint cp) |
| Add a single control point to the currently-set gradient. | |
| virtual void | setGradient (DtRangeEditorInterface::Gradient grad) |
| Replace the currently-set gradient with gradient specified. | |
| virtual DtRangeEditorInterface::Gradient | gradient () const |
| Return the currently-set gradient. | |
| virtual void | removeControlPoint (int index) |
| Remove a single control point from the currently-set gradient. | |
Public Member Functions inherited from makVrv::DtRangeEditorInterface | |
| virtual | ~DtRangeEditorInterface () |
| Virtual DTOR. | |
Static Public Attributes | |
| static const int | theRangeStartColumn = 0 |
| static const int | theRangeEndColumn = 1 |
| static const int | theColorColumn = 2 |
Protected Slots | |
| virtual void | insertNewControlPoint () |
| Insert a new control point at the selection Called when "add point" is pressed. | |
| virtual void | removeSelectedControlPoint () |
| Remove control point at the selection Called when "delete point" is pressed. | |
| virtual void | updateGradient () |
| Redraw the gradient preview and point window. | |
Protected Member Functions | |
| void | setupGui () |
| Lays out the widget. | |
| void | connectToSignals () |
| Connects to signals from widgets. | |
| virtual void | insertNewControlPoint (double rangeStart, double rangeEnd, const QColor &color) |
| Creates a new item in the model with the given parameters. | |
| std::string | colorStringFromColor (const QColor &color) |
| Returns the color as a hex string ( "RRGGBB" ). | |
| QList< QStandardItem * > | modelRowFromAltitudeColor (double rangeStart, double rangeEnd, std::string color) |
| Creates the items for each column in a new row. | |
| virtual void | changeEvent (QEvent *event) |
| Listens for enable/disable events and updates gradient. | |
Protected Attributes | |
| QString | myRangeEndLabel |
| QString | myRangeStartLabel |
| QColor | myBackgroundColor |
| QAbstractItemDelegate * | myColorDelegate |
| QAbstractItemDelegate * | myValueDelegate |
| QStandardItemModel * | myControlPointModel |
| QGraphicsScene * | myGradientScene |
| QTreeView * | myControlPointView |
| QGraphicsView * | myGradientView |
| QPushButton * | myAddControlPointButton |
| QPushButton * | myRemoveControlPointButton |
| makVrv::DtDe & | myDe |
Additional Inherited Members | |
Public Types inherited from makVrv::DtRangeEditorInterface | |
| typedef std::vector< double > | ControlPoint |
| Vector type for the double values that make up a control point. | |
| typedef std::vector < DtRangeEditorInterface::ControlPoint > | Gradient |
| Vector type for storing ControlPoints. | |
Public Attributes inherited from makVrv::DtRangeEditorInterface | |
| boost::signal< void(const DtRangeEditorInterface::Gradient &)> | signal_gradientChanged |
| Signal emitted when the user changes the gradient. | |
A widget class for editing ranges.
| makVrv::DtRangeEditorWidget::DtRangeEditorWidget | ( | DtDe & | de, |
| QWidget * | parent = 0, |
||
| Qt::WindowFlags | flags = 0 |
||
| ) |
CTOR.
|
virtual |
DTOR.
|
virtual |
Reimplementation of QWidget::resizeEvent() to redraw the gradient preview.
|
virtual |
Blank the currently-set gradient.
Implements makVrv::DtRangeEditorInterface.
|
virtual |
Set the units for the altitude label.
|
virtual |
Set the decimals for the altitude label.
|
virtual |
Set the background color to display outside of ranges.
|
virtual |
Get the background color for the ranges.
|
virtual |
Get information about the given range.
|
virtual |
Get the number of ranges.
|
virtual |
Add a single control point to the currently-set gradient.
Implements makVrv::DtRangeEditorInterface.
|
virtual |
Add a single control point to the currently-set gradient.
| DtCorruptedState | if cp is anything but (start,end,r,g,b,a(optional)). |
Implements makVrv::DtRangeEditorInterface.
|
virtual |
Replace the currently-set gradient with gradient specified.
Implements makVrv::DtRangeEditorInterface.
|
virtual |
Return the currently-set gradient.
Implements makVrv::DtRangeEditorInterface.
|
virtual |
Remove a single control point from the currently-set gradient.
|
virtualslot |
Line up everything properly when first shown.
|
protectedvirtualslot |
Insert a new control point at the selection Called when "add point" is pressed.
|
protectedvirtualslot |
Remove control point at the selection Called when "delete point" is pressed.
|
protectedvirtualslot |
Redraw the gradient preview and point window.
|
protected |
Lays out the widget.
Non-virtual (Called from CTOR).
|
protected |
Connects to signals from widgets.
Non-virtual (Called from CTOR).
|
protectedvirtual |
Creates a new item in the model with the given parameters.
|
protected |
Returns the color as a hex string ( "RRGGBB" ).
|
protected |
Creates the items for each column in a new row.
|
protectedvirtual |
Listens for enable/disable events and updates gradient.
|
static |
|
static |
|
static |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |