Exemplo n.º 1
0
/*
`*  Do not modify this code.
 */
int main(void)
{
    printf("Int array addresses:\n");
    intAddress();

    printf("\n\nChar array addresses:\n");
    charAddress();

    printf("\n\nDouble array addresses:\n");
    doubleAddress();

    return 0;
}
Exemplo n.º 2
0
QTextCursor YFileCursor::qTextCursor(const YTextDocument * document) const
{
    if(isNull()) { return QTextCursor(); }

    int anchor = fileToDocPos(charAddress(), document);
    int position = fileToDocPos(selectionEnd(), document);

    if(position < anchor) { std::swap(position, anchor); }

    QTextCursor cursor(document->begin());
    cursor.setPosition(anchor);
    cursor.setPosition(position, QTextCursor::KeepAnchor);

    return cursor;
}
Exemplo n.º 3
0
void YFileCursor::setSelectionEnd(qint64 end)
{
    m_length = end - charAddress();
}
Exemplo n.º 4
0
qint64 YFileCursor::selectionEnd() const
{
    return charAddress() + m_length;
}