[
  {
    "path": ".gitignore",
    "content": "#osx file\n.DS_Store\n\n#directories\ndeploy/\n\n#file extensions\n*.o\n*.qmlc\n*.cpp\n*.h\n*.qrc\n\n#file prefixes\nmoc*.*\nrcc*.*\n\n#packr files\n*-packr.go\n*cgo*\n\n#binary files\n./got-qt\n./cuiinterface/cuiinterface\n"
  },
  {
    "path": "LICENSE.txt",
    "content": "MIT License\n\nCopyright (c) 2018 Alex Walker [@amlwwalker]\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."
  },
  {
    "path": "MAKEFILE.md",
    "content": "## Automated Setup and Building\n\nI have added a makefile to this project to ease configuration.\n\n### Instructions\n\n#### Pre requisite\n\n* Clone this directory:  ` git clone git@github.com:amlwwalker/got-qt.git $(GOPATH)/src/github.com/amlwwalker/got-qt`\n* Go to the directory: `cd $(GOPATH)/src/github.com/amlwwalker/got-qt`\n\n#### Installation\n\n* Run setup to install qt5 `make setup`\n* Run install to install **therecipe/qt** and **got-qt**: `make install`\n\n#### Creating your project\n\n* It will automatically create a directory for projects at `$(GOPATH)/src/github.com/got-qt-projects`\n\t* all projects created using this makefile will end up here\n* Run make to create a new project, setting the project name as an argument: `make createproject PROJECTNAME=testproject`\n* Go to your project directory, `cd $(GOPATH)/src/github.com/got-qt-projects/testproject`\n* Build the console app: `make console`. The binary will appear inside cuiinterface\n* Build the gui app (only configured for OSX so far): `make build`\n* Run the binary in development (hotloading) mode: `make darwinhotload` for OSX, or `make lxhotload` for linux. (Not tested on Windows).\n* You can now edit qml and it will hot load in your new project.\n\n#### Device building\n\nWhen building for devices such as Android or iOS(untested), hotloading must be disabled.\n\n### Updating the production loader qml file\n\nAt this point this is quite crude. So that you can be certain you will get the latest qml changes when hotloading is disabled, that you have copied loader.qml to loader-production.qml and updated the paths to the compiled paths. More information [in the Readme under the production section](https://github.com/amlwwalker/got-qt/#production)"
  },
  {
    "path": "Makefile",
    "content": "# Borrowed from:\n# https://github.com/silven/go-example/blob/master/Makefile\n# https://vic.demuzere.be/articles/golang-makefile-crosscompile/\n\nBINARY = got-qt\n\n# Symlink into GOPATH\nGITHUB_USERNAME=amlwwalker\nGOT_QT_PROJECTS=got-qt-projects\nCONSOLE_DIR=cuiinterface\nGUI_DIR=qt\nDEV_SOURCE=${GOPATH}/src/github.com\n# BUILD_DIR=${DEV_SOURCE}/${GOT_QT_PROJECTS}/${BINARY}\nCURRENT_DIR=$(shell pwd)\n\n#install parameters\nGOT_QT_REPO=git@github.com:amlwwalker/got-qt.git\n\n# Build the project\nall: clean console darwin #linux windows\n\nhardinstall: setup install\n\nsetup:\n\t#install everything including qt\n\tbrew install qt5\n#configure the setup for this\ninstall:\n\t#first go to build dir\n\tcd ${DEV_SOURCE}; \\ #now make a directory to store the got-qt\n\tmkdir ${GITHUB_USERNAME}; \\ #now clone got-qt into there\n\tgit clone ${GOT_QT_REPO} ${GITHUB_USERNAME}/ \\\n\tmkdir 0xAX; \\ #you will need notifier for notifications\n\tgit clone git@github.com:0xAX/notificator.git 0xAX; \\\n\tgo get -u github.com/gobuffalo/packr/...; \\ #you will need packr for configuration files\n\tgo get github.com/radovskyb/watcher; \\ #you will need watcher by radovskyb for hotloading\n\tgo get -u -v github.com/therecipe/qt/cmd/...; \\ #now make sure the user has therecipe/qt installed\n\t$GOPATH/bin/qtsetup;\n\n#var topLevel = filepath.Join(os.Getenv(\"GOPATH\"), \"src\", \"github.com\", \"amlwwalker\", \"got-qt\", \"qt\", \"qml\")\ncreateproject: #pass this PROJECTNAME, e.g: make createproject PROJECTNAME=testproject\n\t#create the directory in github.com\n\tcd ${DEV_SOURCE}; \\\n\tmkdir -p ${GOT_QT_PROJECTS}/${PROJECTNAME}; \\\n\tcd ${GOT_QT_PROJECTS}/${PROJECTNAME}; \\\n\trsync -av --exclude=\".git\" ${DEV_SOURCE}/${GITHUB_USERNAME}/got-qt/* . ; \\\n\tsed -i.bak s/\"got-qt\"/\"${PROJECTNAME}\"/g qt/main.go; \\\n\tsed -i.bak s/\"amlwwalker\"/\"${GOT_QT_PROJECTS}\"/g qt/main.go;\n\n\nconsole:\n\tcd ${CONSOLE_DIR}; \\\n\tgo build -o consoleApp; \\\n\tcd - >/dev/null\n\nbuild:\n\tcd ${GUI_DIR}; \\\n\tqtdeploy build desktop; \\\n\tcd - >/dev/null\n\ndarwinhotload:\n\tcd ${GUI_DIR}; \\\n\tdeploy/darwin/${GUI_DIR}.app/Contents/MacOS/${GUI_DIR}\nlxhotload:\n\tcd ${GUI_DIR}; \\\n\tdeploy/linux/${GUI_DIR}.sh\n"
  },
  {
    "path": "README.md",
    "content": "## Got-qt GUI Framework\n\n## Quick Start!\n\n* To use the hotloading feature a configuration file is compiled into the binary using [packr](https://github.com/gobuffalo/packr).\n* If you are using the [makefile for automation](MAKEFILE.md), running `make install` should setup everything up for you, including packr.\n* Once installation is successful, to build the config.json into the binary, just run `packr` from within the qt directory of this repository. Any time you change the config.json file, found in configfiles/ you will need to re run packr.\n\t* I have intentionally excluded packr files from the git repository as they can get large and are easily generated.\n\n## General Overview\n\nIf you are not interested in manual building and general information (everything below here), you can proceed to [automated building](MAKEFILE.md)\n\n## More background\n\nThis is a framework to make desktop/mobile applications in Go with a GUI written in Qt Qml. Both of these languages are cross platform. Go is an open source programming language, Qt is licensed under [LGPL license](https://www1.qt.io/qt-licensing-terms/). In some instances you will need to buy a commercial Qt license - for instance a statically compiled, commercial app, would need a commerical Qt license.\nThe license for my work here however, is under [MIT license](LICENSE.txt).\n\nHome              |  Menu |  Console UI |  Android\n:-------------------------:|:-------------------------:|:-------------------------: |:-------------------------:\n<img src=\"home.png\" width=\"75%\"> | <img src=\"menu.png\" width=\"75%\"> | <img src=\"consoleUI.png\" width=\"75%\"> | <img src=\"android.jpg\" width=\"75%\">\n\n\n\nIt uses the Material framework from Google for the UI in Qml, and uses Go as a backend. It demonstrates making pages in Qml, interfacing with the backend Go code, and receving messages from the backend. I.e everything you need to build a desktop app, all ready to go.\n\nI built this because I was building desktop apps in Go, with Guis. For every change I made, i had to recompile the go code even if I was just changing the UI code. This takes a long time. It _can_ be sped up, however I wanted to develop my UI faster. I could have used qt-creator, however it was another IDE, I just wanted an easy way to build desktop apps with Go.\n\nSo I added hotloading to the qml files. You can download the [demo OSX app here.](qtapp.zip)\n\n* [Follow me on twitter](https://twitter.com/amlwwalker)\n* [Read the medium post](https://medium.com/@_whitesilence/building-compiled-fast-cross-platform-desktop-apps-in-go-with-qml-a5bb347f4ce9)\n\n##### Watch the [youtube video](https://youtu.be/38gvNBT6VlM)\n\n##### Please note this is in early stages\n\n### What I wanted:\n\n* Wanted to make desktop applications that were as easy to use for anyone who could use a computer. (No web app, no console app etc etc)\n* Wanted to write it in a cross platform language so that I would only need to write it once\n* Use a language I was already familiar with\n* From research, there were a few options for the UI, for instance HTML/CSS/JS. However this required use of the installed default web browser and I didn't want to rely on that, but also it meant that the UI files had to be shipped around with the application. Felt a little messy and like using the wrong tool for the job. Besides, its slow :)\n* Qml seemed very well documented and when I discovered the work of [therecipe](https://github.com/therecipe/qt) I felt like I was solving alot of problems related to cross platform app development in one go.\n* With go compiling the qml into the application as binary, the UI is very fast.\n* The Go Material UI theme is included in QT which sped up UI development.\n\nThis is a combination of a lot of work done by alot of people around the web. I am very pleased that I have now, what I think, is a very workable framework for building apps cross platform.\n\n## Installation\n\nI am assuming you are a Go developer already and have Go installed with your GOPATH set, etc etc... I am using MacOS so I will put steps for that, however I am linking to where to find installation instructions more generally.\n\nI do however hope you are not a Windows developer... Your paths, your consoles, your docker installations... all will have caveats...\n\n### Installing QT\n\nYou can install QT by following the instructions [for regular installation](https://github.com/therecipe/qt/wiki/Installation#regular-installation), however in essence :\n\n`brew install qt5`\n\nThis will install the packaged version of Qt. Its a sort of minimal version to get Qt working easily for OSX. However it is not the official version and does not have support for iOS or Android. That's fine as I am using the docker containers to build for other platforms, but it will lead to a minor step you have to take when building for other platforms\n\n### Installing Qt Go-Binding\n\nYou can install Qt binding by following [these instructions](https://github.com/therecipe/qt/wiki/Installation-on-macOS#installing-binding), however in essence:\n\n* `go get -u -v github.com/therecipe/qt/cmd/...`\n* `$GOPATH/bin/qtsetup`\n\n### Installing Material theme\n\nLuckily Qt comes with the theme installed! No need to do anything here!\n\n### Test everything,\n\n* Because we will later want to cross compile for other OS except OSX, we cannot set a global path to Qt as it will affect the build later for other OS. So before compiling, make sure you have run `export QT_DIR=/usr/local/opt/qt` in the current terminal session. You will need to re run this for each new terminal session otherwise the **build will fail**.\n\nYou can run the example code found [here](https://github.com/therecipe/qt/wiki/Getting-Started#starting-application), but in essence, put the following in your `$GOPATH/src` somewhere and run `qtdeploy test desktop`\n\n```\npackage main\n\nimport (\n\t\"github.com/therecipe/qt/widgets\"\n\t\"os\"\n)\n\nfunc main() {\n\t// Create application\n\tapp := widgets.NewQApplication(len(os.Args), os.Args)\n\n\t// Create main window\n\twindow := widgets.NewQMainWindow(nil, 0)\n\twindow.SetWindowTitle(\"Hello World Example\")\n\twindow.SetMinimumSize2(200, 200)\n\n\t// Create main layout\n\tlayout := widgets.NewQVBoxLayout()\n\n\t// Create main widget and set the layout\n\tmainWidget := widgets.NewQWidget(nil, 0)\n\tmainWidget.SetLayout(layout)\n\n\t// Create a line edit and add it to the layout\n\tinput := widgets.NewQLineEdit(nil)\n\tinput.SetPlaceholderText(\"1. write something\")\n\tlayout.AddWidget(input, 0, 0)\n\n\t// Create a button and add it to the layout\n\tbutton := widgets.NewQPushButton2(\"2. click me\", nil)\n\tlayout.AddWidget(button, 0, 0)\n\n\t// Connect event for button\n\tbutton.ConnectClicked(func(checked bool) {\n\t\twidgets.QMessageBox_Information(nil, \"OK\", input.Text(),\n\t\twidgets.QMessageBox__Ok, widgets.QMessageBox__Ok)\n\t})\n\n\t// Set main widget as the central widget of the window\n\twindow.SetCentralWidget(mainWidget)\n\n\t// Show the window\n\twindow.Show()\n\n\t// Execute app\n\tapp.Exec()\n}\n```\n\nIf you get a window appear once the compilation completes (it may take a moment) then everything is working and you can continue. If you have any issues, read the [wiki page](https://github.com/therecipe/qt/wiki/Getting-Started#starting-application).\n\n### Installing this project\n\nNow your environment is ready, to make app development easy, you can use this project Got-qt. For the sake of argument, I am setting an env var for the project name so I can refer to it elsewhere.\n\nprerequisite. So that the instructions are general for all platforms:\n* MacOS:`export OSTYPE=darwin`\n* Windows:`export OSTYPE=windows`\n* Android:`export OSTYPE=android`\n\n* `export PROJECTNAME=myproject`\n* `cd $GOPATH/src/amlwwalker`\n* `git clone https://github.com/amlwwalker/got-qt`\n* `cp -r got-qt $PROJECTNAME`\n* `cd $PROJECTNAME`\n\n* Update the path in qt/main.go stored as the variable `topLevel` to the new path of your project. This is an absolute build path currently set to this project, as opposed to yours.\n* Remember to update any paths to backend business logic in your own projects, otherwise will only know about logic in this project\n\n* `cd qt` `#Need to compile from within here`\n* `qtdeploy test desktop`\n\nAt this stage, the application will build and run. It will take a bit of time. If you get the sample app appearing then great, compilation has been successful.\n\n### Help/Demo\n\n* (Tip: Turn on english subtitles)\n\n[To see the above process in action, I have added a youtube video here to give you an idea](https://youtu.be/T96KOy4sTJ8)\n\n**Read on for how to develop apps efficiently and easily**\n\n## Using the framework\n\nReasons to use this\n\n* Fast setup of cross platform GUI apps with a Go backend\n* Efficient developing. Compiling QML and Go requires C bindings which is slow\n* Good code management. This projects demonstrates decoupling of backend logic from frontend allowing headless, web-based, console, or gui applications to all share the same logic, yet not know about each other.\n\nThere is a configuration file that tells the application whether to run in hotloading mode. If it is run in hotloading mode, then it will continually monitor changes to its own qml files and update the user interface immediately. Makes for real time development.\n\n* In the case of hotloading, the app must be run directly from the terminal. This is so that it can detect local configuration. Double clicking the app in Finder runs it under the Finder's environment which is not the same as the developers and will therefore not have hotloading enabled.\n* Run with `GOPATH/src/$USER/$PROJECTNAME/deploy/darwin/got-qt/Contents/MacOS/got-qt`\n* This will allow it to detect the config for hotloading and QML will update in realtime.\n\nMy recommended approach is to build your UI using this in QML, then decide how it needs to interface with the Go code (backend). Once you know those requirements, you can add in the listeners in the Go code and have basic interaction with the front end, proving to your self you have two way comms. Use this two way comms to set the needed bridge connections up, but forget about functionality for now. Just confirm you have the commnunication working.\n\nThen, move to building a console UI. There is a demonstration console UI using the amazing [gocui](https://github.com/jroimartin/gocui). Its a very straight forward way of building great console applications in Go. I recommend this for a few reasons:\n\n* Building apps with console UI's compile much faster than with GUIs\n* Building a console app allows you to work out what logic you are going to require, with the intent of keeping it seperate from the UI - I.e better architecture.\n* It is educational as to how frontends and backends communicate, which is useful when designing your GUI. For instance, how are you going to handle processes that take a long time, the user needs to be notified. They also shouldn't experience lock up. How do you handle these things.\n\nThe directory `cuiinterface` shows how this decoupling of the console UI works. Whats great is because nothing else knows about anything in this directory, it won't get compiled into the application when the GUI is compiled. I recommend this same structure for all your UIs (i.e each having its own directory and nothing else knows about it).\n\nOnce the console UI you have built demonstrates the functionality required by the go code, you can then wire up your GUI to the same functions (as the two UI's are just top level interfaces to the backend), and save yourself a lot of compilation time.\n\n## Steps\n\n### Development\n\n1. In config.json, make sure that hotloading is set to true\n\t* **Please Note** hotloading must be disabled when in production mode and on mobile devices\n2. Make sure you have run `packr` in the `qt/` directory Whenever a change to config.json is made\n2. Run the application with `GOPATH/src/$USER/$PROJECTNAME/deploy/darwin/got-qt/Contents/MacOS/got-qt`\n3. Navigate with your editor of choice to `qml/` - this is where all the UI files are kept.\n4. For now you will be editing loader.qml. This file is configured for hotloading. loader-production.qml is for when the code is to be compiled into the application for deployment. This is necessary because the finder app runs under a different user space to you.\n5. Start editing loader.qml. You will see the UI update as you save.\n\t* You can edit any of the files under pages/elements and they will be updated automatically.\n\t* Notice on occasion restarts of the app (but not recompilation) will be required if you break the qml it cannot rebuild it. Just quit and restart easy.\n\n**NOTICE** If you import new libraries into your qml, then in this case a recompile will be required as those libraries won't have been compiled into the application, this only needs to happen once per new library imported however. Shouldn't be too frequent.\n\n### Production\n\n6. When you are ready for production:\n\n* copy loader.qml to `loader-production.qml`\n* Update any relative path in `loader-production.qml` to a qrc path so that the app knows how to find the compiled qml, e.g:\n* Update any relative path to a qml file to a qrc path.\n\n##### Relative:\n\n```\nListElement { title: \"Contacts\"; source: \"pages/_contactsPage.qml\" }\nListElement { title: \"Files\"; source: \"pages/_filelistPage.qml\" }\nListElement { title: \"Downloads\"; source: \"pages/_downloadsPage.qml\" }\n```\n\n##### Qrc:\n\n```\nListElement { title: \"Contacts\"; source: \"qrc:/qml/pages/_contactsPage.qml\" }\nListElement { title: \"Files\"; source: \"qrc:/qml/pages/_filelistPage.qml\" }\nListElement { title: \"Downloads\"; source: \"qrc:/qml/pages/_downloadsPage.qml\" }\n```\n(this step will in time be improved, its a bit annoying to have to do with a find/replace, but ListElements can't have dynamic paths in qml)\n\n* set hotloading to false in config.json and recompile. You can recompile now with `qtdeploy build desktop`\n* Navigate in Finder to your `deploy/$(OSTYPE)` directory and double click the application. It should start up with your changes with your changes compiled in.\n\n### Cross Compilation\n\nUsing [therecipe/qt](https://github.com/therecipe/qt/wiki/Deploying-macOS-to-Windows-32-bit) tools and using docker, its very easy to cross compile for different platforms, but in essence:\n\n* Install docker for your [platform i.e OSX](https://docs.docker.com/docker-for-mac/install/#download-docker-for-mac)\n* Pull the docker container for the platform you want to cross compile for\n\n`docker pull therecipe/qt:windows_32_shared`\n\n* Build for the platform\n\n`qtdeploy -docker build windows_32_shared`\n\n* You can follow the instructions for different devices such as linux, [here](https://github.com/therecipe/qt/wiki/Deploying-macOS-to-Linux). Other devices are documented there aswell.\n\n##### NOTICE: I have only cross compiled for windows and android, but the steps should be the same for other platforms if you have docker installed.\n\n* You will have the application build in `deploy/platform` directory in `qt/`\n\n##### NOTICE: When cross compiling, to be in a terminal session where you did not run `export QT_DIR=/usr/local/opt/qt` first\n\n### Device Specific Setup\n\n#### Android\n\nIn the android/ directory there is the configuration to setup the android app. There is an AndroidManifest.xml where things like the App Name, and the device permissions live. Inside android/res/drawable there is an icon.png file that will set the app icon.\n\n#### OSX\n\nInside the darwin directory, there is Contents/Resources. Inside here you can create the app icon. To do so, you need to put the icon files inside icons.iconset directory (keeping the names for the files the same), where you can put the icon. Then from inside darwin/Contents/Resources, run `iconutil -c icns icons.iconset` to generate the icons.icns file which will be used for the app icon. The info.plist file contains the configuration for OSX.\n\n\n## To do\n\n* Tidy up hotloading.\n* iOS untested\n* Create a Windows Installer because otherwise the end user has to see a whole load of messy qml files as part of the application.\n\n\n\n\n"
  },
  {
    "path": "cuiinterface/interface.go",
    "content": "package main\n\nimport (\n\t\"fmt\"\n\t\"github.com/jroimartin/gocui\"\n\t\"log\"\n\t\"strconv\"\n)\n\ntype fn func(g *gocui.Gui, v *gocui.View) error\n\nvar controls = map[string]fn{} //holder for the functions that the UI controls fire\n\nfunc searchField(g *gocui.Gui, v *gocui.View) error {\n\tmaxX, maxY := g.Size()\n\tif v, err := g.SetView(\"search\", maxX/2-30, maxY/2, maxX/2+30, maxY/2+2); err != nil {\n\t\tif err != gocui.ErrUnknownView {\n\t\t\tupdateView(g, \"logs\", err.Error())\n\t\t\treturn nil\n\t\t}\n\t\tv.Editable = true\n\n\t\tif _, err := g.SetCurrentView(\"search\"); err != nil {\n\t\t\tupdateView(g, \"logs\", err.Error())\n\t\t\treturn nil\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc clearView(g *gocui.Gui, view string) {\n\tg.Update(func(g *gocui.Gui) error {\n\t\tv, err := g.View(view)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tv.Clear()\n\t\treturn nil\n\t})\n}\n\nfunc updateView(g *gocui.Gui, view, message string) error {\n\tg.Update(func(g *gocui.Gui) error {\n\t\tv, err := g.View(view)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfmt.Fprintln(v, message)\n\t\t//scroll the window if necessary\n\t\tcursorDown(g, v)\n\t\treturn nil\n\t})\n\treturn nil\n}\nfunc (c *UIControl) ExternalLogUpdate(message string) {\n\tupdateView(c.gui, \"logs\", message)\n}\nfunc (c *UIControl) login(g *gocui.Gui, v *gocui.View) error {\n\tupdateView(g, \"logs\", \"logging in\")\n\treturn nil\n}\n\nfunc (c *UIControl) searchContact(g *gocui.Gui, v *gocui.View) error {\n\t//we don't need to set the msg view\n\t//because its going to take input\n\tvar l string\n\tvar err error\n\tdefer delView(\"search\", g, v)\n\t_, cy := v.Cursor()\n\tif l, err = v.Line(cy); err != nil {\n\t\tl = \"\"\n\t\t//no value searched for...\n\t\treturn nil\n\t}\n\tupdateView(g, \"logs\", \"searching for \"+l+\"...\")\n\tc.logic.SearchForMatches(l, func(p float64, indeterminate bool) {\n\t\t//if indeterminate is true, it means the logic\n\t\t//has no idea how long it is going to take\n\t\t//so cant have progressive update the UI\n\t\tif indeterminate {\n\t\t\tupdateView(c.gui, \"logs\", \"process takes time....\")\n\t\t} else {\n\t\t\tupdateView(c.gui, \"logs\", \"processing: \"+strconv.FormatFloat(p, 'f', 6, 64))\n\t\t}\n\t\tif p == 1.0 {\n\t\t\t//we have knowledge the process was complete, we can do anything with it\n\t\t\tfor _, v := range c.logic.People {\n\t\t\t\t//the people in the list will be as a result of this function\n\t\t\t\tupdateView(c.gui, \"logs\", \"found: \"+v.Email)\n\t\t\t\tupdateView(c.gui, \"contacts\", v.Email)\n\t\t\t}\n\t\t}\n\t})\n\treturn nil\n}\n\nfunc (c *UIControl) Init() {\n\tg, err := gocui.NewGui(gocui.OutputNormal)\n\tc.gui = g\n\tif err != nil {\n\t\tlog.Panicln(err)\n\t}\n\tdefer g.Close()\n\n\tg.Cursor = true\n\n\tg.SetManagerFunc(c.layout)\n\n\tif err := c.keybindings(g); err != nil {\n\t\tupdateView(c.gui, \"logs\", \"cannot bind keys \"+err.Error())\n\t}\n\n\tif err := g.MainLoop(); err != nil && err != gocui.ErrQuit {\n\t\tupdateView(c.gui, \"logs\", \"main loop errord \"+err.Error())\n\t}\n}\n\nfunc (c *UIControl) layout(g *gocui.Gui) error {\n\tmaxX, maxY := g.Size()\n\tif v, err := g.SetView(\"controls\", 0, 0, 30, maxY); err != nil {\n\t\tif err != gocui.ErrUnknownView {\n\t\t\treturn err\n\t\t}\n\t\tv.Title = \"Controls\"\n\t\tv.Highlight = true\n\t\tv.SelBgColor = gocui.ColorGreen\n\t\tv.SelFgColor = gocui.ColorBlack\n\n\t\tcontrols[\"4. Search Contact\"] = searchField\n\t\tcontrols[\"1. login\"] = c.login\n\t\tfor k, _ := range controls {\n\t\t\tfmt.Fprintln(v, k)\n\t\t}\n\t}\n\tif v, err := g.SetView(\"contacts\", 30, 0, 60, maxY); err != nil {\n\t\tif err != gocui.ErrUnknownView {\n\t\t\treturn err\n\t\t}\n\t\tv.Title = \"Contacts\"\n\t\tv.Highlight = true\n\t\tv.SelBgColor = gocui.ColorGreen\n\t\tv.SelFgColor = gocui.ColorBlack\n\n\t\tif _, err := g.SetCurrentView(\"controls\"); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif v, err := g.SetView(\"files\", 60, 0, maxX, maxY); err != nil {\n\t\tif err != gocui.ErrUnknownView {\n\t\t\treturn err\n\t\t}\n\t\tv.Title = \"Files\"\n\t\tv.Highlight = true\n\t\tv.SelBgColor = gocui.ColorGreen\n\t\tv.SelFgColor = gocui.ColorBlack\n\t\tfmt.Fprintln(v, \"sample.txt\")\n\t\tfmt.Fprintln(v, \"accounts.pdf\")\n\t\tfmt.Fprintln(v, \"design.svg\")\n\n\t\tif _, err := g.SetCurrentView(\"controls\"); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tif v, err := g.SetView(\"logs\", 0, 15, maxX, maxY-1); err != nil {\n\t\tif err != gocui.ErrUnknownView {\n\t\t\treturn err\n\t\t}\n\t\tv.Title = \"Logs\"\n\t\tv.SelBgColor = gocui.ColorGreen\n\t\tv.SelFgColor = gocui.ColorBlack\n\t\tfmt.Fprintln(v, \"loading...\")\n\t\tfmt.Fprintln(v, \"loading complete\")\n\t\tif _, err := g.SetCurrentView(\"controls\"); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc nextView(g *gocui.Gui, v *gocui.View) error {\n\tif v == nil || v.Name() == \"controls\" {\n\t\tupdateView(g, \"logs\", \"setting view to contacts\")\n\t\t_, err := g.SetCurrentView(\"contacts\")\n\t\treturn err\n\t} else if v.Name() == \"contacts\" {\n\t\tupdateView(g, \"logs\", \"setting view to files\")\n\t\t_, err := g.SetCurrentView(\"files\")\n\t\treturn err\n\t}\n\tupdateView(g, \"logs\", \"setting view to controls\")\n\t_, err := g.SetCurrentView(\"controls\")\n\treturn err\n}\n\nfunc cursorDown(g *gocui.Gui, v *gocui.View) error {\n\tif v != nil {\n\t\tcx, cy := v.Cursor()\n\t\tif err := v.SetCursor(cx, cy+1); err != nil {\n\t\t\tox, oy := v.Origin()\n\t\t\tif err := v.SetOrigin(ox, oy+1); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc cursorUp(g *gocui.Gui, v *gocui.View) error {\n\tif v != nil {\n\t\tox, oy := v.Origin()\n\t\tcx, cy := v.Cursor()\n\t\tif err := v.SetCursor(cx, cy-1); err != nil && oy > 0 {\n\t\t\tif err := v.SetOrigin(ox, oy-1); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc getControl(g *gocui.Gui, v *gocui.View) error {\n\tvar l string\n\tvar err error\n\n\t_, cy := v.Cursor()\n\tif l, err = v.Line(cy); err != nil {\n\t\tl = \"\"\n\t}\n\tfor i, _ := range controls {\n\t\tif l == i {\n\t\t\t//need a helper functon to know what to do with the view\n\t\t\tcontrols[i](g, v)\n\t\t\tbreak\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc getLine(g *gocui.Gui, v *gocui.View) error {\n\tvar l string\n\tvar err error\n\n\t_, cy := v.Cursor()\n\tif l, err = v.Line(cy); err != nil {\n\t\tl = \"\"\n\t}\n\n\tmaxX, maxY := g.Size()\n\tif v, err := g.SetView(\"msg\", maxX/2-30, maxY/2, maxX/2+30, maxY/2+2); err != nil {\n\t\tif err != gocui.ErrUnknownView {\n\t\t\treturn err\n\t\t}\n\t\tfmt.Fprintln(v, l)\n\t\tif _, err := g.SetCurrentView(\"msg\"); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\nfunc delMsg(g *gocui.Gui, v *gocui.View) error {\n\treturn delView(\"msg\", g, v)\n}\nfunc delView(view string, g *gocui.Gui, v *gocui.View) error {\n\tif err := g.DeleteView(view); err != nil {\n\t\treturn err\n\t}\n\tif _, err := g.SetCurrentView(\"controls\"); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc quit(g *gocui.Gui, v *gocui.View) error {\n\treturn gocui.ErrQuit\n}\n\nfunc (c *UIControl) keybindings(g *gocui.Gui) error {\n\t//main window bindings\n\tif err := g.SetKeybinding(\"controls\", gocui.KeyCtrlSpace, gocui.ModNone, nextView); err != nil {\n\t\treturn err\n\t}\n\tif err := g.SetKeybinding(\"controls\", gocui.KeyArrowDown, gocui.ModNone, cursorDown); err != nil {\n\t\treturn err\n\t}\n\tif err := g.SetKeybinding(\"controls\", gocui.KeyArrowUp, gocui.ModNone, cursorUp); err != nil {\n\t\treturn err\n\t}\n\tif err := g.SetKeybinding(\"controls\", gocui.KeyEnter, gocui.ModNone, getControl); err != nil {\n\t\treturn err\n\t}\n\t//side window bindings\n\tif err := g.SetKeybinding(\"contacts\", gocui.KeyCtrlSpace, gocui.ModNone, nextView); err != nil {\n\t\treturn err\n\t}\n\tif err := g.SetKeybinding(\"contacts\", gocui.KeyArrowDown, gocui.ModNone, cursorDown); err != nil {\n\t\treturn err\n\t}\n\tif err := g.SetKeybinding(\"contacts\", gocui.KeyArrowUp, gocui.ModNone, cursorUp); err != nil {\n\t\treturn err\n\t}\n\tif err := g.SetKeybinding(\"contacts\", gocui.KeyEnter, gocui.ModNone, getLine); err != nil {\n\t\treturn err\n\t}\n\t//msg box binding\n\tif err := g.SetKeybinding(\"msg\", gocui.KeyEnter, gocui.ModNone, delMsg); err != nil {\n\t\treturn err\n\t}\n\tif err := g.SetKeybinding(\"search\", gocui.KeyEnter, gocui.ModNone, c.searchContact); err != nil {\n\t\treturn err\n\t}\n\n\tif err := g.SetKeybinding(\"files\", gocui.KeyCtrlSpace, gocui.ModNone, nextView); err != nil {\n\t\treturn err\n\t}\n\tif err := g.SetKeybinding(\"files\", gocui.KeyArrowDown, gocui.ModNone, cursorDown); err != nil {\n\t\treturn err\n\t}\n\tif err := g.SetKeybinding(\"files\", gocui.KeyArrowUp, gocui.ModNone, cursorUp); err != nil {\n\t\treturn err\n\t}\n\t//all windows\n\tif err := g.SetKeybinding(\"\", gocui.KeyCtrlC, gocui.ModNone, quit); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "cuiinterface/main.go",
    "content": "package main\n\nimport (\n\t\"github.com/amlwwalker/got-qt/logic\"\n)\n\nfunc main() {\n\tcui := &UIControl{}\n\t//pointer to logic, so needs starting update\n\tcui.logic = &logic.LogicInterface{}\n\tcui.logic.ConfigureLogic()\n\tcui.Init() //init the UI\n\n} // end of main\n"
  },
  {
    "path": "cuiinterface/objects.go",
    "content": "package main\n\nimport (\n\t\"github.com/amlwwalker/got-qt/logic\"\n\t\"github.com/jroimartin/gocui\"\n)\n\ntype UIControl struct {\n\tViews map[string]*gocui.View\n\tgui   *gocui.Gui\n\tlogic *logic.LogicInterface\n}\n"
  },
  {
    "path": "logic/logic.go",
    "content": "package logic\n\nimport (\n\t\"time\"\n)\n\n//handles the interface between any go functions\n//and the qml\nfunc (l *LogicInterface) ConfigureLogic() {\n\tl.People = make(map[string]*Person)\n}\n\nfunc (l *LogicInterface) SearchForMatches(regex string, informant func(float64, bool)) {\n\t//if search takes a while then the informant can alert the front end\n\tvar p Person\n\tp.FirstName = \"Alex\"\n\tp.LastName = \"Walker\"\n\tp.Email = \"alex@walker.com\"\n\t//just demoing using async if things are slow\n\tgo func() {\n\t\ttime.Sleep(1 * time.Second)\n\t\tinformant(0.1, true) //we don't know how long this will take\n\t\ttime.Sleep(1 * time.Second)\n\t\tinformant(0.4, true) //we don't know how long this will take\n\t\ttime.Sleep(1 * time.Second)\n\t\tinformant(0.7, true) //we don't know how long this will take\n\t\ttime.Sleep(1 * time.Second)\n\t\t//the informant knows whatever it was doing is ready whenit is sent a 1.0 value\n\t\tl.People[p.Email] = &p\n\t\tinformant(1.0, true) //we don't know how long this will take\n\t}()\n}\n"
  },
  {
    "path": "logic/objects.go",
    "content": "package logic\n\nimport ()\n\n//this handles interfacing with any business logic occuring elsewhere\ntype LogicInterface struct {\n\tPeople map[string]*Person\n}\n\ntype Person struct {\n\tFirstName string\n\tLastName  string\n\tEmail     string\n}\n"
  },
  {
    "path": "qt/android/AndroidManifest.xml",
    "content": "<?xml version='1.0' encoding='utf-8'?>\r\n<manifest package=\"org.qtproject.example.notification\" xmlns:android=\"http://schemas.android.com/apk/res/android\" android:versionName=\"1.0\" android:versionCode=\"1\" android:installLocation=\"auto\">\r\n    <application android:icon=\"@drawable/icon\" android:name=\"org.qtproject.qt5.android.bindings.QtApplication\" android:label=\"@string/app_name\">\r\n        <activity android:configChanges=\"orientation|uiMode|screenLayout|screenSize|smallestScreenSize|locale|fontScale|keyboard|keyboardHidden|navigation\"\r\n                  android:name=\"org.qtproject.example.notification.NotificationClient\"\r\n                  android:label=\"Got-Qt\"\r\n                  android:screenOrientation=\"portrait\">\r\n            <intent-filter>\r\n                <action android:name=\"android.intent.action.MAIN\"/>\r\n                <category android:name=\"android.intent.category.LAUNCHER\"/>\r\n            </intent-filter>\r\n            <meta-data android:name=\"android.app.lib_name\" android:value=\"-- %%INSERT_APP_LIB_NAME%% --\"/>\r\n            <meta-data android:name=\"android.app.qt_sources_resource_id\" android:resource=\"@array/qt_sources\"/>\r\n            <meta-data android:name=\"android.app.repository\" android:value=\"default\"/>\r\n            <meta-data android:name=\"android.app.qt_libs_resource_id\" android:resource=\"@array/qt_libs\"/>\r\n            <meta-data android:name=\"android.app.bundled_libs_resource_id\" android:resource=\"@array/bundled_libs\"/>\r\n            <!-- Deploy Qt libs as part of package -->\r\n            <meta-data android:name=\"android.app.bundle_local_qt_libs\" android:value=\"-- %%BUNDLE_LOCAL_QT_LIBS%% --\"/>\r\n            <meta-data android:name=\"android.app.bundled_in_lib_resource_id\" android:resource=\"@array/bundled_in_lib\"/>\r\n            <meta-data android:name=\"android.app.bundled_in_assets_resource_id\" android:resource=\"@array/bundled_in_assets\"/>\r\n            <!-- Run with local libs -->\r\n            <meta-data android:name=\"android.app.use_local_qt_libs\" android:value=\"-- %%USE_LOCAL_QT_LIBS%% --\"/>\r\n            <meta-data android:name=\"android.app.libs_prefix\" android:value=\"/data/local/tmp/qt/\"/>\r\n            <meta-data android:name=\"android.app.load_local_libs\" android:value=\"-- %%INSERT_LOCAL_LIBS%% --\"/>\r\n            <meta-data android:name=\"android.app.load_local_jars\" android:value=\"-- %%INSERT_LOCAL_JARS%% --\"/>\r\n            <meta-data android:name=\"android.app.static_init_classes\" android:value=\"-- %%INSERT_INIT_CLASSES%% --\"/>\r\n            <!--  Messages maps -->\r\n            <meta-data android:value=\"@string/ministro_not_found_msg\" android:name=\"android.app.ministro_not_found_msg\"/>\r\n            <meta-data android:value=\"@string/ministro_needed_msg\" android:name=\"android.app.ministro_needed_msg\"/>\r\n            <meta-data android:value=\"@string/fatal_error_msg\" android:name=\"android.app.fatal_error_msg\"/>\r\n            <!--  Messages maps -->\r\n            <!-- Splash screen -->\r\n            <!--\r\n            <meta-data android:name=\"android.app.splash_screen_drawable\" android:resource=\"@drawable/logo\"/>\r\n            -->\r\n            <!-- Splash screen -->\r\n        </activity>\r\n    </application>\r\n    <uses-sdk android:minSdkVersion=\"16\" />\r\n    <supports-screens android:largeScreens=\"true\" android:normalScreens=\"true\" android:anyDensity=\"true\" android:smallScreens=\"true\"/>\r\n    <!-- %%INSERT_PERMISSIONS -->\r\n    <uses-permission android:name=\"android.permission.INTERNET\"/>\r\n    <uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>\r\n    <!-- %%INSERT_FEATURES -->\r\n</manifest>\r\n"
  },
  {
    "path": "qt/android/src/org/qtproject/example/notification/NotificationClient.java",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2016 The Qt Company Ltd.\r\n** Contact: https://www.qt.io/licensing/\r\n**\r\n** This file is part of the QtAndroidExtras module of the Qt Toolkit.\r\n**\r\n** $QT_BEGIN_LICENSE:BSD$\r\n** Commercial License Usage\r\n** Licensees holding valid commercial Qt licenses may use this file in\r\n** accordance with the commercial license agreement provided with the\r\n** Software or, alternatively, in accordance with the terms contained in\r\n** a written agreement between you and The Qt Company. For licensing terms\r\n** and conditions see https://www.qt.io/terms-conditions. For further\r\n** information use the contact form at https://www.qt.io/contact-us.\r\n**\r\n** BSD License Usage\r\n** Alternatively, you may use this file under the terms of the BSD license\r\n** as follows:\r\n**\r\n** \"Redistribution and use in source and binary forms, with or without\r\n** modification, are permitted provided that the following conditions are\r\n** met:\r\n**   * Redistributions of source code must retain the above copyright\r\n**     notice, this list of conditions and the following disclaimer.\r\n**   * Redistributions in binary form must reproduce the above copyright\r\n**     notice, this list of conditions and the following disclaimer in\r\n**     the documentation and/or other materials provided with the\r\n**     distribution.\r\n**   * Neither the name of The Qt Company Ltd nor the names of its\r\n**     contributors may be used to endorse or promote products derived\r\n**     from this software without specific prior written permission.\r\n**\r\n**\r\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\r\n**\r\n** $QT_END_LICENSE$\r\n**\r\n****************************************************************************/\r\n\r\npackage org.qtproject.example.notification;\r\n\r\nimport android.app.Notification;\r\nimport android.app.NotificationManager;\r\nimport android.content.Context;\r\n\r\npublic class NotificationClient extends org.qtproject.qt5.android.bindings.QtActivity\r\n{\r\n    private static NotificationManager m_notificationManager;\r\n    private static Notification.Builder m_builder;\r\n    private static NotificationClient m_instance;\r\n\r\n    public NotificationClient()\r\n    {\r\n        m_instance = this;\r\n    }\r\n\r\n    public static void notify(String s)\r\n    {\r\n        if (m_notificationManager == null) {\r\n            m_notificationManager = (NotificationManager)m_instance.getSystemService(Context.NOTIFICATION_SERVICE);\r\n            m_builder = new Notification.Builder(m_instance);\r\n            m_builder.setSmallIcon(R.drawable.icon);\r\n            m_builder.setContentTitle(\"Message from Wingit!\");\r\n        }\r\n\r\n        m_builder.setContentText(s);\r\n        m_notificationManager.notify(1, m_builder.build());\r\n    }\r\n}\r\n"
  },
  {
    "path": "qt/configfiles/config.json",
    "content": "{\n    \"hotload\": true,\n    \"host\": \"\",\n    \"port\": \"\",\n    \"mode\": \"deploy\",\n    \"version\": \"0.1\",\n    \"author\": \"Alex Walker\",\n    \"path\": \"/Users/alex/\",\n    \"verbose\": true,\n    \"loadFrom\": \"~/\",\n    \"date\": \"02-04-2018\"\n}\n"
  },
  {
    "path": "qt/contactModel.go",
    "content": "package main\n\nimport \"github.com/therecipe/qt/core\"\n\nconst (\n\tFirstName = int(core.Qt__UserRole) + 1<<iota\n\tLastName\n\tEmail\n)\n\ntype PersonModel struct {\n\tcore.QAbstractListModel\n\n\t_ func() `constructor:\"init\"`\n\n\t_ map[int]*core.QByteArray `property:\"roles\"`\n\t_ []*Person                `property:\"people\"`\n\n\t_ func(*Person)                                    `slot:\"addPerson\"`\n\t_ func(row int, firstName, lastName, email string) `slot:\"editPerson\"`\n\t_ func(row int)                                    `slot:\"removePerson\"`\n}\n\ntype Person struct {\n\tcore.QObject\n\n\t_ string `property:\"firstName\"`\n\t_ string `property:\"lastName\"`\n\t_ string `property:\"email\"`\n}\n\nfunc init() {\n\tPerson_QRegisterMetaType()\n}\n\nfunc (m *PersonModel) init() {\n\tm.SetRoles(map[int]*core.QByteArray{\n\t\tFirstName: core.NewQByteArray2(\"firstName\", len(\"firstName\")),\n\t\tLastName:  core.NewQByteArray2(\"lastName\", len(\"lastName\")),\n\t\tEmail:     core.NewQByteArray2(\"email\", len(\"email\")),\n\t})\n\n\tm.ConnectData(m.data)\n\tm.ConnectRowCount(m.rowCount)\n\tm.ConnectColumnCount(m.columnCount)\n\tm.ConnectRoleNames(m.roleNames)\n\n\tm.ConnectAddPerson(m.addPerson)\n\tm.ConnectEditPerson(m.editPerson)\n\tm.ConnectRemovePerson(m.removePerson)\n}\n\nfunc (m *PersonModel) data(index *core.QModelIndex, role int) *core.QVariant {\n\tif !index.IsValid() {\n\t\treturn core.NewQVariant()\n\t}\n\n\tif index.Row() >= len(m.People()) {\n\t\treturn core.NewQVariant()\n\t}\n\n\tvar p = m.People()[index.Row()]\n\n\tswitch role {\n\tcase FirstName:\n\t\t{\n\t\t\treturn core.NewQVariant14(p.FirstName())\n\t\t}\n\tcase LastName:\n\t\t{\n\t\t\treturn core.NewQVariant14(p.LastName())\n\t\t}\n\tcase Email:\n\t\t{\n\t\t\treturn core.NewQVariant14(p.Email())\n\t\t}\n\n\tdefault:\n\t\t{\n\t\t\treturn core.NewQVariant()\n\t\t}\n\t}\n}\n\nfunc (m *PersonModel) rowCount(parent *core.QModelIndex) int {\n\treturn len(m.People())\n}\n\nfunc (m *PersonModel) columnCount(parent *core.QModelIndex) int {\n\treturn 1\n}\n\nfunc (m *PersonModel) roleNames() map[int]*core.QByteArray {\n\treturn m.Roles()\n}\n\nfunc (m *PersonModel) addPerson(p *Person) {\n\tm.BeginInsertRows(core.NewQModelIndex(), len(m.People()), len(m.People()))\n\tm.SetPeople(append(m.People(), p))\n\tm.EndInsertRows()\n}\n\nfunc (m *PersonModel) editPerson(row int, firstName string, lastName string, email string) {\n\tvar p = m.People()[row]\n\n\tif firstName != \"\" {\n\t\tp.SetFirstName(firstName)\n\t}\n\tif lastName != \"\" {\n\t\tp.SetLastName(lastName)\n\t}\n\tif lastName != \"\" {\n\t\tp.SetLastName(email)\n\t}\n\n\tvar pIndex = m.Index(row, 0, core.NewQModelIndex())\n\tm.DataChanged(pIndex, pIndex, []int{FirstName, LastName, Email})\n}\n\nfunc (m *PersonModel) removePerson(row int) {\n\tm.BeginRemoveRows(core.NewQModelIndex(), row, row)\n\tm.SetPeople(append(m.People()[:row], m.People()[row+1:]...))\n\tm.EndRemoveRows()\n}\n"
  },
  {
    "path": "qt/darwin/Contents/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>NSPrincipalClass</key>\n\t<string>NSApplication</string>\n\t<key>CFBundleIconFile</key>\n\t<string>icons.icns</string>\n\t<key>CFBundleDisplayName</key>\n\t<string>Got-Qt</string>\n\t<key>CFBundleName</key>\n\t<string>Got-Qt</string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleGetInfoString</key>\n\t<string>Created by Alex Walker</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleExecutable</key>\n\t<string>qt</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>com.ident.qt</string>\n\t<key>NOTE</key>\n\t<string>This file was created by me.</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "qt/hotloadWatcher.go",
    "content": "package main\n\nimport (\n\t\"fmt\"\n\t\"github.com/radovskyb/watcher\"\n\t\"log\"\n\t\"path/filepath\"\n\t\"time\"\n)\n\ntype HotLoader struct {\n\tLoader    *func(p string)\n\tblackList map[string]bool\n}\n\nfunc (h *HotLoader) initBlacklist(extensions ...string) {\n\th.blackList = make(map[string]bool)\n\tfor _, v := range extensions {\n\t\th.blackList[v] = true\n\t}\n}\nfunc (h *HotLoader) checkBlacklist(fileName string, dir bool) bool {\n\tif h.blackList[filepath.Ext(fileName)] == true {\n\t\t//ignore this file\n\t\treturn true\n\t}\n\tif dir { //consider changes to a dir itself as ignore\n\t\t//ignore raw directory changes\n\t\treturn true\n\t}\n\treturn false\n}\nfunc (h *HotLoader) handleEvent(event watcher.Event) bool {\n\tif h.checkBlacklist(event.Name(), event.IsDir()) {\n\t\t//its blacklisted\n\t\treturn true\n\t}\n\tfmt.Println(\"event occured \" + event.Name() + \", type: \" + event.Op.String() + \", path: \" + event.Path)\n\treturn false\n}\nfunc (h *HotLoader) startWatcher(loader func(string)) {\n\th.initBlacklist(\".qmlc\", \".cpp\", \".h\", \".qrc\", \".go\", \".java\")\n\tw := watcher.New()\n\tw.IgnoreHiddenFiles(true)\n\t// SetMaxEvents to 1 to allow at most 1 event's to be received\n\t// on the Event channel per watching cycle.\n\t//\n\t// If SetMaxEvents is not set, the default is to send all events.\n\tw.SetMaxEvents(1)\n\n\t// Only notify rename and move events.\n\t// w.FilterOps(watcher.Rename, watcher.Move)\n\n\tgo func() {\n\t\tfor {\n\t\t\tselect {\n\t\t\tcase event := <-w.Event:\n\t\t\t\tif !h.handleEvent(event) {\n\t\t\t\t\tfmt.Println(\"file type OK\")\n\t\t\t\t\tfmt.Println(\"loader: \", loader)\n\t\t\t\t\tloader(event.Path)\n\t\t\t\t}\n\t\t\tcase err := <-w.Error:\n\t\t\t\tfmt.Println(\"error: \", err.Error())\n\t\t\tcase <-w.Closed:\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}()\n\n\t// Watch this folder for changes.\n\tif err := w.AddRecursive(\".\"); err != nil {\n\t\tlog.Fatalln(err)\n\t}\n\n\t// Print a list of all of the files and folders currently\n\t// being watched and their paths.\n\t// for path, f := range w.WatchedFiles() {\n\t// \tif !h.checkBlacklist(f.Name()) {\n\t// \t\tfmt.Printf(\"%s: %s\\n\", path, f.Name())\n\t// \t}\n\t// }\n\n\tfmt.Println()\n\n\t// Trigger 2 events after watcher started.\n\t// go func() {\n\t// \tw.Wait()\n\t// \tw.TriggerEvent(watcher.Create, nil)\n\t// \tw.TriggerEvent(watcher.Remove, nil)\n\t// }()\n\n\t// Start the watching process - it'll check for changes every 100ms.\n\tif err := w.Start(time.Millisecond * 100); err != nil {\n\t\tlog.Fatalln(err)\n\t}\n}\n"
  },
  {
    "path": "qt/interface.go",
    "content": "package main\n\nimport (\n\t\"fmt\"\n\t\"github.com/amlwwalker/got-qt/logic\"\n\t\"github.com/therecipe/qt/core\"\n\t\"github.com/therecipe/qt/gui\"\n\t\"time\"\n)\n\ntype QmlBridge struct {\n\tcore.QObject\n\thotLoader HotLoader\n\tbusiness  BusinessInterface\n\t//messages to qml\n\t_ func(p string)                                                     `signal:\"updateLoader\"`\n\t_ func(author, mode, date, host, version, port string, hotload bool) `signal:\"updateSettings\"`\n\t_ func(data string)                                                  `signal:\"sendTime\"`\n\t_ func(c float64, indeterminate bool)                                `signal:\"updateProcessStatus\"`\n\n\t//requests from qml\n\t_ func(number1, number2 string) string `slot:\"calculator\"`\n\t_ func()                               `slot:\"startAsynchronousProcess\"`\n\t_ func(regex string)                   `slot:\"searchFor\"`\n}\n\n//setup functions to communicate between front end and back end\n\nfunc (q *QmlBridge) OpenWithDefaultApplication() {\n\tfmt.Println(\"starting desktop services\")\n\turl := core.QUrl_FromLocalFile(\"/\")\n\tgui.QDesktopServices_OpenUrl(url)\n\tfmt.Println(\"opened url \", url)\n}\n//example of receiving data from frontend and returning a result\nfunc (q *QmlBridge) ConfigureBridge(config Config) {\n\t//1. configure the hotloader\n\tq.business = BusinessInterface{}\n\tq.business.configureInterface()\n\tq.hotLoader = HotLoader{} //may not need it, specified in main.go\n\n\t//2. Configure signals\n\t//configure calculator\n\tq.ConnectCalculator(func(number1, number2 string) string {\n\t\treturn addingNumbers(number1, number2)\n\t})\n\tq.ConnectStartAsynchronousProcess(func() {\n\t\t//inform process has started\n\t\t//so this needs to be signaled to start a long process.\n\t\t//the frontend will assume a value of 1.0 is process complete\n\t\tq.UpdateProcessStatus(0.0, false)\n\t\tq.business.startAsynchronousRoutine(q.UpdateProcessStatus)\n\t})\n\tq.ConnectSearchFor(func(regex string) {\n\t\t//in here we are going to add matches to the search model\n\t\t//that way the front end will be updated live\n\t\t//inform front end work has begun\n\t\tq.UpdateProcessStatus(0.0, true)\n\t\tq.business.searchForMatches(regex, q.UpdateProcessStatus)\n\t})\n\t//example signalling the frontend with settings\n\tgo func() {\n\t\t//send the settings to the front end after a period of time\n\t\ttime.Sleep(5 * time.Second)\n\t\tfmt.Println(\"updating settings with \", config)\n\t\tq.UpdateSettings(config.Author, config.Mode, config.Date, config.Host, config.Version, config.Port, config.Hotload)\n\t}()\n\t//example of external function signalling the front end\n\tq.sendCurrentTime()\n\tq.business.demo()\n}\n\n//example of sending data to the frontend via a signal\nfunc (q *QmlBridge) sendCurrentTime() {\n\tgo func() {\n\t\tfor t := range time.NewTicker(time.Second * 1).C {\n\t\t\tq.SendTime(t.Format(time.ANSIC))\n\t\t}\n\t}()\n}\n\n//example of handling a receive from frontend via slot\nfunc addingNumbers(number1, number2 string) string {\n\tfmt.Println(\"addingNumbers\")\n\treturn number1 + number1 + number2 + number2\n}\n\n//this handles interfacing with any business logic occuring elsewhere\ntype BusinessInterface struct {\n\tpModel *PersonModel\n\tsModel *PersonModel\n\tfModel *PersonModel\n\tlogic  *logic.LogicInterface\n}\n\n//handles the interface between the backend architecture\n//and the bridge\nfunc (b *BusinessInterface) configureInterface() {\n\tb.pModel = NewPersonModel(nil)\n\tb.sModel = NewPersonModel(nil)\n\tb.fModel = NewPersonModel(nil)\n\t//pointer so needs starting update\n\tb.logic = &logic.LogicInterface{}\n\tb.logic.ConfigureLogic()\n}\n\nfunc (b *BusinessInterface) searchForMatches(regex string, informant func(float64, bool)) {\n\t//can do any preprocessing before it goes to the backend\n\tmodelUpdater := func(c float64, indeterminate bool) {\n\n\t\t//if the logic is complete, then we need to update our model\n\t\t//with the search results\n\t\t//otherwise just inform the front end\n\t\tif 1.0 == c { //complete\n\t\t\t//but also needs to know when its complete\n\t\t\t// because if it is, then need to update the model\n\t\t\tfor _, v := range b.logic.People {\n\t\t\t\tvar p = NewPerson(nil)\n\t\t\t\tp.SetFirstName(v.FirstName)\n\t\t\t\tp.SetLastName(v.LastName)\n\t\t\t\tp.SetEmail(v.Email)\n\t\t\t\tb.sModel.AddPerson(p)\n\t\t\t}\n\t\t}\n\t\t//updates the front end\n\t\tinformant(c, true) //we don't know how long it will take\n\t}\n\tb.logic.SearchForMatches(regex, modelUpdater)\n}\n\n//the interface needs to know how to inform the front end on progress\n//so takes a function that takes a value that the front end will use\nfunc (b *BusinessInterface) startAsynchronousRoutine(informant func(float64, bool)) {\n\t//on a go routine, count up to 10\n\t//each tick, inform the front end of your percentage progress\n\t//when it reaches ten, inform the front end it is complete\n\n\tgo func() {\n\t\tvar c float64\n\t\tc = 0.0\n\t\tfor c < 1.0 {\n\t\t\tinformant(c, false) //we know how long this process will take\n\t\t\ttime.Sleep(1 * time.Second)\n\t\t\tc = c + 0.1\n\t\t}\n\t\treturn\n\t}()\n}\nfunc (b *BusinessInterface) demo() {\n\tvar p = NewPerson(nil)\n\tp.SetFirstName(\"john\")\n\tp.SetLastName(\"doe\")\n\tp.SetEmail(\"john@doe.com\")\n\t//add the person to the PersonModel\n\tb.pModel.SetPeople([]*Person{p})\n\n\t//make changes on a routine\n\t//to demo updates\n\tgo func() {\n\t\tfmt.Println(\"3 seconds to adding new people\")\n\t\ttime.Sleep(3 * time.Second)\n\n\t\t//add person\n\t\tfor i := 0; i < 3; i++ {\n\t\t\tvar p = NewPerson(nil)\n\t\t\tp.SetFirstName(\"hello\")\n\t\t\tp.SetLastName(\"world\")\n\t\t\tp.SetEmail(\"hello@world.com\")\n\t\t\tb.pModel.AddPerson(p)\n\t\t}\n\t\tfmt.Println(\"3 seconds to editing people\")\n\t\ttime.Sleep(3 * time.Second)\n\t\t//edit person (demo not changing a field by leaving it blank (see the model code))\n\t\tb.pModel.EditPerson(1, \"bob\", \"\", \"bob@gmail.com\")\n\t\tb.pModel.EditPerson(3, \"\", \"john\", \"john@hotmail.com\")\n\t\tfmt.Println(\"3 seconds to remove person\")\n\t\ttime.Sleep(3 * time.Second)\n\t\t//remove person\n\t\tb.pModel.RemovePerson(2)\n\t}()\n}\n"
  },
  {
    "path": "qt/main.go",
    "content": "package main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"github.com/therecipe/qt/core\"\n\t\"github.com/therecipe/qt/quick\"\n\t\"github.com/therecipe/qt/widgets\"\n\t\"github.com/gobuffalo/packr\" //for compiled files\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n)\n\ntype Config struct {\n\tAuthor  string `\"json\":\"author\"`\n\tDate    string `\"json\":\"date\"`\n\tMode    string `\"json\":\"mode\"`\n\tHost    string `\"json\":\"host\"`\n\tVersion string `\"json\":\"version\"`\n\tPort    string `\"json\":\"port\"`\n\tHotload bool   `\"json\":\"hotload\"`\n}\n\nfunc LoadConfiguration() (error, Config) {\n\tvar config Config\n\n\t//lets compile the config.json file into the binary so its easily accessible\n\tbox := packr.NewBox(\"./configfiles\")\n\tif configFile, err := box.MustBytes(\"config.json\"); err != nil {\n\t\treturn err, config\n\t} else {\n\t\tjson.Unmarshal(configFile, &config)\n\t\treturn nil, config\n\t}\n}\nfunc main() {\n\t//0. set any required env vars for qt\n\tos.Setenv(\"QT_QUICK_CONTROLS_STYLE\", \"material\") //set style to material\n\tos.Setenv(\"QML_DISABLE_DISK_CACHE\", \"true\") //disable caching files\n\n\t//1. the hotloader needs a path to the qml files highest directory\n\t// change this if you are working elsewhere\n\tvar topLevel = filepath.Join(os.Getenv(\"GOPATH\"), \"src\", \"github.com\", \"amlwwalker\", \"got-qt\", \"qt\", \"qml\")\n\n\t//2. load the configuration file\n\t_, config := LoadConfiguration()\n\n\t//3. Create a bridge to the frontend\n\tvar qmlBridge = NewQmlBridge(nil)\n\tqmlBridge.ConfigureBridge(config)\n\t// turn on high definition scaling\n\tcore.QCoreApplication_SetAttribute(core.Qt__AA_EnableHighDpiScaling, true)\n\n\t//4. Configure the qml binding and create an application\n\twidgets.NewQApplication(len(os.Args), os.Args)\n\n\t//create a view\n\tvar view = quick.NewQQuickView(nil)\n\tview.SetTitle(\"got-qt\")\n\tqmlBridge.OpenWithDefaultApplication() //try and open a default directory\n\t//configure the view to know about the bridge\n\t//this needs to happen before anything happens on another thread\n\t//else the thread might beat the context property to setup\n\tview.RootContext().SetContextProperty(\"QmlBridge\", qmlBridge)\n\tview.RootContext().SetContextProperty(\"ContactsModel\", qmlBridge.business.pModel)\n\tview.RootContext().SetContextProperty(\"SearchModel\", qmlBridge.business.sModel)\n\tview.RootContext().SetContextProperty(\"FilesModel\", qmlBridge.business.fModel)\n\n\t//5. Configure hotloading\n\t//configure the loader to handle updating qml live\n\tloader := func(p string) {\n\t\tfmt.Println(\"changed:\", p)\n\t\tview.SetSource(core.NewQUrl())\n\t\tview.Engine().ClearComponentCache()\n\t\tview.SetSource(core.NewQUrl3(topLevel+\"/loader.qml\", 0))\n\t\tif !strings.Contains(p, \"/loader.qml\") {\n\t\t\trelativePath := strings.Replace(p, topLevel+\"/\", \"\", -1)\n\t\t\tqmlBridge.UpdateLoader(relativePath)\n\t\t}\n\t}\n\tvar notifier NotificationHandler\n\tnotifier.Initialise()\n\t//decide whether to enable hotloading (must be disabled for deployment)\n\tif !config.Hotload {\n\t\tfmt.Println(\"compiling qml into binary...\")\n\t\tview.SetSource(core.NewQUrl3(\"qrc:/qml/loader-production.qml\", 0))\n\t\tnotifier.Push(\"Hotloading\", \"Disabled\")\n\t} else {\n\t\tview.SetSource(core.NewQUrl3(topLevel+\"/loader.qml\", 0))\n\t\tgo qmlBridge.hotLoader.startWatcher(loader)\n\t\tnotifier.Push(\"Hotloading\", \"Enabled\")\n\t}\n\n\t//6. Complete setup, and start the UI\n\tview.SetResizeMode(quick.QQuickView__SizeRootObjectToView)\n\tview.Show()\n\twidgets.QApplication_Exec()\n\n}\n"
  },
  {
    "path": "qt/main.go.bak",
    "content": "package main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"github.com/therecipe/qt/core\"\n\t\"github.com/therecipe/qt/quick\"\n\t\"github.com/therecipe/qt/widgets\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n)\n\ntype Config struct {\n\tAuthor  string `\"json\":\"author\"`\n\tDate    string `\"json\":\"date\"`\n\tMode    string `\"json\":\"mode\"`\n\tHost    string `\"json\":\"host\"`\n\tVersion string `\"json\":\"version\"`\n\tPort    string `\"json\":\"port\"`\n\tHotload bool   `\"json\":\"hotload\"`\n}\n\nfunc LoadConfiguration(file string) (error, Config) {\n\tvar config Config\n\tconfigFile, err := os.Open(file)\n\tdefer configFile.Close()\n\tif err != nil {\n\t\tfmt.Println(err.Error())\n\t\treturn err, config\n\t}\n\tjsonParser := json.NewDecoder(configFile)\n\tjsonParser.Decode(&config)\n\treturn nil, config\n}\nfunc main() {\n\t//0. set any required env vars for qt\n\tos.Setenv(\"QT_QUICK_CONTROLS_STYLE\", \"material\") //set style to material\n\tos.Setenv(\"QML_DISABLE_DISK_CACHE\", \"true\") //disable caching files\n\n\t//1. the hotloader needs a path to the qml files highest directory\n\t// change this if you are working elsewhere\n\tvar topLevel = filepath.Join(os.Getenv(\"GOPATH\"), \"src\", \"github.com\", \"\", \"got-qt\", \"qt\", \"qml\")\n\n\t//2. load the configuration file\n\t_, config := LoadConfiguration(\"config.json\")\n\n\t//3. Create a bridge to the frontend\n\tvar qmlBridge = NewQmlBridge(nil)\n\tqmlBridge.ConfigureBridge(config)\n\t// turn on high definition scaling\n\tcore.QCoreApplication_SetAttribute(core.Qt__AA_EnableHighDpiScaling, true)\n\n\t//4. Configure the qml binding and create an application\n\twidgets.NewQApplication(len(os.Args), os.Args)\n\n\t//create a view\n\tvar view = quick.NewQQuickView(nil)\n\tview.SetTitle(\"Got-Qt\")\n\t//configure the view to know about the bridge\n\t//this needs to happen before anything happens on another thread\n\t//else the thread might beat the context property to setup\n\tview.RootContext().SetContextProperty(\"QmlBridge\", qmlBridge)\n\tview.RootContext().SetContextProperty(\"ContactsModel\", qmlBridge.business.pModel)\n\tview.RootContext().SetContextProperty(\"SearchModel\", qmlBridge.business.sModel)\n\tview.RootContext().SetContextProperty(\"FilesModel\", qmlBridge.business.fModel)\n\n\t//5. Configure hotloading\n\t//configure the loader to handle updating qml live\n\tloader := func(p string) {\n\t\tfmt.Println(\"changed:\", p)\n\t\tview.SetSource(core.NewQUrl())\n\t\tview.Engine().ClearComponentCache()\n\t\tview.SetSource(core.NewQUrl3(topLevel+\"/loader.qml\", 0))\n\t\tif !strings.Contains(p, \"/loader.qml\") {\n\t\t\trelativePath := strings.Replace(p, topLevel+\"/\", \"\", -1)\n\t\t\tqmlBridge.UpdateLoader(relativePath)\n\t\t}\n\t}\n\t//decide whether to enable hotloading (must be disabled for deployment)\n\tif !config.Hotload {\n\t\tfmt.Println(\"compiling qml into binary...\")\n\t\tview.SetSource(core.NewQUrl3(\"qrc:/qml/loader-production.qml\", 0))\n\t} else {\n\t\tview.SetSource(core.NewQUrl3(topLevel+\"/loader.qml\", 0))\n\t\tgo qmlBridge.hotLoader.startWatcher(loader)\n\t}\n\n\t//6. Complete setup, and start the UI\n\tview.SetResizeMode(quick.QQuickView__SizeRootObjectToView)\n\tview.Show()\n\n\twidgets.QApplication_Exec()\n\n}\n"
  },
  {
    "path": "qt/notificationHandler.go",
    "content": "package main\n\nimport (\n\t\"github.com/0xAX/notificator\" //for desktop\n\t\"github.com/therecipe/qt/androidextras\"\n\t\"github.com/therecipe/qt/core\"\n\t\"runtime\"\n\t\"fmt\"\n)\n\ntype NotificationHandler struct {\n\tAndroidNotifier *NotificationClient\n\tDesktopNotifier *notificator.Notificator\n}\n\ntype NotificationClient struct {\n\tcore.QObject\n\n\t_ func() `constructor:\"init\"`\n\n\t_ string `property:\"notification\"`\n\n\t_ func(string) `slot:\"updateAndroidNotification\"`\n}\nfunc (n *NotificationHandler) Initialise() {\n\n\tn.AndroidNotifier = NewNotificationClient(nil)\n\tn.AndroidNotifier.ConnectNotificationChanged(n.AndroidNotifier.updateAndroidNotification)\n\t//initialise the notifiers\n\tn.DesktopNotifier = notificator.New(notificator.Options{\n\t    DefaultIcon: \"\",\n\t    AppName: \"WingIt\",\n\t})\n}\nfunc (n *NotificationHandler) Push(title, message string) {\n\n\tswitch runtime.GOOS {\n\t\tcase \"android\":\n\t\t\t//in this case, we are notifying on android\n\t\t// notificationClient = NewNotificationClient(view)\n\t\t// view.Engine().RootContext().SetContextProperty(\"notificationClient\", notificationClient)\n\t\tfmt.Println(\"setting android notification\")\n\t\tn.AndroidNotifier.SetNotification(message)\n\t\tdefault:\n\t\t//notifying on desktop\n\t\tn.DesktopNotifier.Push(title, message, \"\", notificator.UR_CRITICAL)\n\t}\n}\n\nfunc (c *NotificationClient) init() {\n\tc.ConnectNotificationChanged(c.updateAndroidNotification)\n}\n\nfunc (c *NotificationClient) updateAndroidNotification(n string) {\n\tfmt.Println(\"string is \", n)\n\tvar err = androidextras.QAndroidJniObject_CallStaticMethodVoid2Caught(\n\t\t\"org/qtproject/example/notification/NotificationClient\",\n\t\t\"notify\",\n\t\t\"(Ljava/lang/String;)V\",\n\t\tn,\n\t)\n\n\tif err != nil {\n\t\tprintln(err.Error())\n\t}\n}\n"
  },
  {
    "path": "qt/qml/elements/FilePicker.qml",
    "content": "\nimport QtQuick 2.0\nimport QtQuick.Controls 1.4 as OldControls\nimport QtQuick.Controls 2.1\nimport Qt.labs.folderlistmodel 2.1\nimport QtQuick.Window 2.0\nimport \"utils.js\" as Utils\n\nItem {\n\tid:picker\n\tsignal fileSelected(string fileName)\n\treadonly property real textmargin: Utils.dp(Screen.pixelDensity, 8)\n\treadonly property real textSize: Utils.dp(Screen.pixelDensity, 16)\n\treadonly property real headerTextSize: Utils.dp(Screen.pixelDensity, 12)\n\treadonly property real buttonHeight: Utils.dp(Screen.pixelDensity, 24)\n\treadonly property real rowHeight: Utils.dp(Screen.pixelDensity, 36)\n\treadonly property real toolbarHeight: Utils.dp(Screen.pixelDensity, 48)\n\tproperty bool showDotAndDotDot: false\n\tproperty bool showHidden: true\n\tproperty bool showDirsFirst: true\n\tproperty string folder: \"file:///~/\"\n\tproperty string nameFilters: \"*.*\"\n\n\tfunction currentFolder() {\n\t\treturn folderListModel.folder;\n\t}\n\n\tfunction isFolder(fileName) {\n\t\treturn folderListModel.isFolder(folderListModel.indexOf(folderListModel.folder + \"/\" + fileName));\n\t}\n\tfunction canMoveUp() {\n\t\treturn folderListModel.folder.toString() !== \"file:///\";\n\t}\n\n\tfunction onItemClick(fileName) {\n\t\tconsole.log('clicked on ' + fileName)\n\t\tif(!isFolder(fileName)) {\n\t\t\tfileSelected(fileName)\n\t\t\treturn;\n\t\t}\n\t\tif(fileName === \"..\" && canMoveUp()) {\n\t\t\tfolderListModel.folder = folderListModel.parentFolder\n\t\t} else if(fileName !== \".\") {\n\t\t\tif(folderListModel.folder.toString() === \"file:///\") {\n\t\t\t\tfolderListModel.folder += fileName\n\t\t\t} else {\n\t\t\t\tfolderListModel.folder += \"/\" + fileName\n\t\t\t}\n\t\t}\n\t}\n\tRectangle {\n\t\tid: toolbar\n\t\tanchors.right: parent.right\n\t\tanchors.left: parent.left\n\t\tanchors.top: parent.top\n\t\theight: toolbarHeight\n\t\tcolor: Utils.backgroundColor()\n\t\tButton {\n\t\t\tid: button\n\t\t\ttext: \"..\"\n\t\t\tanchors.right: parent.right\n\t\t\tanchors.rightMargin: buttonHeight\n\t\t\tanchors.bottom: parent.bottom\n\t\t\tanchors.top: parent.top\n\t\t\tenabled: canMoveUp()\n\t\t\tflat: true\n\t\t\tonClicked: {\n\t\t\t\tif(canMoveUp) {\n\t\t\t\t\tfolderListModel.folder = folderListModel.parentFolder\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tText {\n\t\t\tid: filePath\n\t\t\ttext: folderListModel.folder.toString().replace(\"file:///\", \"►\").replace(new RegExp(\"/\",'g'), \"►\")\n\t\t\trenderType: Text.NativeRendering\n\t\t\telide: Text.ElideMiddle\n\t\t\tanchors.right: button.left\n\t\t\tfont.italic: true\n\t\t\tfont.bold: true\n\t\t\tverticalAlignment: Text.AlignVCenter\n\t\t\tanchors.left: parent.left\n\t\t\tanchors.leftMargin: buttonHeight\n\t\t\tanchors.bottom: parent.bottom\n\t\t\tanchors.top: parent.top\n\t\t\tfont.pixelSize: textSize\n\n\t\t}\n\t}\n\n\tFolderListModel {\n\t\tid:  folderListModel\n\t\tshowDotAndDotDot: picker.showDotAndDotDot\n\t\tshowHidden: picker.showHidden\n\t\tshowDirsFirst: picker.showDirsFirst\n\t\tfolder: picker.folder\n\t\tnameFilters: picker.nameFilters\n\t}\n\tOldControls.TableView {\n\t\tid: view\n\t\tanchors.top: toolbar.bottom\n\t\tanchors.right: parent.right\n\t\tanchors.bottom: parent.bottom\n\t\tanchors.left: parent.left\n\t\tmodel: folderListModel\n\t\theaderDelegate:headerDelegate\n\t\trowDelegate: Rectangle {\n\t\t\theight: rowHeight\n\t\t}\n\n\t\tOldControls.TableViewColumn {\n\t\t\ttitle: qsTr(\"FileName\")\n\t\t\trole: \"fileName\"\n\t\t\tresizable: true\n\t\t\tdelegate: fileDelegate\n\t\t}\n\n\t\tComponent {\n\t\t\tid: fileDelegate\n\t\t\tItem {\n\t\t\t\theight: rowHeight\n\t\t\t\tRectangle {\n\t\t\t\t\tanchors.fill: parent\n\t\t\t\t\tMouseArea {\n\t\t\t\t\t\tanchors.fill: parent\n\t\t\t\t\t\tonClicked: {\n\t\t\t\t\t\t\tonItemClick(fileNameText.text)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tText {\n\t\t\t\t\t\tid: fileNameText\n\t\t\t\t\t\theight: width\n\t\t\t\t\t\tanchors.left: image.right\n\t\t\t\t\t\tanchors.top: parent.top\n\t\t\t\t\t\tanchors.bottom: parent.bottom\n\t\t\t\t\t\tanchors.right: parent.right\n\t\t\t\t\t\ttext: styleData.value !== undefined ? styleData.value : \"\"\n\t\t\t\t\t\tverticalAlignment: Text.AlignVCenter\n\t\t\t\t\t}\n\t\t\t\t\tImage {\n\t\t\t\t\t\tid: image\n\t\t\t\t\t\theight: buttonHeight\n\t\t\t\t\t\twidth: height\n\t\t\t\t\t\tanchors.left: parent.left\n\t\t\t\t\t\tanchors.leftMargin: textmargin\n\t\t\t\t\t\tanchors.verticalCenter: parent.verticalCenter\n\t\t\t\t\t\tsource: isFolder(fileNameText.text) ? \"qrc:/qml/images/FA/white/png/22/folder.png\" : \"qrc:/qml/images/FA/white/png/22/file.png\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tComponent {\n\t\t\tid: headerDelegate\n\t\t\tRectangle {\n\t\t\t\theight: rowHeight\n\t\t\t\tcolor: Utils.textAltColor()\n\t\t\t\tborder.color: Utils.textAltColor()\n\t\t\t\tText {\n\t\t\t\t\tanchors.verticalCenter: parent.verticalCenter\n\t\t\t\t\tanchors.horizontalCenter: parent.horizontalCenter\n\t\t\t\t\theight: headerTextSize\n\t\t\t\t\tfont.bold: true\n\t\t\t\t\telide: Text.ElideMiddle\n\t\t\t\t\tcolor: Utils.primaryColor()\n\t\t\t\t\ttext: styleData.value !== undefined ? styleData.value : \"\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}"
  },
  {
    "path": "qt/qml/elements/PressAndHoldButton.qml",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2015 The Qt Company Ltd.\n** Contact: http://www.qt.io/licensing/\n**\n** This file is part of the examples of the Qt Toolkit.\n**\n** $QT_BEGIN_LICENSE:BSD$\n** You may use this file under the terms of the BSD license as follows:\n**\n** \"Redistribution and use in source and binary forms, with or without\n** modification, are permitted provided that the following conditions are\n** met:\n**   * Redistributions of source code must retain the above copyright\n**     notice, this list of conditions and the following disclaimer.\n**   * Redistributions in binary form must reproduce the above copyright\n**     notice, this list of conditions and the following disclaimer in\n**     the documentation and/or other materials provided with the\n**     distribution.\n**   * Neither the name of The Qt Company Ltd nor the names of its\n**     contributors may be used to endorse or promote products derived\n**     from this software without specific prior written permission.\n**\n**\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\n**\n** $QT_END_LICENSE$\n**\n****************************************************************************/\n\nimport QtQuick 2.6\n\nImage {\n    id: container\n\n    property int repeatDelay: 300\n    property int repeatDuration: 75\n    property bool pressed: false\n\n    signal clicked\n\n    scale: pressed ? 0.9 : 1\n\n    function release() {\n        autoRepeatClicks.stop()\n        container.pressed = false\n    }\n\n    SequentialAnimation on pressed {\n        id: autoRepeatClicks\n        running: false\n\n        PropertyAction { target: container; property: \"pressed\"; value: true }\n        ScriptAction { script: container.clicked() }\n        PauseAnimation { duration: repeatDelay }\n\n        SequentialAnimation {\n            loops: Animation.Infinite\n            ScriptAction { script: container.clicked() }\n            PauseAnimation { duration: repeatDuration }\n        }\n    }\n\n    MouseArea {\n        anchors.fill: parent\n\n        onPressed: autoRepeatClicks.start()\n        onReleased: container.release()\n        onCanceled: container.release()\n    }\n}"
  },
  {
    "path": "qt/qml/elements/TextButton.qml",
    "content": "/****************************************************************************\n**\n** Copyright (C) 2015 The Qt Company Ltd.\n** Contact: http://www.qt.io/licensing/\n**\n** This file is part of the examples of the Qt Toolkit.\n**\n** $QT_BEGIN_LICENSE:BSD$\n** You may use this file under the terms of the BSD license as follows:\n**\n** \"Redistribution and use in source and binary forms, with or without\n** modification, are permitted provided that the following conditions are\n** met:\n**   * Redistributions of source code must retain the above copyright\n**     notice, this list of conditions and the following disclaimer.\n**   * Redistributions in binary form must reproduce the above copyright\n**     notice, this list of conditions and the following disclaimer in\n**     the documentation and/or other materials provided with the\n**     distribution.\n**   * Neither the name of The Qt Company Ltd nor the names of its\n**     contributors may be used to endorse or promote products derived\n**     from this software without specific prior written permission.\n**\n**\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\n**\n** $QT_END_LICENSE$\n**\n****************************************************************************/\n\nimport QtQuick 2.6\n\nRectangle {\n    id: container\n\n    property alias text: label.text\n\n    signal clicked\n\n    width: label.width + 20; height: label.height + 6\n    smooth: true\n    radius: 10\n\n    gradient: Gradient {\n        GradientStop { id: gradientStop; position: 0.0; color: palette.light }\n        GradientStop { position: 1.0; color: palette.button }\n    }\n\n    SystemPalette { id: palette }\n\n    MouseArea {\n        id: mouseArea\n        anchors.fill: parent\n        onClicked: { container.clicked() }\n    }\n\n    Text {\n        id: label\n        anchors.centerIn: parent\n    }\n\n    states: State {\n        name: \"pressed\"\n        when: mouseArea.pressed\n        PropertyChanges { target: gradientStop; color: palette.dark }\n    }\n}"
  },
  {
    "path": "qt/qml/elements/Toast.qml",
    "content": "import QtQuick 2.6\nimport QtQuick.Layouts 1.3\nimport QtQuick.Controls 2.0\nimport QtQuick.Controls.Material 2.0\n\nPopup {\n    id: popup\n    bottomMargin: 80\n    background: Rectangle{\n        color: \"#ddd\"\n        radius: 3\n    }\n\n    height: 40\n    modal: true\n    focus: true\n    closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent\n    Timer {\n        id: toastTimer\n        interval: 3000\n        repeat: false\n        onTriggered: {\n            popup.close()\n        }\n    } // toastTimer\n    Label {\n        id: toastLabel\n        leftPadding: 16\n        rightPadding: 16\n        font.pixelSize: 14\n        color: \"black\"\n        horizontalAlignment: Text.AlignHCenter\n        verticalAlignment: Text.AlignVCenter\n    } // toastLabel\n    onAboutToShow: {\n        toastTimer.start()\n    }\n    function start(toastText) {\n        toastLabel.text = toastText\n        if(!toastTimer.running) {\n            open()\n        } else {\n            toastTimer.restart()\n        }\n    } // function start\n} // popup toastPopup\n"
  },
  {
    "path": "qt/qml/elements/utils.js",
    "content": "function dp(pixelDensity,x) {\n\treturn (pixelDensity * 25.4 < 120) ? x : x*(pixelDensity * 25.4/160);\n}\n\nfunction baseColor() {\n\treturn \"#f26e35\"\n}\n\nfunction primaryColor() {\n\treturn \"#d04828\"\n}\n\nfunction textColor() {\n\treturn \"#434f4d\"\n}\n\nfunction textAltColor() {\n\treturn \"#a6aaa2\"\n}\n\nfunction backgroundColor() {\n\treturn \"#e7e8e9\"\n}\n\nfunction backgroundAltColor() {\n\treturn \"#ffefde\"\n}"
  },
  {
    "path": "qt/qml/loader-production.qml",
    "content": "import QtQuick 2.6\nimport QtQuick.Layouts 1.3\nimport QtQuick.Controls 2.0\nimport QtQuick.Controls.Material 2.0\nimport QtQuick.Controls.Universal 2.0\nimport Qt.labs.settings 1.0\nimport \"elements\"\nItem {\n    id: window\n    width: 360\n    height: 520\n    visible: true\n    Settings {\n        id: settings\n        property string style: \"Default\"\n    }\n\n    ColumnLayout {\n        width: parent.width\n        anchors.fill: parent\n        ToolBar {\n            id: toolbar\n            Material.foreground: \"white\"\n            Material.background: Material.BlueGrey\n             z: 100\n            anchors.left: parent.left\n            anchors.right: parent.right\n            anchors.top: parent.top\n            RowLayout {\n                spacing: 20\n                anchors.fill: parent\n\n                ToolButton {\n                    contentItem: Image {\n                        fillMode: Image.Pad\n                        horizontalAlignment: Image.AlignHCenter\n                        verticalAlignment: Image.AlignVCenter\n                        source: \"images/drawer.png\" //stackView.depth > 1 ? \"images/back.png\" : \"images/drawer.png\"\n                    }\n                    onClicked: {\n                        //if (stackView.depth > 1) {\n                        //    stackView.pop()\n                        //    listView.currentIndex = -1\n                        //} else {\n                        //    drawer.open()\n                        //}\n                        drawer.open()\n                    }\n                }\n\n                Label {\n                    id: titleLabel\n                    text: listView.currentItem ? listView.currentItem.text : \"My App\"\n                    font.pixelSize: 20\n                    elide: Label.ElideRight\n                    horizontalAlignment: Qt.AlignHCenter\n                    verticalAlignment: Qt.AlignVCenter\n                    Layout.fillWidth: true\n                }\n                ToolButton {\n                    id: settingsViewer\n                    contentItem: Image {\n                        fillMode: Image.Pad\n                        horizontalAlignment: Image.AlignHCenter\n                        verticalAlignment: Image.AlignVCenter\n                        source: \"qrc:/qml/images/menu.png\"\n                    }\n                    onClicked: optionsMenu.open()\n\n                    Menu {\n                        id: optionsMenu\n                        MenuItem {\n                            text: \"Settings\"\n                            onTriggered: settingsPopup.open()\n                        }\n                        MenuItem {\n                            text: \"About\"\n                            onTriggered: aboutDialog.open()\n                        }\n                        MenuItem {\n                            text: \"Log Out\"\n                            onTriggered: logoutDialog.open()\n                        }\n                    }\n                }\n            }\n        }\n        Toast {\n            //a toast that everyone can use\n            id: globalToast\n            x: parent.width / 10\n            y: (parent.height * 4) / 5\n            width: (parent.width * 4) / 5\n        }\n        BusyIndicator {\n            id: loadingIndicator\n            visible: true\n            z: 100\n            readonly property int size: Math.min(footer.availableWidth, footer.availableHeight) / 5\n            width: size\n            height: size\n            anchors.horizontalCenter: parent.horizontalCenter\n            anchors.bottom: footer.top\n            Material.accent: Material.BlueGrey\n        }\n\n        ToolBar {\n            id: footer\n            Material.foreground: \"white\"\n            Material.background: Material.BlueGrey\n             z: 100\n            anchors.left: parent.left\n            anchors.right: parent.right\n            anchors.bottom: parent.bottom\n            RowLayout {\n                spacing: 20\n                anchors.fill: parent\n\n                Label {\n                    id: footerLabel\n                    text: \"\"\n                    visible: true\n                    font.pixelSize: 16\n                    elide: Label.ElideRight\n                    horizontalAlignment: Qt.AlignHCenter\n                    verticalAlignment: Qt.AlignVCenter\n                    Layout.fillWidth: true\n                }\n                ProgressBar {\n                    id: progressIndicator\n                    value: 0.0\n                    indeterminate: false\n                    visible: false\n                    z: 100\n                    width: parent.width\n                    anchors.horizontalCenter: parent.horizontalCenter\n                    Material.accent: Material.Grey\n                }\n                Connections {\n                    target: QmlBridge\n    //Progress bar update\n                    onUpdateProcessStatus: {\n                        //initialise the viewing\n                        footerLabel.visible = false\n                        progressIndicator.visible = true\n                        progressIndicator.indeterminate = indeterminate\n                        //set the progress value (only useful when determinate)\n                        progressIndicator.value = c\n                        if (c.toFixed(2) ==  1.0) {\n                            //process complete\n                            progressIndicator.visible = false\n                            footerLabel.text = \"process complete\"\n                            footerLabel.visible = true\n                        }\n                    }\n                }\n            }\n        }\n        //content holder\n        StackView {\n            id: stackView\n            Layout.fillWidth: true\n            Layout.fillHeight: true\n            anchors.margins: 10\n              Connections {\n                target: QmlBridge\n//hotloading:\n                onUpdateLoader: {\n                    stackView.clear()\n                    stackView.push(p)\n                    footerLabel.text = \"detected change to: \" + p\n                    loadingIndicator.visible = true\n                }\n              }\n\n//animates the loader for 1 second when respawning a page for effect\n                PropertyAnimation {\n                    running: true\n                    target: loadingIndicator\n                    property: 'visible'\n                    to: false\n                    duration: 2000\n                }\n\n            initialItem: Pane {\n                id: pane\n\n                Image {\n                    id: logo\n                    width: pane.availableWidth / 2\n                    height: pane.availableHeight / 2\n                    anchors.centerIn: parent\n                    anchors.verticalCenterOffset: -50\n                    fillMode: Image.PreserveAspectFit\n                    source: \"qrc:/qml/images/qt-logo.png\"\n                }\n\n                Label {\n                    text: \"Qt is a set of controls that can be used to build complete interfaces in Qt Quick.\"\n                    anchors.margins: 20\n                    anchors.top: logo.bottom\n                    anchors.left: parent.left\n                    anchors.right: parent.right\n                    horizontalAlignment: Label.AlignHCenter\n                    verticalAlignment: Label.AlignVCenter\n                    wrapMode: Label.Wrap\n                }\n\n            }\n            onCurrentItemChanged: currentItem.anchors.fill = this\n        }\n    }\n    //menu\n    Drawer {\n        id: drawer\n        width: Math.min(window.width, window.height) / 3 * 2\n        height: window.height\n        dragMargin: stackView.depth > 1 ? 0 : undefined\n\n        ListView {\n            id: listView\n            currentIndex: -1\n            anchors.fill: parent\n\n            delegate: ItemDelegate {\n                width: parent.width\n                text: model.title\n                highlighted: ListView.isCurrentItem\n                onClicked: {\n                    if (listView.currentIndex != index) {\n                        listView.currentIndex = index\n                        stackView.push(model.source)\n                        titleLabel.text = model.title\n                    }\n                    drawer.close()\n                }\n            }\n\n            model: ListModel {\n            //application\n               ListElement { title: \"Contacts\"; source: \"qrc:/qml/pages/_contactsPage.qml\" }\n                ListElement { title: \"Files\"; source: \"qrc:/qml/pages/_filelistPage.qml\" }\n                ListElement { title: \"Downloads\"; source: \"qrc:/qml/pages/_downloadsPage.qml\" }\n                ListElement { title: \"Search\"; source: \"qrc:/qml/pages/_searchPage.qml\" }\n                ListElement { title: \"Login\"; source: \"qrc:/qml/pages/_loginPage.qml\" }\n                ListElement { title: \"Calulator\"; source: \"qrc:/qml/pages/_calculatorPage.qml\" }\n                ListElement { title: \"Clock\"; source: \"qrc:/qml/pages/_clockPage.qml\" }\n                ListElement { title: \"Toast\"; source: \"qrc:/qml/pages/_toastPage.qml\" }\n                ListElement { title: \"Dark Fruit\"; source: \"qrc:/qml/pages/_fruitsPage.qml\" }\n                ListElement { title: \"Light Fruit\"; source: \"qrc:/qml/pages/_fruitsPage2.qml\" }\n                ListElement { title: \"Asynchronous Loading\"; source: \"qrc:/qml/pages/_asynchronousPage.qml\" }\n            //demos\n                ListElement { title: \"BusyIndicator\"; source: \"qrc:/qml/pages/BusyIndicatorPage.qml\" }\n                ListElement { title: \"Button\"; source: \"qrc:/qml/pages/ButtonPage.qml\" }\n                ListElement { title: \"CheckBox\"; source: \"qrc:/qml/pages/CheckBoxPage.qml\" }\n                ListElement { title: \"ComboBox\"; source: \"qrc:/qml/pages/ComboBoxPage.qml\" }\n                ListElement { title: \"Dial\"; source: \"qrc:/qml/pages/DialPage.qml\" }\n                ListElement { title: \"Delegates\"; source: \"qrc:/qml/pages/DelegatePage.qml\" }\n                ListElement { title: \"Drawer\"; source: \"qrc:/qml/pages/DrawerPage.qml\" }\n                ListElement { title: \"Frame\"; source: \"qrc:/qml/pages/FramePage.qml\" }\n                ListElement { title: \"GroupBox\"; source: \"qrc:/qml/pages/GroupBoxPage.qml\" }\n                ListElement { title: \"Menu\"; source: \"qrc:/qml/pages/MenuPage.qml\" }\n                ListElement { title: \"PageIndicator\"; source: \"qrc:/qml/pages/PageIndicatorPage.qml\" }\n                ListElement { title: \"Popup\"; source: \"qrc:/qml/pages/PopupPage.qml\" }\n                ListElement { title: \"ProgressBar\"; source: \"qrc:/qml/pages/ProgressBarPage.qml\" }\n                ListElement { title: \"RadioButton\"; source: \"qrc:/qml/pages/RadioButtonPage.qml\" }\n                ListElement { title: \"RangeSlider\"; source: \"qrc:/qml/pages/RangeSliderPage.qml\" }\n                ListElement { title: \"ScrollBar\"; source: \"qrc:/qml/pages/ScrollBarPage.qml\" }\n                ListElement { title: \"ScrollIndicator\"; source: \"qrc:/qml/pages/ScrollIndicatorPage.qml\" }\n                ListElement { title: \"Slider\"; source: \"qrc:/qml/pages/SliderPage.qml\" }\n                ListElement { title: \"SpinBox\"; source: \"qrc:/qml/pages/SpinBoxPage.qml\" }\n                ListElement { title: \"StackView\"; source: \"qrc:/qml/pages/StackViewPage.qml\" }\n                ListElement { title: \"SwipeView\"; source: \"qrc:/qml/pages/SwipeViewPage.qml\" }\n                ListElement { title: \"Switch\"; source: \"qrc:/qml/pages/SwitchPage.qml\" }\n                ListElement { title: \"TabBar\"; source: \"qrc:/qml/pages/TabBarPage.qml\" }\n                ListElement { title: \"TextArea\"; source: \"qrc:/qml/pages/TextAreaPage.qml\" }\n                ListElement { title: \"TextField\"; source: \"qrc:/qml/pages/TextFieldPage.qml\" }\n                ListElement { title: \"ToolTip\"; source: \"qrc:/qml/pages/ToolTipPage.qml\" }\n                ListElement { title: \"Tumbler\"; source: \"qrc:/qml/pages/TumblerPage.qml\" }\n            }\n\n            ScrollIndicator.vertical: ScrollIndicator { }\n        }\n    }\n    Popup {\n        id: notificationPopup\n        x: (window.width - width) / 2\n        y: window.height / 6\n        width: Math.min(window.width, window.height) / 3 * 2\n        height: settingsColumn.implicitHeight + topPadding + bottomPadding\n        modal: true\n        focus: true\n        contentItem: Text {\n            id: notifcationText\n            text: \"\"\n        }\n    }\n    Popup {\n        id: settingsPopup\n        x: (window.width - width) / 2\n        y: window.height / 6\n        width: Math.min(window.width, window.height) / 3 * 2\n        height: settingsColumn.implicitHeight + topPadding + bottomPadding\n        modal: true\n        focus: true\n\n        contentItem: ColumnLayout {\n            id: settingsColumn\n            spacing: 20\n\n            Label {\n                text: \"Configuration\"\n                font.bold: true\n            }\n\n            RowLayout {\n                spacing: 10\n\n                GridLayout {\n                    id: grid\n                    columns: 2\n\n                    Text { text: \"Hotloading\"; font.bold: true; }\n                    Text { id: hotloading; text: \"waiting\"; color: \"red\" }\n                    Text { text: \"Version\"; font.bold: true; }\n                    Text { id: host; text: \"waiting\"; color: \"red\" }\n                }\n\n              Connections {\n                target: QmlBridge\n                onUpdateSettings: {\n                    footerLabel.text = version\n                    hotloading.text = hotload\n                }\n              }\n                //ComboBox {\n                //    id: styleBox\n                //    property int styleIndex: -1\n                //    model: [\"Default\", \"Material\", \"Universal\"]\n                //    Component.onCompleted: {\n                //        styleIndex = find(settings.style, Qt.MatchFixedString)\n                //        if (styleIndex !== -1)\n                //            currentIndex = styleIndex\n                //    }\n                //    Layout.fillWidth: true\n                //}\n            }\n\n            //Label {\n            //    text: \"Restart required\"\n            //    color: \"#e41e25\"\n            //    opacity: styleBox.currentIndex !== styleBox.styleIndex ? 1.0 : 0.0\n            //    horizontalAlignment: Label.AlignHCenter\n            //    verticalAlignment: Label.AlignVCenter\n            //    Layout.fillWidth: true\n            //    Layout.fillHeight: true\n            //}\n\n            RowLayout {\n                spacing: 10\n\n                Button {\n                    id: okButton\n                    text: \"Ok\"\n                    onClicked: {\n                        //settings.style = styleBox.displayText\n                        settingsPopup.close()\n                    }\n\n                    Material.foreground: Material.primary\n                    Material.background: \"transparent\"\n                    Material.elevation: 0\n\n                    Layout.preferredWidth: 0\n                    Layout.fillWidth: true\n                }\n\n                Button {\n                    id: cancelButton\n                    text: \"Cancel\"\n                    onClicked: {\n                        //styleBox.currentIndex = styleBox.styleIndex\n                        settingsPopup.close()\n                    }\n\n                    Material.background: \"transparent\"\n                    Material.elevation: 0\n\n                    Layout.preferredWidth: 0\n                    Layout.fillWidth: true\n                }\n            }\n        }\n    }\n    Popup {\n        id: logoutDialog\n        modal: true\n        focus: true\n        x: (window.width - width) / 2\n        y: window.height / 6\n        width: Math.min(window.width, window.height) / 3 * 2\n        contentHeight: logoutColumn.height\n\n        Column {\n            id: logoutColumn\n            spacing: 20\n\n            Label {\n                text: \"Logout\"\n                font.bold: true\n            }\n\n            Label {\n                width: logoutDialog.availableWidth\n                text: \"Logging out is really only necessary if you share a computer with others. If you want to continue, click logout below otherwise click elsewhere on the window\"\n                wrapMode: Label.Wrap\n                font.pixelSize: 12\n            }\n            Button {\n                id: searchButton\n                text: \"Logout\"\n                width: logoutDialog.availableWidth\n                onClicked: function() {\n                    console.log('logging out')\n                }\n            }\n        }\n    }\n    Popup {\n        id: aboutDialog\n        modal: true\n        focus: true\n        x: (window.width - width) / 2\n        y: window.height / 6\n        width: Math.min(window.width, window.height) / 3 * 2\n        contentHeight: aboutColumn.height\n\n        Column {\n            id: aboutColumn\n            spacing: 20\n\n            Label {\n                text: \"About\"\n                font.bold: true\n            }\n\n            Label {\n                width: aboutDialog.availableWidth\n                text: \"The Qt Quick Controls 2 module delivers the next generation user interface controls based on Qt Quick.\"\n                wrapMode: Label.Wrap\n                font.pixelSize: 12\n            }\n\n            Label {\n                width: aboutDialog.availableWidth\n                text: \"In comparison to the desktop-oriented Qt Quick Controls 1, Qt Quick Controls 2 \"\n                    + \"are an order of magnitude simpler, lighter and faster, and are primarily targeted \"\n                    + \"towards embedded and mobile platforms.\"\n                wrapMode: Label.Wrap\n                font.pixelSize: 12\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "qt/qml/loader.qml",
    "content": "import QtQuick 2.6\nimport QtQuick.Layouts 1.3\nimport QtQuick.Controls 2.0\nimport QtQuick.Controls.Material 2.0\nimport QtQuick.Controls.Universal 2.0\nimport Qt.labs.settings 1.0\nimport \"elements\"\nItem {\n    id: window\n    width: 480\n    height: 620\n    visible: true\n    Settings {\n        id: settings\n        property string style: \"Default\"\n    }\n\n    ColumnLayout {\n    \twidth: parent.width\n    \tanchors.fill: parent\n\t    ToolBar {\n\t    \tid: toolbar\n\t        Material.foreground: \"white\"\n            Material.background: Material.BlueGrey\n\t         z: 100\n            anchors.left: parent.left\n            anchors.right: parent.right\n            anchors.top: parent.top\n\t        RowLayout {\n\t            spacing: 20\n\t            anchors.fill: parent\n\n\t            ToolButton {\n\t                contentItem: Image {\n\t                    fillMode: Image.Pad\n\t                    horizontalAlignment: Image.AlignHCenter\n\t                    verticalAlignment: Image.AlignVCenter\n\t                    source: \"images/drawer.png\" //stackView.depth > 1 ? \"images/back.png\" : \"images/drawer.png\"\n\t                }\n\t                onClicked: {\n\t                    //if (stackView.depth > 1) {\n\t                    //    stackView.pop()\n\t                    //    listView.currentIndex = -1\n\t                    //} else {\n\t                    //    drawer.open()\n\t                    //}\n                        drawer.open()\n\t                }\n\t            }\n\n\t            Label {\n\t                id: titleLabel\n\t                text: listView.currentItem ? listView.currentItem.text : \"My App\"\n\t                font.pixelSize: 20\n\t                elide: Label.ElideRight\n\t                horizontalAlignment: Qt.AlignHCenter\n\t                verticalAlignment: Qt.AlignVCenter\n\t                Layout.fillWidth: true\n\t            }\n\t            ToolButton {\n                    id: settingsViewer\n\t                contentItem: Image {\n\t                    fillMode: Image.Pad\n\t                    horizontalAlignment: Image.AlignHCenter\n\t                    verticalAlignment: Image.AlignVCenter\n\t                    source: \"qrc:/qml/images/menu.png\"\n\t                }\n\t                onClicked: optionsMenu.open()\n\n\t                Menu {\n\t                    id: optionsMenu\n\t                    MenuItem {\n\t                        text: \"Settings\"\n\t                        onTriggered: settingsPopup.open()\n\t                    }\n\t                    MenuItem {\n\t                        text: \"About\"\n\t                        onTriggered: aboutDialog.open()\n\t                    }\n                        MenuItem {\n                            text: \"Log Out\"\n                            onTriggered: logoutDialog.open()\n                        }\n\t                }\n\t            }\n\t        }\n\t    }\n        Toast {\n            //a toast that everyone can use\n            id: globalToast\n            x: parent.width / 10\n            y: (parent.height * 4) / 5\n            width: (parent.width * 4) / 5\n        }\n        BusyIndicator {\n            id: loadingIndicator\n            visible: true\n            z: 100\n            readonly property int size: Math.min(footer.availableWidth, footer.availableHeight) / 5\n            width: size\n            height: size\n            anchors.horizontalCenter: parent.horizontalCenter\n            anchors.bottom: footer.top\n            Material.accent: Material.BlueGrey\n        }\n\n        ToolBar {\n            id: footer\n            Material.foreground: \"white\"\n            Material.background: Material.BlueGrey\n             z: 100\n            anchors.left: parent.left\n            anchors.right: parent.right\n            anchors.bottom: parent.bottom\n            RowLayout {\n                spacing: 20\n                anchors.fill: parent\n\n                Label {\n                    id: footerLabel\n                    text: \"\"\n                    visible: true\n                    font.pixelSize: 16\n                    elide: Label.ElideRight\n                    horizontalAlignment: Qt.AlignHCenter\n                    verticalAlignment: Qt.AlignVCenter\n                    Layout.fillWidth: true\n                }\n                ProgressBar {\n                    id: progressIndicator\n                    value: 0.0\n                    indeterminate: false\n                    visible: false\n                    z: 100\n                    width: parent.width\n                    anchors.horizontalCenter: parent.horizontalCenter\n                    Material.accent: Material.Grey\n                }\n                Connections {\n                    target: QmlBridge\n    //Progress bar update\n                    onUpdateProcessStatus: {\n                        //initialise the viewing\n                        footerLabel.visible = false\n                        progressIndicator.visible = true\n                        progressIndicator.indeterminate = indeterminate\n                        //set the progress value (only useful when determinate)\n                        progressIndicator.value = c\n                        if (c.toFixed(2) ==  1.0) {\n                            //process complete\n                            progressIndicator.visible = false\n                            footerLabel.text = \"process complete\"\n                            footerLabel.visible = true\n                        }\n                    }\n                }\n            }\n        }\n        //content holder\n\t    StackView {\n\t        id: stackView\n            Layout.fillWidth: true\n            Layout.fillHeight: true\n            anchors.margins: 10\n              Connections {\n                target: QmlBridge\n//hotloading:\n                onUpdateLoader: {\n                    stackView.clear()\n                    stackView.push(p)\n                    footerLabel.text = \"detected change to: \" + p\n                    loadingIndicator.visible = true\n                }\n              }\n\n//animates the loader for 1 second when respawning a page for effect\n                PropertyAnimation {\n                    running: true\n                    target: loadingIndicator\n                    property: 'visible'\n                    to: false\n                    duration: 2000\n                }\n\n\t        initialItem: Pane {\n\t            id: pane\n\n\t            Image {\n\t                id: logo\n\t                width: pane.availableWidth / 2\n\t                height: pane.availableHeight / 2\n\t                anchors.centerIn: parent\n\t                anchors.verticalCenterOffset: -50\n\t                fillMode: Image.PreserveAspectFit\n\t                source: \"qrc:/qml/images/qt-logo.png\"\n\t            }\n\n\t            Label {\n\t                text: \"Qt is a set of controls that can be used to build complete interfaces in Qt Quick.\"\n\t                anchors.margins: 20\n\t                anchors.top: logo.bottom\n\t                anchors.left: parent.left\n\t                anchors.right: parent.right\n\t                horizontalAlignment: Label.AlignHCenter\n\t                verticalAlignment: Label.AlignVCenter\n\t                wrapMode: Label.Wrap\n\t            }\n\n\t        }\n            //onCurrentItemChanged: currentItem.anchors.fill = this\n\t    }\n\t}\n    //menu\n    Drawer {\n        id: drawer\n        width: Math.min(window.width, window.height) / 3 * 2\n        height: window.height\n        dragMargin: stackView.depth > 1 ? 0 : undefined\n\n        ListView {\n            id: listView\n            currentIndex: -1\n            anchors.fill: parent\n\n            delegate: ItemDelegate {\n                width: parent.width\n                text: model.title\n                highlighted: ListView.isCurrentItem\n                onClicked: {\n                    if (listView.currentIndex != index) {\n                        listView.currentIndex = index\n                        stackView.push(model.source)\n                        titleLabel.text = model.title\n                    }\n                    drawer.close()\n                }\n            }\n\n            model: ListModel {\n            //application\n                ListElement { title: \"Contacts\"; source: \"pages/_contactsPage.qml\" }\n                ListElement { title: \"Files\"; source: \"pages/_filelistPage.qml\" }\n                ListElement { title: \"Downloads\"; source: \"pages/_downloadsPage.qml\" }\n                ListElement { title: \"Search\"; source: \"pages/_searchPage.qml\" }\n                ListElement { title: \"Login\"; source: \"pages/_loginPage.qml\" }\n                ListElement { title: \"Calulator\"; source: \"pages/_calculatorPage.qml\" }\n                ListElement { title: \"Clock\"; source: \"pages/_clockPage.qml\" }\n                ListElement { title: \"Toast\"; source: \"pages/_toastPage.qml\" }\n                ListElement { title: \"Dark Fruit\"; source: \"pages/_fruitsPage.qml\" }\n                ListElement { title: \"Light Fruit\"; source: \"pages/_fruitsPage2.qml\" }\n                ListElement { title: \"Asynchronous Loading\"; source: \"pages/_asynchronousPage.qml\" }\n            //demos\n                ListElement { title: \"BusyIndicator\"; source: \"pages/BusyIndicatorPage.qml\" }\n                ListElement { title: \"Button\"; source: \"pages/ButtonPage.qml\" }\n                ListElement { title: \"CheckBox\"; source: \"pages/CheckBoxPage.qml\" }\n                ListElement { title: \"ComboBox\"; source: \"pages/ComboBoxPage.qml\" }\n                ListElement { title: \"Dial\"; source: \"pages/DialPage.qml\" }\n                ListElement { title: \"Delegates\"; source: \"pages/DelegatePage.qml\" }\n                ListElement { title: \"Drawer\"; source: \"pages/DrawerPage.qml\" }\n                ListElement { title: \"Frame\"; source: \"pages/FramePage.qml\" }\n                ListElement { title: \"GroupBox\"; source: \"pages/GroupBoxPage.qml\" }\n                ListElement { title: \"Menu\"; source: \"pages/MenuPage.qml\" }\n                ListElement { title: \"PageIndicator\"; source: \"pages/PageIndicatorPage.qml\" }\n                ListElement { title: \"Popup\"; source: \"pages/PopupPage.qml\" }\n                ListElement { title: \"ProgressBar\"; source: \"pages/ProgressBarPage.qml\" }\n                ListElement { title: \"RadioButton\"; source: \"pages/RadioButtonPage.qml\" }\n                ListElement { title: \"RangeSlider\"; source: \"pages/RangeSliderPage.qml\" }\n                ListElement { title: \"ScrollBar\"; source: \"pages/ScrollBarPage.qml\" }\n                ListElement { title: \"ScrollIndicator\"; source: \"pages/ScrollIndicatorPage.qml\" }\n                ListElement { title: \"Slider\"; source: \"pages/SliderPage.qml\" }\n                ListElement { title: \"SpinBox\"; source: \"pages/SpinBoxPage.qml\" }\n                ListElement { title: \"StackView\"; source: \"pages/StackViewPage.qml\" }\n                ListElement { title: \"SwipeView\"; source: \"pages/SwipeViewPage.qml\" }\n                ListElement { title: \"Switch\"; source: \"pages/SwitchPage.qml\" }\n                ListElement { title: \"TabBar\"; source: \"pages/TabBarPage.qml\" }\n                ListElement { title: \"TextArea\"; source: \"pages/TextAreaPage.qml\" }\n                ListElement { title: \"TextField\"; source: \"pages/TextFieldPage.qml\" }\n                ListElement { title: \"ToolTip\"; source: \"pages/ToolTipPage.qml\" }\n                ListElement { title: \"Tumbler\"; source: \"pages/TumblerPage.qml\" }\n            }\n\n            ScrollIndicator.vertical: ScrollIndicator { }\n        }\n    }\n    Popup {\n        id: notificationPopup\n        x: (window.width - width) / 2\n        y: window.height / 6\n        width: Math.min(window.width, window.height) / 3 * 2\n        height: settingsColumn.implicitHeight + topPadding + bottomPadding\n        modal: true\n        focus: true\n        contentItem: Text {\n            id: notifcationText\n            text: \"\"\n        }\n    }\n    Popup {\n        id: settingsPopup\n        x: (window.width - width) / 2\n        y: window.height / 6\n        width: Math.min(window.width, window.height) / 3 * 2\n        height: settingsColumn.implicitHeight + topPadding + bottomPadding\n        modal: true\n        focus: true\n\n        contentItem: ColumnLayout {\n            id: settingsColumn\n            spacing: 20\n\n            Label {\n                text: \"Configuration\"\n                font.bold: true\n            }\n\n            RowLayout {\n                spacing: 10\n\n                GridLayout {\n                    id: grid\n                    columns: 2\n\n                    Text { text: \"Hotloading\"; font.bold: true; }\n                    Text { id: hotloading; text: \"waiting\"; color: \"red\" }\n                    Text { text: \"Version\"; font.bold: true; }\n                    Text { id: host; text: \"waiting\"; color: \"red\" }\n                }\n\n              Connections {\n                target: QmlBridge\n                onUpdateSettings: {\n                    footerLabel.text = version\n                    hotloading.text = hotload\n                }\n              }\n                //ComboBox {\n                //    id: styleBox\n                //    property int styleIndex: -1\n                //    model: [\"Default\", \"Material\", \"Universal\"]\n                //    Component.onCompleted: {\n                //        styleIndex = find(settings.style, Qt.MatchFixedString)\n                //        if (styleIndex !== -1)\n                //            currentIndex = styleIndex\n                //    }\n                //    Layout.fillWidth: true\n                //}\n            }\n\n            //Label {\n            //    text: \"Restart required\"\n            //    color: \"#e41e25\"\n            //    opacity: styleBox.currentIndex !== styleBox.styleIndex ? 1.0 : 0.0\n            //    horizontalAlignment: Label.AlignHCenter\n            //    verticalAlignment: Label.AlignVCenter\n            //    Layout.fillWidth: true\n            //    Layout.fillHeight: true\n            //}\n\n            RowLayout {\n                spacing: 10\n\n                Button {\n                    id: okButton\n                    text: \"Ok\"\n                    onClicked: {\n                        //settings.style = styleBox.displayText\n                        settingsPopup.close()\n                    }\n\n                    Material.foreground: Material.primary\n                    Material.background: \"transparent\"\n                    Material.elevation: 0\n\n                    Layout.preferredWidth: 0\n                    Layout.fillWidth: true\n                }\n\n                Button {\n                    id: cancelButton\n                    text: \"Cancel\"\n                    onClicked: {\n                        //styleBox.currentIndex = styleBox.styleIndex\n                        settingsPopup.close()\n                    }\n\n                    Material.background: \"transparent\"\n                    Material.elevation: 0\n\n                    Layout.preferredWidth: 0\n                    Layout.fillWidth: true\n                }\n            }\n        }\n    }\n    Popup {\n        id: logoutDialog\n        modal: true\n        focus: true\n        x: (window.width - width) / 2\n        y: window.height / 6\n        width: Math.min(window.width, window.height) / 3 * 2\n        contentHeight: logoutColumn.height\n\n        Column {\n            id: logoutColumn\n            spacing: 20\n\n            Label {\n                text: \"Logout\"\n                font.bold: true\n            }\n\n            Label {\n                width: logoutDialog.availableWidth\n                text: \"Logging out is really only necessary if you share a computer with others. If you want to continue, click logout below otherwise click elsewhere on the window\"\n                wrapMode: Label.Wrap\n                font.pixelSize: 12\n            }\n            Button {\n                id: searchButton\n                text: \"Logout\"\n                width: logoutDialog.availableWidth\n                onClicked: function() {\n                    console.log('logging out')\n                }\n            }\n        }\n    }\n    Popup {\n        id: aboutDialog\n        modal: true\n        focus: true\n        x: (window.width - width) / 2\n        y: window.height / 6\n        width: Math.min(window.width, window.height) / 3 * 2\n        contentHeight: aboutColumn.height\n\n        Column {\n            id: aboutColumn\n            spacing: 20\n\n            Label {\n                text: \"About\"\n                font.bold: true\n            }\n\n            Label {\n                width: aboutDialog.availableWidth\n                text: \"The Qt Quick Controls 2 module delivers the next generation user interface controls based on Qt Quick.\"\n                wrapMode: Label.Wrap\n                font.pixelSize: 12\n            }\n\n            Label {\n                width: aboutDialog.availableWidth\n                text: \"In comparison to the desktop-oriented Qt Quick Controls 1, Qt Quick Controls 2 \"\n                    + \"are an order of magnitude simpler, lighter and faster, and are primarily targeted \"\n                    + \"towards embedded and mobile platforms.\"\n                wrapMode: Label.Wrap\n                font.pixelSize: 12\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "qt/qml/pages/BusyIndicatorPage.qml",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2015 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing/\r\n**\r\n** This file is part of the examples of the Qt Toolkit.\r\n**\r\n** $QT_BEGIN_LICENSE:BSD$\r\n** You may use this file under the terms of the BSD license as follows:\r\n**\r\n** \"Redistribution and use in source and binary forms, with or without\r\n** modification, are permitted provided that the following conditions are\r\n** met:\r\n**   * Redistributions of source code must retain the above copyright\r\n**     notice, this list of conditions and the following disclaimer.\r\n**   * Redistributions in binary form must reproduce the above copyright\r\n**     notice, this list of conditions and the following disclaimer in\r\n**     the documentation and/or other materials provided with the\r\n**     distribution.\r\n**   * Neither the name of The Qt Company Ltd nor the names of its\r\n**     contributors may be used to endorse or promote products derived\r\n**     from this software without specific prior written permission.\r\n**\r\n**\r\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\r\n**\r\n** $QT_END_LICENSE$\r\n**\r\n****************************************************************************/\r\n\r\nimport QtQuick 2.6\r\nimport QtQuick.Controls 2.0\r\n\r\nScrollablePage {\r\n    id: page\r\n\r\n    Column {\r\n        spacing: 40\r\n        width: parent.width\r\n\r\n        Label {\r\n            width: parent.width\r\n            wrapMode: Label.Wrap\r\n            horizontalAlignment: Qt.AlignHCenter\r\n            text: \"BusyIndicator is used to indicate activity while content is being loaded,\"\r\n                  + \" or when the UI is blocked waiting for a resource to become available.\"\r\n        }\r\n\r\n        BusyIndicator {\r\n            readonly property int size: Math.min(page.availableWidth, page.availableHeight) / 5\r\n            width: size\r\n            height: size\r\n            anchors.horizontalCenter: parent.horizontalCenter\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "qt/qml/pages/ButtonPage.qml",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2015 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing/\r\n**\r\n** This file is part of the examples of the Qt Toolkit.\r\n**\r\n** $QT_BEGIN_LICENSE:BSD$\r\n** You may use this file under the terms of the BSD license as follows:\r\n**\r\n** \"Redistribution and use in source and binary forms, with or without\r\n** modification, are permitted provided that the following conditions are\r\n** met:\r\n**   * Redistributions of source code must retain the above copyright\r\n**     notice, this list of conditions and the following disclaimer.\r\n**   * Redistributions in binary form must reproduce the above copyright\r\n**     notice, this list of conditions and the following disclaimer in\r\n**     the documentation and/or other materials provided with the\r\n**     distribution.\r\n**   * Neither the name of The Qt Company Ltd nor the names of its\r\n**     contributors may be used to endorse or promote products derived\r\n**     from this software without specific prior written permission.\r\n**\r\n**\r\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\r\n**\r\n** $QT_END_LICENSE$\r\n**\r\n****************************************************************************/\r\n\r\nimport QtQuick 2.6\r\nimport QtQuick.Controls 2.0\r\n\r\nScrollablePage {\r\n    id: page\r\n\r\n    readonly property int itemWidth: Math.max(button.implicitWidth, Math.min(button.implicitWidth * 2, page.availableWidth / 3))\r\n\r\n    Column {\r\n        spacing: 40\r\n        width: parent.width\r\n\r\n        Label {\r\n            width: parent.width\r\n            wrapMode: Label.Wrap\r\n            horizontalAlignment: Qt.AlignHCenter\r\n            text: \"Button presents a push-button that can be pushed or clicked by the user. \"\r\n                + \"Buttons are normally used to perform an action, or to answer a question.\"\r\n        }\r\n\r\n        Column {\r\n            spacing: 20\r\n            anchors.horizontalCenter: parent.horizontalCenter\r\n\r\n            Button {\r\n                text: \"First\"\r\n                width: itemWidth\r\n            }\r\n            Button {\r\n                id: button\r\n                text: \"Second\"\r\n                width: itemWidth\r\n                highlighted: true\r\n            }\r\n            Button {\r\n                text: \"Third\"\r\n                enabled: false\r\n                width: itemWidth\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "qt/qml/pages/CheckBoxPage.qml",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2015 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing/\r\n**\r\n** This file is part of the examples of the Qt Toolkit.\r\n**\r\n** $QT_BEGIN_LICENSE:BSD$\r\n** You may use this file under the terms of the BSD license as follows:\r\n**\r\n** \"Redistribution and use in source and binary forms, with or without\r\n** modification, are permitted provided that the following conditions are\r\n** met:\r\n**   * Redistributions of source code must retain the above copyright\r\n**     notice, this list of conditions and the following disclaimer.\r\n**   * Redistributions in binary form must reproduce the above copyright\r\n**     notice, this list of conditions and the following disclaimer in\r\n**     the documentation and/or other materials provided with the\r\n**     distribution.\r\n**   * Neither the name of The Qt Company Ltd nor the names of its\r\n**     contributors may be used to endorse or promote products derived\r\n**     from this software without specific prior written permission.\r\n**\r\n**\r\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\r\n**\r\n** $QT_END_LICENSE$\r\n**\r\n****************************************************************************/\r\n\r\nimport QtQuick 2.6\r\nimport QtQuick.Controls 2.0\r\n\r\nScrollablePage {\r\n    id: page\r\n\r\n    Column {\r\n        spacing: 40\r\n        width: parent.width\r\n\r\n        Label {\r\n            width: parent.width\r\n            wrapMode: Label.Wrap\r\n            horizontalAlignment: Qt.AlignHCenter\r\n            text: \"A checkbox presents an option button that can be toggled on or off. \"\r\n                + \"Check boxes are typically used to select one or more options from a set of options.\"\r\n        }\r\n\r\n        Column {\r\n            spacing: 20\r\n            anchors.horizontalCenter: parent.horizontalCenter\r\n\r\n            CheckBox {\r\n                text: \"First\"\r\n                checked: true\r\n            }\r\n            CheckBox {\r\n                text: \"Second\"\r\n            }\r\n            CheckBox {\r\n                text: \"Third\"\r\n                checked: true\r\n                enabled: false\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "qt/qml/pages/ComboBoxPage.qml",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2015 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing/\r\n**\r\n** This file is part of the examples of the Qt Toolkit.\r\n**\r\n** $QT_BEGIN_LICENSE:BSD$\r\n** You may use this file under the terms of the BSD license as follows:\r\n**\r\n** \"Redistribution and use in source and binary forms, with or without\r\n** modification, are permitted provided that the following conditions are\r\n** met:\r\n**   * Redistributions of source code must retain the above copyright\r\n**     notice, this list of conditions and the following disclaimer.\r\n**   * Redistributions in binary form must reproduce the above copyright\r\n**     notice, this list of conditions and the following disclaimer in\r\n**     the documentation and/or other materials provided with the\r\n**     distribution.\r\n**   * Neither the name of The Qt Company Ltd nor the names of its\r\n**     contributors may be used to endorse or promote products derived\r\n**     from this software without specific prior written permission.\r\n**\r\n**\r\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\r\n**\r\n** $QT_END_LICENSE$\r\n**\r\n****************************************************************************/\r\n\r\nimport QtQuick 2.6\r\nimport QtQuick.Controls 2.0\r\n\r\nScrollablePage {\r\n    id: page\r\n\r\n    Column {\r\n        spacing: 40\r\n        width: parent.width\r\n\r\n        Label {\r\n            width: parent.width\r\n            wrapMode: Label.Wrap\r\n            horizontalAlignment: Qt.AlignHCenter\r\n            text: \"ComboBox is a combined button and popup list. It presents \"\r\n                + \"a list of options to the user that occupies minimal screen space.\"\r\n        }\r\n\r\n        ComboBox {\r\n            model: [\"First\", \"Second\", \"Third\"]\r\n            width: Math.max(implicitWidth, Math.min(implicitWidth * 2, page.availableWidth / 3))\r\n            anchors.horizontalCenter: parent.horizontalCenter\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "qt/qml/pages/DelegatePage.qml",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2016 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing/\r\n**\r\n** This file is part of the examples of the Qt Toolkit.\r\n**\r\n** $QT_BEGIN_LICENSE:BSD$\r\n** You may use this file under the terms of the BSD license as follows:\r\n**\r\n** \"Redistribution and use in source and binary forms, with or without\r\n** modification, are permitted provided that the following conditions are\r\n** met:\r\n**   * Redistributions of source code must retain the above copyright\r\n**     notice, this list of conditions and the following disclaimer.\r\n**   * Redistributions in binary form must reproduce the above copyright\r\n**     notice, this list of conditions and the following disclaimer in\r\n**     the documentation and/or other materials provided with the\r\n**     distribution.\r\n**   * Neither the name of The Qt Company Ltd nor the names of its\r\n**     contributors may be used to endorse or promote products derived\r\n**     from this software without specific prior written permission.\r\n**\r\n**\r\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\r\n**\r\n** $QT_END_LICENSE$\r\n**\r\n****************************************************************************/\r\n\r\nimport QtQuick 2.6\r\nimport QtQuick.Layouts 1.1\r\nimport QtQuick.Controls 2.0\r\n\r\nPane {\r\n    padding: 0\r\n\r\n    property var delegateComponentMap: {\r\n        \"ItemDelegate\": itemDelegateComponent,\r\n        \"SwipeDelegate\": swipeDelegateComponent,\r\n        \"CheckDelegate\": checkDelegateComponent,\r\n        \"RadioDelegate\": radioDelegateComponent,\r\n        \"SwitchDelegate\": switchDelegateComponent\r\n    }\r\n\r\n    Component {\r\n        id: itemDelegateComponent\r\n\r\n        ItemDelegate {\r\n            text: labelText\r\n            width: parent.width\r\n        }\r\n    }\r\n\r\n    Component {\r\n        id: swipeDelegateComponent\r\n\r\n        SwipeDelegate {\r\n            id: swipeDelegate\r\n            text: labelText\r\n            width: parent.width\r\n\r\n            onClicked: if (swipe.complete) view.model.remove(ourIndex)\r\n\r\n            Component {\r\n                id: removeComponent\r\n\r\n                Rectangle {\r\n                    color: swipeDelegate.swipe.complete && swipeDelegate.pressed ? \"#333\" : \"#444\"\r\n                    width: parent.width\r\n                    height: parent.height\r\n                    clip: true\r\n\r\n                    Label {\r\n                        font.pixelSize: swipeDelegate.font.pixelSize\r\n                        text: \"Remove\"\r\n                        color: \"white\"\r\n                        anchors.centerIn: parent\r\n                    }\r\n                }\r\n            }\r\n\r\n            swipe.left: removeComponent\r\n            swipe.right: removeComponent\r\n        }\r\n    }\r\n\r\n    Component {\r\n        id: checkDelegateComponent\r\n\r\n        CheckDelegate {\r\n            text: labelText\r\n            width: parent.width\r\n        }\r\n    }\r\n\r\n    ButtonGroup {\r\n        id: radioButtonGroup\r\n    }\r\n\r\n    Component {\r\n        id: radioDelegateComponent\r\n\r\n        RadioDelegate {\r\n            text: labelText\r\n            ButtonGroup.group: radioButtonGroup\r\n        }\r\n    }\r\n\r\n    Component {\r\n        id: switchDelegateComponent\r\n\r\n        SwitchDelegate {\r\n            text: labelText\r\n        }\r\n    }\r\n\r\n    ColumnLayout {\r\n        id: column\r\n        spacing: 40\r\n        anchors.fill: parent\r\n        anchors.topMargin: 20\r\n\r\n        Label {\r\n            Layout.fillWidth: true\r\n            wrapMode: Label.Wrap\r\n            horizontalAlignment: Qt.AlignHCenter\r\n            text: \"Delegate controls are used as delegates in views such as ListView.\"\r\n        }\r\n\r\n        ListView {\r\n            id: listView\r\n            Layout.fillWidth: true\r\n            Layout.fillHeight: true\r\n            clip: true\r\n            model: ListModel {\r\n                ListElement { type: \"RadioDelegate\"; text: \"RadioDelegate\" }\r\n                ListElement { type: \"RadioDelegate\"; text: \"RadioDelegate\" }\r\n                ListElement { type: \"RadioDelegate\"; text: \"RadioDelegate\" }\r\n                ListElement { type: \"SwipeDelegate\"; text: \"SwipeDelegate\" }\r\n                ListElement { type: \"SwipeDelegate\"; text: \"SwipeDelegate\" }\r\n                ListElement { type: \"SwipeDelegate\"; text: \"SwipeDelegate\" }\r\n                ListElement { type: \"CheckDelegate\"; text: \"CheckDelegate\" }\r\n                ListElement { type: \"CheckDelegate\"; text: \"CheckDelegate\" }\r\n                ListElement { type: \"CheckDelegate\"; text: \"CheckDelegate\" }\r\n                ListElement { type: \"RadioDelegate\"; text: \"RadioDelegate\" }\r\n                ListElement { type: \"RadioDelegate\"; text: \"RadioDelegate\" }\r\n                ListElement { type: \"RadioDelegate\"; text: \"RadioDelegate\" }\r\n                ListElement { type: \"SwitchDelegate\"; text: \"SwitchDelegate\" }\r\n                ListElement { type: \"SwitchDelegate\"; text: \"SwitchDelegate\" }\r\n                ListElement { type: \"SwitchDelegate\"; text: \"SwitchDelegate\" }\r\n            }\r\n\r\n            section.property: \"type\"\r\n            section.delegate: Pane {\r\n                width: listView.width\r\n                height: sectionLabel.implicitHeight + 20\r\n\r\n                Label {\r\n                    id: sectionLabel\r\n                    text: section\r\n                    anchors.centerIn: parent\r\n                }\r\n            }\r\n\r\n            delegate: Loader {\r\n                id: delegateLoader\r\n                width: listView.width\r\n                sourceComponent: delegateComponentMap[text]\r\n\r\n                property string labelText: text\r\n                property ListView view: listView\r\n                property int ourIndex: index\r\n\r\n                // Can't find a way to do this in the SwipeDelegate component itself,\r\n                // so do it here instead.\r\n                ListView.onRemove: SequentialAnimation {\r\n                    PropertyAction {\r\n                        target: delegateLoader\r\n                        property: \"ListView.delayRemove\"\r\n                        value: true\r\n                    }\r\n                    NumberAnimation {\r\n                        target: item\r\n                        property: \"height\"\r\n                        to: 0\r\n                        easing.type: Easing.InOutQuad\r\n                    }\r\n                    PropertyAction {\r\n                        target: delegateLoader\r\n                        property: \"ListView.delayRemove\"\r\n                        value: false\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "qt/qml/pages/DialPage.qml",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2015 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing/\r\n**\r\n** This file is part of the examples of the Qt Toolkit.\r\n**\r\n** $QT_BEGIN_LICENSE:BSD$\r\n** You may use this file under the terms of the BSD license as follows:\r\n**\r\n** \"Redistribution and use in source and binary forms, with or without\r\n** modification, are permitted provided that the following conditions are\r\n** met:\r\n**   * Redistributions of source code must retain the above copyright\r\n**     notice, this list of conditions and the following disclaimer.\r\n**   * Redistributions in binary form must reproduce the above copyright\r\n**     notice, this list of conditions and the following disclaimer in\r\n**     the documentation and/or other materials provided with the\r\n**     distribution.\r\n**   * Neither the name of The Qt Company Ltd nor the names of its\r\n**     contributors may be used to endorse or promote products derived\r\n**     from this software without specific prior written permission.\r\n**\r\n**\r\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\r\n**\r\n** $QT_END_LICENSE$\r\n**\r\n****************************************************************************/\r\n\r\nimport QtQuick 2.6\r\nimport QtQuick.Controls 2.0\r\n\r\nScrollablePage {\r\n    id: page\r\n\r\n    Column {\r\n        spacing: 40\r\n        width: parent.width\r\n\r\n        Label {\r\n            width: parent.width\r\n            wrapMode: Label.Wrap\r\n            horizontalAlignment: Qt.AlignHCenter\r\n            text: \"Alex: The Dial is similar to a traditional dial knob that is found on devices such as \"\r\n                + \"stereos or industrial equipment. It allows the user to specify a value within a range.\"\r\n        }\r\n\r\n        Dial {\r\n            value: 0.5\r\n            anchors.horizontalCenter: parent.horizontalCenter\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "qt/qml/pages/DrawerPage.qml",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2015 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing/\r\n**\r\n** This file is part of the examples of the Qt Toolkit.\r\n**\r\n** $QT_BEGIN_LICENSE:BSD$\r\n** You may use this file under the terms of the BSD license as follows:\r\n**\r\n** \"Redistribution and use in source and binary forms, with or without\r\n** modification, are permitted provided that the following conditions are\r\n** met:\r\n**   * Redistributions of source code must retain the above copyright\r\n**     notice, this list of conditions and the following disclaimer.\r\n**   * Redistributions in binary form must reproduce the above copyright\r\n**     notice, this list of conditions and the following disclaimer in\r\n**     the documentation and/or other materials provided with the\r\n**     distribution.\r\n**   * Neither the name of The Qt Company Ltd nor the names of its\r\n**     contributors may be used to endorse or promote products derived\r\n**     from this software without specific prior written permission.\r\n**\r\n**\r\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\r\n**\r\n** $QT_END_LICENSE$\r\n**\r\n****************************************************************************/\r\n\r\nimport QtQuick 2.6\r\nimport QtQuick.Controls 2.0\r\n\r\nPane {\r\n    id: pane\r\n\r\n    Column {\r\n        spacing: 40\r\n        width: parent.width\r\n\r\n        Label {\r\n            width: parent.width\r\n            wrapMode: Label.Wrap\r\n            horizontalAlignment: Qt.AlignHCenter\r\n            text: \"Drawer provides a swipe-based side panel, similar to those often used \"\r\n                + \"in touch interfaces to provide a central location for navigation.\"\r\n        }\r\n\r\n        Button {\r\n            text: \"Open\"\r\n            anchors.horizontalCenter: parent.horizontalCenter\r\n            width: Math.max(implicitWidth, Math.min(implicitWidth * 2, pane.availableWidth / 3))\r\n\r\n            onClicked: drawer.open()\r\n        }\r\n    }\r\n\r\n    Image {\r\n        source: \"qrc:/images/arrow.png\"\r\n        anchors.left: parent.left\r\n        anchors.bottom: parent.bottom\r\n    }\r\n}\r\n"
  },
  {
    "path": "qt/qml/pages/FramePage.qml",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2015 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing/\r\n**\r\n** This file is part of the examples of the Qt Toolkit.\r\n**\r\n** $QT_BEGIN_LICENSE:BSD$\r\n** You may use this file under the terms of the BSD license as follows:\r\n**\r\n** \"Redistribution and use in source and binary forms, with or without\r\n** modification, are permitted provided that the following conditions are\r\n** met:\r\n**   * Redistributions of source code must retain the above copyright\r\n**     notice, this list of conditions and the following disclaimer.\r\n**   * Redistributions in binary form must reproduce the above copyright\r\n**     notice, this list of conditions and the following disclaimer in\r\n**     the documentation and/or other materials provided with the\r\n**     distribution.\r\n**   * Neither the name of The Qt Company Ltd nor the names of its\r\n**     contributors may be used to endorse or promote products derived\r\n**     from this software without specific prior written permission.\r\n**\r\n**\r\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\r\n**\r\n** $QT_END_LICENSE$\r\n**\r\n****************************************************************************/\r\n\r\nimport QtQuick 2.6\r\nimport QtQuick.Controls 2.0\r\n\r\nScrollablePage {\r\n    id: page\r\n\r\n    readonly property int itemWidth: Math.max(button.implicitWidth, Math.min(button.implicitWidth * 3, page.availableWidth / 3 * 2))\r\n\r\n    Column {\r\n        spacing: 40\r\n        width: parent.width\r\n\r\n        Label {\r\n            width: parent.width\r\n            wrapMode: Label.Wrap\r\n            horizontalAlignment: Qt.AlignHCenter\r\n            text: \"Frame is used to layout a logical group of controls together, within a visual frame.\"\r\n        }\r\n\r\n        Frame {\r\n            anchors.horizontalCenter: parent.horizontalCenter\r\n\r\n            Column {\r\n                spacing: 20\r\n                width: page.itemWidth\r\n\r\n                RadioButton {\r\n                    text: \"First\"\r\n                    checked: true\r\n                    width: parent.width\r\n                }\r\n                RadioButton {\r\n                    id: button\r\n                    text: \"Second\"\r\n                    width: parent.width\r\n                }\r\n                RadioButton {\r\n                    text: \"Third\"\r\n                    width: parent.width\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "qt/qml/pages/GroupBoxPage.qml",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2015 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing/\r\n**\r\n** This file is part of the examples of the Qt Toolkit.\r\n**\r\n** $QT_BEGIN_LICENSE:BSD$\r\n** You may use this file under the terms of the BSD license as follows:\r\n**\r\n** \"Redistribution and use in source and binary forms, with or without\r\n** modification, are permitted provided that the following conditions are\r\n** met:\r\n**   * Redistributions of source code must retain the above copyright\r\n**     notice, this list of conditions and the following disclaimer.\r\n**   * Redistributions in binary form must reproduce the above copyright\r\n**     notice, this list of conditions and the following disclaimer in\r\n**     the documentation and/or other materials provided with the\r\n**     distribution.\r\n**   * Neither the name of The Qt Company Ltd nor the names of its\r\n**     contributors may be used to endorse or promote products derived\r\n**     from this software without specific prior written permission.\r\n**\r\n**\r\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\r\n**\r\n** $QT_END_LICENSE$\r\n**\r\n****************************************************************************/\r\n\r\nimport QtQuick 2.6\r\nimport QtQuick.Controls 2.0\r\n\r\nScrollablePage {\r\n    id: page\r\n\r\n    readonly property int itemWidth: Math.max(button.implicitWidth, Math.min(button.implicitWidth * 3, page.availableWidth / 3 * 2))\r\n\r\n    Column {\r\n        spacing: 40\r\n        width: parent.width\r\n\r\n        Label {\r\n            width: parent.width\r\n            wrapMode: Label.Wrap\r\n            horizontalAlignment: Qt.AlignHCenter\r\n            text: \"A GroupBox provides a frame, a title on top of it, and a logical group of controls within that frame.\"\r\n        }\r\n\r\n        GroupBox {\r\n            title: \"Title\"\r\n            anchors.horizontalCenter: parent.horizontalCenter\r\n\r\n            Column {\r\n                spacing: 20\r\n                width: page.itemWidth\r\n\r\n                RadioButton {\r\n                    text: \"First\"\r\n                    checked: true\r\n                    width: parent.width\r\n                }\r\n                RadioButton {\r\n                    id: button\r\n                    text: \"Second\"\r\n                    width: parent.width\r\n                }\r\n                RadioButton {\r\n                    text: \"Third\"\r\n                    width: parent.width\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "qt/qml/pages/Header.qml",
    "content": "Header.qml\n"
  },
  {
    "path": "qt/qml/pages/MenuPage.qml",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2015 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing/\r\n**\r\n** This file is part of the examples of the Qt Toolkit.\r\n**\r\n** $QT_BEGIN_LICENSE:BSD$\r\n** You may use this file under the terms of the BSD license as follows:\r\n**\r\n** \"Redistribution and use in source and binary forms, with or without\r\n** modification, are permitted provided that the following conditions are\r\n** met:\r\n**   * Redistributions of source code must retain the above copyright\r\n**     notice, this list of conditions and the following disclaimer.\r\n**   * Redistributions in binary form must reproduce the above copyright\r\n**     notice, this list of conditions and the following disclaimer in\r\n**     the documentation and/or other materials provided with the\r\n**     distribution.\r\n**   * Neither the name of The Qt Company Ltd nor the names of its\r\n**     contributors may be used to endorse or promote products derived\r\n**     from this software without specific prior written permission.\r\n**\r\n**\r\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\r\n**\r\n** $QT_END_LICENSE$\r\n**\r\n****************************************************************************/\r\n\r\nimport QtQuick 2.6\r\nimport QtQuick.Controls 2.0\r\n\r\nScrollablePage {\r\n    id: page\r\n\r\n    Column {\r\n        spacing: 40\r\n        width: parent.width\r\n\r\n        Label {\r\n            width: parent.width\r\n            wrapMode: Label.Wrap\r\n            horizontalAlignment: Qt.AlignHCenter\r\n            text: \"Menu can be used either as a context menu, or as a popup menu.\"\r\n        }\r\n\r\n        Button {\r\n            id: button\r\n            text: \"Open\"\r\n            anchors.horizontalCenter: parent.horizontalCenter\r\n            width: Math.max(implicitWidth, Math.min(implicitWidth * 2, page.availableWidth / 3))\r\n\r\n            onClicked: optionsMenu.open()\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "qt/qml/pages/PageIndicatorPage.qml",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2015 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing/\r\n**\r\n** This file is part of the examples of the Qt Toolkit.\r\n**\r\n** $QT_BEGIN_LICENSE:BSD$\r\n** You may use this file under the terms of the BSD license as follows:\r\n**\r\n** \"Redistribution and use in source and binary forms, with or without\r\n** modification, are permitted provided that the following conditions are\r\n** met:\r\n**   * Redistributions of source code must retain the above copyright\r\n**     notice, this list of conditions and the following disclaimer.\r\n**   * Redistributions in binary form must reproduce the above copyright\r\n**     notice, this list of conditions and the following disclaimer in\r\n**     the documentation and/or other materials provided with the\r\n**     distribution.\r\n**   * Neither the name of The Qt Company Ltd nor the names of its\r\n**     contributors may be used to endorse or promote products derived\r\n**     from this software without specific prior written permission.\r\n**\r\n**\r\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\r\n**\r\n** $QT_END_LICENSE$\r\n**\r\n****************************************************************************/\r\n\r\nimport QtQuick 2.6\r\nimport QtQuick.Controls 2.0\r\n\r\nScrollablePage {\r\n    id: page\r\n\r\n    Column {\r\n        spacing: 40\r\n        width: parent.width\r\n\r\n        Label {\r\n            width: parent.width\r\n            wrapMode: Label.Wrap\r\n            horizontalAlignment: Qt.AlignHCenter\r\n            text: \"PageIndicator is used to indicate the currently active page in a container of pages.\"\r\n        }\r\n\r\n        PageIndicator {\r\n            count: 5\r\n            currentIndex: 2\r\n            anchors.horizontalCenter: parent.horizontalCenter\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "qt/qml/pages/PopupPage.qml",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2015 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing/\r\n**\r\n** This file is part of the examples of the Qt Toolkit.\r\n**\r\n** $QT_BEGIN_LICENSE:BSD$\r\n** You may use this file under the terms of the BSD license as follows:\r\n**\r\n** \"Redistribution and use in source and binary forms, with or without\r\n** modification, are permitted provided that the following conditions are\r\n** met:\r\n**   * Redistributions of source code must retain the above copyright\r\n**     notice, this list of conditions and the following disclaimer.\r\n**   * Redistributions in binary form must reproduce the above copyright\r\n**     notice, this list of conditions and the following disclaimer in\r\n**     the documentation and/or other materials provided with the\r\n**     distribution.\r\n**   * Neither the name of The Qt Company Ltd nor the names of its\r\n**     contributors may be used to endorse or promote products derived\r\n**     from this software without specific prior written permission.\r\n**\r\n**\r\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\r\n**\r\n** $QT_END_LICENSE$\r\n**\r\n****************************************************************************/\r\n\r\nimport QtQuick 2.6\r\nimport QtQuick.Controls 2.0\r\n\r\nScrollablePage {\r\n    id: page\r\n\r\n    Column {\r\n        spacing: 40\r\n        width: parent.width\r\n\r\n        Label {\r\n            width: parent.width\r\n            wrapMode: Label.Wrap\r\n            horizontalAlignment: Qt.AlignHCenter\r\n            text: \"Popup is used to display modal or modeless content that overlays other \"\r\n                + \"application content. In this example, the settings are shown in a popup.\"\r\n        }\r\n\r\n        Button {\r\n            id: button\r\n            text: \"Open\"\r\n            anchors.horizontalCenter: parent.horizontalCenter\r\n            width: Math.max(implicitWidth, Math.min(implicitWidth * 2, page.availableWidth / 3))\r\n\r\n            onClicked: settingsPopup.open()\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "qt/qml/pages/ProgressBarPage.qml",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2015 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing/\r\n**\r\n** This file is part of the examples of the Qt Toolkit.\r\n**\r\n** $QT_BEGIN_LICENSE:BSD$\r\n** You may use this file under the terms of the BSD license as follows:\r\n**\r\n** \"Redistribution and use in source and binary forms, with or without\r\n** modification, are permitted provided that the following conditions are\r\n** met:\r\n**   * Redistributions of source code must retain the above copyright\r\n**     notice, this list of conditions and the following disclaimer.\r\n**   * Redistributions in binary form must reproduce the above copyright\r\n**     notice, this list of conditions and the following disclaimer in\r\n**     the documentation and/or other materials provided with the\r\n**     distribution.\r\n**   * Neither the name of The Qt Company Ltd nor the names of its\r\n**     contributors may be used to endorse or promote products derived\r\n**     from this software without specific prior written permission.\r\n**\r\n**\r\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\r\n**\r\n** $QT_END_LICENSE$\r\n**\r\n****************************************************************************/\r\n\r\nimport QtQuick 2.6\r\nimport QtQuick.Controls 2.0\r\n\r\nScrollablePage {\r\n    id: page\r\n\r\n    readonly property int itemWidth: Math.max(bar.implicitWidth, page.availableWidth / 3)\r\n\r\n    Column {\r\n        spacing: 40\r\n        width: parent.width\r\n\r\n        Label {\r\n            width: parent.width\r\n            wrapMode: Label.Wrap\r\n            horizontalAlignment: Qt.AlignHCenter\r\n            text: \"ProgressBar indicates the progress of an operation. It can be set in an \"\r\n                + \"indeterminate mode to indicate that the length of the operation is unknown.\"\r\n        }\r\n\r\n        ProgressBar {\r\n            id: bar\r\n            value: 0.5\r\n            width: itemWidth\r\n            anchors.horizontalCenter: parent.horizontalCenter\r\n        }\r\n\r\n        ProgressBar {\r\n            indeterminate: true\r\n            width: itemWidth\r\n            anchors.horizontalCenter: parent.horizontalCenter\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "qt/qml/pages/RadioButtonPage.qml",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2015 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing/\r\n**\r\n** This file is part of the examples of the Qt Toolkit.\r\n**\r\n** $QT_BEGIN_LICENSE:BSD$\r\n** You may use this file under the terms of the BSD license as follows:\r\n**\r\n** \"Redistribution and use in source and binary forms, with or without\r\n** modification, are permitted provided that the following conditions are\r\n** met:\r\n**   * Redistributions of source code must retain the above copyright\r\n**     notice, this list of conditions and the following disclaimer.\r\n**   * Redistributions in binary form must reproduce the above copyright\r\n**     notice, this list of conditions and the following disclaimer in\r\n**     the documentation and/or other materials provided with the\r\n**     distribution.\r\n**   * Neither the name of The Qt Company Ltd nor the names of its\r\n**     contributors may be used to endorse or promote products derived\r\n**     from this software without specific prior written permission.\r\n**\r\n**\r\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\r\n**\r\n** $QT_END_LICENSE$\r\n**\r\n****************************************************************************/\r\n\r\nimport QtQuick 2.6\r\nimport QtQuick.Controls 2.0\r\n\r\nScrollablePage {\r\n    id: page\r\n\r\n    Column {\r\n        spacing: 40\r\n        width: parent.width\r\n\r\n        Label {\r\n            width: parent.width\r\n            wrapMode: Label.Wrap\r\n            horizontalAlignment: Qt.AlignHCenter\r\n            text: \"RadioButton presents an option button that can be toggled on or off. \"\r\n                + \"Radio buttons are typically used to select one option from a set of options.\"\r\n        }\r\n\r\n        Column {\r\n            spacing: 20\r\n            anchors.horizontalCenter: parent.horizontalCenter\r\n\r\n            RadioButton {\r\n                text: \"First\"\r\n            }\r\n            RadioButton {\r\n                text: \"Second\"\r\n                checked: true\r\n            }\r\n            RadioButton {\r\n                text: \"Third\"\r\n                enabled: false\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "qt/qml/pages/RangeSliderPage.qml",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2015 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing/\r\n**\r\n** This file is part of the examples of the Qt Toolkit.\r\n**\r\n** $QT_BEGIN_LICENSE:BSD$\r\n** You may use this file under the terms of the BSD license as follows:\r\n**\r\n** \"Redistribution and use in source and binary forms, with or without\r\n** modification, are permitted provided that the following conditions are\r\n** met:\r\n**   * Redistributions of source code must retain the above copyright\r\n**     notice, this list of conditions and the following disclaimer.\r\n**   * Redistributions in binary form must reproduce the above copyright\r\n**     notice, this list of conditions and the following disclaimer in\r\n**     the documentation and/or other materials provided with the\r\n**     distribution.\r\n**   * Neither the name of The Qt Company Ltd nor the names of its\r\n**     contributors may be used to endorse or promote products derived\r\n**     from this software without specific prior written permission.\r\n**\r\n**\r\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\r\n**\r\n** $QT_END_LICENSE$\r\n**\r\n****************************************************************************/\r\n\r\nimport QtQuick 2.6\r\nimport QtQuick.Controls 2.0\r\n\r\nScrollablePage {\r\n    id: page\r\n\r\n    readonly property int itemWidth: Math.max(slider.implicitWidth, Math.min(slider.implicitWidth * 2, page.availableWidth / 3))\r\n\r\n    Column {\r\n        spacing: 40\r\n        width: parent.width\r\n\r\n        Label {\r\n            width: parent.width\r\n            wrapMode: Label.Wrap\r\n            horizontalAlignment: Qt.AlignHCenter\r\n            text: \"RangeSlider is used to select a range specified by two values, by sliding each handle along a track.\"\r\n        }\r\n\r\n        RangeSlider {\r\n            id: slider\r\n            first.value: 0.25\r\n            second.value: 0.75\r\n            width: itemWidth\r\n            anchors.horizontalCenter: parent.horizontalCenter\r\n        }\r\n\r\n        RangeSlider {\r\n            orientation: Qt.Vertical\r\n            first.value: 0.25\r\n            second.value: 0.75\r\n            height: itemWidth\r\n            anchors.horizontalCenter: parent.horizontalCenter\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "qt/qml/pages/ScrollBarPage.qml",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2015 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing/\r\n**\r\n** This file is part of the examples of the Qt Toolkit.\r\n**\r\n** $QT_BEGIN_LICENSE:BSD$\r\n** You may use this file under the terms of the BSD license as follows:\r\n**\r\n** \"Redistribution and use in source and binary forms, with or without\r\n** modification, are permitted provided that the following conditions are\r\n** met:\r\n**   * Redistributions of source code must retain the above copyright\r\n**     notice, this list of conditions and the following disclaimer.\r\n**   * Redistributions in binary form must reproduce the above copyright\r\n**     notice, this list of conditions and the following disclaimer in\r\n**     the documentation and/or other materials provided with the\r\n**     distribution.\r\n**   * Neither the name of The Qt Company Ltd nor the names of its\r\n**     contributors may be used to endorse or promote products derived\r\n**     from this software without specific prior written permission.\r\n**\r\n**\r\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\r\n**\r\n** $QT_END_LICENSE$\r\n**\r\n****************************************************************************/\r\n\r\nimport QtQuick 2.6\r\nimport QtQuick.Controls 2.0\r\n\r\nFlickable {\r\n    id: flickable\r\n\r\n    contentHeight: pane.height\r\n\r\n    Pane {\r\n        id: pane\r\n        width: flickable.width\r\n        height: flickable.height * 1.25\r\n\r\n        Column {\r\n            id: column\r\n            spacing: 40\r\n            width: parent.width\r\n\r\n            Label {\r\n                width: parent.width\r\n                wrapMode: Label.Wrap\r\n                horizontalAlignment: Qt.AlignHCenter\r\n                text: \"ScrollBar is an interactive bar that can be used to scroll to a specific position. \"\r\n                    + \"A scroll bar can be either vertical or horizontal, and can be attached to any Flickable, \"\r\n                    + \"such as ListView and GridView.\"\r\n            }\r\n\r\n            Image {\r\n                rotation: 90\r\n                source: \"qrc:/images/arrows.png\"\r\n                anchors.horizontalCenter: parent.horizontalCenter\r\n            }\r\n        }\r\n    }\r\n\r\n    ScrollBar.vertical: ScrollBar { }\r\n}\r\n"
  },
  {
    "path": "qt/qml/pages/ScrollIndicatorPage.qml",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2015 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing/\r\n**\r\n** This file is part of the examples of the Qt Toolkit.\r\n**\r\n** $QT_BEGIN_LICENSE:BSD$\r\n** You may use this file under the terms of the BSD license as follows:\r\n**\r\n** \"Redistribution and use in source and binary forms, with or without\r\n** modification, are permitted provided that the following conditions are\r\n** met:\r\n**   * Redistributions of source code must retain the above copyright\r\n**     notice, this list of conditions and the following disclaimer.\r\n**   * Redistributions in binary form must reproduce the above copyright\r\n**     notice, this list of conditions and the following disclaimer in\r\n**     the documentation and/or other materials provided with the\r\n**     distribution.\r\n**   * Neither the name of The Qt Company Ltd nor the names of its\r\n**     contributors may be used to endorse or promote products derived\r\n**     from this software without specific prior written permission.\r\n**\r\n**\r\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\r\n**\r\n** $QT_END_LICENSE$\r\n**\r\n****************************************************************************/\r\n\r\nimport QtQuick 2.6\r\nimport QtQuick.Controls 2.0\r\n\r\nFlickable {\r\n    id: flickable\r\n\r\n    contentHeight: pane.height\r\n\r\n    Pane {\r\n        id: pane\r\n        width: flickable.width\r\n        height: flickable.height * 1.25\r\n\r\n        Column {\r\n            id: column\r\n            spacing: 40\r\n            width: parent.width\r\n\r\n            Label {\r\n                width: parent.width\r\n                wrapMode: Label.Wrap\r\n                horizontalAlignment: Qt.AlignHCenter\r\n                text: \"ScrollIndicator is a non-interactive indicator that indicates the current scroll position. \"\r\n                    + \"A scroll indicator can be either vertical or horizontal, and can be attached to any Flickable, \"\r\n                    + \"such as ListView and GridView.\"\r\n            }\r\n\r\n            Image {\r\n                rotation: 90\r\n                source: \"qrc:/images/arrows.png\"\r\n                anchors.horizontalCenter: parent.horizontalCenter\r\n            }\r\n        }\r\n    }\r\n\r\n    ScrollIndicator.vertical: ScrollIndicator { }\r\n}\r\n"
  },
  {
    "path": "qt/qml/pages/ScrollablePage.qml",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2016 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing/\r\n**\r\n** This file is part of the examples of the Qt Toolkit.\r\n**\r\n** $QT_BEGIN_LICENSE:BSD$\r\n** You may use this file under the terms of the BSD license as follows:\r\n**\r\n** \"Redistribution and use in source and binary forms, with or without\r\n** modification, are permitted provided that the following conditions are\r\n** met:\r\n**   * Redistributions of source code must retain the above copyright\r\n**     notice, this list of conditions and the following disclaimer.\r\n**   * Redistributions in binary form must reproduce the above copyright\r\n**     notice, this list of conditions and the following disclaimer in\r\n**     the documentation and/or other materials provided with the\r\n**     distribution.\r\n**   * Neither the name of The Qt Company Ltd nor the names of its\r\n**     contributors may be used to endorse or promote products derived\r\n**     from this software without specific prior written permission.\r\n**\r\n**\r\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\r\n**\r\n** $QT_END_LICENSE$\r\n**\r\n****************************************************************************/\r\n\r\nimport QtQuick 2.6\r\nimport QtQuick.Controls 2.0\r\n\r\nPage {\r\n    id: page\r\n\r\n    default property alias content: pane.contentItem\r\n\r\n    Flickable {\r\n        anchors.fill: parent\r\n        contentHeight: pane.implicitHeight\r\n        flickableDirection: Flickable.AutoFlickIfNeeded\r\n\r\n        Pane {\r\n            id: pane\r\n            width: parent.width\r\n        }\r\n\r\n        ScrollIndicator.vertical: ScrollIndicator { }\r\n    }\r\n}\r\n"
  },
  {
    "path": "qt/qml/pages/SliderPage.qml",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2015 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing/\r\n**\r\n** This file is part of the examples of the Qt Toolkit.\r\n**\r\n** $QT_BEGIN_LICENSE:BSD$\r\n** You may use this file under the terms of the BSD license as follows:\r\n**\r\n** \"Redistribution and use in source and binary forms, with or without\r\n** modification, are permitted provided that the following conditions are\r\n** met:\r\n**   * Redistributions of source code must retain the above copyright\r\n**     notice, this list of conditions and the following disclaimer.\r\n**   * Redistributions in binary form must reproduce the above copyright\r\n**     notice, this list of conditions and the following disclaimer in\r\n**     the documentation and/or other materials provided with the\r\n**     distribution.\r\n**   * Neither the name of The Qt Company Ltd nor the names of its\r\n**     contributors may be used to endorse or promote products derived\r\n**     from this software without specific prior written permission.\r\n**\r\n**\r\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\r\n**\r\n** $QT_END_LICENSE$\r\n**\r\n****************************************************************************/\r\n\r\nimport QtQuick 2.6\r\nimport QtQuick.Controls 2.0\r\n\r\nScrollablePage {\r\n    id: page\r\n\r\n    readonly property int itemWidth: Math.max(slider.implicitWidth, Math.min(slider.implicitWidth * 2, page.availableWidth / 3))\r\n\r\n    Column {\r\n        spacing: 40\r\n        width: parent.width\r\n\r\n        Label {\r\n            width: parent.width\r\n            wrapMode: Label.Wrap\r\n            horizontalAlignment: Qt.AlignHCenter\r\n            text: \"Slider is used to select a value by sliding a handle along a track.\"\r\n        }\r\n\r\n        Slider {\r\n            id: slider\r\n            value: 0.5\r\n            width: itemWidth\r\n            anchors.horizontalCenter: parent.horizontalCenter\r\n        }\r\n\r\n        Slider {\r\n            orientation: Qt.Vertical\r\n            value: 0.5\r\n            height: itemWidth\r\n            anchors.horizontalCenter: parent.horizontalCenter\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "qt/qml/pages/SpinBoxPage.qml",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2015 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing/\r\n**\r\n** This file is part of the examples of the Qt Toolkit.\r\n**\r\n** $QT_BEGIN_LICENSE:BSD$\r\n** You may use this file under the terms of the BSD license as follows:\r\n**\r\n** \"Redistribution and use in source and binary forms, with or without\r\n** modification, are permitted provided that the following conditions are\r\n** met:\r\n**   * Redistributions of source code must retain the above copyright\r\n**     notice, this list of conditions and the following disclaimer.\r\n**   * Redistributions in binary form must reproduce the above copyright\r\n**     notice, this list of conditions and the following disclaimer in\r\n**     the documentation and/or other materials provided with the\r\n**     distribution.\r\n**   * Neither the name of The Qt Company Ltd nor the names of its\r\n**     contributors may be used to endorse or promote products derived\r\n**     from this software without specific prior written permission.\r\n**\r\n**\r\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\r\n**\r\n** $QT_END_LICENSE$\r\n**\r\n****************************************************************************/\r\n\r\nimport QtQuick 2.6\r\nimport QtQuick.Controls 2.0\r\n\r\nScrollablePage {\r\n    id: page\r\n\r\n    readonly property int itemWidth: Math.max(box.implicitWidth, Math.min(box.implicitWidth * 2, pane.availableWidth / 3))\r\n\r\n    Column {\r\n        spacing: 40\r\n        width: parent.width\r\n\r\n        Label {\r\n            width: parent.width\r\n            wrapMode: Label.Wrap\r\n            horizontalAlignment: Qt.AlignHCenter\r\n            text: \"SpinBox allows the user to choose an integer value by clicking the up or down indicator buttons, \"\r\n                + \"by pressing up or down on the keyboard, or by entering a text value in the input field.\"\r\n        }\r\n\r\n        SpinBox {\r\n            id: box\r\n            value: 50\r\n            width: itemWidth\r\n            anchors.horizontalCenter: parent.horizontalCenter\r\n            editable: true\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "qt/qml/pages/StackViewPage.qml",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2015 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing/\r\n**\r\n** This file is part of the examples of the Qt Toolkit.\r\n**\r\n** $QT_BEGIN_LICENSE:BSD$\r\n** You may use this file under the terms of the BSD license as follows:\r\n**\r\n** \"Redistribution and use in source and binary forms, with or without\r\n** modification, are permitted provided that the following conditions are\r\n** met:\r\n**   * Redistributions of source code must retain the above copyright\r\n**     notice, this list of conditions and the following disclaimer.\r\n**   * Redistributions in binary form must reproduce the above copyright\r\n**     notice, this list of conditions and the following disclaimer in\r\n**     the documentation and/or other materials provided with the\r\n**     distribution.\r\n**   * Neither the name of The Qt Company Ltd nor the names of its\r\n**     contributors may be used to endorse or promote products derived\r\n**     from this software without specific prior written permission.\r\n**\r\n**\r\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\r\n**\r\n** $QT_END_LICENSE$\r\n**\r\n****************************************************************************/\r\n\r\nimport QtQuick 2.6\r\nimport QtQuick.Controls 2.0\r\n\r\nStackView {\r\n    id: stackView\r\n    initialItem: page\r\n\r\n    Component {\r\n        id: page\r\n\r\n        Pane {\r\n            id: pane\r\n            width: parent ? parent.width : 0 // TODO: fix null parent on destruction\r\n\r\n            Column {\r\n                spacing: 40\r\n                width: parent.width\r\n\r\n                Label {\r\n                    width: parent.width\r\n                    wrapMode: Label.Wrap\r\n                    horizontalAlignment: Qt.AlignHCenter\r\n                    text: \"StackView provides a stack-based navigation model which can be used with a set of interlinked pages. \"\r\n                    + \"Items are pushed onto the stack as the user navigates deeper into the material, and popped off again \"\r\n                    + \"when he chooses to go back.\"\r\n                }\r\n\r\n                Button {\r\n                    id: button\r\n                    text: \"Push\"\r\n                    anchors.horizontalCenter: parent.horizontalCenter\r\n                    width: Math.max(button.implicitWidth, Math.min(button.implicitWidth * 2, pane.availableWidth / 3))\r\n                    onClicked: stackView.push(page)\r\n                }\r\n\r\n                Button {\r\n                    text: \"Pop\"\r\n                    enabled: stackView.depth > 1\r\n                    width: Math.max(button.implicitWidth, Math.min(button.implicitWidth * 2, pane.availableWidth / 3))\r\n                    anchors.horizontalCenter: parent.horizontalCenter\r\n                    onClicked: stackView.pop()\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "qt/qml/pages/SwipeViewPage.qml",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2015 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing/\r\n**\r\n** This file is part of the examples of the Qt Toolkit.\r\n**\r\n** $QT_BEGIN_LICENSE:BSD$\r\n** You may use this file under the terms of the BSD license as follows:\r\n**\r\n** \"Redistribution and use in source and binary forms, with or without\r\n** modification, are permitted provided that the following conditions are\r\n** met:\r\n**   * Redistributions of source code must retain the above copyright\r\n**     notice, this list of conditions and the following disclaimer.\r\n**   * Redistributions in binary form must reproduce the above copyright\r\n**     notice, this list of conditions and the following disclaimer in\r\n**     the documentation and/or other materials provided with the\r\n**     distribution.\r\n**   * Neither the name of The Qt Company Ltd nor the names of its\r\n**     contributors may be used to endorse or promote products derived\r\n**     from this software without specific prior written permission.\r\n**\r\n**\r\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\r\n**\r\n** $QT_END_LICENSE$\r\n**\r\n****************************************************************************/\r\n\r\nimport QtQuick 2.6\r\nimport QtQuick.Controls 2.0\r\n\r\nPane {\r\n    id: pane\r\n\r\n    SwipeView {\r\n        id: view\r\n        currentIndex: 1\r\n        anchors.fill: parent\r\n\r\n        Repeater {\r\n            model: 3\r\n\r\n            Pane {\r\n                width: view.width\r\n                height: view.height\r\n\r\n                Column {\r\n                    spacing: 40\r\n                    width: parent.width\r\n\r\n                    Label {\r\n                        width: parent.width\r\n                        wrapMode: Label.Wrap\r\n                        horizontalAlignment: Qt.AlignHCenter\r\n                        text: \"SwipeView provides a navigation model that simplifies horizontal paged scrolling. \"\r\n                        + \"The page indicator on the bottom shows which is the presently active page.\"\r\n                    }\r\n\r\n                    Image {\r\n                        source: \"qrc:/images/arrows.png\"\r\n                        anchors.horizontalCenter: parent.horizontalCenter\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    PageIndicator {\r\n        count: view.count\r\n        currentIndex: view.currentIndex\r\n        anchors.bottom: parent.bottom\r\n        anchors.horizontalCenter: parent.horizontalCenter\r\n    }\r\n}\r\n"
  },
  {
    "path": "qt/qml/pages/SwitchPage.qml",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2015 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing/\r\n**\r\n** This file is part of the examples of the Qt Toolkit.\r\n**\r\n** $QT_BEGIN_LICENSE:BSD$\r\n** You may use this file under the terms of the BSD license as follows:\r\n**\r\n** \"Redistribution and use in source and binary forms, with or without\r\n** modification, are permitted provided that the following conditions are\r\n** met:\r\n**   * Redistributions of source code must retain the above copyright\r\n**     notice, this list of conditions and the following disclaimer.\r\n**   * Redistributions in binary form must reproduce the above copyright\r\n**     notice, this list of conditions and the following disclaimer in\r\n**     the documentation and/or other materials provided with the\r\n**     distribution.\r\n**   * Neither the name of The Qt Company Ltd nor the names of its\r\n**     contributors may be used to endorse or promote products derived\r\n**     from this software without specific prior written permission.\r\n**\r\n**\r\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\r\n**\r\n** $QT_END_LICENSE$\r\n**\r\n****************************************************************************/\r\n\r\nimport QtQuick 2.6\r\nimport QtQuick.Controls 2.0\r\n\r\nScrollablePage {\r\n    id: page\r\n\r\n    Column {\r\n        spacing: 40\r\n        width: parent.width\r\n\r\n        Label {\r\n            width: parent.width\r\n            wrapMode: Label.Wrap\r\n            horizontalAlignment: Qt.AlignHCenter\r\n            text: \"Switch is an option button that can be dragged or toggled on or off. \"\r\n                + \"Switches are typically used to select between two states.\"\r\n        }\r\n\r\n        Column {\r\n            spacing: 20\r\n            anchors.horizontalCenter: parent.horizontalCenter\r\n\r\n            Switch {\r\n                text: \"First\"\r\n            }\r\n            Switch {\r\n                text: \"Second\"\r\n                checked: true\r\n            }\r\n            Switch {\r\n                text: \"Third\"\r\n                enabled: false\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "qt/qml/pages/TabBarPage.qml",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2015 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing/\r\n**\r\n** This file is part of the examples of the Qt Toolkit.\r\n**\r\n** $QT_BEGIN_LICENSE:BSD$\r\n** You may use this file under the terms of the BSD license as follows:\r\n**\r\n** \"Redistribution and use in source and binary forms, with or without\r\n** modification, are permitted provided that the following conditions are\r\n** met:\r\n**   * Redistributions of source code must retain the above copyright\r\n**     notice, this list of conditions and the following disclaimer.\r\n**   * Redistributions in binary form must reproduce the above copyright\r\n**     notice, this list of conditions and the following disclaimer in\r\n**     the documentation and/or other materials provided with the\r\n**     distribution.\r\n**   * Neither the name of The Qt Company Ltd nor the names of its\r\n**     contributors may be used to endorse or promote products derived\r\n**     from this software without specific prior written permission.\r\n**\r\n**\r\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\r\n**\r\n** $QT_END_LICENSE$\r\n**\r\n****************************************************************************/\r\n\r\nimport QtQuick 2.6\r\nimport QtQuick.Controls 2.0\r\n\r\nPage {\r\n    id: page\r\n\r\n    SwipeView {\r\n        id: swipeView\r\n        anchors.fill: parent\r\n        currentIndex: tabBar.currentIndex\r\n\r\n        Repeater {\r\n            model: 3\r\n\r\n            Pane {\r\n                width: swipeView.width\r\n                height: swipeView.height\r\n\r\n                Column {\r\n                    spacing: 40\r\n                    width: parent.width\r\n\r\n                    Label {\r\n                        width: parent.width\r\n                        wrapMode: Label.Wrap\r\n                        horizontalAlignment: Qt.AlignHCenter\r\n                        text: \"TabBar is a bar with icons or text which allows the user\"\r\n                              + \"to switch between different subtasks, views, or modes.\"\r\n                    }\r\n\r\n                    Image {\r\n                        source: \"qrc:/images/arrows.png\"\r\n                        anchors.horizontalCenter: parent.horizontalCenter\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    footer: TabBar {\r\n        id: tabBar\r\n        currentIndex: swipeView.currentIndex\r\n\r\n        TabButton {\r\n            text: \"First\"\r\n        }\r\n        TabButton {\r\n            text: \"Second\"\r\n        }\r\n        TabButton {\r\n            text: \"Third\"\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "qt/qml/pages/TextAreaPage.qml",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2015 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing/\r\n**\r\n** This file is part of the examples of the Qt Toolkit.\r\n**\r\n** $QT_BEGIN_LICENSE:BSD$\r\n** You may use this file under the terms of the BSD license as follows:\r\n**\r\n** \"Redistribution and use in source and binary forms, with or without\r\n** modification, are permitted provided that the following conditions are\r\n** met:\r\n**   * Redistributions of source code must retain the above copyright\r\n**     notice, this list of conditions and the following disclaimer.\r\n**   * Redistributions in binary form must reproduce the above copyright\r\n**     notice, this list of conditions and the following disclaimer in\r\n**     the documentation and/or other materials provided with the\r\n**     distribution.\r\n**   * Neither the name of The Qt Company Ltd nor the names of its\r\n**     contributors may be used to endorse or promote products derived\r\n**     from this software without specific prior written permission.\r\n**\r\n**\r\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\r\n**\r\n** $QT_END_LICENSE$\r\n**\r\n****************************************************************************/\r\n\r\nimport QtQuick 2.6\r\nimport QtQuick.Controls 2.0\r\n\r\nScrollablePage {\r\n    id: page\r\n\r\n    Column {\r\n        spacing: 40\r\n        width: parent.width\r\n\r\n        Label {\r\n            width: parent.width\r\n            wrapMode: Label.Wrap\r\n            horizontalAlignment: Qt.AlignHCenter\r\n            text: \"TextArea is a multi-line text editor.\"\r\n        }\r\n\r\n        TextArea {\r\n            width: Math.max(implicitWidth, Math.min(implicitWidth * 3, pane.availableWidth / 3))\r\n            anchors.horizontalCenter: parent.horizontalCenter\r\n\r\n            wrapMode: TextArea.Wrap\r\n            text: \"TextArea\\n...\\n...\\n...\"\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "qt/qml/pages/TextFieldPage.qml",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2015 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing/\r\n**\r\n** This file is part of the examples of the Qt Toolkit.\r\n**\r\n** $QT_BEGIN_LICENSE:BSD$\r\n** You may use this file under the terms of the BSD license as follows:\r\n**\r\n** \"Redistribution and use in source and binary forms, with or without\r\n** modification, are permitted provided that the following conditions are\r\n** met:\r\n**   * Redistributions of source code must retain the above copyright\r\n**     notice, this list of conditions and the following disclaimer.\r\n**   * Redistributions in binary form must reproduce the above copyright\r\n**     notice, this list of conditions and the following disclaimer in\r\n**     the documentation and/or other materials provided with the\r\n**     distribution.\r\n**   * Neither the name of The Qt Company Ltd nor the names of its\r\n**     contributors may be used to endorse or promote products derived\r\n**     from this software without specific prior written permission.\r\n**\r\n**\r\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\r\n**\r\n** $QT_END_LICENSE$\r\n**\r\n****************************************************************************/\r\n\r\nimport QtQuick 2.6\r\nimport QtQuick.Controls 2.0\r\n\r\nScrollablePage {\r\n    id: page\r\n\r\n    Column {\r\n        spacing: 40\r\n        width: parent.width\r\n\r\n        Label {\r\n            width: parent.width\r\n            wrapMode: Label.Wrap\r\n            horizontalAlignment: Qt.AlignHCenter\r\n            text: \"TextField is a single-line text editor.\"\r\n        }\r\n\r\n        TextField {\r\n            id: field\r\n            placeholderText: \"TextField\"\r\n            width: Math.max(implicitWidth, Math.min(implicitWidth * 2, pane.availableWidth / 3))\r\n            anchors.horizontalCenter: parent.horizontalCenter\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "qt/qml/pages/ToolTipPage.qml",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2016 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing/\r\n**\r\n** This file is part of the examples of the Qt Toolkit.\r\n**\r\n** $QT_BEGIN_LICENSE:BSD$\r\n** You may use this file under the terms of the BSD license as follows:\r\n**\r\n** \"Redistribution and use in source and binary forms, with or without\r\n** modification, are permitted provided that the following conditions are\r\n** met:\r\n**   * Redistributions of source code must retain the above copyright\r\n**     notice, this list of conditions and the following disclaimer.\r\n**   * Redistributions in binary form must reproduce the above copyright\r\n**     notice, this list of conditions and the following disclaimer in\r\n**     the documentation and/or other materials provided with the\r\n**     distribution.\r\n**   * Neither the name of The Qt Company Ltd nor the names of its\r\n**     contributors may be used to endorse or promote products derived\r\n**     from this software without specific prior written permission.\r\n**\r\n**\r\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\r\n**\r\n** $QT_END_LICENSE$\r\n**\r\n****************************************************************************/\r\n\r\nimport QtQuick 2.6\r\nimport QtQuick.Controls 2.0\r\n\r\nScrollablePage {\r\n    id: page\r\n\r\n    Column {\r\n        spacing: 40\r\n        width: parent.width\r\n\r\n        Label {\r\n            width: parent.width\r\n            wrapMode: Label.Wrap\r\n            horizontalAlignment: Qt.AlignHCenter\r\n            text: \"A tool tip is a short piece of text that informs the user of a control's function.\"\r\n        }\r\n\r\n        Button {\r\n            text: \"Tip\"\r\n            anchors.horizontalCenter: parent.horizontalCenter\r\n            width: Math.max(implicitWidth, Math.min(implicitWidth * 2, pane.availableWidth / 3))\r\n\r\n            ToolTip.timeout: 5000\r\n            ToolTip.visible: pressed\r\n            ToolTip.text: \"This is a tool tip.\"\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "qt/qml/pages/TumblerPage.qml",
    "content": "/****************************************************************************\r\n**\r\n** Copyright (C) 2015 The Qt Company Ltd.\r\n** Contact: http://www.qt.io/licensing/\r\n**\r\n** This file is part of the examples of the Qt Toolkit.\r\n**\r\n** $QT_BEGIN_LICENSE:BSD$\r\n** You may use this file under the terms of the BSD license as follows:\r\n**\r\n** \"Redistribution and use in source and binary forms, with or without\r\n** modification, are permitted provided that the following conditions are\r\n** met:\r\n**   * Redistributions of source code must retain the above copyright\r\n**     notice, this list of conditions and the following disclaimer.\r\n**   * Redistributions in binary form must reproduce the above copyright\r\n**     notice, this list of conditions and the following disclaimer in\r\n**     the documentation and/or other materials provided with the\r\n**     distribution.\r\n**   * Neither the name of The Qt Company Ltd nor the names of its\r\n**     contributors may be used to endorse or promote products derived\r\n**     from this software without specific prior written permission.\r\n**\r\n**\r\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\r\n**\r\n** $QT_END_LICENSE$\r\n**\r\n****************************************************************************/\r\n\r\nimport QtQuick 2.6\r\nimport QtQuick.Controls 2.0\r\n\r\nScrollablePage {\r\n    id: page\r\n\r\n    Column {\r\n        spacing: 40\r\n        width: parent.width\r\n\r\n        Label {\r\n            width: parent.width\r\n            wrapMode: Label.Wrap\r\n            horizontalAlignment: Qt.AlignHCenter\r\n            text: \"Tumbler is used to select a value by spinning a wheel.\"\r\n        }\r\n\r\n        Tumbler {\r\n            model: 10\r\n            visibleItemCount: 5\r\n            anchors.horizontalCenter: parent.horizontalCenter\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "qt/qml/pages/_asynchronousPage.qml",
    "content": "import QtQuick 2.6\nimport QtQuick.Controls 2.0\nimport \"../elements\"\nScrollablePage {\n    id: page\n\n    Column {\n        spacing: 40\n        width: parent.width\n\n        Label {\n            width: parent.width\n            wrapMode: Label.Wrap\n            horizontalAlignment: Qt.AlignHCenter\n            text: \"This page demos using a progress bar (found on the layout page) to update the UI of the progres of a backend process (for instance downloading a file)\"\n        }\n\n        Button {\n            id: button\n            text: \"Start Process\"\n            anchors.horizontalCenter: parent.horizontalCenter\n            width: Math.max(implicitWidth, Math.min(implicitWidth * 2, page.availableWidth / 3))\n\n            onClicked: function() {\n                globalToast.open()\n                globalToast.start(\"beginning process\")\n                QmlBridge.startAsynchronousProcess()\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "qt/qml/pages/_calculatorPage.qml",
    "content": "import QtQuick 2.6\nimport QtQuick.Layouts 1.1\nimport QtQuick.Controls 2.0\nimport QtQuick.Controls.Material 2.0\n\nPane {\n    padding: 0\n    Column {\n        spacing: 40\n        width: parent.width\n\n        Label {\n            width: parent.width\n            wrapMode: Label.Wrap\n            horizontalAlignment: Qt.AlignHCenter\n            text: \"This page demonstrates a simple calculator, using Go to add two values together. The answer is returned to the UI\"\n        }\n        Row {\n            id: row\n            anchors.left: parent.left\n            anchors.right: parent.right\n\n            TextField {\n                id: prefix\n                placeholderText: \"10\"\n                horizontalAlignment: Qt.AlignHCenter\n                width: (row.width/2) - 10\n            }\n            Label {\n                wrapMode: Label.Wrap\n                horizontalAlignment: Qt.AlignHCenter\n                text: \" + \"\n            }\n            TextField {\n                id: suffix\n                placeholderText: \"5\"\n                horizontalAlignment: Qt.AlignHCenter\n                width: (row.width/2) - 10\n            }\n        }\n        Button {\n            width: parent.width\n            text: \"Get Result!\"\n            onClicked: function() {\n            console.log('updating answer')\n                answer.text = QmlBridge.calculator(Number(suffix.text), Number(prefix.text))\n            }\n        }\n        Label {\n            id: answer\n            width: parent.width\n            wrapMode: Label.Wrap\n            horizontalAlignment: Qt.AlignHCenter\n            text: \"\"\n        }\n    }\n}"
  },
  {
    "path": "qt/qml/pages/_clockPage.qml",
    "content": "import QtQuick 2.6\nimport QtQuick.Layouts 1.1\nimport QtQuick.Controls 2.0\nimport QtQuick.Controls.Material 2.0\n\nPane {\n    padding: 0\n    id: page\n    Column {\n        spacing: 40\n        width: parent.width\n\n        Label {\n            width: parent.width\n            wrapMode: Label.Wrap\n            horizontalAlignment: Qt.AlignHCenter\n            text: \"Demonstrates receving information from Go backend\"\n        }\n\n        GroupBox {\n            title: \"Clock\"\n            anchors.horizontalCenter: parent.horizontalCenter\n\n            Column {\n                spacing: 20\n                width: page.itemWidth\n\n                Text\n                {\n                    id: clock\n\n                    color: \"black\"\n                    font.pointSize: 16\n                    opacity: 0.75\n\n                    Connections\n                    {\n                        target: QmlBridge\n                        onSendTime:\n                        {\n                            clock.text = data\n                        }\n                    }\n                }\n            }\n        }\n    }\n\n}"
  },
  {
    "path": "qt/qml/pages/_contactsPage.qml",
    "content": "import QtQuick 2.6\nimport QtQuick.Layouts 1.1\nimport QtQuick.Controls 2.0\nimport QtQuick.Controls.Material 2.0\nimport QtQuick.Dialogs 1.0\nimport \"../elements\"\nPane {\n    id: pane\n    padding: 0\n    property var delegateComponentMap: {\n        \"ItemDelegate\": itemDelegateComponent\n    }\n\n    Component {\n        id: itemDelegateComponent\n\n        ItemDelegate {\n            text: labelText\n            width: parent.width\n            Material.foreground: Material.BlueGrey\n            ToolTip.timeout: 5000\n            ToolTip.visible: hovered\n            ToolTip.text: \"Click to choose a file, or drag a file here, to send\"\n            MouseArea {\n                anchors.fill: parent\n                cursorShape: Qt.PointingHandCursor\n                acceptedButtons: Qt.LeftButton | Qt.RightButton\n                onClicked: {\n                    console.log(\"Click\")\n                    if (mouse.button == Qt.LeftButton)\n                    {\n                        console.log(\"Left\")\n                        fPicker.visible = true\n                    }\n                    else if (mouse.button == Qt.RightButton)\n                    {\n                        fileDialog.open()\n                        footerLabel.text = \"Clicked on \" + labelText\n                    }\n                }\n            }\n            Popup {\n                id: fPicker\n                visible: false\n                modal: true\n                focus: true\n                width: window.height / 3 * 2\n                x: (window.width - width) / 2\n                y: -200\n                contentHeight: 400\n                FilePicker {\n                    anchors.fill: parent\n                    showDotAndDotDot: true\n                    onFileSelected: {\n                    }\n                }\n            }\n            DropArea {\n                id: drg\n                anchors.fill: parent\n                onDropped: {\n                    //ctrl.processFileForSharing(ctrl.pendingFile)\n                    //badgeArea.color = \"transparent\"\n                    //badge.color = Colors.color.steelblue\n                    //badge.text = ctrl.person(index).len\n                }\n                onEntered: {\n                    console.log(\"hello world\")\n                    //badge.color = \"white\"\n                    //badge.text = FontAwesome.icons.fa_upload\n                    //badgeArea.color = Colors.color.balanced\n                    //ctrl.pendingFile = drag.urls.toString()\n                    //ctrl.pendingContact = txt.text\n                }\n                onExited: {\n                    //badgeArea.color = \"transparent\"\n                    //badge.color = Colors.color.steelblue\n                    //badge.text = ctrl.person(index).len\n                }\n            }\n        }\n    }\n\n    ColumnLayout {\n        spacing: 10\n        anchors.fill: parent\n        anchors.topMargin: 20\n\n        Label {\n            Layout.fillWidth: true\n            wrapMode: Label.Wrap\n            padding: 20\n            topPadding: 0\n            horizontalAlignment: Qt.AlignHLeft\n            text: \"These are your contacts. <br><ul><li>Left click to see files from them</li><li>Right click to choose a file to send them</li><li>You can also drag a file onto a contact to send it to them.</li></ul>\"\n        }\n        ListView {\n            id: listView\n            Layout.fillWidth: true\n            Layout.fillHeight: true\n            clip: true\n            model: ContactsModel\n            delegate: Loader {\n                id: delegateLoader\n                width: listView.width\n                sourceComponent: delegateComponentMap[\"ItemDelegate\"]\n\n                property string labelText: email\n                property ListView view: listView\n                property int ourIndex: index\n\n                // Can't find a way to do this in the SwipeDelegate component itself,\n                // so do it here instead.\n                ListView.onRemove: SequentialAnimation {\n                    PropertyAction {\n                        target: delegateLoader\n                        property: \"ListView.delayRemove\"\n                        value: true\n                    }\n                    NumberAnimation {\n                        target: item\n                        property: \"height\"\n                        to: 0\n                        easing.type: Easing.InOutQuad\n                    }\n                    PropertyAction {\n                        target: delegateLoader\n                        property: \"ListView.delayRemove\"\n                        value: false\n                    }\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "qt/qml/pages/_downloadsPage.qml",
    "content": "import QtQuick 2.6\nimport QtQuick.Layouts 1.1\nimport QtQuick.Controls 2.0\nimport QtQuick.Controls.Material 2.0\nPane {\n    padding: 0\n    property var delegateComponentMap: {\n        \"ItemDelegate\": itemDelegateComponent\n    }\n\n    Component {\n        id: itemDelegateComponent\n        ItemDelegate {\n            text: labelText\n            width: parent.width\n            Material.foreground: Material.BlueGrey\n            MouseArea {\n                anchors.fill: parent\n                cursorShape: Qt.PointingHandCursor\n                onClicked: {\n                    footerLabel.text = \"Clicked on \" + labelText\n\n                }\n\n            }\n            ToolTip.timeout: 5000\n            ToolTip.visible: hovered\n            ToolTip.text: \"Click to open the file\"\n        }\n    }\n    ColumnLayout {\n        spacing: 10\n        anchors.fill: parent\n        anchors.topMargin: 20\n\n        Label {\n            Layout.fillWidth: true\n            wrapMode: Label.Wrap\n            padding: 20\n            topPadding: 0\n            horizontalAlignment: Qt.AlignHLeft\n            text: \"These are files you have downloaded. <br><ul><li>Click on one to open it</li><li>Files are stored at <a href='~/.downloads'>~/.downloads</a></li></ul>\"\n            onLinkActivated: Qt.openUrlExternally(link)\n            MouseArea {\n                anchors.fill: parent\n                acceptedButtons: Qt.NoButton\n                cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor\n            }\n        }\n        ListView {\n            id: listView\n            Layout.fillWidth: true\n            Layout.fillHeight: true\n            clip: true\n            spacing: 2\n            model: ListModel {\n                ListElement { type: \"ItemDelegate\"; text: \"item1.pdf\" }\n                ListElement { type: \"ItemDelegate\"; text: \"item2.exe\" }\n                ListElement { type: \"ItemDelegate\"; text: \"item3.md\" }\n            }\n\n            section.property: \"type\"\n\n            delegate: Loader {\n                id: delegateLoader\n                width: listView.width\n                sourceComponent: delegateComponentMap[type]\n\n                property string labelText: text\n                property ListView view: listView\n                property int ourIndex: index\n\n                // Can't find a way to do this in the SwipeDelegate component itself,\n                // so do it here instead.\n                ListView.onRemove: SequentialAnimation {\n                    PropertyAction {\n                        target: delegateLoader\n                        property: \"ListView.delayRemove\"\n                        value: true\n                    }\n                    NumberAnimation {\n                        target: item\n                        property: \"height\"\n                        to: 0\n                        easing.type: Easing.InOutQuad\n                    }\n                    PropertyAction {\n                        target: delegateLoader\n                        property: \"ListView.delayRemove\"\n                        value: false\n                    }\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "qt/qml/pages/_filelistPage.qml",
    "content": "import QtQuick 2.6\nimport QtQuick.Layouts 1.1\nimport QtQuick.Controls 2.0\nimport QtQuick.Controls.Material 2.0\nPane {\n    padding: 0\n    property var delegateComponentMap: {\n        \"ItemDelegate\": itemDelegateComponent\n    }\n\n    Component {\n        id: itemDelegateComponent\n        ItemDelegate {\n            text: labelText\n            width: parent.width\n            Material.foreground: Material.BlueGrey\n            MouseArea {\n                anchors.fill: parent\n                cursorShape: Qt.PointingHandCursor\n                onClicked: {\n                    footerLabel.text = \"Clicked on \" + labelText\n\n                }\n\n            }\n            ToolTip.timeout: 5000\n            ToolTip.visible: hovered\n            ToolTip.text: \"Click to download the file\"\n        }\n    }\n    ColumnLayout {\n        spacing: 10\n        anchors.fill: parent\n        anchors.topMargin: 20\n\n        Label {\n            Layout.fillWidth: true\n            wrapMode: Label.Wrap\n            padding: 20\n            topPadding: 0\n            horizontalAlignment: Qt.AlignHLeft\n            text: \"These are file sent to you. <br><ul><li>Click on one to download it</li></ul>\"\n        }\n        ListView {\n            id: listView\n            Layout.fillWidth: true\n            Layout.fillHeight: true\n            clip: true\n            spacing: 2\n            model: ListModel {\n                ListElement { type: \"ItemDelegate\"; text: \"domination.pdf\" }\n                ListElement { type: \"ItemDelegate\"; text: \"megolomania.exe\" }\n                ListElement { type: \"ItemDelegate\"; text: \"bankvault.md\" }\n            }\n\n            section.property: \"type\"\n\n            delegate: Loader {\n                id: delegateLoader\n                width: listView.width\n                sourceComponent: delegateComponentMap[type]\n\n                property string labelText: text\n                property ListView view: listView\n                property int ourIndex: index\n\n                // Can't find a way to do this in the SwipeDelegate component itself,\n                // so do it here instead.\n                ListView.onRemove: SequentialAnimation {\n                    PropertyAction {\n                        target: delegateLoader\n                        property: \"ListView.delayRemove\"\n                        value: true\n                    }\n                    NumberAnimation {\n                        target: item\n                        property: \"height\"\n                        to: 0\n                        easing.type: Easing.InOutQuad\n                    }\n                    PropertyAction {\n                        target: delegateLoader\n                        property: \"ListView.delayRemove\"\n                        value: false\n                    }\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "qt/qml/pages/_fruitsPage.qml",
    "content": "import QtQuick 2.6\nimport QtQuick.Layouts 1.1\nimport QtQuick.Controls 2.0\nimport QtQuick.Controls.Material 2.0\nimport \"../elements\"\nimport \"../images\"\nRectangle {\n    id: container\n    width: 500; height: 400\n    color: \"#343434\"\n\n    // The model:\n    ListModel {\n        id: fruitModel\n\n        ListElement {\n            name: \"Apple\"; cost: 2.45\n            attributes: [\n                ListElement { description: \"Core\" },\n                ListElement { description: \"Deciduous\" }\n            ]\n        }\n        ListElement {\n            name: \"Banana\"; cost: 1.95\n            attributes: [\n                ListElement { description: \"Tropical\" },\n                ListElement { description: \"Seedless\" }\n            ]\n        }\n        ListElement {\n            name: \"Cumquat\"; cost: 3.25\n            attributes: [\n                ListElement { description: \"Citrus\" }\n            ]\n        }\n        ListElement {\n            name: \"Durian\"; cost: 9.95\n            attributes: [\n                ListElement { description: \"Tropical\" },\n                ListElement { description: \"Smelly\" }\n            ]\n        }\n    }\n\n    // The delegate for each fruit in the model:\n    Component {\n        id: listDelegate\n\n        Item {\n            id: delegateItem\n            width: listView.width - 10\n            height: 55\n            clip: true\n\n            Row {\n                anchors.verticalCenter: parent.verticalCenter\n                spacing: 10\n\n                Column {\n                    Image {\n                        source: \"../images/FA/white/png/22/arrow-up.png\"\n                        MouseArea { anchors.fill: parent; onClicked: fruitModel.move(index, index-1, 1) }\n                    }\n                    Image { source: \"../images/FA/white/png/22/arrow-down.png\"\n                        MouseArea { anchors.fill: parent; onClicked: fruitModel.move(index, index+1, 1) }\n                    }\n                }\n\n                Column {\n                    anchors.verticalCenter: parent.verticalCenter\n\n                    Text {\n                        text: name\n                        font.pixelSize: 15\n                        color: \"white\"\n                    }\n                    Row {\n                        spacing: 5\n                        Repeater {\n                            model: attributes\n                            Text { text: description; color: \"White\" }\n                        }\n                    }\n                }\n            }\n\n            Row {\n                anchors.verticalCenter: parent.verticalCenter\n                anchors.right: parent.right\n                spacing: 10\n\n                PressAndHoldButton {\n                    anchors.verticalCenter: parent.verticalCenter\n                    source: \"../images/FA/white/png/22/minus.png\"\n                    onClicked: fruitModel.setProperty(index, \"cost\", cost + 0.25)\n                }\n\n                Text {\n                    id: costText\n                    anchors.verticalCenter: parent.verticalCenter\n                    text: '$' + Number(cost).toFixed(2)\n                    font.pixelSize: 15\n                    color: \"white\"\n                    font.bold: true\n                }\n\n                PressAndHoldButton {\n                    anchors.verticalCenter: parent.verticalCenter\n                    source: \"../images/FA/white/png/22/plus.png\"\n                    onClicked: fruitModel.setProperty(index, \"cost\", Math.max(0,cost-0.25))\n                }\n\n                Image {\n                    source: \"../images/FA/white/png/22/remove.png\"\n                    MouseArea { anchors.fill:parent; onClicked: fruitModel.remove(index) }\n                }\n            }\n\n            // Animate adding and removing of items:\n\n            ListView.onAdd: SequentialAnimation {\n                PropertyAction { target: delegateItem; property: \"height\"; value: 0 }\n                NumberAnimation { target: delegateItem; property: \"height\"; to: 55; duration: 250; easing.type: Easing.InOutQuad }\n            }\n\n            ListView.onRemove: SequentialAnimation {\n                PropertyAction { target: delegateItem; property: \"ListView.delayRemove\"; value: true }\n                NumberAnimation { target: delegateItem; property: \"height\"; to: 0; duration: 250; easing.type: Easing.InOutQuad }\n\n                // Make sure delayRemove is set back to false so that the item can be destroyed\n                PropertyAction { target: delegateItem; property: \"ListView.delayRemove\"; value: false }\n            }\n        }\n    }\n\n    // The view:\n    ListView {\n        id: listView\n        anchors.fill: parent; anchors.margins: 20\n        model: fruitModel\n        delegate: listDelegate\n    }\n\n    Row {\n        anchors { left: parent.left; bottom: parent.bottom; margins: 20 }\n        spacing: 10\n\n        TextButton {\n            text: \"Add an item\"\n            onClicked: {\n                fruitModel.append({\n                    \"name\": \"Pizza Margarita\",\n                    \"cost\": 5.95,\n                    \"attributes\": [{\"description\": \"Cheese\"}, {\"description\": \"Tomato\"}]\n                })\n            }\n        }\n\n        TextButton {\n            text: \"Remove all items\"\n            onClicked: fruitModel.clear()\n        }\n    }\n}"
  },
  {
    "path": "qt/qml/pages/_fruitsPage2.qml",
    "content": "import QtQuick 2.6\nimport QtQuick.Layouts 1.1\nimport QtQuick.Controls 2.0\nimport QtQuick.Controls.Material 2.0\nimport \"../elements\"\nimport \"../images\"\nRectangle {\n    id: container\n    width: 500; height: 400\n\n    // The model:\n    ListModel {\n        id: fruitModel\n\n        ListElement {\n            name: \"Apple\"; cost: 2.45\n            attributes: [\n                ListElement { description: \"Core\" },\n                ListElement { description: \"Deciduous\" }\n            ]\n        }\n        ListElement {\n            name: \"Banana\"; cost: 1.95\n            attributes: [\n                ListElement { description: \"Tropical\" },\n                ListElement { description: \"Seedless\" }\n            ]\n        }\n        ListElement {\n            name: \"Cumquat\"; cost: 3.25\n            attributes: [\n                ListElement { description: \"Citrus\" }\n            ]\n        }\n        ListElement {\n            name: \"Durian\"; cost: 9.95\n            attributes: [\n                ListElement { description: \"Tropical\" },\n                ListElement { description: \"Smelly\" }\n            ]\n        }\n    }\n\n    // The delegate for each fruit in the model:\n    Component {\n        id: listDelegate\n\n        Item {\n            id: delegateItem\n            width: listView.width - 10\n            height: 55\n            clip: true\n\n            Row {\n                anchors.verticalCenter: parent.verticalCenter\n                spacing: 10\n\n                Column {\n                    Image {\n                        source: \"../images/FA-PNG/black/png/22/arrow-up.png\"\n                        MouseArea { anchors.fill: parent; onClicked: fruitModel.move(index, index-1, 1) }\n                    }\n                    Image { source: \"../images/FA-PNG/black/png/22/arrow-down.png\"\n                        MouseArea { anchors.fill: parent; onClicked: fruitModel.move(index, index+1, 1) }\n                    }\n                }\n\n                Column {\n                    anchors.verticalCenter: parent.verticalCenter\n\n                    Text {\n                        text: name\n                        font.pixelSize: 15\n                        color: \"#333\"\n                    }\n                    Row {\n                        spacing: 5\n                        Repeater {\n                            model: attributes\n                            Text { text: description; color: \"#333\" }\n                        }\n                    }\n                }\n            }\n\n            Row {\n                anchors.verticalCenter: parent.verticalCenter\n                anchors.right: parent.right\n                spacing: 10\n\n                PressAndHoldButton {\n                    anchors.verticalCenter: parent.verticalCenter\n                    source: \"../images/FA-PNG/black/png/22/minus.png\"\n                    onClicked: fruitModel.setProperty(index, \"cost\", cost - 0.25)\n                }\n\n                Text {\n                    id: costText\n                    anchors.verticalCenter: parent.verticalCenter\n                    text: '$' + Number(cost).toFixed(2)\n                    font.pixelSize: 15\n                    color: \"#333\"\n                    font.bold: true\n                }\n\n                PressAndHoldButton {\n                    anchors.verticalCenter: parent.verticalCenter\n                    source: \"../images/FA-PNG/black/png/22/plus.png\"\n                    onClicked: fruitModel.setProperty(index, \"cost\", Math.max(0,cost + 0.25))\n                }\n\n                Image {\n                    source: \"../images/FA-PNG/black/png/22/remove.png\"\n                    MouseArea { anchors.fill:parent; onClicked: fruitModel.remove(index) }\n                }\n            }\n\n            // Animate adding and removing of items:\n\n            ListView.onAdd: SequentialAnimation {\n                PropertyAction { target: delegateItem; property: \"height\"; value: 0 }\n                NumberAnimation { target: delegateItem; property: \"height\"; to: 55; duration: 250; easing.type: Easing.InOutQuad }\n            }\n\n            ListView.onRemove: SequentialAnimation {\n                PropertyAction { target: delegateItem; property: \"ListView.delayRemove\"; value: true }\n                NumberAnimation { target: delegateItem; property: \"height\"; to: 0; duration: 250; easing.type: Easing.InOutQuad }\n\n                // Make sure delayRemove is set back to false so that the item can be destroyed\n                PropertyAction { target: delegateItem; property: \"ListView.delayRemove\"; value: false }\n            }\n        }\n    }\n\n    // The view:\n    ListView {\n        id: listView\n        anchors.fill: parent; anchors.margins: 20\n        model: fruitModel\n        delegate: listDelegate\n    }\n\n}"
  },
  {
    "path": "qt/qml/pages/_loginPage.qml",
    "content": "import QtQuick 2.6\nimport QtQuick.Controls 2.0\nScrollablePage {\n    id: page\n\n    Column {\n        spacing: 40\n        width: parent.width\n\n            Label {\n                width: parent.width\n                wrapMode: Label.Wrap\n                horizontalAlignment: Qt.AlignHCenter\n                text: \"Login using Google Authentication. Make sure you have created an account first here: <a href='http://website.co.uk'>website.co.uk</a>\"\n                onLinkActivated: Qt.openUrlExternally(link)\n                MouseArea {\n                    anchors.fill: parent\n                    acceptedButtons: Qt.NoButton\n                    cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor\n                }\n            }\n            Button {\n                id: button\n                text: \"Login\"\n                anchors.horizontalCenter: parent.horizontalCenter\n                width: Math.max(implicitWidth, Math.min(implicitWidth * 2, page.availableWidth / 3))\n\n                onClicked: function() {\n                    globalToast.open()\n                    globalToast.start(\"Attempting to log in\")\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "qt/qml/pages/_searchPage.qml",
    "content": "import QtQuick 2.6\nimport QtQuick.Layouts 1.1\nimport QtQuick.Controls 2.0\nimport QtQuick.Controls.Material 2.0\nPane {\n    padding: 0\n    property var delegateComponentMap: {\n        \"ItemDelegate\": itemDelegateComponent\n    }\n\n    Component {\n        id: itemDelegateComponent\n        ItemDelegate {\n            text: labelText\n            width: parent.width\n            Material.foreground: Material.BlueGrey\n            MouseArea {\n                anchors.fill: parent\n                cursorShape: Qt.PointingHandCursor\n                onClicked: {\n                    footerLabel.text = \"Clicked on \" + labelText\n\n                }\n\n            }\n            ToolTip.timeout: 5000\n            ToolTip.visible: hovered\n            ToolTip.text: \"Click to add contact to your contacts\"\n        }\n    }\n    ColumnLayout {\n        spacing: 10\n        anchors.fill: parent\n        anchors.topMargin: 20\n\n        Label {\n            Layout.fillWidth: true\n            wrapMode: Label.Wrap\n            horizontalAlignment: Qt.AlignHCenter\n            padding: 20\n            topPadding: 0\n            text: \"Search for new contacts here. Click on a search result to add them to your contacts\"\n        }\n        TextField {\n            id: searchContactField\n            Layout.fillWidth: true\n            placeholderText: \"James Bond\"\n            horizontalAlignment: Qt.AlignHCenter\n            Keys.onReturnPressed: {\n                console.log(\"the user is searching for \" + searchContactField.text)\n                footerLabel.text = \"searching for \" + searchContactField.text\n                searchContactField.text = \"\"\n            }\n            background: Rectangle {\n                border.color: \"grey\"\n                radius: 2\n            }\n        }\n        Button {\n            id: searchButton\n            text: \"Search\"\n            Layout.fillWidth: true\n            onClicked: function() {\n                footerLabel.text = \"searching for \" + searchContactField.text\n                searchContactField.text = \"\"\n                QmlBridge.searchFor(searchContactField.text)\n            }\n        }\n        ListView {\n            id: listView\n            Layout.fillWidth: true\n            Layout.fillHeight: true\n            clip: true\n            spacing: 2\n            model: SearchModel\n            delegate: Loader {\n                id: delegateLoader\n                width: listView.width\n                sourceComponent: delegateComponentMap[\"ItemDelegate\"]\n\n                property string labelText: email\n                property ListView view: listView\n                property int ourIndex: index\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "qt/qml/pages/_toastPage.qml",
    "content": "import QtQuick 2.6\nimport QtQuick.Controls 2.0\nScrollablePage {\n    id: page\n\n    Column {\n        spacing: 40\n        width: parent.width\n\n            Label {\n                width: parent.width\n                wrapMode: Label.Wrap\n                horizontalAlignment: Qt.AlignHCenter\n                text: \"This page demos a toast element\"\n            }\n\n            Button {\n                id: button\n                text: \"Show Toast\"\n                anchors.horizontalCenter: parent.horizontalCenter\n                width: Math.max(implicitWidth, Math.min(implicitWidth * 2, page.availableWidth / 3))\n\n                onClicked: function() {\n                    globalToast.open()\n                    globalToast.start(\"hello from toast\")\n                }\n\n            }\n    }\n}\n"
  }
]