ViewerContext Class

(QmlJS::ViewerContext)

The ViewerContext class encapsulate selector and paths for a given viewer. More...

Header: #include <ViewerContext>

Public Types

enum Flags { Complete, AddAllPathsAndDefaultSelectors, AddAllPaths, AddDefaultPaths, AddDefaultPathsAndSelectors }

Public Functions

ViewerContext()
ViewerContext(QStringList selectors, QStringList paths, Dialect language = Dialect::Qml, Flags flags = AddAllPaths)
bool languageIsCompatible(Dialect l) const
void maybeAddPath(const QString &path)

Detailed Description

The ViewerContext class encapsulate selector and paths for a given viewer.

Using a a different viewer context can emulate (the pure qml part) of a device. This allows checking how a given qml would be interpreted on another platform/viewer.

Screen information will also most likely need to be added here.

Member Type Documentation

enum ViewerContext::Flags

Member Function Documentation

ViewerContext::ViewerContext()

Default constructs an instance of ViewerContext.

ViewerContext::ViewerContext(QStringList selectors, QStringList paths, Dialect language = Dialect::Qml, Flags flags = AddAllPaths)

Default constructs an instance of ViewerContext.

bool ViewerContext::languageIsCompatible(Dialect l) const

void ViewerContext::maybeAddPath(const QString &path)