VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | 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.

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

Public Slots

virtual void decorate ()
 

Public Member Functions

 DtRangeEditorWidget (DtDe &de, QWidget *parent=0, Qt::WindowFlags flags=0)
 
virtual ~DtRangeEditorWidget ()
 
virtual void resizeEvent (QResizeEvent *event)
 
virtual void clearGradient ()
 
virtual void setValueUnits (const QString &units)
 
virtual void setValueDecimals (int decimals)
 
virtual void setRangeBackgroundColor (const QColor &color)
 
virtual QColor rangeBackgroundColor () const
 
virtual void getRange (int index, float &rangeStart, float &rangeEnd, QColor &color) const
 
virtual int numRanges () const
 
virtual void addControlPoint (double rangeStart, double rangeEnd, double red, double green, double blue, double alpha=1.0)
 
virtual void addControlPoint (const DtRangeEditorInterface::ControlPoint &cp)
 
virtual void setGradient (DtRangeEditorInterface::Gradient grad)
 
virtual
DtRangeEditorInterface::Gradient 
gradient () const
 
virtual void removeControlPoint (int index)
 
- Public Member Functions inherited from makVrv::DtRangeEditorInterface
virtual ~DtRangeEditorInterface ()
 

Static Public Attributes

static const int theRangeStartColumn = 0
 
static const int theRangeEndColumn = 1
 
static const int theColorColumn = 2
 

Protected Slots

virtual void insertNewControlPoint ()
 
virtual void removeSelectedControlPoint ()
 
virtual void updateGradient ()
 

Protected Member Functions

void setupGui ()
 
void connectToSignals ()
 
virtual void insertNewControlPoint (double rangeStart, double rangeEnd, const QColor &color)
 
std::string colorStringFromColor (const QColor &color)
 
QList< QStandardItem * > modelRowFromAltitudeColor (double rangeStart, double rangeEnd, std::string color)
 
virtual void changeEvent (QEvent *event)
 

Protected Attributes

QString myRangeEndLabel
 
QString myRangeStartLabel
 
QColor myBackgroundColor
 
QAbstractItemDelegate * myColorDelegate
 
DtRangeEditorValueDelegate * myValueDelegate
 
QStandardItemModel * myControlPointModel
 
QGraphicsScene * myGradientScene
 
QTreeViewmyControlPointView
 
QGraphicsViewmyGradientView
 
QPushButtonmyAddControlPointButton
 
QPushButtonmyRemoveControlPointButton
 
makVrv::DtDemyDe
 

Additional Inherited Members

- Public Types inherited from makVrv::DtRangeEditorInterface
typedef std::vector< doubleControlPoint
 
typedef std::vector
< DtRangeEditorInterface::ControlPoint
Gradient
 
- Public Attributes inherited from makVrv::DtRangeEditorInterface
boost::signalslib::signal
< void(const
DtRangeEditorInterface::Gradient &)> 
signal_gradientChanged
 

Constructor & Destructor Documentation

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

CTOR.

virtual makVrv::DtRangeEditorWidget::~DtRangeEditorWidget ( )
virtual

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.

virtual void makVrv::DtRangeEditorWidget::addControlPoint ( const DtRangeEditorInterface::ControlPoint cp)
virtual

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.

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 ( )
virtualslot

Line up everything properly when first shown.

virtual void makVrv::DtRangeEditorWidget::insertNewControlPoint ( )
protectedvirtualslot

Insert a new control point at the selection Called when "add point" is pressed.

virtual void makVrv::DtRangeEditorWidget::removeSelectedControlPoint ( )
protectedvirtualslot

Remove control point at the selection Called when "delete point" is pressed.

virtual void makVrv::DtRangeEditorWidget::updateGradient ( )
protectedvirtualslot

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 
)
protectedvirtual

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)
protectedvirtual

Listens for enable/disable events and updates gradient.

Member Data Documentation

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
DtRangeEditorValueDelegate* makVrv::DtRangeEditorWidget::myValueDelegate
protected
QStandardItemModel* makVrv::DtRangeEditorWidget::myControlPointModel
protected
QGraphicsScene* makVrv::DtRangeEditorWidget::myGradientScene
protected
QTreeView* makVrv::DtRangeEditorWidget::myControlPointView
protected
QGraphicsView* makVrv::DtRangeEditorWidget::myGradientView
protected
QPushButton* makVrv::DtRangeEditorWidget::myAddControlPointButton
protected
QPushButton* makVrv::DtRangeEditorWidget::myRemoveControlPointButton
protected
makVrv::DtDe& makVrv::DtRangeEditorWidget::myDe
protected

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

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)