Commit ccc50432 authored by Michal Policht's avatar Michal Policht

Move examples to subdirectories of each individual tool.

parent c14429b9
......@@ -15,8 +15,7 @@ Project {
references: [
"tools/tools.qbs",
"extensions/extensions.qbs",
"examples/examples.qbs"
"extensions/extensions.qbs"
]
AutotestRunner {
......
The MIT License
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
//(c)MP: Copyright © %YEAR%, Michal Policht. All rights reserved.
//(c)MP: The MIT License
//(c)MP: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
//(c)MP: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
//(c)MP: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#(c)MP: Copyright © %YEAR%, Michal Policht. All rights reserved.
#(c)MP: The MIT License
#(c)MP: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#(c)MP: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#(c)MP: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The MIT License
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
//(c)MP: Copyright © %YEAR%, Michal Policht. All rights reserved.
//(c)MP: The MIT License
//(c)MP: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
//(c)MP: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
//(c)MP: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#(c)MP: Copyright © %YEAR%, Michal Policht. All rights reserved.
#(c)MP: The MIT License
#(c)MP: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#(c)MP: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#(c)MP: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import qbs.File
Project {
minimumQbsVersion: "1.6"
references: examplesProbe.projectDirs
/*
This probe simply scans current directory for subdirectories and stores the results in projectDirs property.
*/
Probe {
id: examplesProbe
property pathList projectDirs: []
configure: {
projectDirs = File.directoryEntries(path, File.Dirs | File.NoDotAndDotDot)
}
}
}
......@@ -16,7 +16,9 @@ CommonProduct {
cpp.libraryPaths: [cutehmi.dirs.externalLibDir]
property string installDir: cutehmi.dirs.examplesInstallDirname + "/" + FileInfo.baseName(sourceDirectory)
property string installPrefix: FileInfo.baseName(FileInfo.cleanPath(sourceDirectory + "/../.."))
property string installDir: cutehmi.dirs.examplesInstallDirname + "/" + installPrefix + "/" + FileInfo.baseName(sourceDirectory)
FileTagger {
patterns: "*.qml"
......
......@@ -8,7 +8,7 @@ Use `--project` command line option to specify the QML project file to open.
For example to run *CountDaemon* example use following command.
```
cutehmi_daemon --project="examples/CountDaemon/Main.qml"
cutehmi_daemon --project="examples/cutehmi_daemon/CountDaemon/Main.qml"
```
Fore debug builds use `cutehmi_daemon_debug` instead of `cutehmi_daemon`. Read system logs to investigate whether daemon is running
(e.g. `journalctl -n20` on a system with *systemd*).
......@@ -16,7 +16,7 @@ Fore debug builds use `cutehmi_daemon_debug` instead of `cutehmi_daemon`. Read s
One may use `--app` option to tell the program to work as a foreground process (this can be useful when testing projects).
```
cutehmi_daemon --project="examples/CountDaemon/Main.qml" --app
cutehmi_daemon --project="examples/cutehmi_daemon/CountDaemon/Main.qml" --app
```
Running this example should result in printing following lines.
......
......@@ -71,6 +71,10 @@ Project {
condition: parent.buildTests
}
}
SubProject {
filePath: "examples/examples.qbs"
}
}
//(c)MP: Copyright © 2019, Michal Policht <michpolicht@gmail.com>. All rights reserved.
......
......@@ -15,7 +15,7 @@ cutehmi.Example {
copyright: "Michal Policht"
license: "The MIT License"
license: "GNU Lesser General Public License, v. 3.0"
files: [
"Main.qml",
......
import qbs
Project {
references: [
"CountDaemon"
]
}
//(c)MP: Copyright © 2019, Michal Policht <michpolicht@gmail.com>. All rights reserved.
//(c)MP: This file is a part of CuteHMI.
//(c)MP: CuteHMI is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
//(c)MP: CuteHMI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
//(c)MP: You should have received a copy of the GNU Lesser General Public License along with CuteHMI. If not, see <https://www.gnu.org/licenses/>.
......@@ -5,13 +5,13 @@ Client, GUI application, which allows one to run CuteHMI project in a window.
Use `--project` command line option to specify a QML project file to open.
For example to run 'Simple View' example use following command.
```
cutehmi_view --project="examples/SimpleView/_Main.qml"
cutehmi_view --project="examples/cutehmi_view/SimpleView/_Main.qml"
```
Fore debug builds use `cutehmi_view_debug` instead of `cutehmi_view`.
To run project from QtCreator click `Projects` -> `Run`. Select `cutehmi_view` from `Run configuration:`. In the
`Command line arguments:` box type: `--project="examples/SimpleView/_Main.qml"`.
`Command line arguments:` box type: `--project="examples/cutehmi_view/SimpleView/_Main.qml"`.
The window should look similar to the screenshot below.
![SimpleView screenshot](doc/SimpleView.png)
......
......@@ -50,6 +50,10 @@ Project {
condition: parent.buildTests
}
}
SubProject {
filePath: "examples/examples.qbs"
}
}
//(c)MP: Copyright © 2019, Michal Policht <michpolicht@gmail.com>. All rights reserved.
......
......@@ -3,6 +3,8 @@ import qbs
import cutehmi
cutehmi.Example {
id: root
name: "SimpleView"
vendor: "CuteHMI"
......@@ -15,7 +17,7 @@ cutehmi.Example {
copyright: "Michal Policht"
license: "The MIT License"
license: "GNU Lesser General Public License, v. 3.0"
files: [
"RectangularElement.qml",
......
import qbs
Project {
references: [
"SimpleView"
]
}
//(c)MP: Copyright © 2019, Michal Policht <michpolicht@gmail.com>. All rights reserved.
//(c)MP: This file is a part of CuteHMI.
//(c)MP: CuteHMI is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
//(c)MP: CuteHMI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
//(c)MP: You should have received a copy of the GNU Lesser General Public License along with CuteHMI. If not, see <https://www.gnu.org/licenses/>.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment