2018年5月9日

WorkerScript

モジュール

QtQuick 2.0

クラス継承

QQuickWorkerScript → QObject

プロパティー

source: url = QUrl()

シグナル

message(QQmlV4Handle messageObject)

sourceChanged()

スロット

void sendMessage(QQmlV4Function*)

説明


プロパティーの説明

source: url

シグナルの説明

message(QQmlV4Handle messageObject)

スロットの説明

void sendMessage(QQmlV4Function*)

参考情報

2018年5月8日

ScriptAction

モジュール

QtQuick 2.0

クラス継承

QQuickScriptAction → QQuickAbstractAnimation (internal) → QObject

プロパティー

script: QQmlScriptString = QQmlScriptString()
scriptName: QString = ""

説明


プロパティーの説明

script: QQmlScriptString

scriptName: QString

参考情報

2018年5月7日

DelegateModelGroup

モジュール

QtQml.Models 2.1

クラス継承

QQmlDelegateModelGroup → QObject

プロパティー

count: int = 0 readonly
name: QString = ""
includeByDefault: bool = false

シグナル

changed(QQmlV4Handle removed, QQmlV4Handle inserted)
countChanged()
defaultIncludeChanged()
nameChanged()

メソッド

QQmlV4Handle get(int index)

スロット

void addGroups(QQmlV4Function*)
void create(QQmlV4Function*)
void insert(QQmlV4Function*)
void move(QQmlV4Function*)
void resolve(QQmlV4Function*)
void remove(QQmlV4Function*)
void removeGroups(QQmlV4Function*)
void setGroups(QQmlV4Function*)

説明


プロパティーの説明

count: int

name: QString

includeByDefault: bool

シグナルの説明

changed(QQmlV4Handle removed, QQmlV4Handle inserted)


defaultIncludeChanged()

includeByDefault プロパティーの変更通知シグナル。

メソッドの説明

QQmlV4Handle get(int index)

スロットの説明

void addGroups(QQmlV4Function*)

void create(QQmlV4Function*)

void insert(QQmlV4Function*)

void move(QQmlV4Function*)

void resolve(QQmlV4Function*)

void remove(QQmlV4Function*)

void removeGroups(QQmlV4Function*)

void setGroups(QQmlV4Function*)

注意


includeByDefault プロパティーの変更通知シグナルが defaultIncludeChanged() となっていて命名規則と異なっている。

参考情報

2018年5月6日

ParentChange

モジュール

QtQuick 2.0

クラス継承

QQuickParentChange → QQuickStateOperation (internal) → QObject

プロパティー

target: Item = null
parent: Item = null
x: QQmlScriptString = ""
y: QQmlScriptString = ""
width: QQmlScriptString = ""
height: QQmlScriptString = ""
scale: QQmlScriptString = ""
rotation: QQmlScriptString = ""

説明


target に指定したビジュアルオブジェクトの parent を変更する。

x、y、width、height、scale、rotation で指定しないものがあるとき、parent を変更するビジュアルオブジェクトのそれらの値は見掛けをそのままにするような parent 変更先ビジュアルオブジェクト座標系での値に変更される。つまり、x と y の座標値は parent 変更先ビジュアルオブジェクトから見た座標値になり、スケールは逆数に、角度は逆向きになって、parent を変更する前の見掛けを保つように変更される。

x、y、width、height、scale、rotation のいずれかあるいは複数に parent 変更先ビジュアルオブジェクトでのプロパティー値を設定すると ParentAnimation でアニメーション効果を付けられる。

サンプルコード switchparent.qml を参照。

プロパティーの説明

target: Item

parent を変更するビジュアルオブジェクト。

parent: Item

parent 変更先ビジュアルオブジェクト。

x: QQmlScriptString

parent 変更先ビジュアルオブジェクトでの x 座標値を指定する。

y: QQmlScriptString

parent 変更先ビジュアルオブジェクトでの y 座標値を指定する。

width: QQmlScriptString

parent 変更後の幅を指定する。

height: QQmlScriptString

parent 変更後の高さを指定する。

scale: QQmlScriptString

parent 変更後のスケールを指定する。

rotation: QQmlScriptString

parent 変更後の角度を指定する。

問題


兄弟関係にある複数ビジュアルオブジェクトの parent を変更しようとすると正しく動作しない場合がある。

参考情報

ParentAnimation

モジュール

QtQuick 2.0

クラス継承

QQuickParentAnimation →  QQuickAnimationGroup (internal) → QQuickAbstractAnimation (internal) → QObject

プロパティー

target: Item = null
newParent: Item = null
via: Item = null

シグナル

targetChanged()
newParentChanged()
viaChanged()

説明


サンプルコード switchparent.qml を参照。


プロパティーの説明

target: Item

newParent: Item

via: Item

parent 変更先のビジュアルオブジェクトが parent 変更元のビジュアルオブジェクトよりも描画順序が先の場合や parent 変更先と変更元のいずれかのビジュアルオブジェクトの clip が true に設定されている場合に、clip が false に設定されているビジュアルオブジェクトを指定して parent を変えるビジュアルオブジェクトが隠れないようにする。

問題


ParentAnimation のリファレンスには親ビジュアルオブジェクトの clip が true のときの via 使用について書かれているがビジュアルオブジェクトの描画順序のために via が必要なことが書かれていない。

参考情報