Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.trolltech.qt.xmlpatterns
Class QSourceLocation

    java.lang.Object
      com.trolltech.qt.QSignalEmitter
          com.trolltech.qt.QtJambiObject
              com.trolltech.qt.xmlpatterns.QSourceLocation

All Implemented Interfaces:
  QtJambiInterface, java.lang.Cloneable

    public class QSourceLocation

extends QtJambiObject
implements java.lang.Cloneable

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)` This method returns the QSourceLocation instance pointed to by `nativePointer`.
`boolean` | `isNull()` Returns `true` if this `QSourceLocation` doesn't identify anything.
`long` | `line()` Returns the current line number.
`static QNativePointer` | `nativePointerArray(QSourceLocation[] array)` This function returns a QNativePointer that is pointing to the specified 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()` Returns a string representation of the `this QSourceLocation`.
`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

### QSourceLocation

    public QSourceLocation()

  Construct a `QSourceLocation` that doesn't identify anything at all.

  For a default constructed QSourceLocation(), `isNull()` returns `true`.

### QSourceLocation

    public QSourceLocation(QSourceLocation other)

  Constructs a `QSourceLocation` that is a copy of `other`.

### QSourceLocation

    public QSourceLocation(QUrl uri,
                           int line)

  Constructs a `QSourceLocation` with URI `u`, line `l` and column `c`.

### QSourceLocation

    public QSourceLocation(QUrl uri)

  Constructs a `QSourceLocation` with URI `u`, line `l` and column `c`.

### QSourceLocation

    public QSourceLocation(QUrl uri,
                           int line,
                           int column)

  Constructs a `QSourceLocation` with URI `u`, line `l` and column `c`.

Method Detail

### column

    public final long column()

  Returns the current column number. The column number refers to the count of characters, not bytes. The first column is column 1, not 0. The default value is -1, indicating the column number is unknown.

See also:
  `setColumn()`.

### isNull

    public final boolean isNull()

  Returns `true` if this `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.

### line

    public final long line()

  Returns the current line number. The first line number is 1, not 0. The default value is -1, indicating the line number is unknown.

See also:
  `setLine()`.

### setColumn

    public final void setColumn(long newColumn)

  Sets the column number to `newColumn`. 0 is an invalid column number. The first column number is 1.

See also:
  `column()`.

### setLine

    public final void setLine(long newLine)

  Sets the line number to `newLine`. 0 is an invalid line number. The first line number is 1.

See also:
  `line()`.

### setUri

    public final void setUri(QUrl newUri)

  Sets the URI to `newUri`.

See also:
  `uri()`.

### uri

    public final QUrl uri()

  Returns the resource that this `QSourceLocation` refers to. For example, the resource could be a file in the local file system, if the URI scheme is `file`.

See also:
  `setUri()`.

### fromNativePointer

    public static QSourceLocation fromNativePointer(QNativePointer nativePointer)

  This method returns the QSourceLocation instance pointed to by `nativePointer`.

### nativePointerArray

    public static QNativePointer nativePointerArray(QSourceLocation[] array)

  This function returns a QNativePointer that is pointing to the specified QSourceLocation array.

### toString

    public java.lang.String toString()

  Returns a string representation of the `this QSourceLocation`.

  Overrides:
    `toString` in class `java.lang.Object`

### clone

    public QSourceLocation clone()

  This method is reimplemented for internal reasons

  Overrides:
    `clone` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD