VR-Forces 4.0.4 Class Documentation
Public Slots | Public Member Functions | Static Public Attributes | Protected Slots | Protected Member Functions | Protected Attributes
makVrv::DtRangeEditorWidget Class Reference

A widget class for editing ranges. More...

Inheritance diagram for makVrv::DtRangeEditorWidget:
Inheritance graph
[legend]

List of all members.

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
QPushButtonmyAddControlPointButton
QPushButtonmyRemoveControlPointButton
makVrv::DtDemyDe

Detailed Description

A widget class for editing ranges.


Constructor & Destructor Documentation

makVrv::DtRangeEditorWidget::DtRangeEditorWidget ( DtDe de,
QWidget parent = 0,
Qt::WindowFlags  flags = 0 
)

CTOR.

DTOR.


Member Function Documentation

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.

Add a single control point to the currently-set gradient.

Exceptions:
DtCorruptedStateif cp is anything but (start,end,r,g,b,a(optional)).

Implements makVrv::DtRangeEditorInterface.

Replace the currently-set gradient with gradient specified.

Implements makVrv::DtRangeEditorInterface.

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.

Lays out the widget.

Non-virtual (Called from CTOR).

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.


Member Data Documentation

QAbstractItemDelegate* makVrv::DtRangeEditorWidget::myColorDelegate [protected]
QAbstractItemDelegate* makVrv::DtRangeEditorWidget::myValueDelegate [protected]
QStandardItemModel* makVrv::DtRangeEditorWidget::myControlPointModel [protected]
QGraphicsScene* makVrv::DtRangeEditorWidget::myGradientScene [protected]
QGraphicsView* makVrv::DtRangeEditorWidget::myGradientView [protected]

The documentation for this class was generated from the following file:

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)