Esempio 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;
}
Esempio 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;
}
Esempio n. 3
0
void YFileCursor::setSelectionEnd(qint64 end)
{
    m_length = end - charAddress();
}
Esempio n. 4
0
qint64 YFileCursor::selectionEnd() const
{
    return charAddress() + m_length;
}