Example #1
0
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;
}
Example #2
0
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;
}
Example #3
0
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;
}
Example #4
0
void QwtPickerTracker::drawOverlay( QPainter *painter ) const
{
    painter->setPen( d_picker->trackerPen() );
    d_picker->drawTracker( painter );
}
Example #5
0
QRegion QwtPickerTracker::maskHint() const
{
    return d_picker->trackerRect( font() );
}
Example #6
0
void QwtPickerRubberband::drawOverlay( QPainter *painter ) const
{
    painter->setPen( d_picker->rubberBandPen() );
    d_picker->drawRubberBand( painter );
}
Example #7
0
QRegion QwtPickerRubberband::maskHint() const
{
    return d_picker->rubberBandMask();
}