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 drawing subsystem #723

Merged
merged 41 commits into from
May 26, 2024
Merged

Refactor drawing subsystem #723

merged 41 commits into from
May 26, 2024

Commits on May 18, 2024

  1. Extract "Ellips" primitive from a generic "Area"

    Both ellipses and rectangles are drawn from a single object named
    "Area". Drawing logic depends on the source of an object: if it's
    from "rectangles" container, then draw a rectangle, otherwise
    draw an ellipse.
    
    This commit creates new separate "Ellips"  type, which allows to:
    - hide a dedicated ellipsis rectangle drawing logic in a method
      associated only with "Ellips" objects
    - distinguish ellipses and rectangles by their types, not by the
      place they come from
    
    The name ("Ellips") has no "e" at the end because "Ellipse"
    conflicts with a painting with the same name, which is declared in
    the same namespace. I didn't want to go into any additional trouble
    and chose to go with this type of a "workaround".
    wawuwo committed May 18, 2024
    Configuration menu
    Copy the full SHA
    3d3c3ee View commit details
    Browse the repository at this point in the history
  2. Rename member "ellips" to "ellipses"

    Some classes have members of container types, storing "Ellips"
    objects, i.e. ellipses. Just assigning a proper name.
    wawuwo committed May 18, 2024
    Configuration menu
    Copy the full SHA
    75484d7 View commit details
    Browse the repository at this point in the history
  3. Rename "Area" to "Rect"

    After extracting ellipse from "Area" to a separate class, "Area"
    means only a rectangle.
    wawuwo committed May 18, 2024
    Configuration menu
    Copy the full SHA
    a2e7d8e View commit details
    Browse the repository at this point in the history
  4. Add misc::draw_richtext

    This is a helper function required for some future changes.
    wawuwo committed May 18, 2024
    Configuration menu
    Copy the full SHA
    ba24ba4 View commit details
    Browse the repository at this point in the history
  5. Add "DrawingPrimitive" interface and its implementations

    DrawingPrimitive is a common interface for the parts from which
    component's appearence is built: qucs::Line, qucs::Arc, qucs::Rect,
    qucs::Ellips, qucs::Text. With this commit they a turned from
    "dumb" POD to more "smart" objects. Common interface also allows
    to hide drawing logic and make drawing more convenient and easy
    for client code.
    wawuwo committed May 18, 2024
    Configuration menu
    Copy the full SHA
    599f9a9 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    a356fa4 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b5b7d5f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    794b2d2 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    4e9e968 View commit details
    Browse the repository at this point in the history
  10. Add misc::draw_resize_handle

    wawuwo committed May 18, 2024
    Configuration menu
    Copy the full SHA
    3ba06d7 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    a1813ee View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    1cf43cd View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    44dfae9 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    820ba2d View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    1ee8364 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    0cbb383 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    c8af759 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    17d4f0a View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    05c186b View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    423c887 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    7340b6d View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    a6ef626 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    e1c4ce7 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    3fb9458 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    b407e38 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    1dc52b0 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    c5ac979 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    4c5a6fa View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    2476576 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    be88d06 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    c416126 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    99e11f6 View commit details
    Browse the repository at this point in the history
  33. Make Schematic::drawContents use QPainter-based drawing

    Schematic::drawContents is the root of the "drawing" call stack:
    starting from this function the QPainter is passed down to diagrams,
    components, paintings, etc., using the QPainter-base "paint" methods
    prepared in previous commits. So, in this commit we're basically
    connect everyhing together to make the new drawing subsystem.
    wawuwo committed May 18, 2024
    Configuration menu
    Copy the full SHA
    b97cf20 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    8fd201e View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    e9f5228 View commit details
    Browse the repository at this point in the history
  36. Remove ViewPainter and related stuff

    After switching everything to drawing using bare QPainter, a lot
    of ViewPainter-based stuff became unused and basically obsolete,
    including the ViewPainter itself.
    wawuwo committed May 18, 2024
    Configuration menu
    Copy the full SHA
    1a05e13 View commit details
    Browse the repository at this point in the history
  37. Remove unused functions from ImageWriter

    These functions became unused after switching to QPainter-based
    drawing and printing.
    wawuwo committed May 18, 2024
    Configuration menu
    Copy the full SHA
    4a7dc25 View commit details
    Browse the repository at this point in the history

Commits on May 19, 2024

  1. Configuration menu
    Copy the full SHA
    f171eba View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4ae6c25 View commit details
    Browse the repository at this point in the history

Commits on May 23, 2024

  1. Configuration menu
    Copy the full SHA
    fd9e2fc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f6fda4d View commit details
    Browse the repository at this point in the history