mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-02 04:48:27 +00:00
Move printer demo and energy-monitor into new top-level demos/ folder
These are showing off use-cases for Slint, but they're not examples showing individual Slint features. Also removed the old printerdemo while at it.
This commit is contained in:
parent
acafc9c3e6
commit
a98d4709be
241 changed files with 187 additions and 982 deletions
|
|
@ -37,10 +37,10 @@ The installation will use binaries provided vi macOS, Windows, and Linux for var
|
|||
|
||||
## Try it out
|
||||
|
||||
If you want to just play with this, you can try running our Python port of the [printer demo](../../examples/printerdemo/python/README.md):
|
||||
If you want to just play with this, you can try running our Python port of the [printer demo](../../demos/printerdemo/python/README.md):
|
||||
|
||||
```bash
|
||||
cd examples/printerdemo/python
|
||||
cd demos/printerdemo/python
|
||||
pipenv update
|
||||
pipenv run python main.py
|
||||
```
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ def test_property_access():
|
|||
finished: true,
|
||||
dash-prop: true,
|
||||
};
|
||||
in property <image> imageprop: @image-url("../../../examples/printerdemo/ui/images/cat.jpg");
|
||||
in property <image> imageprop: @image-url("../../../demos/printerdemo/ui/images/cat.jpg");
|
||||
|
||||
callback test-callback();
|
||||
}
|
||||
|
|
@ -177,7 +177,7 @@ def test_callbacks():
|
|||
if __name__ == "__main__":
|
||||
import slint
|
||||
module = slint.load_file(
|
||||
"../../examples/printerdemo/ui/printerdemo.slint")
|
||||
"../../demos/printerdemo/ui/printerdemo.slint")
|
||||
instance = module.MainWindow()
|
||||
instance.PrinterQueue.start_job = lambda title: print(
|
||||
f"new print job {title}")
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ def test_magic_import_path():
|
|||
try:
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__),
|
||||
"..", "..", ".."))
|
||||
instance = loader.examples.printerdemo.ui.printerdemo.MainWindow()
|
||||
instance = loader.demos.printerdemo.ui.printerdemo.MainWindow()
|
||||
del instance
|
||||
finally:
|
||||
sys.path = oldsyspath
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue