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

bool Q3MultiLineEdit::getMarkedRegion ( int *  line1,
int *  col1,
int *  line2,
int *  col2 
) const [protected]

If there is selected text, sets line1, col1, line2 and col2 to the start and end of the selected region and returns true. Returns false if there is no selected text.

Definition at line 179 of file q3multilineedit.cpp.

References Q3TextEdit::getSelection().

{
    int p1,c1, p2, c2;
    getSelection(&p1, &c1, &p2, &c2);
    if (p1 == -1 && c1 == -1 && p2 == -1 && c2 == -1)
        return false;
    if (line1)
        *line1 = p1;
    if (col1)
        *col1 = c1;
    if (line2)
        *line2 = p2;
    if (col2)
        *col2 = c2;
    return true;
}


Generated by  Doxygen 1.6.0   Back to index