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

Vcs2d interactions updated #1091

Merged
merged 199 commits into from Mar 2, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
199 commits
Select commit Hold shift + click to select a range
58a2f86
SBF: Added vtk_ui package to VCS
chaosphere2112 Nov 18, 2014
c412184
vtk_ui fixes
Nov 19, 2014
541a346
Adding configurator
Nov 20, 2014
4bb13fa
Template config
Nov 20, 2014
7b1c0f8
Template config
Nov 20, 2014
36ba752
Initial configurator integration with canvas
Nov 20, 2014
a688a13
Added fillarea support to configurator
Nov 21, 2014
1d38bd3
Tweaked render hierarchy of UI
Nov 24, 2014
b1a6573
Fixed render-layer stuff for UI
Nov 25, 2014
a0793e7
Disabled handle resize functionality
Dec 1, 2014
71bec17
Removed debug print statement from manager.py
Dec 1, 2014
bb7fd62
Improved the detach function
Dec 1, 2014
ba1e24d
Added 'insert' and 'remove' vertex capabilities.
Dec 1, 2014
08d65e6
Fillareas now draggable when editing
Dec 2, 2014
a211855
Fixed a merge issue; logo was moved out of vtk backend
Dec 8, 2014
079db68
Added a contextual toolbar to fillarea
Dec 8, 2014
be28e77
Refactor of click/drag logic
Dec 12, 2014
a7bcef2
Added initial support for line editor
Dec 15, 2014
5b62075
Removed print statements, made line click detection work
Dec 18, 2014
6641de6
Added a color picker, integrated into fillarea editor
Dec 18, 2014
567334e
Integrated color picker with line editor, removed print
Dec 18, 2014
ebd6eaf
Added right click support to clickable
Dec 18, 2014
f217290
Made line editor draggable
Dec 18, 2014
7686671
Created the dataeditor, a subclass of boxeditor
Dec 19, 2014
3315207
Whitespace
Dec 19, 2014
8083425
Deleted a print
Dec 19, 2014
251a1aa
Removed super annoying flickering
Dec 22, 2014
695ce5b
Improved drag UX
Dec 22, 2014
b4fd2da
Made double click disable box editor
Jan 5, 2015
accf0a8
Fixed a bug where dragging wouldn't stop
Jan 6, 2015
e267065
Labels were not being detached on toolbar detach
Jan 7, 2015
649cdd7
Fixed a rerender bug
Jan 7, 2015
8526b5e
Updating labels to be less junky
Jan 7, 2015
202164b
Updating labels to be less junky
Jan 7, 2015
e0eadf0
Added legend editor
Jan 7, 2015
25dabd0
Fixed an issue with double clicking near the edge
Jan 7, 2015
035658f
Initial marker editor commit
Jan 8, 2015
8494608
Fixed bug with colorpicker close, added to marker
Jan 8, 2015
5d1031e
Fixed segfault on closing picker
Jan 8, 2015
7ba404b
Added size adjustment
Jan 8, 2015
d7e5069
Fix set_state's label placement
Jan 12, 2015
a68ea76
Add marker type change to toolbar
Jan 12, 2015
cd6d346
Added delete function to hide empty objects
Jan 12, 2015
d38eaee
Deletes self when no markers are present, rather than throwing errors
Jan 12, 2015
1213fef
Fillarea deletes self when there's nothing left
Jan 12, 2015
1d75df4
Moved deactivate call for marker to delete
Jan 12, 2015
4fa3a09
Removed deactivate() proxy in marker to match style of other editors
Jan 12, 2015
cbcc7be
Added an editable textbox widget
Jan 13, 2015
0d20dd2
Now detects where the text was clicked, and sets cursor there.
Jan 13, 2015
886708f
Moved textbox to own section, added cursor
Jan 13, 2015
1942e50
Fixes broken button.detach()
Jan 14, 2015
c3aa6ef
Cursor disappears when editing ends
Jan 14, 2015
d2c700c
Added Textbox to init imports
Jan 15, 2015
0d6a7f9
Added textproperty option, and call place on show()
Jan 15, 2015
0b50e15
Added textproperty option
Jan 15, 2015
b1ce1cd
Added text editor, and added it to configurator
Jan 15, 2015
be31be0
Refactored inside_text function
Jan 15, 2015
8b90fb4
Added action handling to textbox
Jan 15, 2015
5cd6479
Made text editable and save properly
Jan 15, 2015
da9da6d
Removed some printing
Jan 15, 2015
8202db8
Fixes bug where it tried to detach None
Jan 15, 2015
38eda01
Double clicking will add a new textbox
Jan 15, 2015
df61985
Widgets now pass the super.__init__ chain properly
Jan 16, 2015
b8aadf0
Labels can be dragged
Jan 16, 2015
567cf9f
Height of text can be changed via toolbar
Jan 16, 2015
99faa5c
Renamed color_picker to colorpicker, updated references
Jan 16, 2015
ef713e7
Added color picker to text editor
Jan 16, 2015
fd4553d
Fixed bug where cursor was placed when not editing
Jan 16, 2015
1c57301
Made label objects not allocate an extra textproperty
Jan 16, 2015
61e2da4
Added on_editing_end callback to textbox
Jan 16, 2015
adf74ed
Made alignments configurable, now respects alignment in bounds checks
Jan 16, 2015
cfaa3db
Added angle support to text editor
Jan 16, 2015
b6508bd
Support for clicking on rotated text, because math.
Jan 16, 2015
5237b2e
Added font changing to text editor
Jan 16, 2015
64adb2c
Made images be placed over background color instead of replacing it
Jan 21, 2015
8f63601
Saved an allocation of vtkImageData
Jan 21, 2015
5e82326
Added icons for creation buttons, fill creation button
Jan 21, 2015
4fb795e
Made button alignment effect location
Jan 21, 2015
8c9600d
Placed fill button correctly
Jan 21, 2015
faea531
Added place() functions to all editors
Jan 21, 2015
fc4b435
Calls place() on target editor when resizing
Jan 21, 2015
20c4da8
Made button alignment hug edges of window
Jan 22, 2015
99d97e5
'fix' bug where row isn't detectable
Jan 22, 2015
2e1d7dc
Fixes text alignment issues with movement
Jan 22, 2015
5b127e9
Added text creator
Jan 22, 2015
4dd6509
Fixed button alignment placment
Jan 22, 2015
a9b750d
Move location of text button 5px left
Jan 22, 2015
da0b5c9
Adds line creator
Jan 22, 2015
db41b76
Saves on type change now
Jan 22, 2015
8ea77e6
Adds marker creator
Jan 22, 2015
6771054
Fixed icons to not cause libpng errors
Jan 22, 2015
9ab9121
Made configurator choose highest priority item in DP to click
Jan 23, 2015
14f6b76
Added projection changing to data editor
Jan 23, 2015
5cbbafb
Added label editor, little buggy right now
Jan 27, 2015
527cb29
Lag on dragging labels fixed
Jan 28, 2015
2a4249e
Fixed bug where every other update eliminated cached array strings
Jan 28, 2015
df1b015
Made only displays from the current canvas be stored in configurator
Jan 28, 2015
ac51492
Made editing happen on single click instead of double
Jan 28, 2015
d8f381b
Forgot text editor for is_object
Jan 28, 2015
6e084ac
Activating a slider from the toolbar hides other sliders
Jan 28, 2015
27325d4
Mouseover gives hand cursor
Feb 2, 2015
3a0567c
Increase click size, add width slider
Feb 2, 2015
0ba74a5
Fixed issues with double click line
Feb 2, 2015
5c2ce1e
Fixed fillarea click detector
Feb 2, 2015
569d4cf
Made handles render on placement
Feb 2, 2015
b6de350
Removed now-unnecessary rerenders while dragging box
Feb 2, 2015
33c57cc
Fixed text dragging, added point for label dragging
Feb 2, 2015
52ac25c
Changed configurator to use release to determine what action to take
Feb 3, 2015
8683c6d
Made rotation and size adjustments more fluid
Feb 3, 2015
6e08d71
Made configurator responsible for deactivating on clicks outside of e…
Feb 3, 2015
c3b6cf9
Made handles batch-render, got rid of unnecessary renders
Feb 4, 2015
1cec478
Added text attr editing to label editor
Feb 5, 2015
3b0bd9d
Added keyable behavior, priority editor, implemented in all editors
Feb 6, 2015
0fd5a57
Forgot the len
Feb 6, 2015
f4e6af4
Made returned values from the update callback change slider value
Feb 6, 2015
1124dcd
Made toolbar place self on show
Feb 6, 2015
b1487d3
Added configure toolbar, background color changing
Feb 6, 2015
bb6867d
Added logo toggle button to config toolbar
Feb 9, 2015
6c7103a
Made box derivatives set changed in save()
Feb 9, 2015
7deff72
Fixed double update on colormap change
Feb 9, 2015
f2fb35d
Fix delete bug for text
Feb 10, 2015
c2345d3
Added toolbar to configurator.place
Feb 10, 2015
bf6c815
Adds contrasting background color to textboxes while editing
Feb 10, 2015
1b1170c
Adds font specification to buttons
Feb 11, 2015
ce4c52c
Changes font button to font menu
Feb 11, 2015
204aa57
Makes the text editor also use font menu
Feb 11, 2015
274bfe2
Removed Fill/Line/Box editing for the interim
Feb 11, 2015
fbb37b4
Changed marker and text to use alt + click instead of double click
Feb 11, 2015
141cb5f
UI removes itself before outputting results
Feb 11, 2015
b42584a
Adds group editor, shift selection/deselection
Feb 11, 2015
e01691a
GroupEditor will multiplex mouse and keyboard events
Feb 12, 2015
b67f481
Fixed annoying initial flash of rerendering
Feb 12, 2015
bd9d3a0
Added direct actor access to label and point
Feb 12, 2015
eb63af6
Fixed annoying flashing
Feb 12, 2015
e21dd4d
Made orientation happen in the TextProperty instead of the TextActor
Feb 12, 2015
8b1c7ae
Made all label attributes map directly to the actor
Feb 12, 2015
a900aec
Refactored some handle internals
Feb 12, 2015
c040170
All labels store their actors now
Feb 13, 2015
7910e4d
Made label editor support all labels
Feb 13, 2015
beeaabd
Added support for id/dataname
Feb 13, 2015
ad12579
Removed some unused code
Feb 13, 2015
e71d3fa
Switched secondaries over to using secondary plotting methods
Feb 13, 2015
584daec
Switched text editor over to using actors
Feb 13, 2015
2d55ffd
Template is swapped out
chaosphere2112 Feb 17, 2015
86ddbb0
Save and reset template implemented
chaosphere2112 Feb 17, 2015
85e53eb
Converted markers to using actors
Feb 18, 2015
010c34d
Made all marker attributes work off actors
chaosphere2112 Feb 19, 2015
82d3c2d
Made text actor get updated text when editing is over
Feb 19, 2015
76016f1
Made slider autoconvert min max and val to floats
Feb 19, 2015
40446e5
Added on_open to toolbar widget
Feb 19, 2015
127a096
Added animation slider
Feb 19, 2015
1e7a513
Added get_text all the way down the toolbar stack
Feb 19, 2015
efcdf9f
Group editor now has toolbar support for text and labels
Feb 19, 2015
08b549f
Added marker toolbar to group editor
chaosphere2112 Feb 20, 2015
ee41658
Added on_drag for live dragging updates to Label widget
chaosphere2112 Feb 20, 2015
4de8b61
Made it so we don't create a new vtkPoints for markers
chaosphere2112 Feb 20, 2015
4e1c70d
Group toolbar switches buttons based on what's selected
chaosphere2112 Feb 20, 2015
5faf44f
Migrated handle.dragged to use dx/dy
chaosphere2112 Feb 20, 2015
7257712
Fixed up group dragging
chaosphere2112 Feb 20, 2015
39a5ef4
Removed the handle from point editors
chaosphere2112 Feb 20, 2015
2ffefae
Changed over to using drag methods for text
chaosphere2112 Feb 20, 2015
509fcdd
Labels should properly update while dragged
chaosphere2112 Feb 20, 2015
fc1e797
Removed unnecessary rerender
chaosphere2112 Feb 20, 2015
7df8543
Text actors show up where they're supposed to
chaosphere2112 Feb 20, 2015
71f99c2
Fixed text layout issues
chaosphere2112 Feb 20, 2015
6840ffb
Fixed issue where animation slider was added repeatedly
chaosphere2112 Feb 20, 2015
4701fe7
Text editor angle is cleaned up
chaosphere2112 Feb 20, 2015
317cfae
Fixed delete for all editors
chaosphere2112 Feb 20, 2015
e795e72
Text gets set properly, stubbed in priority logic
chaosphere2112 Feb 20, 2015
95a8cd5
Whoops, copy paste error
chaosphere2112 Feb 21, 2015
487276b
Fix for non-darwin platforms; forgot to OS gate some mac specific logic
Feb 23, 2015
5be3786
Toolbar label mentions which member is selected for labeleditor
Feb 23, 2015
2ceb483
UI will only show up once x.interact() is called
Feb 23, 2015
64ca206
Toolbars in text and label editors will automatically show as is appr…
Feb 23, 2015
e397085
fixes hover cursor change, added in_bounds method to buttons
Feb 23, 2015
c0cc77b
Fix for colorpicker segfault
Feb 24, 2015
6111a38
Colorpicker should finally close on ubuntu
Feb 25, 2015
89145de
Removed unnecessary import of 'inspect'
Feb 25, 2015
bdcf6ec
Toolbar shows up now
Feb 25, 2015
ad04542
Fixed cursor changing, use control to drop new text/marker, has new c…
Feb 25, 2015
e2c456b
Added tooltips to buttons and marker/text editor
Feb 25, 2015
abe6021
Fix poorly done rebase merge
Feb 25, 2015
9dfd28d
Adds sanity check for window size fetching in behavior
Feb 26, 2015
260a645
Added class docstrings for the editors
Feb 26, 2015
5dd19c0
Removed commented orientation code from genTextActor
Feb 26, 2015
55b8f20
Made manager get stuck on absolute top layer of render stack
Feb 26, 2015
8b5bb90
Extracted out hideGUI and showGUI
Feb 26, 2015
5878b59
Fixed bug where configurator would crash bg=1 plots
Feb 26, 2015
e94d5af
Merge branch 'master' into vcs2d_interaction
Feb 27, 2015
da1ee83
Passes test_vcs_interact_no_open.py
Feb 27, 2015
eb49dd9
Forgot to halve the marker scale when I refactored the vcs2vtk marker…
Feb 27, 2015
4520ac5
Properly initialize UI in UVCDAT GUI
Feb 27, 2015
5a86b86
Changed everything to batch rendering, save a bunch of render cycles
Feb 27, 2015
353480a
Tooltips will only show if button is visible
chaosphere2112 Mar 1, 2015
bc0d27a
Weird double indent fix
chaosphere2112 Mar 1, 2015
03e5977
Improved animation controls
chaosphere2112 Mar 1, 2015
3cc7878
Merge remote-tracking branch 'sam/vcs2d_interaction' into vcs2d_inter…
aashish24 Mar 2, 2015
8071318
Fixed whitespace issues and file permissions
aashish24 Mar 2, 2015
ee50b40
Fixed plot not found
aashish24 Mar 2, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Expand Up @@ -60,4 +60,3 @@ sources/
version
/.hooks-config
/.idea

54 changes: 27 additions & 27 deletions Packages/DV3D/Application.py
Expand Up @@ -17,74 +17,74 @@ def getPlotFromVar( var, **args ):
return plot

class DV3DApp:

def __init__( self, canvas, cell_coordinates=None, **args ):
self.plot = None
self.canvas = canvas
self.cell_coordinates = cell_coordinates


# def init(self, **args ):
# var= None
# init_args = args.get( 'init', None )
# if init_args:
# ( grid_file, data_file, interface, varnames, grd_coords, var_proc_op, ROI, subSpace ) = init_args
# df = cdms2.open( data_file )
# df = cdms2.open( data_file )
# var = df[ varnames[0] ]
# else:
# print>>sys.stderr, "Error, this method requires an init_args argument"
#
#
# if id(var) <> id(None):
# self.plot = getPlotFromVar( var, **args )
# self.plot.init( **args )
# self.plot.init( **args )

def update( self, tmpl ):
if self.plot <> None:
self.plot.updateModule()
self.plot.updateModule()

def onClosing(self, cell ):
if self.plot <> None:
self.plot.onClosing( cell )

def applyAction( self, action ):
if self.plot <> None:
self.plot.applyAction( action )

def setAnimationStepper( self, stepper ):
self.plot.setAnimationStepper( stepper )

def gminit(self, var1, var2, **args ):
grid_metadata = var1.getGrid()
plot_type = args.get( 'plot_type', PlotType.getPointsLayout( grid_metadata ) )
args[ 'cell_coordinates' ] = self.cell_coordinates

if plot_type == PlotType.Grid:
if self.plot == None:
self.plot = RectGridPlot(**args)
self.plot = RectGridPlot(**args)
self.plot.gminit( var1, var2, **args )
self.plot.ParameterValueChanged.connect(self.canvas.processParameterChange)
else:
self.plot.updateModule()
self.plot.updateModule()
else:
if self.plot == None:
self.plot = CPCPlot(**args)
self.plot.gminit( var1, var2, **args )
self.plot = CPCPlot(**args)
self.plot.gminit( var1, var2, **args )
self.plot.ParameterValueChanged.connect(self.canvas.processParameterChange)
else:
self.plot.updateModule()
self.plot.updateModule()



def getRenderWindow(self):
return self.plot.renderWindow
# def onKeyEvent( self, eventArgs ):
# return self.plot.onKeyEvent( eventArgs )

def terminate( self ):
return self.plot.terminate( )
def start(self):
iren = self.plot.renderWindow.GetInteractor()
return self.plot.renderWindow

# def onKeyEvent( self, eventArgs ):
# return self.plot.onKeyEvent( eventArgs )

def terminate( self ):
return self.plot.terminate( )

def start(self):
iren = self.plot.renderWindow.GetInteractor()
iren.Start()

def hideWidgets(self):
Expand Down