#include <OSGQTypedFieldValueLabel.h>
Inheritance diagram for osg::QTypedFieldValueLabel< FieldContentsTypeT >:

Public Types | |
| typedef FieldContentsTypeT | FieldContentsType |
Public Member Functions | |
| virtual void | paint (QPainter *pPainter, const QColorGroup &colGrp, const QRect &rect) |
| virtual QSize | sizeHint (void) |
| virtual QSize | minimumSizeHint (void) |
| virtual void | valueChanged (void) |
| void | setIndex (UInt32 uiIndex) |
| UInt32 | getIndex (void) const |
Static Public Member Functions | |
| static QFieldValueLabelBase * | create (QFieldViewBase *pView, UInt32 uiIndex) |
Protected Member Functions | |
| const QString & | getCachedValue (void) |
| const QSize & | getCachedSize (void) |
| QFieldViewBase * | getFieldView (void) |
| const QFieldViewBase * | getFieldView (void) const |
| FieldContainerPtr & | getFieldContainer (void) |
| const FieldContainerPtr & | getFieldContainer (void) const |
| UInt32 | getFieldId (void) const |
| UInt32 | getAspect (void) const |
| Field * | getFieldPtr (void) |
| const Field * | getFieldPtr (void) const |
Private Types | |
| typedef QGenericFieldValueLabel | Inherited |
Definition at line 55 of file OSGQTypedFieldValueLabel.h.
|
|||||
|
Definition at line 59 of file OSGQTypedFieldValueLabel.h. |
|
|||||
|
Reimplemented from osg::QGenericFieldValueLabel. Definition at line 62 of file OSGQTypedFieldValueLabel.h. |
|
||||||||||||
|
Create function, which is registered at the QFieldLabelFactory. Definition at line 108 of file OSGQFieldValueLabel.cpp. References osg::QGenericFieldValueLabel::QGenericFieldValueLabel(). 00109 { 00110 return new QGenericFieldValueLabel(pView, uiIndex); 00111 }
|
|
||||||||||||||||
|
Draws the text representation of a field value. Implements osg::QFieldValueLabelBase. Definition at line 124 of file OSGQFieldValueLabel.cpp. References osg::QGenericFieldValueLabel::getCachedValue(), and osg::QGenericFieldValueLabel::sizeHint(). 00126 { 00127 if(!rect.isValid()) 00128 return; 00129 00130 pPainter->save(); 00131 00132 pPainter->setPen (colGrp.text()); 00133 pPainter->setBrush(colGrp.base()); 00134 00135 if( (rect.width() < sizeHint().width()) || 00136 (rect.height() < sizeHint().height()) ) 00137 { 00138 pPainter->drawRect(rect); 00139 00140 pPainter->drawText(rect, AlignVCenter, getCachedValue()); 00141 } 00142 else 00143 { 00144 QRect rectText(rect.x() +4, rect.y() +4, 00145 rect.width()-8, rect.height()-8 ); 00146 00147 pPainter->drawRect(rect); 00148 00149 pPainter->drawText(rectText, AlignVCenter, getCachedValue()); 00150 } 00151 00152 pPainter->restore(); 00153 }
|
|
|
Get the best size for this label. Implements osg::QFieldValueLabelBase. Definition at line 159 of file OSGQFieldValueLabel.cpp. References osg::QGenericFieldValueLabel::getCachedSize(). Referenced by osg::QGenericFieldValueLabel::paint(). 00160 { 00161 return QSize(getCachedSize().width() + 8, 00162 getCachedSize().height() + 8); 00163 }
|
|
|
Get the minimal size for this label. Implements osg::QFieldValueLabelBase. Definition at line 169 of file OSGQFieldValueLabel.cpp. References osg::QGenericFieldValueLabel::getCachedSize(). 00170 { 00171 return getCachedSize(); 00172 }
|
|
|
Tell the label, that the shown field's value has changed. Implements osg::QFieldValueLabelBase. Definition at line 178 of file OSGQFieldValueLabel.cpp. References osg::QGenericFieldValueLabel::_bCacheValid. 00179 { 00180 _bCacheValid = false; 00181 }
|
|
|
Definition at line 184 of file OSGQFieldValueLabel.cpp. References osg::QGenericFieldValueLabel::_strCachedVal, and osg::QGenericFieldValueLabel::updateCache(). Referenced by osg::QGenericFieldValueLabel::paint(). 00185 { 00186 updateCache(); 00187 00188 return _strCachedVal; 00189 }
|
|
|
Definition at line 192 of file OSGQFieldValueLabel.cpp. References osg::QGenericFieldValueLabel::_cachedSize, and osg::QGenericFieldValueLabel::updateCache(). Referenced by osg::QGenericFieldValueLabel::minimumSizeHint(), and osg::QGenericFieldValueLabel::sizeHint(). 00193 { 00194 updateCache(); 00195 00196 return _cachedSize; 00197 }
|
|
|
Definition at line 81 of file OSGQFieldValueLabel.cpp. References osg::QFieldValueLabelBase::_uiIndex, and osg::QFieldValueLabelBase::valueChanged(). Referenced by osg::QMFieldView::acquireLabel(). 00082 { 00083 _uiIndex = uiIndex; 00084 00085 valueChanged(); 00086 }
|
|
|
|
Definition at line 52 of file OSGQFieldValueLabel.inl. References osg::QFieldValueLabelBase::_pView. Referenced by osg::QVectorFieldValueLabel< VectorTypeT >::updateCache(), osg::QPointFieldValueLabel< PointTypeT >::updateCache(), osg::QMatrixFieldValueLabel< MatrixTypeT >::updateCache(), and osg::QGenericFieldValueLabel::updateCache(). 00053 { 00054 return _pView; 00055 }
|
|
|
Definition at line 58 of file OSGQFieldValueLabel.inl. References osg::QFieldValueLabelBase::_pView. 00059 { 00060 return _pView; 00061 }
|
|
|
Definition at line 64 of file OSGQFieldValueLabel.inl. References osg::QFieldValueLabelBase::_pView, and osg::QFieldViewBase::getFieldContainer(). 00065 { 00066 return _pView->getFieldContainer(); 00067 }
|
|
|
Definition at line 70 of file OSGQFieldValueLabel.inl. References osg::QFieldValueLabelBase::_pView, and osg::QFieldViewBase::getFieldContainer(). 00071 { 00072 return _pView->getFieldContainer(); 00073 }
|
|
|
Definition at line 76 of file OSGQFieldValueLabel.inl. References osg::QFieldValueLabelBase::_pView, and osg::QFieldViewBase::getFieldId(). 00077 { 00078 return _pView->getFieldId(); 00079 }
|
|
|
Definition at line 82 of file OSGQFieldValueLabel.inl. References osg::QFieldValueLabelBase::_pView, and osg::QFieldViewBase::getAspect(). 00083 { 00084 return _pView->getAspect(); 00085 }
|
|
|
Definition at line 88 of file OSGQFieldValueLabel.inl. References osg::QFieldValueLabelBase::_pView, and osg::QFieldViewBase::getFieldPtr(). Referenced by osg::QVectorFieldValueLabel< VectorTypeT >::updateCache(), osg::QPointFieldValueLabel< PointTypeT >::updateCache(), osg::QMatrixFieldValueLabel< MatrixTypeT >::updateCache(), and osg::QGenericFieldValueLabel::updateCache(). 00089 { 00090 return _pView->getFieldPtr(); 00091 }
|
|
|
Definition at line 94 of file OSGQFieldValueLabel.inl. References osg::QFieldValueLabelBase::_pView, and osg::QFieldViewBase::getFieldPtr(). 00095 { 00096 return _pView->getFieldPtr(); 00097 }
|
1.4.3