static QwtArray<QwtPicker *> activePickers(QWidget *w) { QwtArray<QwtPicker *> pickers; #if QT_VERSION >= 0x040000 QObjectList children = w->children(); for ( int i = 0; i < children.size(); i++ ) { QObject *obj = children[i]; if ( obj->inherits("QwtPicker") ) { QwtPicker *picker = (QwtPicker *)obj; if ( picker->isEnabled() ) pickers += picker; } } #else QObjectList *children = (QObjectList *)w->children(); if ( children ) { for ( QObjectListIterator it(*children); it.current(); ++it ) { QObject *obj = (QObject *)it.current(); if ( obj->inherits("QwtPicker") ) { QwtPicker *picker = (QwtPicker *)obj; if ( picker->isEnabled() ) { pickers.resize(pickers.size() + 1); pickers[int(pickers.size()) - 1] = picker; } } } } #endif return pickers; }
static QVector<QwtPicker *> qwtActivePickers( QWidget *w ) { QVector<QwtPicker *> pickers; QObjectList children = w->children(); for ( int i = 0; i < children.size(); i++ ) { QwtPicker *picker = qobject_cast<QwtPicker *>( children[i] ); if ( picker && picker->isEnabled() ) pickers += picker; } return pickers; }
static QVector<QwtPicker *> activePickers( QWidget *w ) { QVector<QwtPicker *> pickers; QObjectList children = w->children(); for ( int i = 0; i < children.size(); i++ ) { QObject *obj = children[i]; if ( obj->inherits( "QwtPicker" ) ) { QwtPicker *picker = ( QwtPicker * )obj; if ( picker->isEnabled() ) pickers += picker; } } return pickers; }
void QwtPickerTracker::drawOverlay( QPainter *painter ) const { painter->setPen( d_picker->trackerPen() ); d_picker->drawTracker( painter ); }
QRegion QwtPickerTracker::maskHint() const { return d_picker->trackerRect( font() ); }
void QwtPickerRubberband::drawOverlay( QPainter *painter ) const { painter->setPen( d_picker->rubberBandPen() ); d_picker->drawRubberBand( painter ); }
QRegion QwtPickerRubberband::maskHint() const { return d_picker->rubberBandMask(); }