summaryrefslogtreecommitdiffstats
path: root/wayland/democompositor/apps
Commit message (Collapse)AuthorAgeFilesLines
* democompositor: Export the sourceFileName as wellHolger Hans Peter Freyther2017-11-291-0/+1
| | | | | | | | This will allow to easily compare two different AppEntry. The easiest way is to check if they come from the same file. Change-Id: I2642b1037eeb3abd77f4b2d677753ccd01256075 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* democompositor: Add a mandatory "Id" to the app specificationHolger Hans Peter Freyther2017-11-096-2/+22
| | | | | | | | Add a manodatory appId, expose it to QML, add a simple find by id method and update the testcases. Change-Id: I4f80a97e5f31e972694dd61eff0166f9de2f5d51 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* democompositor: Allow arbitrary extensions inside the app mapHolger Hans Peter Freyther2017-10-244-2/+19
| | | | | | | | | Allow extensions and let them begin with X-. Briefly document it, add some extensions as an example and briefly test that the right values are parsed. Change-Id: I7a9ae6b2f365802fcce6dce56fa7795f76d83421 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* democompositor: Move images and apps to resources/ folderHolger Hans Peter Freyther2017-10-244-32/+0
| | | | | | | | | The apps were hard to be discovered inside apps/files and other projects here seem to use a resources/ folder. Move the apps and the images in it. Change-Id: If2e9127ea6e941e1a97465b2de5e9f9af3660ea3 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* democompositor: Remove deleted files from the modelHolger Hans Peter Freyther2017-10-242-6/+60
| | | | | | | | | | | | | | | In the previous code review Paul discovered the fact that files would never be removed. Implement finding deleted files and emit a signal per removed file. Consume the signal in QML and use the new API to kill the process (one could close the wayland display connection as well). Emit the removed signals _after_ the model has been updated to provide the QML code with an updated model during the signal handling. Change-Id: Ib3bb1bd953bfbf09d25c5e5822756a53b08fd797 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* democompositor: Give up on having AppEntry with only const membersHolger Hans Peter Freyther2017-09-123-26/+18
| | | | | | | | | | | | When building gadgets that include instances of AppEntry that will expose these member variables a Q_PROPERTY we will end trying to do a std::move (even if the AppEntry is not movable). Remove the const from the member variables, leave the CONSTANT in the property to not generate a write function and let's keep the discipline to not assign to an existing AppEntry. Change-Id: I742a9d091e7e6eac6cc3cb84a48b7b8812a24247 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* democompositor: Add method to scan and watch a directoryHolger Hans Peter Freyther2017-09-122-0/+20
| | | | | | | | | This will add files of a given directory and use a QFileSystemWatcher to check for changes and then re-scan it. It will return if the watching has started. Change-Id: I4d5021430fa400c648167fea37c45d7472ceb322 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* democompositor: Add method to scan entire directory for filesHolger Hans Peter Freyther2017-09-122-0/+14
| | | | | | | | Make this and the addFile a public slot to be more easily. Take all files from the directory and ignore the suffix. Change-Id: I8017c3a873a962ab0b4e7e5c9946403f1ee0ffcd Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* democompositor: Introduce an AppListModel to expose appsHolger Hans Peter Freyther2017-09-127-6/+242
| | | | | | | | | | | | | | | | | | | | | | | Turn the AppEntry into a gadget and store the filename of where the entry came from. Update the existing test to deal with it. Introduce AppListModel as a QAbstractItemModel and expose the raw AppEntry and its fields as role. Have some slow O(n) code to check if an entry has already been added. The goal is to use a directory watcher to automatically update this list. Store the AppEntry as a pointer so we don't have to remove the const from the field. The next steps are to fully populate the AppListModel by scanning and watching a directory and then replacing the LaunchButton code with a Repeater on the application model. After starting of apps will be done by passing the AppEntry to a launcher. Application state should be stored outside the AppEntry and maybe in a different model as well. Change-Id: Ia933a09942ea8bb88eae5c101d13a30564d8c639 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* democompositor: Add parsing of entries and testcodeHolger Hans Peter Freyther2017-09-126-0/+405
| | | | | | | | | | | | | | Implement parsing of the json definition. Initially be strict to parse the file correctly. Add some basic tests for checking how data and file parsing is working and feed some invalid input into the parser and check the result. Use macro for checking the JSON type and doing the conversion to allow an early return and to avoid having to write the same code over and over again. Change-Id: I8c4301bac1b6226f94c8fc0004a313487b73c21a Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* democompositor: Describe applications using a JSON fileHolger Hans Peter Freyther2017-09-125-0/+52
Inspired by the freedesktop.org specification define a simple JSON format and add files for the existing demo applications using this specifcation. Install them into the QStandardPaths::DataLocation/apps direcyory. Change-Id: If5bbec8ec3a1b375f1e58f8534545b89507cc1a8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>