15
15
width: units.gu(50)
16
16
height: units.gu(75)
21
// It returns "expected argument" message when not specified a path.
22
// It works anyway, but it may be worth to use Argument{} in future
23
defaultArgument.help: "Path of the document"
24
defaultArgument.valueNames: ["path"]
28
19
objectName: "fileObject"
35
26
Component.onCompleted: {
36
// Check if a value has been specified for "path" argument
37
if (args.defaultArgument.at(0)) {
38
// If so, send the path to the File plugin
39
console.log("Path argument is:", args.defaultArgument.at(0))
40
file.path = args.defaultArgument.at(0)
27
// Check if a value has been specified for "documentPath" argument.
28
// The value for the argument is parsed in main.cpp.
31
// If so, send the path to the File plugin and load the document.
32
console.log("Path argument is:", documentPath);
33
file.path = documentPath;
42
// Otherwise, push a welcome screen in the stack
43
pageStack.push(Qt.resolvedUrl("WelcomePage.qml"))
35
// Otherwise, push a welcome screen in the stack.
36
pageStack.push(Qt.resolvedUrl("WelcomePage.qml"));
47
40
// Content Importer
41
// Used when user asks to open a document from ContentHub.
49
43
id: contentHubLoader