Changeset View
Changeset View
Standalone View
Standalone View
src/activities/memory/MemoryCommon.qml
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Line(s) | 40 | pageComponent: Image { | |||
---|---|---|---|---|---|
46 | 46 | | |||
47 | signal start | 47 | signal start | ||
48 | signal stop | 48 | signal stop | ||
49 | 49 | | |||
50 | property alias items: items | 50 | property alias items: items | ||
51 | property bool keyNavigationVisible: false | 51 | property bool keyNavigationVisible: false | ||
52 | 52 | | |||
53 | Component.onCompleted: { | 53 | Component.onCompleted: { | ||
54 | dialogActivityConfig.initialize() | ||||
54 | activity.start.connect(start) | 55 | activity.start.connect(start) | ||
55 | activity.stop.connect(stop) | 56 | activity.stop.connect(stop) | ||
56 | } | 57 | } | ||
57 | 58 | | |||
58 | QtObject { | 59 | QtObject { | ||
59 | id: items | 60 | id: items | ||
60 | property alias bar: bar | 61 | property alias bar: bar | ||
61 | property alias bonus: bonus | 62 | property alias bonus: bonus | ||
62 | property GCSfx audioEffects: activity.audioEffects | 63 | property GCSfx audioEffects: activity.audioEffects | ||
63 | property bool withTux: activity.withTux | 64 | property bool withTux: activity.withTux | ||
64 | property bool tuxTurn: false | 65 | property bool tuxTurn: false | ||
65 | property var playQueue | 66 | property var playQueue | ||
66 | property int selectionCount | 67 | property int selectionCount | ||
67 | property int tuxScore: tuxScore.text | 68 | property int tuxScore: tuxScore.text | ||
68 | property int playerScore: playerScore.text | 69 | property int playerScore: playerScore.text | ||
69 | property var dataset: activity.dataset | 70 | property var levels: activity.datasetLoader.data != 0 ? activity.datasetLoader.data : activity.dataset | ||
70 | property alias containerModel: containerModel | 71 | property alias containerModel: containerModel | ||
71 | property alias grid: grid | 72 | property alias grid: grid | ||
72 | property bool blockClicks: false | 73 | property bool blockClicks: false | ||
73 | property int columns | 74 | property int columns | ||
74 | property int rows | 75 | property int rows | ||
75 | property int spacing: 5 * ApplicationInfo.ratio | 76 | property int spacing: 5 * ApplicationInfo.ratio | ||
76 | } | 77 | } | ||
77 | 78 | | |||
▲ Show 20 Lines • Show All 60 Lines • ▼ Show 20 Line(s) | 88 | GridView { | |||
138 | } | 139 | } | ||
139 | } | 140 | } | ||
140 | 141 | | |||
141 | DialogHelp { | 142 | DialogHelp { | ||
142 | id: dialogHelp | 143 | id: dialogHelp | ||
143 | onClose: home() | 144 | onClose: home() | ||
144 | } | 145 | } | ||
145 | 146 | | |||
147 | DialogChooseLevel { | ||||
148 | id: dialogActivityConfig | ||||
149 | currentActivity: activity.activityInfo | ||||
150 | | ||||
151 | onSaveData: { | ||||
152 | levelFolder = dialogActivityConfig.chosenLevel | ||||
153 | currentActivity.currentLevel = dialogActivityConfig.chosenLevel | ||||
154 | ApplicationSettings.setCurrentLevel(currentActivity.name, dialogActivityConfig.chosenLevel) | ||||
155 | home() | ||||
156 | } | ||||
157 | onClose: { | ||||
158 | home() | ||||
159 | } | ||||
160 | onStartActivity: { | ||||
161 | background.start() | ||||
162 | } | ||||
163 | } | ||||
164 | | ||||
146 | Bar { | 165 | Bar { | ||
147 | id: bar | 166 | id: bar | ||
148 | content: BarEnumContent { value: help | home | level } | 167 | content: BarEnumContent { value: help | home | level | activityConfig } | ||
149 | onHelpClicked: { | 168 | onHelpClicked: { | ||
150 | displayDialog(dialogHelp) | 169 | displayDialog(dialogHelp) | ||
151 | } | 170 | } | ||
152 | onPreviousLevelClicked: Activity.previousLevel() | 171 | onPreviousLevelClicked: Activity.previousLevel() | ||
172 | onActivityConfigClicked: { | ||||
173 | displayDialog(dialogActivityConfig) | ||||
174 | } | ||||
153 | onNextLevelClicked: Activity.nextLevel() | 175 | onNextLevelClicked: Activity.nextLevel() | ||
154 | onHomeClicked: home() | 176 | onHomeClicked: home() | ||
155 | } | 177 | } | ||
156 | 178 | | |||
157 | Image { | 179 | Image { | ||
158 | id: player | 180 | id: player | ||
159 | source: 'qrc:/gcompris/src/activities/memory/resource/children.svg' | 181 | source: 'qrc:/gcompris/src/activities/memory/resource/children.svg' | ||
160 | anchors { | 182 | anchors { | ||
▲ Show 20 Lines • Show All 87 Lines • Show Last 20 Lines |