Commit graph

25 commits

Author SHA1 Message Date
Simon Hausmann
a98d4709be 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.
2024-10-25 12:09:32 +02:00
Enyium
9894eca229 Fixed kebab casing of previous appwindow.slint. 2024-09-20 10:26:49 +02:00
Simon Hausmann
844590cac8
Python: Add support for snake case imports (#6229)
When using slint.loader.app_window.XXX look for "app_window.slint" followed by "app-window.slint".

Fixes #6216
2024-09-20 10:25:14 +02:00
Simon Hausmann
1e3f05c983 Python: Expose Slint structs
Structs declared and exported in Slint are now available in the module namespace
with a constructor.

Fixes #5708
2024-08-13 12:04:04 +02:00
Simon Hausmann
833883b028 Python: Fix Slint file loading in callback examples
The foo_slint import has been replaced with the auto-loader.
2024-08-11 10:27:18 +02:00
Simon Hausmann
e36eb6aba6 Document behaviour of globals when exporting multiple components
Fixes #5467
2024-07-18 13:43:13 +02:00
Simon Hausmann
e3aab79fdb Python: Improve Struct mapping
When reading, create the local equivalent of a dataclass, so that access
doesn't require ["foo"] key syntax.

Also implement the copy protocol, so that we can safely make clones of
the references returned by the ListModel.
2024-07-11 22:08:10 +02:00
Simon Hausmann
0c7d2062a5 Python: Add support for exporting multiple components 2024-07-02 10:52:22 +02:00
Aurindam Jana
3523e86359
Simplify commercial license (#3063)
Base the commercial license on the Royalty-free license adding clauses pertaining to the fees.
2024-05-31 14:06:17 +02:00
Aurindam Jana
9a3aa265d5
Update Royalty-free license (#5257)
Add clarification that Application may not expose Slint APIs.
2024-05-31 10:53:19 +02:00
Simon Hausmann
3c3b2ecb5a doc: highlight the function of the auto-loader once more in the python README 2024-04-19 09:19:59 +02:00
Simon Hausmann
f86f4993fa Python: Replace import magic with an auto-loader
As discussed on Reddit, the magic import logic is not very tool friendly and a little too magic perhaps. Instead, this patch introduces an automatic loader (`slint.loader`), which can traverse `sys.path` and lazily load `.slint` files by attribute lookup.

Closes #4856
2024-04-18 16:04:20 +02:00
Simon Hausmann
93307707cd doc: Replace the use of a git pip install with an installation from pypi 2024-04-18 15:55:46 +02:00
Simon Hausmann
97940ee7b8 Python: Mention installation via pip and sort prerequisites
cc #4138
2024-04-18 13:44:20 +02:00
Aurindam Jana
0cfeec1a31
Update Slint Community License (#4994)
Updated the version from 1.1 to 1.2 
Renamed the header to "Slint Royalty-free Desktop, Mobile, and Web Applications License"
Added definition of "Mobile Application" and grant of right
Moved "Limitations" to 3rd section and "License Conditions - Attributions" to 2nd section
Added flexibility to choose between showing "MadeWithSlint" as a dialog/splash screen or on a public webpage
Moved the para on copyright notices to section under "Limitations"
2024-04-15 15:18:55 +02:00
Olivier Goffart
fd4dcfc128
Update MSRV to 1.73
A MSRV update is required to update the image crate to 0.25, otherwise
we get link error that are ficed in newer version.
Also other dependency update such as env_logger needs a newer MSRV.

Update to 1.73 because it has functions like `with_borrow` on thread
storage which we already actually use in some platform.

This is also the last release before the the drop of macOs < 10.12
in Rust 1.74
2024-03-27 09:04:31 +01:00
Olivier Goffart
902de92229
Fix tests
The code snippet don't have a component and the test currently fails if there is no components.
2024-03-14 18:06:43 +01:00
Olivier Goffart
4dbdfa9e6a
Specify that code snippets uses the slint language 2024-03-14 17:41:30 +01:00
Simon Hausmann
b83ace4e6d
Python: Fix MSRV 2024-03-08 15:21:30 +01:00
Florian Blasius
2355234553 Fixed typo in python readme 2024-03-08 10:32:10 +01:00
Simon Hausmann
cc83784de5 Python: Remove link to milestone 1
Instead refer to the remaining tickets for now.
2024-03-07 17:51:00 +01:00
Simon Hausmann
a3b7a6da50 Python: Beef up the README with an API overview and a quickstart 2024-03-07 17:38:36 +01:00
Simon Hausmann
6a6b70185f From the Python README, refer to the printer demo instead of the tests. 2024-03-07 12:12:24 +01:00
Simon Hausmann
5d3ad7b252 Python: Fix venv setup
A subtly missing letter :)
2024-01-31 17:04:06 +01:00
Simon Hausmann
2c6af79104 Add a barebones README 2023-12-21 12:57:35 +01:00