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

Refactor: Update ResizableRect and ResizableRectWithNameTypeAndResult… #48

Merged
merged 2 commits into from
Oct 21, 2024

Conversation

royshil
Copy link
Contributor

@royshil royshil commented Oct 20, 2024

… classes

This commit refactors the ResizableRect and ResizableRectWithNameTypeAndResult classes in the src/resizable_rect.py file.

  • Import statements have been updated to include the TextDetectionTarget and TextDetectionTargetWithResult classes from the text_detection_target module.
  • The setFlags method in the MiniRect class has been updated to use the QGraphicsItem.GraphicsItemFlag enum for improved readability.
  • The ResizableRectWithNameTypeAndResult class now accepts a TextDetectionTarget object as a parameter instead of individual x, y, width, height, and name parameters.
  • The setupAddButton method in the ResizableRectWithNameTypeAndResult class has been modified to use a smaller add button size and display a "+" symbol instead of "Add".
  • The mini_rects attribute in the ResizableRectWithNameTypeAndResult class is now initialized with MiniRect objects created from the mini_rects attribute of the TextDetectionTarget object.

These changes improve the readability and maintainability of the code.

… classes

This commit refactors the ResizableRect and ResizableRectWithNameTypeAndResult classes in the src/resizable_rect.py file.

- Import statements have been updated to include the TextDetectionTarget and TextDetectionTargetWithResult classes from the text_detection_target module.
- The setFlags method in the MiniRect class has been updated to use the QGraphicsItem.GraphicsItemFlag enum for improved readability.
- The ResizableRectWithNameTypeAndResult class now accepts a TextDetectionTarget object as a parameter instead of individual x, y, width, height, and name parameters.
- The setupAddButton method in the ResizableRectWithNameTypeAndResult class has been modified to use a smaller add button size and display a "+" symbol instead of "Add".
- The mini_rects attribute in the ResizableRectWithNameTypeAndResult class is now initialized with MiniRect objects created from the mini_rects attribute of the TextDetectionTarget object.

These changes improve the readability and maintainability of the code.
@royshil royshil merged commit 141ba55 into main Oct 21, 2024
5 checks passed
@royshil royshil deleted the roy.mini_rect_storage branch October 21, 2024 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant