Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add member functions to basic Qt types in Rust #55

Closed
1 of 2 tasks
LeonMatthesKDAB opened this issue Jan 12, 2022 · 6 comments
Closed
1 of 2 tasks

Add member functions to basic Qt types in Rust #55

LeonMatthesKDAB opened this issue Jan 12, 2022 · 6 comments
Assignees
Labels
⬆️ feature New feature or request 🙋 good first issue Good for newcomers
Milestone

Comments

@LeonMatthesKDAB
Copy link
Collaborator

LeonMatthesKDAB commented Jan 12, 2022

Original Description
Types like QPoint have a lot of member functions, as well as operators (i.e. +,-,/,*) that make them a lot more useful. We should give Rust access to these as well.

@LeonMatthesKDAB LeonMatthesKDAB mentioned this issue Jan 12, 2022
14 tasks
@ahayzen-kdab
Copy link
Collaborator

Note that this is related to #53

@LeonMatthesKDAB
Copy link
Collaborator Author

Note: QRect's interface should propably not mimic Qt directly. set_x and set_y will change the width and height, which is not at all obvious/expected behavior. So we should improve on Qt in this regard, and come up with our own, safer interface.

@ahayzen-kdab
Copy link
Collaborator

Also ensure that we are using CXX where we can.

Eg

#[rust_name = "qurl_to_qstring"]
fn qurlToQString(url: &QUrl) -> QString;

could probably just be

#[rust_name = "to_string"]
fn toString(self: &QUrl) -> QString;

@ahayzen-kdab
Copy link
Collaborator

Also ensure that we are using CXX where we can.

Eg

#[rust_name = "qurl_to_qstring"]
fn qurlToQString(url: &QUrl) -> QString;

could probably just be

#[rust_name = "to_string"]
fn toString(self: &QUrl) -> QString;

We can't in this place as toString has an optional parameter. So we could have to provide that in Rust for it to work with CXX etc.

@ahayzen-kdab
Copy link
Collaborator

Also note that QDateTime it would be useful to link up the static methods like QDateTime::currentDateTime(), otherwise might have static methods that could be useful too.

@ahayzen-kdab ahayzen-kdab self-assigned this Jan 17, 2023
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jan 17, 2023
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jan 17, 2023
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jan 17, 2023
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jan 17, 2023
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jan 17, 2023
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jan 17, 2023
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jan 17, 2023
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jan 17, 2023
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jan 17, 2023
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jan 17, 2023
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jan 17, 2023
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jan 17, 2023
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jan 17, 2023
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jan 17, 2023
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jan 17, 2023
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jan 17, 2023
ahayzen-kdab added a commit to ahayzen-kdab/cxx-qt that referenced this issue Jan 17, 2023
ahayzen-kdab added a commit that referenced this issue Mar 7, 2023
ahayzen-kdab added a commit that referenced this issue Mar 7, 2023
ahayzen-kdab added a commit that referenced this issue Mar 7, 2023
ahayzen-kdab added a commit that referenced this issue Mar 7, 2023
ahayzen-kdab added a commit that referenced this issue Mar 7, 2023
ahayzen-kdab added a commit that referenced this issue Mar 7, 2023
ahayzen-kdab added a commit that referenced this issue Mar 7, 2023
ahayzen-kdab added a commit that referenced this issue Mar 7, 2023
ahayzen-kdab added a commit that referenced this issue Mar 7, 2023
ahayzen-kdab added a commit that referenced this issue Mar 7, 2023
ahayzen-kdab added a commit that referenced this issue Mar 7, 2023
@ahayzen-kdab
Copy link
Collaborator

Closing via #416.

przempore pushed a commit to przempore/cxx-qt that referenced this issue Mar 15, 2023
przempore pushed a commit to przempore/cxx-qt that referenced this issue Mar 15, 2023
przempore pushed a commit to przempore/cxx-qt that referenced this issue Mar 15, 2023
przempore pushed a commit to przempore/cxx-qt that referenced this issue Mar 15, 2023
przempore pushed a commit to przempore/cxx-qt that referenced this issue Mar 15, 2023
przempore pushed a commit to przempore/cxx-qt that referenced this issue Mar 15, 2023
przempore pushed a commit to przempore/cxx-qt that referenced this issue Mar 15, 2023
przempore pushed a commit to przempore/cxx-qt that referenced this issue Mar 15, 2023
przempore pushed a commit to przempore/cxx-qt that referenced this issue Mar 15, 2023
przempore pushed a commit to przempore/cxx-qt that referenced this issue Mar 15, 2023
przempore pushed a commit to przempore/cxx-qt that referenced this issue Mar 15, 2023
przempore pushed a commit to przempore/cxx-qt that referenced this issue Mar 15, 2023
przempore pushed a commit to przempore/cxx-qt that referenced this issue Mar 15, 2023
przempore pushed a commit to przempore/cxx-qt that referenced this issue Mar 15, 2023
przempore pushed a commit to przempore/cxx-qt that referenced this issue Mar 15, 2023
przempore pushed a commit to przempore/cxx-qt that referenced this issue Mar 15, 2023
przempore pushed a commit to przempore/cxx-qt that referenced this issue Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⬆️ feature New feature or request 🙋 good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants