内容表

QSourceLocation

概要

函数

详细描述

PySide.QtXmlPatterns.QSourceLocation class identifies a location in a resource by URI, line, and column.

PySide.QtXmlPatterns.QSourceLocation is a simple value based class that has three properties, PySide.QtXmlPatterns.QSourceLocation.uri() , PySide.QtXmlPatterns.QSourceLocation.line() ,和 PySide.QtXmlPatterns.QSourceLocation.column() , that, taken together, identify a certain point in a resource, e.g., a file or an in-memory document.

PySide.QtXmlPatterns.QSourceLocation.line() and PySide.QtXmlPatterns.QSourceLocation.column() refer to character counts (not byte counts), and they both start from 1, as opposed to 0.

class PySide.QtXmlPatterns. QSourceLocation
class PySide.QtXmlPatterns. QSourceLocation ( other )
class PySide.QtXmlPatterns. QSourceLocation ( uri [ , line=-1 [ , column=-1 ] ] )
参数:

构造 PySide.QtXmlPatterns.QSourceLocation that doesn't identify anything at all.

For a default constructed PySide.QtXmlPatterns.QSourceLocation.QSourceLocation() , PySide.QtXmlPatterns.QSourceLocation.isNull() 返回 true .

构造 PySide.QtXmlPatterns.QSourceLocation that is a copy of other .

构造 PySide.QtXmlPatterns.QSourceLocation with URI u , line l and column c .

PySide.QtXmlPatterns.QSourceLocation. column ( )
返回类型: PySide.QtCore.qint64

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.

PySide.QtXmlPatterns.QSourceLocation. isNull ( )
返回类型: PySide.QtCore.bool

返回 true 若此 PySide.QtXmlPatterns.QSourceLocation doesn't identify anything.

For a default constructed PySide.QtXmlPatterns.QSourceLocation ,此函数返回 true . The same applies for any other PySide.QtXmlPatterns.QSourceLocation whose PySide.QtXmlPatterns.QSourceLocation.uri() is invalid.

PySide.QtXmlPatterns.QSourceLocation. line ( )
返回类型: PySide.QtCore.qint64

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

PySide.QtXmlPatterns.QSourceLocation. __ne__ ( other )
参数: other PySide.QtXmlPatterns.QSourceLocation
返回类型: PySide.QtCore.bool

Returns the opposite of applying operator==() for this PySide.QtXmlPatterns.QXmlName and other .

PySide.QtXmlPatterns.QSourceLocation. __eq__ ( other )
参数: other PySide.QtXmlPatterns.QSourceLocation
返回类型: PySide.QtCore.bool

返回 true,若此 PySide.QtXmlPatterns.QSourceLocation is identical to other .

Two PySide.QtXmlPatterns.QSourceLocation instances are equal if their PySide.QtXmlPatterns.QSourceLocation.uri() , PySide.QtXmlPatterns.QSourceLocation.line() and PySide.QtXmlPatterns.QSourceLocation.column() are equal.

PySide.QtXmlPatterns.QSourceLocation instances for which PySide.QtXmlPatterns.QSourceLocation.isNull() returns true are considered equal.

PySide.QtXmlPatterns.QSourceLocation. setColumn ( newColumn )
参数: newColumn PySide.QtCore.qint64

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

PySide.QtXmlPatterns.QSourceLocation. setLine ( newLine )
参数: newLine PySide.QtCore.qint64

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

PySide.QtXmlPatterns.QSourceLocation. setUri ( newUri )
参数: newUri PySide.QtCore.QUrl

Sets the URI to newUri .

PySide.QtXmlPatterns.QSourceLocation. uri ( )
返回类型: PySide.QtCore.QUrl

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