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

Public Slots | |
| virtual void | decorate () |
| Line up everything properly when first shown. | |
Public Member Functions | |
| DtGradientEditorWidget (DtDe &de, QWidget *parent=0, Qt::WindowFlags flags=0) | |
| CTOR. | |
| virtual | ~DtGradientEditorWidget () |
| 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 | setAltitudeUnits (const QString &units) |
| Set the units for the altitude label. | |
| virtual void | setAltitudeDecimals (int decimals) |
| Set the decimals for the altitude label. | |
| virtual void | addControlPoint (double location, double red, double green, double blue, double alpha=1.0) |
| Add a single control point to the currently-set gradient. | |
| virtual void | addControlPoint (DtGradientEditorInterface::ControlPoint cp) |
| Add a single control point to the currently-set gradient. | |
| virtual void | setGradient (DtGradientEditorInterface::Gradient grad) |
| Replace the currently-set gradient with gradient specified. | |
| virtual const DtGradientEditorInterface::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 | theAltitudeColumn = 0 |
| static const int | theDisplayColorColumn = 1 |
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 height, 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 altitude, std::string color) |
| Creates the items for each column in a new row. | |
Protected Attributes | |
| QString | myAltitudeUnitsLabel |
| QAbstractItemDelegate * | myColorDelegate |
| QAbstractItemDelegate * | myAltitudeDelegate |
| QStandardItemModel * | myControlPointModel |
| QGraphicsScene * | myGradientScene |
| QTreeView * | myControlPointView |
| QGraphicsView * | myGradientView |
| QPushButton * | myAddControlPointButton |
| QPushButton * | myRemoveControlPointButton |
| makVrv::DtDe & | myDe |
A widget class for editing gradients.
| makVrv::DtGradientEditorWidget::DtGradientEditorWidget | ( | DtDe & | de, |
| QWidget * | parent = 0, |
||
| Qt::WindowFlags | flags = 0 |
||
| ) |
CTOR.
| virtual makVrv::DtGradientEditorWidget::~DtGradientEditorWidget | ( | ) | [virtual] |
DTOR.
| virtual void makVrv::DtGradientEditorWidget::resizeEvent | ( | QResizeEvent * | event | ) | [virtual] |
Reimplementation of QWidget::resizeEvent() to redraw the gradient preview.
| virtual void makVrv::DtGradientEditorWidget::clearGradient | ( | ) | [virtual] |
Blank the currently-set gradient.
Implements makVrv::DtGradientEditorInterface.
| virtual void makVrv::DtGradientEditorWidget::setAltitudeUnits | ( | const QString & | units | ) | [virtual] |
Set the units for the altitude label.
| virtual void makVrv::DtGradientEditorWidget::setAltitudeDecimals | ( | int | decimals | ) | [virtual] |
Set the decimals for the altitude label.
| virtual void makVrv::DtGradientEditorWidget::addControlPoint | ( | double | location, |
| double | red, | ||
| double | green, | ||
| double | blue, | ||
| double | alpha = 1.0 |
||
| ) | [virtual] |
Add a single control point to the currently-set gradient.
Implements makVrv::DtGradientEditorInterface.
| virtual void makVrv::DtGradientEditorWidget::addControlPoint | ( | DtGradientEditorInterface::ControlPoint | cp | ) | [virtual] |
Add a single control point to the currently-set gradient.
Implements makVrv::DtGradientEditorInterface.
| virtual void makVrv::DtGradientEditorWidget::setGradient | ( | DtGradientEditorInterface::Gradient | grad | ) | [virtual] |
Replace the currently-set gradient with gradient specified.
Implements makVrv::DtGradientEditorInterface.
| virtual const DtGradientEditorInterface::Gradient makVrv::DtGradientEditorWidget::gradient | ( | ) | const [virtual] |
Return the currently-set gradient.
Implements makVrv::DtGradientEditorInterface.
| virtual void makVrv::DtGradientEditorWidget::removeControlPoint | ( | int | index | ) | [virtual] |
Remove a single control point from the currently-set gradient.
| virtual void makVrv::DtGradientEditorWidget::decorate | ( | ) | [virtual, slot] |
Line up everything properly when first shown.
| virtual void makVrv::DtGradientEditorWidget::insertNewControlPoint | ( | ) | [protected, virtual, slot] |
Insert a new control point at the selection Called when "add point" is pressed.
| virtual void makVrv::DtGradientEditorWidget::removeSelectedControlPoint | ( | ) | [protected, virtual, slot] |
Remove control point at the selection Called when "delete point" is pressed.
| virtual void makVrv::DtGradientEditorWidget::updateGradient | ( | ) | [protected, virtual, slot] |
Redraw the gradient preview and point window.
| void makVrv::DtGradientEditorWidget::setupGui | ( | ) | [protected] |
Lays out the widget.
Non-virtual (Called from CTOR).
| void makVrv::DtGradientEditorWidget::connectToSignals | ( | ) | [protected] |
Connects to signals from widgets.
Non-virtual (Called from CTOR).
| virtual void makVrv::DtGradientEditorWidget::insertNewControlPoint | ( | double | height, |
| const QColor & | color | ||
| ) | [protected, virtual] |
Creates a new item in the model with the given parameters.
| std::string makVrv::DtGradientEditorWidget::colorStringFromColor | ( | const QColor & | color | ) | [protected] |
Returns the color as a hex string ( "RRGGBB" ).
| QList<QStandardItem*> makVrv::DtGradientEditorWidget::modelRowFromAltitudeColor | ( | double | altitude, |
| std::string | color | ||
| ) | [protected] |
Creates the items for each column in a new row.
const int makVrv::DtGradientEditorWidget::theAltitudeColumn = 0 [static] |
const int makVrv::DtGradientEditorWidget::theDisplayColorColumn = 1 [static] |
QString makVrv::DtGradientEditorWidget::myAltitudeUnitsLabel [protected] |
QAbstractItemDelegate* makVrv::DtGradientEditorWidget::myColorDelegate [protected] |
QAbstractItemDelegate* makVrv::DtGradientEditorWidget::myAltitudeDelegate [protected] |
QStandardItemModel* makVrv::DtGradientEditorWidget::myControlPointModel [protected] |
QGraphicsScene* makVrv::DtGradientEditorWidget::myGradientScene [protected] |
QTreeView* makVrv::DtGradientEditorWidget::myControlPointView [protected] |
QGraphicsView* makVrv::DtGradientEditorWidget::myGradientView [protected] |
makVrv::DtDe& makVrv::DtGradientEditorWidget::myDe [protected] |