@@ -25,7 +25,7 @@ AbstractButton {
26 property bool showList: false
26 property bool showList: false
28− readonly property var currentDepartment: scope && scope.hasDepartments ? scope.getDepartment(scope.currentDepartmentId) : null
28+ readonly property var currentDepartment: scope && scope.hasNavigation ? scope.getNavigation(scope.currentNavigationId) : null
30 property alias windowWidth: blackRect.width
30 property alias windowWidth: blackRect.width
31 property alias windowHeight: blackRect.height
31 property alias windowHeight: blackRect.height
@@ -102,8 +102,8 @@ AbstractButton {
102 model: ListModel {
102 model: ListModel {
103 id: departmentModel
103 id: departmentModel
104 // We have two roles
104 // We have two roles
105− // departmentId: the department id of the department the list represents
105+ // navigationId: the department id of the department the list represents
106− // nullifyDepartment: overrides departmentId to be null
106+ // nullifyDepartment: overrides navigationId to be null
107 // This is used to "clear" the delegate when going "right" on the tree
107 // This is used to "clear" the delegate when going "right" on the tree
109 anchors {
109 anchors {
@@ -138,31 +138,31 @@ AbstractButton {
140 height: desiredHeight
140 height: desiredHeight
141− department: (nullifyDepartment || !scope) ? null : scope.getDepartment(departmentId)
141+ department: (nullifyDepartment || !scope) ? null : scope.getNavigation(navigationId)
142 currentDepartment: root.currentDepartment
142 currentDepartment: root.currentDepartment
143 onEnterDepartment: {
143 onEnterDepartment: {
144− scope.loadDepartment(newDepartmentId);
144+ scope.performQuery(departmentQuery);
145 // We only need to add a new item to the model
145 // We only need to add a new item to the model
146 // if we have children, otherwise just load it
146 // if we have children, otherwise just load it
147 if (hasChildren) {
147 if (hasChildren) {
148 isGoingBack = false;
148 isGoingBack = false;
149− departmentModel.append({"departmentId": newDepartmentId, "nullifyDepartment": false});
149+ departmentModel.append({"navigationId": newNavigationId, "nullifyDepartment": false});
150 departmentListView.currentIndex++;
150 departmentListView.currentIndex++;
152 showList = false;
152 showList = false;
155 onGoBackToParentClicked: {
155 onGoBackToParentClicked: {
156− scope.loadDepartment(department.parentDepartmentId);
156+ scope.performQuery(department.parentQuery);
157 isGoingBack = true;
157 isGoingBack = true;
158 departmentModel.setProperty(departmentListView.currentIndex - 1, "nullifyDepartment", false);
158 departmentModel.setProperty(departmentListView.currentIndex - 1, "nullifyDepartment", false);
159 departmentListView.currentIndex--;
159 departmentListView.currentIndex--;
161 onAllDepartmentClicked: {
161 onAllDepartmentClicked: {
162 showList = false;
162 showList = false;
163− if (root.currentDepartment.parentDepartmentId == department.departmentId) {
163+ if (root.currentDepartment.parentNavigationId == department.navigationId) {
164 // For leaves we have to go to the parent too
164 // For leaves we have to go to the parent too
165− scope.loadDepartment(root.currentDepartment.parentDepartmentId);
165+ scope.performQuery(root.currentDepartment.parentQuery);
@@ -185,16 +185,16 @@ AbstractButton {
186 onScopeChanged: {
186 onScopeChanged: {
187 departmentModel.clear();
187 departmentModel.clear();
188− if (scope && scope.hasDepartments) {
188+ if (scope && scope.hasNavigation) {
189− departmentModel.append({"departmentId": scope.currentDepartmentId, "nullifyDepartment": false});
189+ departmentModel.append({"navigationId": scope.currentNavigationId, "nullifyDepartment": false});
193 Connections {
193 Connections {
194 target: scope
194 target: scope
195− onHasDepartmentsChanged: {
195+ onHasNavigationChanged: {
196− if (scope.hasDepartments) {
196+ if (scope.hasNavigation) {
197− departmentModel.append({"departmentId": scope.currentDepartmentId, "nullifyDepartment": false});
197+ departmentModel.append({"navigationId": scope.currentNavigationId, "nullifyDepartment": false});
199 departmentModel.clear();
199 departmentModel.clear();