Logo Search packages:      
Sourcecode: qt4-x11 version File versions

QVariant QPlainTextEdit::inputMethodQuery ( Qt::InputMethodQuery  property  )  const [protected, virtual]

Reimplemented from QWidget.

Definition at line 2084 of file qplaintextedit.cpp.

References QVariant::toPoint(), QPointF::toPoint(), QVariant::toPointF(), QRectF::toRect(), QVariant::toRect(), QVariant::toRectF(), QRect::translated(), and QVariant::type().

{
    Q_D(const QPlainTextEdit);
    QVariant v = d->control->inputMethodQuery(property);
    const QPoint offset(-d->horizontalOffset(), -0);
    if (v.type() == QVariant::RectF)
        v = v.toRectF().toRect().translated(offset);
    else if (v.type() == QVariant::PointF)
        v = v.toPointF().toPoint() + offset;
    else if (v.type() == QVariant::Rect)
        v = v.toRect().translated(offset);
    else if (v.type() == QVariant::Point)
        v = v.toPoint() + offset;
    return v;
}


Generated by  Doxygen 1.6.0   Back to index