Last active
March 9, 2018 10:49
-
-
Save stephenquan/7e0dff095061300a3253a3f42f068f4b to your computer and use it in GitHub Desktop.
AppStudio return shortcuts to standard locations
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
import QtQuick 2.7 | |
import QtQuick.Layouts 1.3 | |
import QtQuick.Controls 2.1 | |
import QtQuick.Dialogs 1.0 | |
import ArcGIS.AppFramework 1.0 | |
App { | |
id: app | |
width: 640 * AppFramework.displayScaleFactor | |
height: 480 * AppFramework.displayScaleFactor | |
property var shortcuts: { | |
"desktop": AppFramework.standardPaths.defaultFolder(StandardPaths.DesktopLocation).url, | |
"documents": AppFramework.standardPaths.defaultFolder(StandardPaths.DocumentsLocation).url, | |
"fonts": AppFramework.standardPaths.defaultFolder(StandardPaths.FontsLocation).url, | |
"applications": AppFramework.standardPaths.defaultFolder(StandardPaths.ApplicationsLocation).url, | |
"music": AppFramework.standardPaths.defaultFolder(StandardPaths.MusicLocation).url, | |
"pictures": AppFramework.standardPaths.defaultFolder(StandardPaths.PicturesLocation).url, | |
"temp": AppFramework.standardPaths.defaultFolder(StandardPaths.TempLocation).url, | |
"home": AppFramework.standardPaths.defaultFolder(StandardPaths.HomeLocation).url, | |
"data": AppFramework.standardPaths.defaultFolder(StandardPaths.DataLocation).url, | |
"cache": AppFramework.standardPaths.defaultFolder(StandardPaths.CacheLocation).url, | |
"genericData": AppFramework.standardPaths.defaultFolder(StandardPaths.GenericDataLocation).url, | |
"runtime": AppFramework.standardPaths.defaultFolder(StandardPaths.RuntimeLocation).url, | |
"config": AppFramework.standardPaths.defaultFolder(StandardPaths.ConfigLocation).url, | |
"download": AppFramework.standardPaths.defaultFolder(StandardPaths.DownloadLocation).url, | |
"genericCache": AppFramework.standardPaths.defaultFolder(StandardPaths.GenericCacheLocation).url, | |
"genericConfig": AppFramework.standardPaths.defaultFolder(StandardPaths.GenericConfigLocation).url, | |
"appData": AppFramework.standardPaths.defaultFolder(StandardPaths.AppDataLocation).url | |
}; | |
Flickable { | |
id: flickable | |
anchors.fill: parent | |
anchors.margins: 10 | |
contentHeight: textArea.height | |
TextArea { | |
id: textArea | |
width: flickable.width | |
selectByMouse: true | |
text: qsTr("shortcuts: %1").arg(JSON.stringify(shortcuts, undefined, 2)) | |
wrapMode: Text.WrapAtWordBoundaryOrAnywhere | |
font.pointSize: 12 | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment