|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.xmlpatterns.QSourceLocation
public class QSourceLocation
The QSourceLocation
class Identifies a location in a resource by URI, line, and column. QSourceLocation
is a simple value based class that has three properties, uri()
, line()
, and column()
, that, taken together, identify a certain point in a resource, e.g., a file or an in-memory document.
line()
and column()
refer to character counts (not byte counts), and they both start from 1, as opposed to 0.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
---|
QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9 |
Constructor Summary | |
---|---|
QSourceLocation()
Construct a QSourceLocation that doesn't identify anything at all. |
|
QSourceLocation(QSourceLocation other)
Constructs a QSourceLocation that is a copy of other. |
|
QSourceLocation(QUrl uri)
Constructs a QSourceLocation with URI u, line l and column c. |
|
QSourceLocation(QUrl uri,
int line)
Constructs a QSourceLocation with URI u, line l and column c. |
|
QSourceLocation(QUrl uri,
int line,
int column)
Constructs a QSourceLocation with URI u, line l and column c. |
Method Summary | |
---|---|
QSourceLocation |
clone()
This method is reimplemented for internal reasons |
long |
column()
Returns the current column number. |
static QSourceLocation |
fromNativePointer(QNativePointer nativePointer)
|
boolean |
isNull()
Returns true if this QSourceLocation doesn't identify anything. |
long |
line()
Returns the current line number. |
static QNativePointer |
nativePointerArray(QSourceLocation[] array)
|
void |
setColumn(long newColumn)
Sets the column number to newColumn. |
void |
setLine(long newLine)
Sets the line number to newLine. |
void |
setUri(QUrl newUri)
Sets the URI to newUri. |
java.lang.String |
toString()
|
QUrl |
uri()
Returns the resource that this QSourceLocation refers to. |
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Constructor Detail |
---|
public QSourceLocation()
QSourceLocation
that doesn't identify anything at all. For a default constructed QSourceLocation(), isNull()
returns true.
public QSourceLocation(QSourceLocation other)
QSourceLocation
that is a copy of other.
public QSourceLocation(QUrl uri, int line)
QSourceLocation
with URI u, line l and column c.
public QSourceLocation(QUrl uri)
QSourceLocation
with URI u, line l and column c.
public QSourceLocation(QUrl uri, int line, int column)
QSourceLocation
with URI u, line l and column c.
Method Detail |
---|
public final long column()
setColumn()
.
public final boolean isNull()
QSourceLocation
doesn't identify anything. For a default constructed QSourceLocation
, this function returns true. The same applies for any other QSourceLocation
whose uri()
is invalid.
public final long line()
setLine()
.
public final void setColumn(long newColumn)
column()
.
public final void setLine(long newLine)
line()
.
public final void setUri(QUrl newUri)
uri()
.
public final QUrl uri()
QSourceLocation
refers to. For example, the resource could be a file in the local file system, if the URI scheme is file. setUri()
.
public static QSourceLocation fromNativePointer(QNativePointer nativePointer)
public static QNativePointer nativePointerArray(QSourceLocation[] array)
public java.lang.String toString()
toString
in class java.lang.Object
public QSourceLocation clone()
clone
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |