Squish: Added test for QML outline

Change-Id: I6199cf22da0049319c2eaef6977884ed7f63a4fd
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
This commit is contained in:
Christian Stenger
2012-10-30 12:05:27 +01:00
parent fbb197655b
commit 00dab06535
8 changed files with 440 additions and 1 deletions

View File

@@ -91,6 +91,7 @@
:Qt Creator_CompileOutput_Core::Internal::OutputPaneToggleButton {occurrence='4' type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_CompileOutput_Core::Internal::OutputPaneToggleButton {occurrence='4' type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_Core::Internal::CommandComboBox {type='Core::Internal::CommandComboBox' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_Core::Internal::CommandComboBox {type='Core::Internal::CommandComboBox' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_Core::Internal::MainWindow {type='Core::Internal::MainWindow' visible='1' windowTitle?='*Qt Creator'} :Qt Creator_Core::Internal::MainWindow {type='Core::Internal::MainWindow' visible='1' windowTitle?='*Qt Creator'}
:Qt Creator_Core::Internal::NavComboBox {type='Core::Internal::NavComboBox' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_CppEditor::Internal::CPPEditorWidget {type='CppEditor::Internal::CPPEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_CppEditor::Internal::CPPEditorWidget {type='CppEditor::Internal::CPPEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_FilenameQComboBox {type='QComboBox' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_FilenameQComboBox {type='QComboBox' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_Find::Internal::SearchResultTreeView {type='Find::Internal::SearchResultTreeView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_Find::Internal::SearchResultTreeView {type='Find::Internal::SearchResultTreeView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
@@ -101,6 +102,7 @@
:Qt Creator_QDeclarativeView {type='QDeclarativeView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_QDeclarativeView {type='QDeclarativeView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_QHelpContentWidget {type='QHelpContentWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_QHelpContentWidget {type='QHelpContentWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_QTableView {type='QTableView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_QTableView {type='QTableView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_QmlJSEditor::Internal::QmlJSOutlineTreeView {type='QmlJSEditor::Internal::QmlJSOutlineTreeView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_QmlJSEditor::QmlJSTextEditorWidget {type='QmlJSEditor::QmlJSTextEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_QmlJSEditor::QmlJSTextEditorWidget {type='QmlJSEditor::QmlJSTextEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_SearchResult_Core::Internal::OutputPaneToggleButton {occurrence='2' type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_SearchResult_Core::Internal::OutputPaneToggleButton {occurrence='2' type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_SystemSettings.Details_Utils::DetailsButton {occurrence='4' text='Details' type='Utils::DetailsButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_SystemSettings.Details_Utils::DetailsButton {occurrence='4' text='Details' type='Utils::DetailsButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}

View File

@@ -294,6 +294,7 @@ def invokeFindUsage(editor, line, typeOperation, n=1):
def openDocument(treeElement): def openDocument(treeElement):
try: try:
selectFromCombo(":Qt Creator_Core::Internal::NavComboBox", "Open Documents")
navigator = waitForObject(":Qt Creator_Utils::NavigationTreeView") navigator = waitForObject(":Qt Creator_Utils::NavigationTreeView")
fileName = waitForObjectItem(navigator, treeElement).text fileName = waitForObjectItem(navigator, treeElement).text
doubleClickItem(navigator, treeElement, 5, 5, 0, Qt.LeftButton) doubleClickItem(navigator, treeElement, 5, 5, 0, Qt.LeftButton)

View File

@@ -7,6 +7,6 @@ HOOK_SUB_PROCESSES=false
IMPLICITAUTSTART=0 IMPLICITAUTSTART=0
LANGUAGE=Python LANGUAGE=Python
OBJECTMAP=../objects.map OBJECTMAP=../objects.map
TEST_CASES=tst_qtquick_creation tst_qtquick_creation2 tst_qtquick_creation3 tst_qtquick_creation4 TEST_CASES=tst_qml_outline tst_qtquick_creation tst_qtquick_creation2 tst_qtquick_creation3 tst_qtquick_creation4
VERSION=2 VERSION=2
WRAPPERS=Qt WRAPPERS=Qt

View File

@@ -0,0 +1,114 @@
source("../../shared/qtcreator.py")
qmlEditor = ":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget"
outline = ":Qt Creator_QmlJSEditor::Internal::QmlJSOutlineTreeView"
def main():
sourceExample = os.path.abspath(os.path.join(sdkPath, "Examples", "4.7", "declarative",
"keyinteraction", "focus"))
proFile = "focus.pro"
if not neededFilePresent(os.path.join(sourceExample, proFile)):
return
templateDir = prepareTemplate(sourceExample)
startApplication("qtcreator" + SettingsPath)
openQmakeProject(os.path.join(templateDir, proFile))
qmlFiles = ["focus.QML.qml.focus\\.qml", "focus.QML.qml.Core.ListMenu\\.qml"]
checkOutlineFor(qmlFiles)
testModify()
invokeMenuItem("File", "Save All")
invokeMenuItem("File", "Exit")
def checkOutlineFor(qmlFiles):
for qmlFile in qmlFiles:
if not openDocument(qmlFile):
test.fatal("Failed to open file '%s'" % simpleFileName(qmlFile))
continue
selectFromCombo(":Qt Creator_Core::Internal::NavComboBox", "Outline")
pseudoTree = buildTreeFromOutline()
# __writeOutlineFile__(pseudoTree, simpleFileName(qmlFile)+"_outline.tsv")
verifyOutline(pseudoTree, simpleFileName(qmlFile) + "_outline.tsv")
def buildTreeFromOutline():
global outline
model = waitForObject(outline).model()
waitFor("model.rowCount() > 0")
return processChildren(model, QModelIndex(), 0)
def processChildren(model, startIndex, level):
children = []
for index in dumpIndices(model, startIndex):
annotationData = str(index.data(Qt.UserRole + 3)) # HACK - taken from source
children.append((str(index.data()), level, annotationData))
if model.hasChildren(index):
children.extend(processChildren(model, index, level + 1))
return children
def testModify():
global qmlEditor, outline
if not openDocument("focus.QML.qml.focus\\.qml"):
test.fatal("Failed to open file focus.qml")
return
test.log("Testing whether modifications show up inside outline.")
if not placeCursorToLine(qmlEditor, 'color: "#3E606F"'):
return
test.log("Modification: adding a QML element")
typeLines(qmlEditor, ['', '', 'Text {', 'id: addedText', 'text: "Squish QML outline test"',
'color: "darkcyan"', 'font.bold: true', 'anchors.centerIn: parent'])
selectFromCombo(":Qt Creator_Core::Internal::NavComboBox", "Outline")
snooze(1) # no way to wait for a private signal
pseudoTree = buildTreeFromOutline()
# __writeOutlineFile__(pseudoTree, "focus.qml_mod1_outline.tsv")
verifyOutline(pseudoTree, "focus.qml_mod1_outline.tsv")
test.log("Modification: change existing content")
performModification('color: "#3E606F"', "<Left>", 7, "Left", "white")
performModification('color: "black"', "<Left>", 5, "Left", "#cc00bb")
performModification('rotation: 90', None, 2, "Left", "180")
snooze(1) # no way to wait for a private signal
pseudoTree = buildTreeFromOutline()
# __writeOutlineFile__(pseudoTree, "focus.qml_mod2_outline.tsv")
verifyOutline(pseudoTree, "focus.qml_mod2_outline.tsv")
def performModification(afterLine, typing, markCount, markDirection, newText):
global qmlEditor
if not placeCursorToLine(qmlEditor, afterLine):
return
if typing:
type(qmlEditor, typing)
markText(qmlEditor, markCount, markDirection)
type(qmlEditor, newText)
def markText(editor, charCount, direction):
for i in range(charCount):
type(editor, "<Shift+%s>" % direction)
# used to create the tsv file(s)
def __writeOutlineFile__(outlinePseudoTree, filename):
f = open(filename, "w+")
f.write('"element"\t"nestinglevel"\t"value"\n')
for elem in outlinePseudoTree:
f.write('"%s"\t"%s"\t"%s"\n' % (elem[0], elem[1], elem[2].replace('"', '\"\"')))
f.close()
def retrieveData(record):
return (testData.field(record, "element"),
__builtin__.int(testData.field(record, "nestinglevel")),
testData.field(record, "value"))
def verifyOutline(outlinePseudoTree, datasetFileName):
fileName = datasetFileName[:datasetFileName.index("_")]
expected = map(retrieveData, testData.dataset(datasetFileName))
if len(expected) != len(outlinePseudoTree):
test.fail("Mismatch in length of expected and found elements of outline. Skipping "
"verification of nodes.",
"Found %d elements, but expected %d" % (len(outlinePseudoTree), len(expected)))
return
for counter, (expectedItem, foundItem) in enumerate(zip(expected, outlinePseudoTree)):
if expectedItem != foundItem:
test.fail("Mismatch in element number %d for '%s'" % (counter + 1, fileName),
"%s != %s" % (str(expectedItem), str(foundItem)))
return
test.passes("All nodes (%d) inside outline match expected nodes for '%s'."
% (len(expected), fileName))
def simpleFileName(navigatorFileName):
return ".".join(navigatorFileName.split(".")[-2:]).replace("\\", "")

View File

@@ -0,0 +1,85 @@
"element" "nestinglevel" "value"
"FocusScope" "0" ""
"clip" "1" "true"
"onActiveFocusChanged" "1" ""
"ListView" "1" ""
"id" "2" "list1"
"y" "2" "activeFocus ? 10 : 40"
"width" "2" "parent.width / 3"
"height" "2" "parent.height - 20"
"focus" "2" "true"
"KeyNavigation.up" "2" "gridMenu"
"KeyNavigation.left" "2" "contextMenu"
"KeyNavigation.right" "2" "list2"
"model" "2" "10"
"cacheBuffer" "2" "200"
"delegate" "2" ""
"ListViewDelegate" "3" ""
"y" "2" ""
"Behavior" "3" ""
"NumberAnimation" "4" ""
"duration" "5" "600"
"easing.type" "5" "Easing.OutQuint"
"ListView" "1" ""
"id" "2" "list2"
"y" "2" "activeFocus ? 10 : 40"
"x" "2" "parseInt(parent.width / 3)"
"width" "2" "parent.width / 3"
"height" "2" "parent.height - 20"
"KeyNavigation.up" "2" "gridMenu"
"KeyNavigation.left" "2" "list1"
"KeyNavigation.right" "2" "list3"
"model" "2" "10"
"cacheBuffer" "2" "200"
"delegate" "2" ""
"ListViewDelegate" "3" ""
"y" "2" ""
"Behavior" "3" ""
"NumberAnimation" "4" ""
"duration" "5" "600"
"easing.type" "5" "Easing.OutQuint"
"ListView" "1" ""
"id" "2" "list3"
"y" "2" "activeFocus ? 10 : 40"
"x" "2" "parseInt(2 * parent.width / 3)"
"width" "2" "parent.width / 3"
"height" "2" "parent.height - 20"
"KeyNavigation.up" "2" "gridMenu"
"KeyNavigation.left" "2" "list2"
"model" "2" "10"
"cacheBuffer" "2" "200"
"delegate" "2" ""
"ListViewDelegate" "3" ""
"y" "2" ""
"Behavior" "3" ""
"NumberAnimation" "4" ""
"duration" "5" "600"
"easing.type" "5" "Easing.OutQuint"
"Rectangle" "1" ""
"width" "2" "parent.width"
"height" "2" "1"
"color" "2" """#D1DBBD"""
"Rectangle" "1" ""
"y" "2" "1"
"width" "2" "parent.width"
"height" "2" "10"
"gradient" "2" ""
"Gradient" "3" ""
"GradientStop" "4" ""
"position" "5" "0.0"
"color" "5" """#3E606F"""
"GradientStop" "4" ""
"position" "5" "1.0"
"color" "5" """transparent"""
"Rectangle" "1" ""
"y" "2" "parent.height - 10"
"width" "2" "parent.width"
"height" "2" "10"
"gradient" "2" ""
"Gradient" "3" ""
"GradientStop" "4" ""
"position" "5" "1.0"
"color" "5" """#3E606F"""
"GradientStop" "4" ""
"position" "5" "0.0"
"color" "5" """transparent"""
1 element nestinglevel value
2 FocusScope 0
3 clip 1 true
4 onActiveFocusChanged 1
5 ListView 1
6 id 2 list1
7 y 2 activeFocus ? 10 : 40
8 width 2 parent.width / 3
9 height 2 parent.height - 20
10 focus 2 true
11 KeyNavigation.up 2 gridMenu
12 KeyNavigation.left 2 contextMenu
13 KeyNavigation.right 2 list2
14 model 2 10
15 cacheBuffer 2 200
16 delegate 2
17 ListViewDelegate 3
18 y 2
19 Behavior 3
20 NumberAnimation 4
21 duration 5 600
22 easing.type 5 Easing.OutQuint
23 ListView 1
24 id 2 list2
25 y 2 activeFocus ? 10 : 40
26 x 2 parseInt(parent.width / 3)
27 width 2 parent.width / 3
28 height 2 parent.height - 20
29 KeyNavigation.up 2 gridMenu
30 KeyNavigation.left 2 list1
31 KeyNavigation.right 2 list3
32 model 2 10
33 cacheBuffer 2 200
34 delegate 2
35 ListViewDelegate 3
36 y 2
37 Behavior 3
38 NumberAnimation 4
39 duration 5 600
40 easing.type 5 Easing.OutQuint
41 ListView 1
42 id 2 list3
43 y 2 activeFocus ? 10 : 40
44 x 2 parseInt(2 * parent.width / 3)
45 width 2 parent.width / 3
46 height 2 parent.height - 20
47 KeyNavigation.up 2 gridMenu
48 KeyNavigation.left 2 list2
49 model 2 10
50 cacheBuffer 2 200
51 delegate 2
52 ListViewDelegate 3
53 y 2
54 Behavior 3
55 NumberAnimation 4
56 duration 5 600
57 easing.type 5 Easing.OutQuint
58 Rectangle 1
59 width 2 parent.width
60 height 2 1
61 color 2 "#D1DBBD"
62 Rectangle 1
63 y 2 1
64 width 2 parent.width
65 height 2 10
66 gradient 2
67 Gradient 3
68 GradientStop 4
69 position 5 0.0
70 color 5 "#3E606F"
71 GradientStop 4
72 position 5 1.0
73 color 5 "transparent"
74 Rectangle 1
75 y 2 parent.height - 10
76 width 2 parent.width
77 height 2 10
78 gradient 2
79 Gradient 3
80 GradientStop 4
81 position 5 1.0
82 color 5 "#3E606F"
83 GradientStop 4
84 position 5 0.0
85 color 5 "transparent"

View File

@@ -0,0 +1,81 @@
"element" "nestinglevel" "value"
"Rectangle" "0" ""
"id" "1" "window"
"width" "1" "800"
"height" "1" "480"
"color" "1" """#3E606F"""
"Text" "1" ""
"id" "2" "addedText"
"text" "2" """Squish QML outline test"""
"color" "2" """darkcyan"""
"font.bold" "2" "true"
"anchors.centerIn" "2" "parent"
"FocusScope" "1" ""
"id" "2" "mainView"
"width" "2" "parent.width"
"height" "2" "parent.height"
"focus" "2" "true"
"GridMenu" "2" ""
"id" "3" "gridMenu"
"width" "3" "parent.width"
"height" "3" "320"
"focus" "3" "true"
"interactive" "3" "parent.activeFocus"
"ListMenu" "2" ""
"id" "3" "listMenu"
"y" "3" "320"
"width" "3" "parent.width"
"height" "3" "320"
"Rectangle" "2" ""
"id" "3" "shade"
"anchors.fill" "3" "parent"
"color" "3" """black"""
"opacity" "3" "0"
"states" "2" ""
"State" "3" ""
"name" "4" """showListViews"""
"PropertyChanges" "4" ""
"target" "5" "gridMenu"
"y" "5" "-160"
"PropertyChanges" "4" ""
"target" "5" "listMenu"
"y" "5" "160"
"transitions" "2" ""
"Transition" "3" ""
"NumberAnimation" "4" ""
"properties" "5" """y"""
"duration" "5" "600"
"easing.type" "5" "Easing.OutQuint"
"Image" "1" ""
"source" "2" """Core/images/arrow.png"""
"rotation" "2" "90"
"anchors.verticalCenter" "2" "parent.verticalCenter"
"MouseArea" "2" ""
"anchors.fill" "3" "parent"
"anchors.margins" "3" "-10"
"onClicked" "3" "contextMenu.focus = true"
"ContextMenu" "1" ""
"id" "2" "contextMenu"
"x" "2" "-265"
"width" "2" "260"
"height" "2" "parent.height"
"states" "1" ""
"State" "2" ""
"name" "3" """contextMenuOpen"""
"when" "3" "!mainView.activeFocus"
"PropertyChanges" "3" ""
"target" "4" "contextMenu"
"x" "4" "0"
"open" "4" "true"
"PropertyChanges" "3" ""
"target" "4" "mainView"
"x" "4" "130"
"PropertyChanges" "3" ""
"target" "4" "shade"
"opacity" "4" "0.25"
"transitions" "1" ""
"Transition" "2" ""
"NumberAnimation" "3" ""
"properties" "4" """x,opacity"""
"duration" "4" "600"
"easing.type" "4" "Easing.OutQuint"
1 element nestinglevel value
2 Rectangle 0
3 id 1 window
4 width 1 800
5 height 1 480
6 color 1 "#3E606F"
7 Text 1
8 id 2 addedText
9 text 2 "Squish QML outline test"
10 color 2 "darkcyan"
11 font.bold 2 true
12 anchors.centerIn 2 parent
13 FocusScope 1
14 id 2 mainView
15 width 2 parent.width
16 height 2 parent.height
17 focus 2 true
18 GridMenu 2
19 id 3 gridMenu
20 width 3 parent.width
21 height 3 320
22 focus 3 true
23 interactive 3 parent.activeFocus
24 ListMenu 2
25 id 3 listMenu
26 y 3 320
27 width 3 parent.width
28 height 3 320
29 Rectangle 2
30 id 3 shade
31 anchors.fill 3 parent
32 color 3 "black"
33 opacity 3 0
34 states 2
35 State 3
36 name 4 "showListViews"
37 PropertyChanges 4
38 target 5 gridMenu
39 y 5 -160
40 PropertyChanges 4
41 target 5 listMenu
42 y 5 160
43 transitions 2
44 Transition 3
45 NumberAnimation 4
46 properties 5 "y"
47 duration 5 600
48 easing.type 5 Easing.OutQuint
49 Image 1
50 source 2 "Core/images/arrow.png"
51 rotation 2 90
52 anchors.verticalCenter 2 parent.verticalCenter
53 MouseArea 2
54 anchors.fill 3 parent
55 anchors.margins 3 -10
56 onClicked 3 contextMenu.focus = true
57 ContextMenu 1
58 id 2 contextMenu
59 x 2 -265
60 width 2 260
61 height 2 parent.height
62 states 1
63 State 2
64 name 3 "contextMenuOpen"
65 when 3 !mainView.activeFocus
66 PropertyChanges 3
67 target 4 contextMenu
68 x 4 0
69 open 4 true
70 PropertyChanges 3
71 target 4 mainView
72 x 4 130
73 PropertyChanges 3
74 target 4 shade
75 opacity 4 0.25
76 transitions 1
77 Transition 2
78 NumberAnimation 3
79 properties 4 "x,opacity"
80 duration 4 600
81 easing.type 4 Easing.OutQuint

View File

@@ -0,0 +1,81 @@
"element" "nestinglevel" "value"
"Rectangle" "0" ""
"id" "1" "window"
"width" "1" "800"
"height" "1" "480"
"color" "1" """white"""
"Text" "1" ""
"id" "2" "addedText"
"text" "2" """Squish QML outline test"""
"color" "2" """darkcyan"""
"font.bold" "2" "true"
"anchors.centerIn" "2" "parent"
"FocusScope" "1" ""
"id" "2" "mainView"
"width" "2" "parent.width"
"height" "2" "parent.height"
"focus" "2" "true"
"GridMenu" "2" ""
"id" "3" "gridMenu"
"width" "3" "parent.width"
"height" "3" "320"
"focus" "3" "true"
"interactive" "3" "parent.activeFocus"
"ListMenu" "2" ""
"id" "3" "listMenu"
"y" "3" "320"
"width" "3" "parent.width"
"height" "3" "320"
"Rectangle" "2" ""
"id" "3" "shade"
"anchors.fill" "3" "parent"
"color" "3" """#cc00bb"""
"opacity" "3" "0"
"states" "2" ""
"State" "3" ""
"name" "4" """showListViews"""
"PropertyChanges" "4" ""
"target" "5" "gridMenu"
"y" "5" "-160"
"PropertyChanges" "4" ""
"target" "5" "listMenu"
"y" "5" "160"
"transitions" "2" ""
"Transition" "3" ""
"NumberAnimation" "4" ""
"properties" "5" """y"""
"duration" "5" "600"
"easing.type" "5" "Easing.OutQuint"
"Image" "1" ""
"source" "2" """Core/images/arrow.png"""
"rotation" "2" "180"
"anchors.verticalCenter" "2" "parent.verticalCenter"
"MouseArea" "2" ""
"anchors.fill" "3" "parent"
"anchors.margins" "3" "-10"
"onClicked" "3" "contextMenu.focus = true"
"ContextMenu" "1" ""
"id" "2" "contextMenu"
"x" "2" "-265"
"width" "2" "260"
"height" "2" "parent.height"
"states" "1" ""
"State" "2" ""
"name" "3" """contextMenuOpen"""
"when" "3" "!mainView.activeFocus"
"PropertyChanges" "3" ""
"target" "4" "contextMenu"
"x" "4" "0"
"open" "4" "true"
"PropertyChanges" "3" ""
"target" "4" "mainView"
"x" "4" "130"
"PropertyChanges" "3" ""
"target" "4" "shade"
"opacity" "4" "0.25"
"transitions" "1" ""
"Transition" "2" ""
"NumberAnimation" "3" ""
"properties" "4" """x,opacity"""
"duration" "4" "600"
"easing.type" "4" "Easing.OutQuint"
1 element nestinglevel value
2 Rectangle 0
3 id 1 window
4 width 1 800
5 height 1 480
6 color 1 "white"
7 Text 1
8 id 2 addedText
9 text 2 "Squish QML outline test"
10 color 2 "darkcyan"
11 font.bold 2 true
12 anchors.centerIn 2 parent
13 FocusScope 1
14 id 2 mainView
15 width 2 parent.width
16 height 2 parent.height
17 focus 2 true
18 GridMenu 2
19 id 3 gridMenu
20 width 3 parent.width
21 height 3 320
22 focus 3 true
23 interactive 3 parent.activeFocus
24 ListMenu 2
25 id 3 listMenu
26 y 3 320
27 width 3 parent.width
28 height 3 320
29 Rectangle 2
30 id 3 shade
31 anchors.fill 3 parent
32 color 3 "#cc00bb"
33 opacity 3 0
34 states 2
35 State 3
36 name 4 "showListViews"
37 PropertyChanges 4
38 target 5 gridMenu
39 y 5 -160
40 PropertyChanges 4
41 target 5 listMenu
42 y 5 160
43 transitions 2
44 Transition 3
45 NumberAnimation 4
46 properties 5 "y"
47 duration 5 600
48 easing.type 5 Easing.OutQuint
49 Image 1
50 source 2 "Core/images/arrow.png"
51 rotation 2 180
52 anchors.verticalCenter 2 parent.verticalCenter
53 MouseArea 2
54 anchors.fill 3 parent
55 anchors.margins 3 -10
56 onClicked 3 contextMenu.focus = true
57 ContextMenu 1
58 id 2 contextMenu
59 x 2 -265
60 width 2 260
61 height 2 parent.height
62 states 1
63 State 2
64 name 3 "contextMenuOpen"
65 when 3 !mainView.activeFocus
66 PropertyChanges 3
67 target 4 contextMenu
68 x 4 0
69 open 4 true
70 PropertyChanges 3
71 target 4 mainView
72 x 4 130
73 PropertyChanges 3
74 target 4 shade
75 opacity 4 0.25
76 transitions 1
77 Transition 2
78 NumberAnimation 3
79 properties 4 "x,opacity"
80 duration 4 600
81 easing.type 4 Easing.OutQuint

View File

@@ -0,0 +1,75 @@
"element" "nestinglevel" "value"
"Rectangle" "0" ""
"id" "1" "window"
"width" "1" "800"
"height" "1" "480"
"color" "1" """#3E606F"""
"FocusScope" "1" ""
"id" "2" "mainView"
"width" "2" "parent.width"
"height" "2" "parent.height"
"focus" "2" "true"
"GridMenu" "2" ""
"id" "3" "gridMenu"
"width" "3" "parent.width"
"height" "3" "320"
"focus" "3" "true"
"interactive" "3" "parent.activeFocus"
"ListMenu" "2" ""
"id" "3" "listMenu"
"y" "3" "320"
"width" "3" "parent.width"
"height" "3" "320"
"Rectangle" "2" ""
"id" "3" "shade"
"anchors.fill" "3" "parent"
"color" "3" """black"""
"opacity" "3" "0"
"states" "2" ""
"State" "3" ""
"name" "4" """showListViews"""
"PropertyChanges" "4" ""
"target" "5" "gridMenu"
"y" "5" "-160"
"PropertyChanges" "4" ""
"target" "5" "listMenu"
"y" "5" "160"
"transitions" "2" ""
"Transition" "3" ""
"NumberAnimation" "4" ""
"properties" "5" """y"""
"duration" "5" "600"
"easing.type" "5" "Easing.OutQuint"
"Image" "1" ""
"source" "2" """Core/images/arrow.png"""
"rotation" "2" "90"
"anchors.verticalCenter" "2" "parent.verticalCenter"
"MouseArea" "2" ""
"anchors.fill" "3" "parent"
"anchors.margins" "3" "-10"
"onClicked" "3" "contextMenu.focus = true"
"ContextMenu" "1" ""
"id" "2" "contextMenu"
"x" "2" "-265"
"width" "2" "260"
"height" "2" "parent.height"
"states" "1" ""
"State" "2" ""
"name" "3" """contextMenuOpen"""
"when" "3" "!mainView.activeFocus"
"PropertyChanges" "3" ""
"target" "4" "contextMenu"
"x" "4" "0"
"open" "4" "true"
"PropertyChanges" "3" ""
"target" "4" "mainView"
"x" "4" "130"
"PropertyChanges" "3" ""
"target" "4" "shade"
"opacity" "4" "0.25"
"transitions" "1" ""
"Transition" "2" ""
"NumberAnimation" "3" ""
"properties" "4" """x,opacity"""
"duration" "4" "600"
"easing.type" "4" "Easing.OutQuint"
1 element nestinglevel value
2 Rectangle 0
3 id 1 window
4 width 1 800
5 height 1 480
6 color 1 "#3E606F"
7 FocusScope 1
8 id 2 mainView
9 width 2 parent.width
10 height 2 parent.height
11 focus 2 true
12 GridMenu 2
13 id 3 gridMenu
14 width 3 parent.width
15 height 3 320
16 focus 3 true
17 interactive 3 parent.activeFocus
18 ListMenu 2
19 id 3 listMenu
20 y 3 320
21 width 3 parent.width
22 height 3 320
23 Rectangle 2
24 id 3 shade
25 anchors.fill 3 parent
26 color 3 "black"
27 opacity 3 0
28 states 2
29 State 3
30 name 4 "showListViews"
31 PropertyChanges 4
32 target 5 gridMenu
33 y 5 -160
34 PropertyChanges 4
35 target 5 listMenu
36 y 5 160
37 transitions 2
38 Transition 3
39 NumberAnimation 4
40 properties 5 "y"
41 duration 5 600
42 easing.type 5 Easing.OutQuint
43 Image 1
44 source 2 "Core/images/arrow.png"
45 rotation 2 90
46 anchors.verticalCenter 2 parent.verticalCenter
47 MouseArea 2
48 anchors.fill 3 parent
49 anchors.margins 3 -10
50 onClicked 3 contextMenu.focus = true
51 ContextMenu 1
52 id 2 contextMenu
53 x 2 -265
54 width 2 260
55 height 2 parent.height
56 states 1
57 State 2
58 name 3 "contextMenuOpen"
59 when 3 !mainView.activeFocus
60 PropertyChanges 3
61 target 4 contextMenu
62 x 4 0
63 open 4 true
64 PropertyChanges 3
65 target 4 mainView
66 x 4 130
67 PropertyChanges 3
68 target 4 shade
69 opacity 4 0.25
70 transitions 1
71 Transition 2
72 NumberAnimation 3
73 properties 4 "x,opacity"
74 duration 4 600
75 easing.type 4 Easing.OutQuint