![]() | Home · All Classes · Modules |
The QSourceLocation class is used to identify a location in a resource, using a URI, line number and column number. More...
The QSourceLocation class is used to identify a location in a resource, using a URI, line number and column number.
QSourceLocation is a simple value based class that has three properties, uri(), line(), and column(), that together identifies a certain point in a resource, such as a file or an in-memory document.
line() and column() refer to character count(not for instance byte count) and they both starts from 1, as opposed to 0.
Construct a QSourceLocation that doesn't identify anything at all.
For a default constructed QSourceLocation(), isNull() returns true.
Constructs a QSourceLocation instance that is a copy of other.
Constructs a QSourceLocation with URI u, line l and column c.
Returns the current column number. The column number refers to the count of characters, not bytes.
The first column has number 1, not 0.
The default value is -1, signalling that the column number is unknown.
See also setColumn().
Returns true if this QSourceLocation doesn't identify anything.
For instance, for a default constructed QSourceLocation this function returns true. The same applies for any other QSourceLocation whose uri() is invalid.
Returns the current line number.
The first line number is 1, not 0.
The default value is -1, signalling that the line number is unknown.
See also setLine().
Sets the column number to newColumn. 0 is an invalid column number. The first column number is 1.
See also column().
Sets the line number to newLine.
See also line().
Sets the URI to newUri.
See also uri().
Returns the resource that this QSourceLocation refers to. For instance, this could be a file on the local file system, if the URI scheme is file.
See also setUri().
PyQt 4.4.2 for X11 | Copyright © Riverbank Computing Ltd and Trolltech AS 2008 | Qt 4.4.0 |