![]() |
VR-Forces 4.0.4 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. | |
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 |
A widget class for editing ranges.
| makVrv::DtRangeEditorWidget::DtRangeEditorWidget | ( | DtDe & | de, |
| QWidget * | parent = 0, |
||
| Qt::WindowFlags | flags = 0 |
||
| ) |
CTOR.
| virtual makVrv::DtRangeEditorWidget::~DtRangeEditorWidget | ( | ) | [virtual] |
DTOR.
| virtual void makVrv::DtRangeEditorWidget::resizeEvent | ( | QResizeEvent * | event | ) | [virtual] |
Reimplementation of QWidget::resizeEvent() to redraw the gradient preview.
| virtual void makVrv::DtRangeEditorWidget::clearGradient | ( | ) | [virtual] |
Blank the currently-set gradient.
Implements makVrv::DtRangeEditorInterface.
| virtual void makVrv::DtRangeEditorWidget::setValueUnits | ( | const QString & | units | ) | [virtual] |
Set the units for the altitude label.
| virtual void makVrv::DtRangeEditorWidget::setValueDecimals | ( | int | decimals | ) | [virtual] |
Set the decimals for the altitude label.
| virtual void makVrv::DtRangeEditorWidget::setRangeBackgroundColor | ( | const QColor & | color | ) | [virtual] |
Set the background color to display outside of ranges.
| virtual QColor makVrv::DtRangeEditorWidget::rangeBackgroundColor | ( | ) | const [virtual] |
Get the background color for the ranges.
| virtual void makVrv::DtRangeEditorWidget::getRange | ( | int | index, |
| float & | rangeStart, | ||
| float & | rangeEnd, | ||
| QColor & | color | ||
| ) | const [virtual] |
Get information about the given range.
| virtual int makVrv::DtRangeEditorWidget::numRanges | ( | ) | const [virtual] |
Get the number of ranges.
| virtual void makVrv::DtRangeEditorWidget::addControlPoint | ( | double | rangeStart, |
| double | rangeEnd, | ||
| double | red, | ||
| double | green, | ||
| double | blue, | ||
| double | alpha = 1.0 |
||
| ) | [virtual] |
Add a single control point to the currently-set gradient.
Implements makVrv::DtRangeEditorInterface.
| virtual void makVrv::DtRangeEditorWidget::addControlPoint | ( | DtRangeEditorInterface::ControlPoint | cp | ) | [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 void makVrv::DtRangeEditorWidget::setGradient | ( | DtRangeEditorInterface::Gradient | grad | ) | [virtual] |
Replace the currently-set gradient with gradient specified.
Implements makVrv::DtRangeEditorInterface.
| virtual DtRangeEditorInterface::Gradient makVrv::DtRangeEditorWidget::gradient | ( | ) | const [virtual] |
Return the currently-set gradient.
Implements makVrv::DtRangeEditorInterface.
| virtual void makVrv::DtRangeEditorWidget::removeControlPoint | ( | int | index | ) | [virtual] |
Remove a single control point from the currently-set gradient.
| virtual void makVrv::DtRangeEditorWidget::decorate | ( | ) | [virtual, slot] |
Line up everything properly when first shown.
| virtual void makVrv::DtRangeEditorWidget::insertNewControlPoint | ( | ) | [protected, virtual, slot] |
Insert a new control point at the selection Called when "add point" is pressed.
| virtual void makVrv::DtRangeEditorWidget::removeSelectedControlPoint | ( | ) | [protected, virtual, slot] |
Remove control point at the selection Called when "delete point" is pressed.
| virtual void makVrv::DtRangeEditorWidget::updateGradient | ( | ) | [protected, virtual, slot] |
Redraw the gradient preview and point window.
| void makVrv::DtRangeEditorWidget::setupGui | ( | ) | [protected] |
Lays out the widget.
Non-virtual (Called from CTOR).
| void makVrv::DtRangeEditorWidget::connectToSignals | ( | ) | [protected] |
Connects to signals from widgets.
Non-virtual (Called from CTOR).
| virtual void makVrv::DtRangeEditorWidget::insertNewControlPoint | ( | double | rangeStart, |
| double | rangeEnd, | ||
| const QColor & | color | ||
| ) | [protected, virtual] |
Creates a new item in the model with the given parameters.
| std::string makVrv::DtRangeEditorWidget::colorStringFromColor | ( | const QColor & | color | ) | [protected] |
Returns the color as a hex string ( "RRGGBB" ).
| QList<QStandardItem*> makVrv::DtRangeEditorWidget::modelRowFromAltitudeColor | ( | double | rangeStart, |
| double | rangeEnd, | ||
| std::string | color | ||
| ) | [protected] |
Creates the items for each column in a new row.
| virtual void makVrv::DtRangeEditorWidget::changeEvent | ( | QEvent * | event | ) | [protected, virtual] |
Listens for enable/disable events and updates gradient.
const int makVrv::DtRangeEditorWidget::theRangeStartColumn = 0 [static] |
const int makVrv::DtRangeEditorWidget::theRangeEndColumn = 1 [static] |
const int makVrv::DtRangeEditorWidget::theColorColumn = 2 [static] |
QString makVrv::DtRangeEditorWidget::myRangeEndLabel [protected] |
QString makVrv::DtRangeEditorWidget::myRangeStartLabel [protected] |
QColor makVrv::DtRangeEditorWidget::myBackgroundColor [protected] |
QAbstractItemDelegate* makVrv::DtRangeEditorWidget::myColorDelegate [protected] |
QAbstractItemDelegate* makVrv::DtRangeEditorWidget::myValueDelegate [protected] |
QStandardItemModel* makVrv::DtRangeEditorWidget::myControlPointModel [protected] |
QGraphicsScene* makVrv::DtRangeEditorWidget::myGradientScene [protected] |
QTreeView* makVrv::DtRangeEditorWidget::myControlPointView [protected] |
QGraphicsView* makVrv::DtRangeEditorWidget::myGradientView [protected] |
makVrv::DtDe& makVrv::DtRangeEditorWidget::myDe [protected] |