group lveditqmljs

Library used for extending and interacting with qml projects.

Summary

Members Descriptions
classlv::DocumentQmlInfo::ValueReference Contains a reference to a value within a parsed qml document.
classlv::DocumentQmlInfo::ASTReference Reference to an AST node within the parsed qml document.
classlv::DocumentQmlInfo::Message Message information containing parsing status.
classlv::DocumentQmlInfo::Import Import data associated with a lv::DocumentQmlInfo.
classlv::DocumentQmlInfo Contains parsed information about a Project qml document.
classlv::DocumentQmlValueObjects::RangeItem Base range item acting as a node in the hierarchy.
classlv::DocumentQmlValueObjects::RangeProperty Property range item inside the ierarchy.
classlv::DocumentQmlValueObjects::RangeObject Object range item inside the hierarchy.
classlv::DocumentQmlValueObjects Contains the ierarchy of Qml objects and a reference to their AST.
classlv::LanguageQmlHandler Main code handler for the qml extension.
classlv::ProjectQmlExtension Main object used throughout qml extension plugin.
classlv::ProjectQmlScope Contains all the loaded plugins of a project.
classlv::QmlCompletionContext Contains a qml code completion context.
classlv::QmlDeclaration Holds a qml property declaration.
classlv::QmlEditFragment An editing fragment for a lv::ProjectDocument.

class lv::DocumentQmlInfo::ValueReference

Contains a reference to a value within a parsed qml document.

Summary

Members Descriptions
public const QmlJS::Value *value Internal reference to the value.
public constDocumentQmlInfo*parent Reference to the parent.
public inlineValueReference(const QmlJS::Value * val,constDocumentQmlInfo* p) ValueReference constructor.
public inlineValueReference() ValueReference destructor.

Members

public const QmlJS::Value *value

Internal reference to the value.

public constDocumentQmlInfo*parent

Reference to the parent.

public inlineValueReference(const QmlJS::Value * val,constDocumentQmlInfo* p)

ValueReference constructor.

public inlineValueReference()

ValueReference destructor.

class lv::DocumentQmlInfo::ASTReference

Reference to an AST node within the parsed qml document.

Summary

Members Descriptions
public QmlJS::AST::Node *node Internal reference to the AST node.
public inlineASTReference(QmlJS::AST::Node * n) ASTReference constructor.
public inlineASTReference() ASTReference destructor.

Members

public QmlJS::AST::Node *node

Internal reference to the AST node.

public inlineASTReference(QmlJS::AST::Node * n)

ASTReference constructor.

public inlineASTReference()

ASTReference destructor.

class lv::DocumentQmlInfo::Message

Message information containing parsing status.

Summary

Members Descriptions
publicSeveritykind Message severity level.
public intposition Position the message was generated at.
public intline Line the message was generated at.
public QStringtext Message text.
public inlineMessage(Severitypkind,int pposition,int pline,const QString & ptext) DocumentQmlInfo::Message constructor.
enumSeverity Severity of a message.

Members

publicSeveritykind

Message severity level.

public intposition

Position the message was generated at.

public intline

Line the message was generated at.

public QStringtext

Message text.

public inlineMessage(Severitypkind,int pposition,int pline,const QString & ptext)

DocumentQmlInfo::Message constructor.

enumSeverity

Values Descriptions
Hint Lowest severity level.
MaybeWarning Might be a warning.
Warning Warning Level.
MaybeError Might be an error.
Error Error level.

Severity of a message.

class lv::DocumentQmlInfo::Import

Import data associated with a lv::DocumentQmlInfo.

Summary

Members Descriptions
publicImport(TypeimportType,const QString & uri,const QString & as,int vMajor,int vMinor,Document::Locationlocation) Import constructor.
publicImport(TypeimportType,const QString & uri,const QString & relativeUri,const QString & as,int vMajor,int vMinor,Document::Locationlocation)
public inline voidupdateUri(const QString & uri) Updates the import uri for this import.
public inline voidsetImportType(TypeimportType)
public inlineTypeimportType() const Returns the import type for this import.
public inline const QString &uri() const Returns the path of this import.
public inline const QString &relativeUri() const Returns the import relative uri.
public inline const QString &as() const Returns the namespace this import was declared in.
public inline intversionMajor() const Returns the major version of this import.
public inline intversionMinor() const Returns the minor version of this import.
public inline boolisVersionValid() const Returns true if this version is valid, false otherwise.
public QStringtoString() const
public QStringversionString() const
public voidsetLocation(constDocument::Location& location)
public constDocument::Location&location() const
public inline booloperator==(constImport& other) const Returns true if this object is the same as other, false otherwise.
enumType Import type

Members

publicImport(TypeimportType,const QString & uri,const QString & as,int vMajor,int vMinor,Document::Locationlocation)

Import constructor.

Takes an importType, the path of the import, the as namespace in which to import for this document and the two versions: vMajor, vMinor

publicImport(TypeimportType,const QString & uri,const QString & relativeUri,const QString & as,int vMajor,int vMinor,Document::Locationlocation)

public inline voidupdateUri(const QString & uri)

Updates the import uri for this import.

public inline voidsetImportType(TypeimportType)

public inlineTypeimportType() const

Returns the import type for this import.

public inline const QString &uri() const

Returns the path of this import.

public inline const QString &relativeUri() const

Returns the import relative uri.

public inline const QString &as() const

Returns the namespace this import was declared in.

public inline intversionMajor() const

Returns the major version of this import.

public inline intversionMinor() const

Returns the minor version of this import.

public inline boolisVersionValid() const

Returns true if this version is valid, false otherwise.

public QStringtoString() const

public QStringversionString() const

public voidsetLocation(constDocument::Location& location)

public constDocument::Location&location() const

public inline booloperator==(constImport& other) const

Returns true if this object is the same as other, false otherwise.

enumType

Values Descriptions
Invalid Invalid type
Library Library based import with qmldir file.
Directory Directory based import
ImplicitDirectory Implicit import
File Js file import
UnknownFile Unknown file import

Import type

class lv::DocumentQmlInfo

Contains parsed information about a Project qml document.

Summary

Members Descriptions
public QStringListextractIds() const Extract the declared id's within a qml document.
public constValueReferencerootObject() Return a reference to the root object of this qml document.
public constValueReferencevalueForId(const QString & id) const Returns a reference to the value represented by the given id.
public lv::QmlTypeInfo::PtrextractValueObject(constValueReference& value,ValueReference* parent) const Extracts a usable object given a value reference.
public lv::QmlTypeInfo::PtrextractValueObjectWithExport(constValueReference& value,const QString & componentName,const QString & libraryPath) const
public QStringListextractTypeName(constValueReference& value) const Extract the name of the type given by this value reference.
public voidextractTypeNameRange(constValueReference& value,int & begin,int & end) const Extract the range of the type given by a value reference.
public voidextractRange(constValueReference& value,int & begin,int & end) Extract the full range given by a value reference.
public voidcreateRanges() Finds the ranges within this document.
public constValueReferencevalueAtPosition(int position) const Find the value reference at a given position.
public constValueReferencevalueAtPosition(int position,int & begin,int & end) const Find the value reference and range at a given position.
public constASTReferenceastObjectAtPosition(int position) Returns the reference to an AST node at a specified position.
public QStringpropertySourceFromObjectId(const QString & componentId,const QString & propertyName)
public boolisValueNull(constValueReference& vr) const Check wether the value reference is null.
public boolisParsedCorrectly() const Check wether the document was parsed correctly after calling the lv::DocumentQmlInfo::parse() method.
public boolparse(const QString & source) Parses the source code to an AST form.
public const QList<DocumentQmlInfo::Message> &diagnostics() const
public QStringpath() const Return the path of the Document.
public QStringcomponentName() const Return the component name represented by this Document.
public QStringsource() const
public voidtryExtractImports() Tries to extract imports from a document that was not correcly parsed.
publicDocumentQmlValueObjects::PtrcreateObjects() const Visit the AST and create the objects defined in this document.
publicDocumentQmlValueObjects::PtrcreateObjects(constASTReference& ast) const Visit the AST from the given ast node and create the objects defined within.
public~DocumentQmlInfo() DocumentQmlInfo destructor.
public voidupdateImportType(const QString & uri,Import::Typetype) Updates the import at the given uri type.
public boolhasImport(constImport& key) const
public boolhasImport(const QString & importUri) const
public boolhasImportAs(const QString & asKey) const
public inttotalImports() const Returns the total number of imports for this lv::ProjectDocument.
public constImportList&imports() const Returns the ImportList associated with this object.
public voidtransferImports(constImportList& imports)
public voidaddImport(constImport& key) Adds an import path to a given key.
protectedDocumentQmlInfo(const QString & fileName) DocumentQmlInfo constructor.
enumDialect Dialect used by the source code of a file.
typedefImportList List of import entries
typedefConstPtr Constat SharedPointer to DocumentqmlInfo.
typedefPtr SharedPointer to DocumentqmlInfo.

Members

public QStringListextractIds() const

Extract the declared id's within a qml document.

public constValueReferencerootObject()

Return a reference to the root object of this qml document.

public constValueReferencevalueForId(const QString & id) const

Returns a reference to the value represented by the given id.

public lv::QmlTypeInfo::PtrextractValueObject(constValueReference& value,ValueReference* parent) const

Extracts a usable object given a value reference.

For example, you can use this class together with lv::DocumentQmlInfo::valueForId() to inspect a specific object defined with an id within the qml document.

public lv::QmlTypeInfo::PtrextractValueObjectWithExport(constValueReference& value,const QString & componentName,const QString & libraryPath) const

public QStringListextractTypeName(constValueReference& value) const

Extract the name of the type given by this value reference.

public voidextractTypeNameRange(constValueReference& value,int & begin,int & end) const

Extract the range of the type given by a value reference.

begin and end will be populated with the given range, or -1 if the range cannot be extracted

public voidextractRange(constValueReference& value,int & begin,int & end)

Extract the full range given by a value reference.

begin and end will be populated with the given range, or -1 if the range cannot be extracted

public voidcreateRanges()

Finds the ranges within this document.

public constValueReferencevalueAtPosition(int position) const

Find the value reference at a given position.

public constValueReferencevalueAtPosition(int position,int & begin,int & end) const

Find the value reference and range at a given position.

The begin and end arguments will be populated with the range positino

public constASTReferenceastObjectAtPosition(int position)

Returns the reference to an AST node at a specified position.

public QStringpropertySourceFromObjectId(const QString & componentId,const QString & propertyName)

public boolisValueNull(constValueReference& vr) const

Check wether the value reference is null.

Returns

true if vr is null, false otherwise

public boolisParsedCorrectly() const

Check wether the document was parsed correctly after calling the lv::DocumentQmlInfo::parse() method.

Returns

true if it was, false otherwise

public boolparse(const QString & source)

Parses the source code to an AST form.

Returns

True if the parse went correctly, false otherwise

public const QList<DocumentQmlInfo::Message> &diagnostics() const

public QStringpath() const

Return the path of the Document.

public QStringcomponentName() const

Return the component name represented by this Document.

public QStringsource() const

public voidtryExtractImports()

Tries to extract imports from a document that was not correcly parsed.

publicDocumentQmlValueObjects::PtrcreateObjects() const

Visit the AST and create the objects defined in this document.

Returns

A pointer to the lv::DocumentQmlValueObjects

publicDocumentQmlValueObjects::PtrcreateObjects(constASTReference& ast) const

Visit the AST from the given ast node and create the objects defined within.

Returns

A pointer to the lv::DocumentQmlValueObjects

public~DocumentQmlInfo()

DocumentQmlInfo destructor.

public voidupdateImportType(const QString & uri,Import::Typetype)

Updates the import at the given uri type.

public boolhasImport(constImport& key) const

public boolhasImport(const QString & importUri) const

public boolhasImportAs(const QString & asKey) const

public inttotalImports() const

Returns the total number of imports for this lv::ProjectDocument.

public constImportList&imports() const

Returns the ImportList associated with this object.

public voidtransferImports(constImportList& imports)

public voidaddImport(constImport& key)

Adds an import path to a given key.

protectedDocumentQmlInfo(const QString & fileName)

DocumentQmlInfo constructor.

This constructor is private. Use lv::DocumentQmlInfo::create() function.

enumDialect

Values Descriptions
Unknown Unknown dialect.
Javascript Javascript dialect.
Qml Qml dialect.
QmlTypeInfo QmlTypeInfo dialect.
QmlProject QmlProject dialect.
Json Json dialect.

Dialect used by the source code of a file.

typedefImportList

List of import entries

typedefConstPtr

Constat SharedPointer to DocumentqmlInfo.

typedefPtr

SharedPointer to DocumentqmlInfo.

class lv::DocumentQmlValueObjects::RangeItem

Base range item acting as a node in the hierarchy.

Summary

Members Descriptions
public inline virtual~RangeItem()
public RangeTyperangeType() const
public QmlJS::AST::Node *getAst() Returns internal AST node.
publicRangeItem*getParent() Returns the parent of this item, or nullptr if there isn't any.
public voidappendObject(RangeObject* child) Appends an object to this item.
public inline virtual voidappendProperty(RangeProperty*) Appends a property to this item.
enumRangeType

Members

public inline virtual~RangeItem()

public RangeTyperangeType() const

public QmlJS::AST::Node *getAst()

Returns internal AST node.

publicRangeItem*getParent()

Returns the parent of this item, or nullptr if there isn't any.

public voidappendObject(RangeObject* child)

Appends an object to this item.

public inline virtual voidappendProperty(RangeProperty*)

Appends a property to this item.

enumRangeType

Values Descriptions
Property
Object

class lv::DocumentQmlValueObjects::RangeProperty

class lv::DocumentQmlValueObjects::RangeProperty
  : public lv::DocumentQmlValueObjects::RangeItem

Property range item inside the ierarchy.

Summary

Members Descriptions
public QmlJS::AST::Node *ast Internal AST node.
publicRangeItem*parent Parent of this item.
publicRangeObject*child Child object of this property if it has any.
public intbegin Start range of this property.
public intpropertyEnd Returns the end of this property's identifier declaration.
public intvalueBegin Returns the starting position of this property's value declaration.
public intend Returns the end of this property.
public inlineRangeProperty()
public inline~RangeProperty()
public inline virtual voidappendObject(RangeObject* object) Sets the value of this property to the specified object.
public inline virtual RangeTyperangeType() const
public inline virtual QmlJS::AST::Node *getAst() Returns internal AST node.
public inline virtualRangeItem*getParent() Returns the parent of this item, or nullptr if there isn't any.
public QStringListname() const Returns the name chain of this property.
public QStringListobject() const Returns the declared object chain this property belongs to.
public QStringtype() const Returns the declared type of this property if it has any.
public boolhasType() const Returns true if this property's type was declared within this document, false otherwise.

Members

public QmlJS::AST::Node *ast

Internal AST node.

publicRangeItem*parent

Parent of this item.

publicRangeObject*child

Child object of this property if it has any.

public intbegin

Start range of this property.

public intpropertyEnd

Returns the end of this property's identifier declaration.

public intvalueBegin

Returns the starting position of this property's value declaration.

public intend

Returns the end of this property.

public inlineRangeProperty()

public inline~RangeProperty()

public inline virtual voidappendObject(RangeObject* object)

Sets the value of this property to the specified object.

public inline virtual RangeTyperangeType() const

public inline virtual QmlJS::AST::Node *getAst()

Returns internal AST node.

public inline virtualRangeItem*getParent()

Returns the parent of this item, or nullptr if there isn't any.

public QStringListname() const

Returns the name chain of this property.

For example

border.size : 20 // will return border.size

public QStringListobject() const

Returns the declared object chain this property belongs to.

Returns the object type chain for this property.

public QStringtype() const

Returns the declared type of this property if it has any.

Returns the type of this property.

public boolhasType() const

Returns true if this property's type was declared within this document, false otherwise.

Checks wether this property was declared with a type.

Returns

True on success, false otherwise

class lv::DocumentQmlValueObjects::RangeObject

class lv::DocumentQmlValueObjects::RangeObject
  : public lv::DocumentQmlValueObjects::RangeItem

Object range item inside the hierarchy.

Summary

Members Descriptions
public QmlJS::AST::Node *ast Internal AST node.
publicRangeItem*parent Parent of this object.
public QList<RangeObject* >children Children for this object.
public QList<RangeProperty* >properties Properties for this obejct.
public intbegin Start position for this object.
public intend End position for this object.
public intidentifierEnd
public inlineRangeObject()
public inline~RangeObject()
public inline virtual RangeTyperangeType() const
public inline virtual voidappendObject(RangeObject* child) Appends a child object to this object.
public inline virtual voidappendProperty(RangeProperty* property) Appends a property to this object.
public inline virtual QmlJS::AST::Node *getAst() Returns internal AST node.
public inline virtualRangeItem*getParent() Returns the parent of this object, or nullptr if there isn't any.

Members

public QmlJS::AST::Node *ast

Internal AST node.

publicRangeItem*parent

Parent of this object.

public QList<RangeObject* >children

Children for this object.

public QList<RangeProperty* >properties

Properties for this obejct.

public intbegin

Start position for this object.

public intend

End position for this object.

public intidentifierEnd

public inlineRangeObject()

public inline~RangeObject()

public inline virtual RangeTyperangeType() const

public inline virtual voidappendObject(RangeObject* child)

Appends a child object to this object.

public inline virtual voidappendProperty(RangeProperty* property)

Appends a property to this object.

public inline virtual QmlJS::AST::Node *getAst()

Returns internal AST node.

public inline virtualRangeItem*getParent()

Returns the parent of this object, or nullptr if there isn't any.

class lv::DocumentQmlValueObjects

Contains the ierarchy of Qml objects and a reference to their AST.

This class can be used to extract parsed objects and their properties using their range and position in code.

Summary

Members Descriptions
public~DocumentQmlValueObjects() DocumentQmlValueObjects destructor.
public inlineRangeObject*root() Returns the root node of this ierarchy.
public QStringtoString() const String representation of this object.
public voidvisit(QmlJS::AST::Node * astroot) Visitor method implementation.
public QList<RangeProperty* >propertiesBetween(int start,int end,RangeObject* root) Returns the properties between start and end for the given root object.
public QList<RangeObject* >objectsBetween(int start,int end,RangeObject* root)
publicRangeObject*objectAtPosition(int position,RangeObject* root)
publicRangeObject*objectThatWrapsPosition(int position,RangeObject* root)
typedefPtr Shared Pointer to a lv::DocumentQmlValueObjects.
typedefConstPtr Const Shared Pointer to a lv::DocumentQmlValueObjects.

Members

public~DocumentQmlValueObjects()

DocumentQmlValueObjects destructor.

public inlineRangeObject*root()

Returns the root node of this ierarchy.

public QStringtoString() const

String representation of this object.

Will output the hierarchy of nodes defined in this object

public voidvisit(QmlJS::AST::Node * astroot)

Visitor method implementation.

public QList<RangeProperty* >propertiesBetween(int start,int end,RangeObject* root)

Returns the properties between start and end for the given root object.

public QList<RangeObject* >objectsBetween(int start,int end,RangeObject* root)

publicRangeObject*objectAtPosition(int position,RangeObject* root)

publicRangeObject*objectThatWrapsPosition(int position,RangeObject* root)

typedefPtr

Shared Pointer to a lv::DocumentQmlValueObjects.

typedefConstPtr

Const Shared Pointer to a lv::DocumentQmlValueObjects.

class lv::LanguageQmlHandler

class lv::LanguageQmlHandler
  : public QObject

Main code handler for the qml extension.

Handles code completion, palette control, property and item searching.

Summary

Members Descriptions
public explicitLanguageQmlHandler(ViewEngine* engine,Project* project,QmlJsSettings * settings,ProjectQmlExtension* projectHandler,ProjectDocument* document,CodeHandler* handler) LanguageQmlHandler constructor.
public~LanguageQmlHandler() LanguageQmlHandler destructor.
public voidassistCompletion(QTextCursor & cursor,const QChar & insertion,bool manuallyTriggered,CodeCompletionModel* model,QTextCursor & cursorChange) Implementation of code completion assist.
public inlineProjectDocument*document() const
public voidrehighlightBlock(const QTextBlock & block) Calls a new rehighlight on the specified block.
publicQmlDeclaration::PtrgetDeclarationViaCompletionContext(int position)
public QList<lv::QmlDeclaration::Ptr>getDeclarationsViaParsedDocument(int position,int length)
public QList<lv::QmlDeclaration::Ptr>getDeclarations(int position,int length) Get a list of declarations from a specific cursor.
publicQmlEditFragment*createInjectionChannel(QmlDeclaration::Ptrproperty,QmlEditFragment* parent) Creates an injection channel between a declaration and the runtime.
public booladdEditFragment(QmlEditFragment* edit) Adds an editing fragment to the current document.
public voidremoveEditFragment(QmlEditFragment* edit) Removes an editing fragment from this document.
public inline QmlJsSettings *settings() Returns the settings associated with this object.
public voidsuggestionsForProposedExpression(QmlDeclaration::Ptrdeclaration,const QString & expression,CodeCompletionModel* model,bool suggestFunctions) const
public boolfindBindingForExpression(QmlEditFragment* edit,const QString & expression)
public boolfindFunctionBindingForExpression(QmlEditFragment* edit,const QString & expression)
publicQmlUsageGraphScanner*createScanner()
public voidnewDocumentScanReady(DocumentQmlInfo::PtrdocumentInfo) Handler for when a new document scope is ready.
public inlineQmlEditFragmentContainer*editContainer()
public inline DocumentQmlChannels *bindingChannels() const
publicCodeHandler*code() const
publicQmlEditFragment*importsFragment() const
public voidsetImportsFragment(QmlEditFragment* importsFragment)
publicQmlEditFragment*rootFragment() const
public voidsetRootFragment(QmlEditFragment* rootFragment)
publicQmlInheritanceInfoinheritanceInfo(constQmlTypeReference& name,int position)
{signal} public voidimportsFragmentChanged()
{signal} public voidrootFragmentChanged()
{slot} public boolareImportsScanned()
{slot} publiclv::QmlEditFragment*findObjectFragmentByPosition(int position)
{slot} publiclv::QmlEditFragment*findFragmentByPosition(int position)
{slot} public voidonDocumentParsed(QJSValue callback)
{slot} public voidonImportsScanned(QJSValue callback)
{slot} public voidremoveSyncImportsListeners()
{slot} public QList< int >languageFeatures() const
{slot} public QStringhelp(int position)
{slot} public voidtoggleComment(int position,int length)
{slot} publiclv::QmlEditFragment*openConnection(int position)
{slot} publiclv::QmlEditFragment*openNestedConnection(lv::QmlEditFragment* edit,int position)
{slot} publiclv::QmlEditFragment*openReadOnlyPropertyConnection(lv::QmlEditFragment* parentFragment,QString name)
{slot} public QList< QObject * >openNestedFragments(lv::QmlEditFragment* edit,const QJSValue & options)
{slot} public QJSValueeditFragments()
{slot} public voidremoveConnection(lv::QmlEditFragment* edit)
{slot} public voideraseObject(lv::QmlEditFragment* edit,bool removeFragment)
{slot} public QStringdefaultPalette(lv::QmlEditFragment* fragment)
{slot} public QJSValuefindPalettesForFragment(lv::QmlEditFragment* fragment)
{slot} public QJSValuefindPalettes(int position) Finds the available list of palettes at the current cursor position.
{slot} publiclv::QmlEditFragment*removePalette(lv::CodePalette* palette) Removes a palette given its container object.
{slot} publiclv::CodePalette*openBinding(lv::QmlEditFragment* edit,QString paletteName) Open a specific binding palette for edit fragment given a paletteList and an index.
{slot} public voidcloseBinding(int position,int length) Closes the bindings between the given position and length.
{slot} public QJSValueexpand(lv::QmlEditFragment* edit,const QJSValue & val)
{slot} public QJSValuedeclarationInfo(int position,int length)
{slot} public QJSValuecontextBlockRange(int cursorPosition) Finds the boundaries of the code block containing the cursor position.
{slot} public QJSValuegetDocumentIds()
{slot} public intcheckPragma(int position)
{slot} publiclv::QmlMetaTypeInfo*typeInfo(const QJSValue & typeOrFragment)
{slot} publiclv::QmlImportsModel*importsModel()
{slot} public intfindImportsPosition()
{slot} public intfindRootPosition()
{slot} public voidsuggestCompletion(int cursorPosition)
{slot} publiclv::CodePalette*edit(lv::QmlEditFragment* ef) Opens an editing palette for the given edit fragment.
{slot} public voidcancelEdit() Cancels the current editing palette.
{slot} public lv::QmlAddContainer *getAddOptions(QJSValue value) Get the insertion options at the given position.
{slot} public QJSValueaddPropertyToCode(int position,const QString & name,const QString & value,lv::QmlEditFragment* parentGroup) Add a property given the addText at the specified position.
{slot} public intaddObjectToCode(int position,const QJSValue & type,const QJSValue & properties) Adds an item given the addText at the specitied position.
{slot} public intaddEventToCode(int position,const QString & name)
{slot} public voidcreateObjectForProperty(lv::QmlEditFragment* propertyFragment)
{slot} public voidcreateObjectInRuntime(lv::QmlEditFragment* edit,const QJSValue & typeOptions,const QJSValue & properties)
{slot} public voidcreateRootObjectInRuntime(const QJSValue & typeOptions,const QJSValue & properties)
{slot} public void__whenLibraryScanQueueCleared()
{slot} public void__updateScope() Called when a new scope is available from the scanMonitor.
{slot} public void__documentContentsChanged(int position,int charsRemoved,int charsAdded) DocumentContentsChanged handler.
{slot} public void__documentFormatUpdate(int position,int length)
{slot} public void__cursorWritePositionChanged(QTextCursor cursor)
{slot} public void__newProjectScopeReady() Handler for when a new project scope is ready.
{slot} public void__aboutToDelete()

Members

public explicitLanguageQmlHandler(ViewEngine* engine,Project* project,QmlJsSettings * settings,ProjectQmlExtension* projectHandler,ProjectDocument* document,CodeHandler* handler)

LanguageQmlHandler constructor.

This is called through the ProjectQmlHandler.

public~LanguageQmlHandler()

LanguageQmlHandler destructor.

public voidassistCompletion(QTextCursor & cursor,const QChar & insertion,bool manuallyTriggered,CodeCompletionModel* model,QTextCursor & cursorChange)

Implementation of code completion assist.

Handles bracket and paranthesis auto-completion together with suggestions population.

public inlineProjectDocument*document() const

public voidrehighlightBlock(const QTextBlock & block)

Calls a new rehighlight on the specified block.

publicQmlDeclaration::PtrgetDeclarationViaCompletionContext(int position)

public QList<lv::QmlDeclaration::Ptr>getDeclarationsViaParsedDocument(int position,int length)

public QList<lv::QmlDeclaration::Ptr>getDeclarations(int position,int length)

Get a list of declarations from a specific cursor.

publicQmlEditFragment*createInjectionChannel(QmlDeclaration::Ptrproperty,QmlEditFragment* parent)

Creates an injection channel between a declaration and the runtime.

This method will find all binding channels available by parsing the contents of the code structure, creating a set of binding pahts that describe where each component resides, and use those binding paths to connect the position of the code structure to the same values within the runtime.

public booladdEditFragment(QmlEditFragment* edit)

Adds an editing fragment to the current document.

public voidremoveEditFragment(QmlEditFragment* edit)

Removes an editing fragment from this document.

public inline QmlJsSettings *settings()

Returns the settings associated with this object.

public voidsuggestionsForProposedExpression(QmlDeclaration::Ptrdeclaration,const QString & expression,CodeCompletionModel* model,bool suggestFunctions) const

public boolfindBindingForExpression(QmlEditFragment* edit,const QString & expression)

public boolfindFunctionBindingForExpression(QmlEditFragment* edit,const QString & expression)

publicQmlUsageGraphScanner*createScanner()

public voidnewDocumentScanReady(DocumentQmlInfo::PtrdocumentInfo)

Handler for when a new document scope is ready.

public inlineQmlEditFragmentContainer*editContainer()

public inline DocumentQmlChannels *bindingChannels() const

publicCodeHandler*code() const

publicQmlEditFragment*importsFragment() const

public voidsetImportsFragment(QmlEditFragment* importsFragment)

publicQmlEditFragment*rootFragment() const

public voidsetRootFragment(QmlEditFragment* rootFragment)

publicQmlInheritanceInfoinheritanceInfo(constQmlTypeReference& name,int position)

{signal} public voidimportsFragmentChanged()

{signal} public voidrootFragmentChanged()

{slot} public boolareImportsScanned()

{slot} publiclv::QmlEditFragment*findObjectFragmentByPosition(int position)

{slot} publiclv::QmlEditFragment*findFragmentByPosition(int position)

{slot} public voidonDocumentParsed(QJSValue callback)

{slot} public voidonImportsScanned(QJSValue callback)

{slot} public voidremoveSyncImportsListeners()

{slot} public QList< int >languageFeatures() const

{slot} public QStringhelp(int position)

{slot} public voidtoggleComment(int position,int length)

{slot} publiclv::QmlEditFragment*openConnection(int position)

{slot} publiclv::QmlEditFragment*openNestedConnection(lv::QmlEditFragment* edit,int position)

{slot} publiclv::QmlEditFragment*openReadOnlyPropertyConnection(lv::QmlEditFragment* parentFragment,QString name)

{slot} public QList< QObject * >openNestedFragments(lv::QmlEditFragment* edit,const QJSValue & options)

{slot} public QJSValueeditFragments()

{slot} public voidremoveConnection(lv::QmlEditFragment* edit)

{slot} public voideraseObject(lv::QmlEditFragment* edit,bool removeFragment)

{slot} public QStringdefaultPalette(lv::QmlEditFragment* fragment)

{slot} public QJSValuefindPalettesForFragment(lv::QmlEditFragment* fragment)

{slot} public QJSValuefindPalettes(int position)

Finds the available list of palettes at the current cursor position.

{slot} publiclv::QmlEditFragment*removePalette(lv::CodePalette* palette)

Removes a palette given its container object.

{slot} publiclv::CodePalette*openBinding(lv::QmlEditFragment* edit,QString paletteName)

Open a specific binding palette for edit fragment given a paletteList and an index.

Returns

A pointer to the opened lv::CodePalette.

{slot} public voidcloseBinding(int position,int length)

Closes the bindings between the given position and length.

{slot} public QJSValueexpand(lv::QmlEditFragment* edit,const QJSValue & val)

{slot} public QJSValuedeclarationInfo(int position,int length)

{slot} public QJSValuecontextBlockRange(int cursorPosition)

Finds the boundaries of the code block containing the cursor position.

Mostly used for fragments

{slot} public QJSValuegetDocumentIds()

{slot} public intcheckPragma(int position)

{slot} publiclv::QmlMetaTypeInfo*typeInfo(const QJSValue & typeOrFragment)

{slot} publiclv::QmlImportsModel*importsModel()

{slot} public intfindImportsPosition()

{slot} public intfindRootPosition()

{slot} public voidsuggestCompletion(int cursorPosition)

{slot} publiclv::CodePalette*edit(lv::QmlEditFragment* ef)

Opens an editing palette for the given edit fragment.

{slot} public voidcancelEdit()

Cancels the current editing palette.

{slot} public lv::QmlAddContainer *getAddOptions(QJSValue value)

Get the insertion options at the given position.

Returns an lv::QmlAddContainer for all the options

{slot} public QJSValueaddPropertyToCode(int position,const QString & name,const QString & value,lv::QmlEditFragment* parentGroup)

Add a property given the addText at the specified position.

{slot} public intaddObjectToCode(int position,const QJSValue & type,const QJSValue & properties)

Adds an item given the addText at the specitied position.

{slot} public intaddEventToCode(int position,const QString & name)

{slot} public voidcreateObjectForProperty(lv::QmlEditFragment* propertyFragment)

{slot} public voidcreateObjectInRuntime(lv::QmlEditFragment* edit,const QJSValue & typeOptions,const QJSValue & properties)

{slot} public voidcreateRootObjectInRuntime(const QJSValue & typeOptions,const QJSValue & properties)

{slot} public void__whenLibraryScanQueueCleared()

{slot} public void__updateScope()

Called when a new scope is available from the scanMonitor.

{slot} public void__documentContentsChanged(int position,int charsRemoved,int charsAdded)

DocumentContentsChanged handler.

{slot} public void__documentFormatUpdate(int position,int length)

{slot} public void__cursorWritePositionChanged(QTextCursor cursor)

{slot} public void__newProjectScopeReady()

Handler for when a new project scope is ready.

{slot} public void__aboutToDelete()

class lv::ProjectQmlExtension

class lv::ProjectQmlExtension
  : public QObject
  : public QQmlParserStatus

Main object used throughout qml extension plugin.

To capture the object, you can use the workspace layer:

var projectQmlExtension = lk.layers.workspace.extensions["editqml"].globals

Summary

Members Descriptions
publicProjectQmlExtension(QObject * parent) ProjectQmlExtension constructor with a parent parameter.
public virtual~ProjectQmlExtension() ProjectQmlExtension destructor.
public voidclassBegin() Override of QQmlParserStatus::classBegin.
public voidcomponentComplete() Override of QQmlParserStatus::componentComplete.
public inline QmlProjectMonitor *scanMonitor() Returns the lv::ProjectQmlScanMonitor associated with this object.
public inline QmlBindingChannelsDispatcher *channelsDispatcher() Returns the channels dispatcher.
public voidaddLanguageQmlHandler(LanguageQmlHandler* handler) Adds a codeHandler to this object.
public voidremoveLanguageQmlHandler(LanguageQmlHandler* handler) Removes the handler from this object.
public inlinePaletteLoader*paletteContainer() Returns the lv::PaletteContainer associated with this object.
public voidsetParams(Settings* settings,Project* project,ViewEngine* engine,Workspace * workspace) Assign initialization params for this object.
public inlineProject*project() Returns the global lv::Project.
{slot} public QObject *createHandler(ProjectDocument* document,CodeHandler* handler) Creates a LanguageQmlHandler for the given document.

Members

publicProjectQmlExtension(QObject * parent)

ProjectQmlExtension constructor with a parent parameter.

public virtual~ProjectQmlExtension()

ProjectQmlExtension destructor.

public voidclassBegin()

Override of QQmlParserStatus::classBegin.

public voidcomponentComplete()

Override of QQmlParserStatus::componentComplete.

public inline QmlProjectMonitor *scanMonitor()

Returns the lv::ProjectQmlScanMonitor associated with this object.

public inline QmlBindingChannelsDispatcher *channelsDispatcher()

Returns the channels dispatcher.

public voidaddLanguageQmlHandler(LanguageQmlHandler* handler)

Adds a codeHandler to this object.

CodeHandlers are updated each time the engine recompiles the code.

public voidremoveLanguageQmlHandler(LanguageQmlHandler* handler)

Removes the handler from this object.

Note that this does not destroy the object.

public inlinePaletteLoader*paletteContainer()

Returns the lv::PaletteContainer associated with this object.

public voidsetParams(Settings* settings,Project* project,ViewEngine* engine,Workspace * workspace)

Assign initialization params for this object.

public inlineProject*project()

Returns the global lv::Project.

{slot} public QObject *createHandler(ProjectDocument* document,CodeHandler* handler)

Creates a LanguageQmlHandler for the given document.

class lv::ProjectQmlScope

class lv::ProjectQmlScope
  : public QObject

Contains all the loaded plugins of a project.

Summary

Members Descriptions
public~ProjectQmlScope() ProjectQmlScope destructor.
public QmlLibraryInfo::PtraddQmlGlobalLibrary(const QString & uri,int major,int minor)
public QmlLibraryInfo::PtraddQmlProjectLibrary(const QString & uri)
public inline QList< QString >pathsForImport(const QString & importUri) Returns the stored paths for an import uri.
public QStringuriForPath(const QString & path) Returns the uri of a library from it's path.
public inline voidaddDefaultLibraries(const QList< QString > & paths) Adds a set of paths to the default libraries.
public inline const QList< QString > &defaultLibraries() const Returns the default libraries.
public QmlLibraryInfo::PtrlibraryInfo(const QString & path)
public boollibraryExists(const QString & path)
public voidaddLibrary(const QString & path)
public voidassignLibrary(const QString & path,QmlLibraryInfo::Ptr libinfo)
public voidassignLibraries(const QHash< QString, QmlLibraryInfo::Ptr > & libinfos)
public inttotalLibraries() const Returns the total number of global libraries.
public QList< QmlLibraryInfo::Ptr >getLibrariesInPath(const QString & path)
public voidresetLibrariesInPath(const QString & path)
public voidresetLibrary(const QString & path)
public QStringtoString()
public inlineQmlLanguageScanMonitor*languageScanMonitor()
publicQmlLanguageScanner*languageScanner()
{signal} public void__processQueue()
{signal} public voidlibraryScanQueueCleared()
{slot} public void__libraryUpdates()
typedefConstPtr Constant SharedPointer to ProjectQmlScope.
typedefPtr SharedPointer to ProjectQmlScope.

Members

public~ProjectQmlScope()

ProjectQmlScope destructor.

public QmlLibraryInfo::PtraddQmlGlobalLibrary(const QString & uri,int major,int minor)

public QmlLibraryInfo::PtraddQmlProjectLibrary(const QString & uri)

public inline QList< QString >pathsForImport(const QString & importUri)

Returns the stored paths for an import uri.

public QStringuriForPath(const QString & path)

Returns the uri of a library from it's path.

public inline voidaddDefaultLibraries(const QList< QString > & paths)

Adds a set of paths to the default libraries.

public inline const QList< QString > &defaultLibraries() const

Returns the default libraries.

public QmlLibraryInfo::PtrlibraryInfo(const QString & path)

public boollibraryExists(const QString & path)

public voidaddLibrary(const QString & path)

public voidassignLibrary(const QString & path,QmlLibraryInfo::Ptr libinfo)

public voidassignLibraries(const QHash< QString, QmlLibraryInfo::Ptr > & libinfos)

public inttotalLibraries() const

Returns the total number of global libraries.

public QList< QmlLibraryInfo::Ptr >getLibrariesInPath(const QString & path)

public voidresetLibrariesInPath(const QString & path)

public voidresetLibrary(const QString & path)

public QStringtoString()

public inlineQmlLanguageScanMonitor*languageScanMonitor()

publicQmlLanguageScanner*languageScanner()

{signal} public void__processQueue()

{signal} public voidlibraryScanQueueCleared()

{slot} public void__libraryUpdates()

typedefConstPtr

Constant SharedPointer to ProjectQmlScope.

typedefPtr

SharedPointer to ProjectQmlScope.

class lv::QmlCompletionContext

class lv::QmlCompletionContext
  : public lv::CodeCompletionContext

Contains a qml code completion context.

You can use the QmlCompletionContextFinder to find such a context at a given cursor position.

To find out the actual context state, use the QmlCompletionContext::context method.

QTextCursor cursor(document);
cursor.setPosition(100);
QmlCompletionContextFinder finder;

QmlCompltionContext::ConstPtr context = finder.getContext(cursor); vlog() << (context->context() == QmlCompletionContext::InImport);

For a string based output, QmlCompletionContext::contextString() will give a concatenated string of the states

// ...
QmlCompletionContext::ConstPtr context = finder.getContext(cursor);
vlog() << context->contextString();

Summary

Members Descriptions
public~QmlCompletionContext() Completion context destructor.
public inline intcontext() const Returns the current context state.
public QStringcontextString() const Returns the context a string of concatenated states.
public inline QStringobjectTypeName() const Returns the object typename for this context if it has any, or an empty string if it hasn't been captured.
public inline const QStringList &objectTypePath() const Returns the object type for this context, or an empty list if it hasn't been captured.
public inline QStringpropertyName() const Returns the property name for this completion context, or an empty string if it hasn't been captured.
public inline const QStringList &propertyPath() const Returns the property type for this context, or an empty list if it hasn't been captured.
public inline intpropertyPosition() const Returns the property start position for this context, or -1 if it hasn't been captured.
public inline const QStringList &expressionPath() const Returns the current expression the cursor is under.
public booloperator==(constQmlCompletionContext& other) const Returns true if this QmlCompletionContext is equal to other, false otherwise.
public booloperator!=(constQmlCompletionContext& other) const Returns true if this QmlCompletionContext is not equal to other, false otherwise.
protectedQmlCompletionContext(int context,const QStringList & objectTypePath,const QStringList & propertyPath,const QStringList & expressionPath,int propertyPosition) QmlCompletionContext constructor.
enumContext Context state
typedefConstPtr Shared const pointer to QmlCompletionContext
typedefPtr Shared pointer to QmlCompletionContext

Members

public~QmlCompletionContext()

Completion context destructor.

public inline intcontext() const

Returns the current context state.

public QStringcontextString() const

Returns the context a string of concatenated states.

public inline QStringobjectTypeName() const

Returns the object typename for this context if it has any, or an empty string if it hasn't been captured.

public inline const QStringList &objectTypePath() const

Returns the object type for this context, or an empty list if it hasn't been captured.

public inline QStringpropertyName() const

Returns the property name for this completion context, or an empty string if it hasn't been captured.

public inline const QStringList &propertyPath() const

Returns the property type for this context, or an empty list if it hasn't been captured.

public inline intpropertyPosition() const

Returns the property start position for this context, or -1 if it hasn't been captured.

public inline const QStringList &expressionPath() const

Returns the current expression the cursor is under.

public booloperator==(constQmlCompletionContext& other) const

Returns true if this QmlCompletionContext is equal to other, false otherwise.

public booloperator!=(constQmlCompletionContext& other) const

Returns true if this QmlCompletionContext is not equal to other, false otherwise.

protectedQmlCompletionContext(int context,const QStringList & objectTypePath,const QStringList & propertyPath,const QStringList & expressionPath,int propertyPosition)

QmlCompletionContext constructor.

Use lv::QmlCompletionContext::create() to create a new completion context.

enumContext

Values Descriptions
InImport Context is within an import statement
InImportVersion Context is within an import statement at the version section
InQml Context is within qml
InLhsOfBinding Context is within the left side of the binding
InRhsofBinding Context is within the right side of the binding
InAfterOnLhsOfBinding Context is within the right side of a slot binding
InStringLiteral Context is within a string literal

Context state

typedefConstPtr

Shared const pointer to QmlCompletionContext

typedefPtr

Shared pointer to QmlCompletionContext

class lv::QmlDeclaration

Holds a qml property declaration.

Item{
    property int declaration: 20
}

In the above case, the lv::QmlDeclaration has the following properties:

  • identifierChain : the property identifier, in this case declaration

  • identifierPosition: position of the declaration property

  • identifierLength: length of the declaration property

  • type: type of the declaration property, in this case int

  • document: document where the declaration property was declared

  • length: length of the declaration property

  • valueOffset: offset for the value of the declaration property, in this case it's the position of the number 20 minus the position of the property

  • valueLength: length of the value for the declaration property, or 2

  • section: A section within the project document

Summary

Members Descriptions
public~QmlDeclaration() QmlDeclaration destructor.
public inline intidentifierPosition() const Returns the identifier position.
public inline intidentifierLength() const Returns the identifier length.
public inline intposition() const Returns position of this declaration, equivalent to identifier position.
public inline intvaluePosition() const Returns the value position for this delcaration, calculated relative to the identifierPosition.
public inline const QStringList &identifierChain() const Returns the identifierChain for this delcaration.
public inline constQmlTypeReference&type() const Returns the type of this declaration.
public inline constQmlTypeReference&parentType() const Returns the object type for this declaration.
public inlineProjectDocument*document() Returns the document this declaration is in.
public inline intlength() const Returns the length of this declaration.
public inline intvalueOffset() const Returns the valueOffset for this declaration.
public inline voidsetValuePositionOffset(int positionOffset) Assings a new positionOffset for this declaration.
public intvalueObjectScopeOffset() const If this declaration is a property and initialises an object, this will return the start of the object scope.
public voidsetValueObjectScopeOffset(int objectScopeOffset) If this declaration is a property and initialises an object, this will set the start of the object scope.
public inline intvalueLength() const Returns the value lenght of this declaration.
public inline voidsetValueLength(int valueLength) Sets the value length of this declaration.
public inlineProjectDocumentSection::Ptrsection() Returns the current lv::ProjectDocument section.
public inline voidsetSection(ProjectDocumentSection::Ptrsection) Assigns the lv::ProjectDocument section.
public inline boolisForList() const Checks wether this is a list-child declaration instead of a property-based one.
public boolisForObject() const Returns true if this declaration is for an object.
public boolisForComponent() const Returns true if this declaration is for a component.
public boolisForProperty() const Returns true if this declaration is for a property.
public boolisForSlot() const Returns true if this declaration is for a slot.
public boolisForImports() const
public inline boolisWritable() const
enumSectionType ProjectDocument section type.
typedefPtr Shared pointer to QmlDeclaration
typedefConstPtr Shared const pointer to QmlDeclaration

Members

public~QmlDeclaration()

QmlDeclaration destructor.

public inline intidentifierPosition() const

Returns the identifier position.

public inline intidentifierLength() const

Returns the identifier length.

public inline intposition() const

Returns position of this declaration, equivalent to identifier position.

public inline intvaluePosition() const

Returns the value position for this delcaration, calculated relative to the identifierPosition.

public inline const QStringList &identifierChain() const

Returns the identifierChain for this delcaration.

public inline constQmlTypeReference&type() const

Returns the type of this declaration.

public inline constQmlTypeReference&parentType() const

Returns the object type for this declaration.

public inlineProjectDocument*document()

Returns the document this declaration is in.

public inline intlength() const

Returns the length of this declaration.

public inline intvalueOffset() const

Returns the valueOffset for this declaration.

public inline voidsetValuePositionOffset(int positionOffset)

Assings a new positionOffset for this declaration.

public intvalueObjectScopeOffset() const

If this declaration is a property and initialises an object, this will return the start of the object scope.

public voidsetValueObjectScopeOffset(int objectScopeOffset)

If this declaration is a property and initialises an object, this will set the start of the object scope.

public inline intvalueLength() const

Returns the value lenght of this declaration.

public inline voidsetValueLength(int valueLength)

Sets the value length of this declaration.

public inlineProjectDocumentSection::Ptrsection()

Returns the current lv::ProjectDocument section.

public inline voidsetSection(ProjectDocumentSection::Ptrsection)

Assigns the lv::ProjectDocument section.

public inline boolisForList() const

Checks wether this is a list-child declaration instead of a property-based one.

public boolisForObject() const

Returns true if this declaration is for an object.

public boolisForComponent() const

Returns true if this declaration is for a component.

public boolisForProperty() const

Returns true if this declaration is for a property.

public boolisForSlot() const

Returns true if this declaration is for a slot.

public boolisForImports() const

public inline boolisWritable() const

enumSectionType

Values Descriptions
Section Section type

ProjectDocument section type.

typedefPtr

Shared pointer to QmlDeclaration

typedefConstPtr

Shared const pointer to QmlDeclaration

class lv::QmlEditFragment

class lv::QmlEditFragment
  : public QObject

An editing fragment for a lv::ProjectDocument.

An editing fragment represents a section within a lv::ProjectDocument that is connected to the running application. Fragments have palettes associated with them, and can write code based on the given value of a palette. They provide the set of binding channels connected to the application.

Summary

Members Descriptions
publicQmlEditFragment(QmlDeclaration::Ptrdeclaration,lv::LanguageQmlHandler* codeHandler,QObject * parent) QmlEditFragment contructor.
public virtual~QmlEditFragment() QmlEditFragment destructor.
public voidsetPaletteForBinding(CodePalette* palette)
public inline boolhasPalette(CodePalette* palette)
publicCodePalette*palette(const QString & type)
public voidaddPalette(CodePalette* palette)
public voidremovePalette(CodePalette* palette)
public inline QList<CodePalette* >::iteratorbegin()
public inline QList<CodePalette* >::iteratorend()
public voidremoveBindingPalette()
public voidsetBindingPalette(CodePalette* palette)
public voidaddChildFragment(QmlEditFragment* edit)
publicQmlEditFragment*findChildFragment(QmlEditFragment* edit)
public inlineQmlDeclaration::Ptrdeclaration() const Returns the lv::CodeDeclaration associated with this object.
public voidupdatePaletteValue(CodePalette* palette)
public voidinitializePaletteValue(CodePalette* palette)
public inline QObject *visualParent() const
public inline voidsetVisualParent(QObject * visualParent)
publicQmlEditFragment*rootFragment()
public voidsetObjectInitializeType(constQmlTypeReference& type)
public constQmlTypeReference&objectInitializeType() const
public voidemitRemoval()
public inline QJSValue &whenBinding()
public inline voidsetWhenBinding(const QJSValue & whenBinding)
public voidsetChannel(QSharedPointer< QmlBindingChannel > channel)
public inline const QSharedPointer< QmlBindingChannel >channel() const
public QSharedPointer< QmlBindingPath >fullBindingPath()
public Locationlocation() const
public LocationvalueLocation() const
public boolisWritable() const
public inlinelv::LanguageQmlHandler*language() const
public voidsetObjectId(QString id)
public inline const QList<lv::QmlEditFragment* > &childFragments()
public voidcheckIfGroup()
public voidremoveFragmentType(FragmentType type)
public voidaddFragmentType(FragmentType type)
public boolisOfFragmentType(FragmentType type) const
public boolisGroup() const
{signal} public voidvisualParentChanged()
{signal} public voidconnectionChanged(int index)
{signal} public voidaboutToRemovePalette(lv::CodePalette* palette)
{signal} public voidaboutToBeRemoved()
{signal} public voidpaletteListEmpty()
{signal} public voidobjectAdded(lv::QmlEditFragment* obj)
{signal} public voidchildAdded(lv::QmlEditFragment* ef,QJSValue context)
{signal} public voidrefCountChanged()
{signal} public voidwhenBindingChanged()
{signal} public voidtypeChanged()
{signal} public voidisNullChanged()
{slot} public inline intposition()
{slot} public intvaluePosition() const Returns the lv::QmlDeclaration's value postion.
{slot} public intvalueLength() const Returns the lv::QmlDeclaration's value length.
{slot} public intlength() const
{slot} public QStringtype() const
{slot} public QStringtypeName() const
{slot} public QStringidentifier() const
{slot} public QStringobjectInitializerType() const
{slot} public QStringobjectId()
{slot} public intfragmentType() const
{slot} public boolisBuilder() const
{slot} public voidrebuild()
{slot} public QStringListbindingPath()
{slot} public boolisNull()
{slot} public boolisMethod()
{slot} public voidcommit(const QVariant & value)
{slot} public QObject *readObject()
{slot} public QObject *propertyObject()
{slot} public QStringdefaultValue() const
{slot} public QStringreadValueText() const Reads the code value of this fragment and returns it.
{slot} public QJSValuereadValueConnection() const
{slot} public QVariantparse()
{slot} public boolbindExpression(const QString & expression)
{slot} public boolbindFunctionExpression(const QString & expression)
{slot} public voidwriteProperties(const QJSValue & properties)
{slot} public voidwrite(const QJSValue options)
{slot} public voidwriteCode(const QString & code) Writes the code to the value part of this fragment.
{slot} public inttotalPalettes() const
{slot} public QJSValuepaletteList() const
{slot} public voidremovePalettes()
{slot} public inlinelv::CodePalette*bindingPalette()
{slot} public voidupdateBindings()
{slot} publiclv::QmlEditFragment*parentFragment()
{slot} public QJSValuegetChildFragments() const
{slot} public voidremoveChildFragment(QmlEditFragment* edit)
{slot} public voidincrementRefCount()
{slot} public voiddecrementRefCount()
{slot} public intrefCount()
{slot} public voidsuggestionsForExpression(const QString & expression,lv::CodeCompletionModel* model,bool suggestFunctions)
{slot} public voidsignalChildAdded(lv::QmlEditFragment* ef,const QJSValue & context)
{slot} public void__updateFromPalette()
{slot} public void__updateValue()
{slot} public void__channelObjectErased()
{slot} public void__inputRunnableObjectReady()
{slot} public void__selectedChannelChanged()
enumSectionType ProjectDocument section type for this QmlEditFragment
enumLocation
enumFragmentType

Members

publicQmlEditFragment(QmlDeclaration::Ptrdeclaration,lv::LanguageQmlHandler* codeHandler,QObject * parent)

QmlEditFragment contructor.

The Fragment is constructed from a declaration object and a palette object.

public virtual~QmlEditFragment()

QmlEditFragment destructor.

public voidsetPaletteForBinding(CodePalette* palette)

public inline boolhasPalette(CodePalette* palette)

publicCodePalette*palette(const QString & type)

public voidaddPalette(CodePalette* palette)

public voidremovePalette(CodePalette* palette)

public inline QList<CodePalette* >::iteratorbegin()

public inline QList<CodePalette* >::iteratorend()

public voidremoveBindingPalette()

public voidsetBindingPalette(CodePalette* palette)

public voidaddChildFragment(QmlEditFragment* edit)

publicQmlEditFragment*findChildFragment(QmlEditFragment* edit)

public inlineQmlDeclaration::Ptrdeclaration() const

Returns the lv::CodeDeclaration associated with this object.

public voidupdatePaletteValue(CodePalette* palette)

public voidinitializePaletteValue(CodePalette* palette)

public inline QObject *visualParent() const

public inline voidsetVisualParent(QObject * visualParent)

publicQmlEditFragment*rootFragment()

public voidsetObjectInitializeType(constQmlTypeReference& type)

public constQmlTypeReference&objectInitializeType() const

public voidemitRemoval()

public inline QJSValue &whenBinding()

public inline voidsetWhenBinding(const QJSValue & whenBinding)

public voidsetChannel(QSharedPointer< QmlBindingChannel > channel)

public inline const QSharedPointer< QmlBindingChannel >channel() const

public QSharedPointer< QmlBindingPath >fullBindingPath()

public Locationlocation() const

public LocationvalueLocation() const

public boolisWritable() const

public inlinelv::LanguageQmlHandler*language() const

public voidsetObjectId(QString id)

public inline const QList<lv::QmlEditFragment* > &childFragments()

public voidcheckIfGroup()

public voidremoveFragmentType(FragmentType type)

public voidaddFragmentType(FragmentType type)

public boolisOfFragmentType(FragmentType type) const

public boolisGroup() const

{signal} public voidvisualParentChanged()

{signal} public voidconnectionChanged(int index)

{signal} public voidaboutToRemovePalette(lv::CodePalette* palette)

{signal} public voidaboutToBeRemoved()

{signal} public voidpaletteListEmpty()

{signal} public voidobjectAdded(lv::QmlEditFragment* obj)

{signal} public voidchildAdded(lv::QmlEditFragment* ef,QJSValue context)

{signal} public voidrefCountChanged()

{signal} public voidwhenBindingChanged()

{signal} public voidtypeChanged()

{signal} public voidisNullChanged()

{slot} public inline intposition()

{slot} public intvaluePosition() const

Returns the lv::QmlDeclaration's value postion.

{slot} public intvalueLength() const

Returns the lv::QmlDeclaration's value length.

{slot} public intlength() const

{slot} public QStringtype() const

{slot} public QStringtypeName() const

{slot} public QStringidentifier() const

{slot} public QStringobjectInitializerType() const

{slot} public QStringobjectId()

{slot} public intfragmentType() const

{slot} public boolisBuilder() const

{slot} public voidrebuild()

{slot} public QStringListbindingPath()

{slot} public boolisNull()

{slot} public boolisMethod()

{slot} public voidcommit(const QVariant & value)

{slot} public QObject *readObject()

{slot} public QObject *propertyObject()

{slot} public QStringdefaultValue() const

{slot} public QStringreadValueText() const

Reads the code value of this fragment and returns it.

{slot} public QJSValuereadValueConnection() const

{slot} public QVariantparse()

{slot} public boolbindExpression(const QString & expression)

{slot} public boolbindFunctionExpression(const QString & expression)

{slot} public voidwriteProperties(const QJSValue & properties)

{slot} public voidwrite(const QJSValue options)

{slot} public voidwriteCode(const QString & code)

Writes the code to the value part of this fragment.

{slot} public inttotalPalettes() const

{slot} public QJSValuepaletteList() const

{slot} public voidremovePalettes()

{slot} public inlinelv::CodePalette*bindingPalette()

{slot} public voidupdateBindings()

{slot} publiclv::QmlEditFragment*parentFragment()

{slot} public QJSValuegetChildFragments() const

{slot} public voidremoveChildFragment(QmlEditFragment* edit)

{slot} public voidincrementRefCount()

{slot} public voiddecrementRefCount()

{slot} public intrefCount()

{slot} public voidsuggestionsForExpression(const QString & expression,lv::CodeCompletionModel* model,bool suggestFunctions)

{slot} public voidsignalChildAdded(lv::QmlEditFragment* ef,const QJSValue & context)

{slot} public void__updateFromPalette()

{slot} public void__updateValue()

{slot} public void__channelObjectErased()

{slot} public void__inputRunnableObjectReady()

{slot} public void__selectedChannelChanged()

enumSectionType

Values Descriptions
Section Section Value

ProjectDocument section type for this QmlEditFragment

enumLocation

Values Descriptions
Imports
Object
Component
Property
Slot

enumFragmentType

Values Descriptions
Builder
ReadOnly
Group
GroupChild