-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changed the way to create qml pages, now the page is created when you…
… go to it - added PageSetupWizardConfigSource, PageSetupWizardInstalling, PageSetupWizardProtocolSettings, PageSetupWizardTextKey
- Loading branch information
Showing
25 changed files
with
504 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,7 @@ | ||
import QtQuick | ||
import QtQuick.Controls | ||
|
||
import Qt.labs.folderlistmodel | ||
|
||
import PageType 1.0 | ||
|
||
Item { | ||
property var pages: ({}) | ||
|
||
signal finished() | ||
|
||
FolderListModel { | ||
id: folderModelPages | ||
folder: "qrc:/ui/qml/Pages2/" | ||
nameFilters: ["*.qml"] | ||
showDirs: false | ||
|
||
onStatusChanged: { | ||
if (status == FolderListModel.Ready) { | ||
for (var i = 0; i < folderModelPages.count; i++) { | ||
createPagesObjects(folderModelPages.get(i, "filePath"), PageType.Basic); | ||
} | ||
finished() | ||
} | ||
} | ||
|
||
function createPagesObjects(file, type) { | ||
if (file.indexOf("Base") !== -1) { | ||
return; // skip Base Pages | ||
} | ||
|
||
var c = Qt.createComponent("qrc" + file); | ||
|
||
var finishCreation = function(component) { | ||
if (component.status === Component.Ready) { | ||
var obj = component.createObject(root); | ||
if (obj === null) { | ||
console.debug("Error creating object " + component.url); | ||
} else { | ||
obj.visible = false | ||
if (type === PageType.Basic) { | ||
pages[obj.page] = obj | ||
} | ||
} | ||
} else if (component.status === Component.Error) { | ||
console.debug("Error loading component:", component.errorString()); | ||
} | ||
} | ||
|
||
if (c.status === Component.Ready) { | ||
finishCreation(c); | ||
} else { | ||
console.debug("Warning: " + file + " page components are not ready " + c.errorString()); | ||
} | ||
} | ||
} | ||
StackView { | ||
id: stackView | ||
initialItem: "PageStart" | ||
} |
Oops, something went wrong.