-
Notifications
You must be signed in to change notification settings - Fork 24
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
enhanced gui functionality #108
Conversation
allow user to adjust window bounds, restore default windows, show box around original window, keep line in visible window
used clang-format -i **/*.cpp **/*.h
negative filtration values now appear correctly; changing window now does not query arrangement
arranged controls in 2x2 grid so slice diagram is closer in size to persistence diagram
…ed to original control layout
enalrged default window size, add white boxes around axis labels
fix bug with bottom left counter in pd
Simon, thanks for your work on this! It looks very good overall. However, starting with commit 5c4c3db, the viewer crashes (with a segmentation fault) as soon as it appears on the screen. The cause seems to be the following delete statements in SliceDiagram::redraw_labels()
It seems that rect1, ..., rect6 are null pointers when they are deleted, and this causes a crash (on some systems, but evidently not on yours or Mike's). Could we edit the code to remove these delete statements? For example, could we simply move the rectangles without deleting them? |
Hi Matthew,
Thanks for your feedback!
I added a new commit, and I’m interested to know whether it fixes the issue on your machine (I just “new”-ed all the rectangles before the function gets called).
I agree that deleting and new-ing the rectangles every time seems a little wasteful; I wasn’t sure how to move them without using a QPainter; do you know of a more proper way to move them?
Thanks!
… On Feb 27, 2018, at 5:06 AM, Matthew Wright ***@***.***> wrote:
and this causes a crash (on some systems, but evidently not on yours or Mike's). Could we edit the code to remove these delete statements? For example, could we simply m
|
Simon, your change fixed the issue on my machine. However, I think that a more efficient solution would avoid the new and delete commands in redraw_labels(). This should be possible by using functions such as:
Could we try this approach? |
Thanks Matthew, I’ll try that.
… On Feb 27, 2018, at 2:39 PM, Matthew Wright ***@***.***> wrote:
Simon, your change fixed the issue on my machine. However, I think that a more efficient solution would avoid the new and delete commands in redraw_labels(). This should be possible by using functions such as:
Resize rectangles with QGraphicsRectItem::setRect()
Move rectangles/text with QGraphicsItem::SetPos()
Ensure that rectangles/text stay on top of the other visualization elements with QGraphicsItem::setZValue()
Could we try this approach?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#108 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ATXUE0Eh0-8u6ryOvD6d82_9iTIiHmfiks5tZFnmgaJpZM4R5khE>.
|
Matthew, I just pushed a new version which avoids the deletes.
… On Feb 27, 2018, at 2:39 PM, Matthew Wright ***@***.***> wrote:
Simon, your change fixed the issue on my machine. However, I think that a more efficient solution would avoid the new and delete commands in redraw_labels(). This should be possible by using functions such as:
Resize rectangles with QGraphicsRectItem::setRect()
Move rectangles/text with QGraphicsItem::SetPos()
Ensure that rectangles/text stay on top of the other visualization elements with QGraphicsItem::setZValue()
Could we try this approach?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#108 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ATXUE0Eh0-8u6ryOvD6d82_9iTIiHmfiks5tZFnmgaJpZM4R5khE>.
|
Remove division of bottom controls into two groups so that default sizes of the two windows are more balanced
translate entire diagram so there are equal amounts of whitespace above/below and left/right
…l panel sizing Left labels no longer get cut off in initial view. Also on bottom control panel, slice diagram controls are now a fixed size and allowed to "bleed over" when window is made smaller
Hi @SimonSegert could you please rebase this onto current master to address the conflicts & then I'll review? Sorry for the delay, I didn't get any notification from github that Matthew had requested me to review it. Thanks! |
Hi @xoltar this pull request is no longer up to date. I will close it, and soon will open up another request on another branch. Sorry for the confusion! |
Added:
spin boxes to allow user to change bounds of visible window in slice diagram, while updating persistence diagram accordingly (bottom left corner of pd corresponds to bottom control dot, and length of sides of pd corresponds to length of main diagonal of visible window in slice diagram)
"-inf<" strip along left side of persistence diagram to display deaths of barcodes whose births occur to the left of the current window
three additional counters corresponding to: (1) barcodes which die too early to appear in the diagram, (2) essential and (3) nonessential barcodes which span the entire length of the persistence diagram
two default window options in drop down menu (original view, and minimal view containing betti number supports)
option to restore line to center of window if it goes out of bounds
light gray box in viewing window circumscribing original view
Changed: