Changeset 5276


Ignore:
Timestamp:
Apr 18, 2015 12:44:02 AM (6 years ago)
Author:
ldelgass
Message:

remove unused methods in flowvis viewer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/flowvisviewer.tcl

    r5274 r5276  
    66# It connects to the Flowvis server running on a rendering farm, transmits
    77# data, and displays the results.
    8 #
    98# ======================================================================
    109#  AUTHOR:  Michael McLennan, Purdue University
     
    7069    public method scale {args}
    7170    public method updateTransferFunctions {}
    72 
    73     # soon to be removed.
    74     private method Flow {option args}
    75     private method Play {}
    76     private method Pause {}
    7771
    7872    # The following methods are only used by this class.
     
    460454        "Set duration of flow (format is min:sec)"
    461455
    462 
    463456    itk_component add durationlabel {
    464457        label $itk_component(flowcontrols).durationl \
     
    12471240    }
    12481241
    1249 
    12501242    # sync the state of slicers
    12511243    set vols [CurrentVolumeIds -cutplanes]
     
    14461438        $itk_component(3dview) configure -cursor ""
    14471439    }
    1448 }
    1449 
    1450 
    1451 # ----------------------------------------------------------------------
    1452 # USAGE: Flow movie record|stop|play ?on|off|toggle?
    1453 #
    1454 # Called when the user clicks on the record, stop or play buttons
    1455 # for flow visualization.
    1456 # ----------------------------------------------------------------------
    1457 itcl::body Rappture::FlowvisViewer::Flow {option args} {
    1458     switch -- $option {
    1459         movie {
    1460             if {[llength $args] < 1 || [llength $args] > 2} {
    1461                 error "wrong # args: should be \"Flow movie record|stop|play ?on|off|toggle?\""
    1462             }
    1463             set action [lindex $args 0]
    1464             set op [lindex $args 1]
    1465             if {$op == ""} { set op "on" }
    1466 
    1467             set current [State $action]
    1468             if {$op == "toggle"} {
    1469                 if {$current == "on"} {
    1470                     set op "off"
    1471                 } else {
    1472                     set op "on"
    1473                 }
    1474             }
    1475             set cmds ""
    1476             switch -- $action {
    1477                 record {
    1478                     if { [$itk_component(rewind) cget -relief] != "sunken" } {
    1479                         $itk_component(rewind) configure -relief sunken
    1480                         $itk_component(stop) configure -relief raised
    1481                         $itk_component(play) configure -relief raised
    1482                         set inner $itk_component(settingsFrame)
    1483                         set frames [$inner.framecnt value]
    1484                         set _settings(nsteps) $frames
    1485                         set cmds "flow capture $frames"
    1486                         SendCmd $cmds
    1487                     }
    1488                 }
    1489                 stop {
    1490                     if { [$itk_component(stop) cget -relief] != "sunken" } {
    1491                         $itk_component(rewind) configure -relief raised
    1492                         $itk_component(stop) configure -relief sunken
    1493                         $itk_component(play) configure -relief raised
    1494                         _pause
    1495                         set cmds "flow reset"
    1496                         SendCmd $cmds
    1497                     }
    1498                 }
    1499                 play {
    1500                     if { [$itk_component(play) cget -relief] != "sunken" } {
    1501                         $itk_component(rewind) configure -relief raised
    1502                         $itk_component(stop) configure -relief raised
    1503                         $itk_component(play) configure \
    1504                             -image [Rappture::icon flow-pause] \
    1505                             -relief sunken
    1506                         bind $itk_component(play) <ButtonPress> \
    1507                             [itcl::code $this _pause]
    1508                         flow next
    1509                     }
    1510                 }
    1511                 default {
    1512                     error "bad option \"$option\": should be one of record|stop|play"
    1513                 }
    1514 
    1515             }
    1516         }
    1517         default {
    1518             error "bad option \"$option\": should be movie"
    1519         }
    1520     }
    1521 }
    1522 
    1523 # ----------------------------------------------------------------------
    1524 # USAGE: Play
    1525 #
    1526 # ----------------------------------------------------------------------
    1527 itcl::body Rappture::FlowvisViewer::Play {} {
    1528     SendCmd "flow next"
    1529     set delay [expr {int(ceil(pow($_settings(speed)/10.0+2,2.0)*15))}]
    1530     $_dispatcher event -after $delay !play
    1531 }
    1532 
    1533 # ----------------------------------------------------------------------
    1534 # USAGE: Pause
    1535 #
    1536 # Invoked when the user hits the "pause" button to stop playing the
    1537 # current sequence of frames as a movie.
    1538 # ----------------------------------------------------------------------
    1539 itcl::body Rappture::FlowvisViewer::Pause {} {
    1540     $_dispatcher cancel !play
    1541 
    1542     # Toggle the button to "play" mode
    1543     $itk_component(play) configure \
    1544         -image [Rappture::icon flow-start] \
    1545         -relief raised
    1546     bind $itk_component(play) <ButtonPress> \
    1547         [itcl::code $this Flow movie play toggle]
    15481440}
    15491441
     
    26772569}
    26782570
    2679 
    26802571#
    26812572# flow --
     
    28212712}
    28222713
    2823 itcl::body Rappture::FlowvisViewer::GetPngImage  { widget width height } {
     2714itcl::body Rappture::FlowvisViewer::GetPngImage { widget width height } {
    28242715    set token "print[incr _nextToken]"
    28252716    set var ::Rappture::FlowvisViewer::_hardcopy($this-$token)
Note: See TracChangeset for help on using the changeset viewer.