This is the main component of an Application. More...
Import Statement: | import ArcGIS.AppFramework 1.0 |
Properties
- arguments : QStringList
- backButtonAction : BackButtonAction
- folder : FileFolder
- info : AppInfo
- releaseType : string
- settings : Settings
Signals
- backButtonClicked()
- colorChanged()
- errorChanged(string error)
- lowMemory()
- openUrl(url url)
Methods
- AppDependency dependency(string propertyName, string value)
- AppDependency dependency(string value)
- restart()
Detailed Description
It defines all the attributes that are common across visual items, such as x and y position, width and height, anchoring and key handling support. App component can be useful for grouping several items under a single root visual item. Following code snippet explains the usage of the App component.
App { id: app; width: 400; height: 640; Text { id: appText; anchors { left: parent.left; right: parent.right; top: parent.top; topMargin: 100; } text: "My App" font.pointSize: 24 color: "black" horizontalAlignment: Text.AlignHCenter; } Button { anchors.bottom: parent.bottom anchors.bottomMargin: 100 anchors.horizontalCenter: parent.horizontalCenter text: "Close" onClicked: { Qt.quit() } } }
Enumerations
BackButtonAction enumeration
This is currently under review. Please ignore.
Name | Value |
---|---|
App.BackButtonQuit | 0 |
App.BackButtonSignal | 1 |
App.BackButtonIgnore | 2 |
Property Documentation
The action performed by the app when the device's back button is pressed.
[read-only] folder : FileFolder |
Provides access to a folder and its contents.
[read-only] info : AppInfo |
Provides details of the Application.
Returns the type of release as defined by the app's appinfo.json file.
[read-only] settings : Settings |
Parameters can be set using this property
Signal Documentation
Signal emitted when the device's back button has been pressed.
Note: The corresponding handler is onBackButtonClicked
.
This is currently under review. Please ignore.
Note: The corresponding handler is onColorChanged
.
Signal emitted when the last error encountered by the app has changed.
Note: The corresponding handler is onErrorChanged
.
Signal emitted when the system is low on available RAM. This signal is only supported on Android and iOS.
Note: The corresponding handler is onLowMemory
.
This signal is emitted when url is opened. For example,
onOpenUrl: { console.log("onOpenUrl:", url); var urlInfo = AppFramework.urlInfo(url); if (!urlInfo.host.length) { console.log("onOpenUrl parameters:", JSON.stringify(urlInfo.queryParameters, undefined, 2)); } }
This URL can either be a traditional HTTP or HTTPS URL (for example http://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/0?f=pjson), or a custom URL scheme (for example example-url://).
Note: The corresponding handler is onOpenUrl
.
Method Documentation
This method is currently under review. Please ignore.
The propertyName parameter
The value parameter
This method is currently under review. Please ignore.
The value parameter
Restarts the app. When the app is run in Player, Player will be restarted.
Item { Button { width: 100 height: 30 text: "Restart app" onClicked: { txtArea.text += "\n\n" + "Restarting app..." + Date().toString(); timer.start(); } } Timer { id: timer interval: 500; running: false; repeat: true onTriggered: { app.restart(); } } }