-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow custom setters/getters/notify for qproperty (#994)
This adds support for three flags to the qproperty macro: `read`,`write`,`notify`. If any of them is used, the user is in control of what is generated by CXX-Qt. Using the flags without an argument will cause CXX-Qt to auto-generate that part of the property. This means that `read, write, notify` is equivalent to the current behavior, which continues to be supported for convenience. If the user specifies a value (e.g. `read=my_getter`), CXX-Qt will no longer auto-generate anything, but simply link to that function in the definition of the Q_PROPERTY macro in C++. The corresponding function/signal must already be exported to C++ by the user with the correct name & signature. This allows user complete control over their signals. We will likely follow this up with the remaining valid flags on Q_PROPERTY.
- Loading branch information
1 parent
02e5be6
commit 0ed19c6
Showing
19 changed files
with
907 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,11 @@ | |
[package] | ||
name = "cxx-qt-gen" | ||
version.workspace = true | ||
authors = ["Andrew Hayzen <[email protected]>", "Gerhard de Clercq <[email protected]>", "Leon Matthes <[email protected]>"] | ||
authors = [ | ||
"Andrew Hayzen <[email protected]>", | ||
"Gerhard de Clercq <[email protected]>", | ||
"Leon Matthes <[email protected]>", | ||
] | ||
edition.workspace = true | ||
license.workspace = true | ||
description = "Code generation for integrating `cxx-qt` into higher level tools" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.