Changeset 3859:24277aaeec73 in orange


Ignore:
Timestamp:
05/14/08 13:43:42 (6 years ago)
Author:
miha <miha.stajdohar@…>
Branch:
default
Convert:
751a77804e31d31194d46de2db32d496c7f2aef8
Message:
 
Location:
orange/OrangeWidgets/Prototypes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeWidgets/Prototypes/OWNetwork.py

    r3855 r3859  
    2222dlg_selected = dir + "Dlg_SelectedNodes.png" 
    2323dlg_unselected = dir + "Dlg_UnselectedNodes.png" 
     24dlg_showall = dir + "Dlg_clear.png" 
    2425 
    2526class OWNetwork(OWWidget): 
     
    142143#        self.ctrlMarkProportion = OWGUI.spin(OWGUI.indentedBox(ribg), self, "markProportion", 0, 100, 1, label="Percentage" + ": ", callback=self.setHubs) 
    143144         
    144         ib = OWGUI.widgetBox(self.markTab, "Selection", orientation="horizontal", addSpace=True) 
     145        T = OWToolbars.NavigateSelectToolbar 
     146        self.zoomSelectToolbar = T(self, self.hcontroArea, self.graph, self.autoSendSelection, 
     147                                  buttons = (T.IconZoom, T.IconZoomExtent, T.IconZoomSelection, ("", "", "", None, None, 0, "navigate"), T.IconPan,  
     148                                             ("Move selection", "buttonMoveSelection", "activateMoveSelection", QIcon(OWToolbars.dlg_select), Qt.ArrowCursor, 1, "select"), 
     149                                             T.IconRectangle, T.IconPolygon, ("", "", "", None, None, 0, "select"), T.IconSendSelection)) 
     150         
     151        ib = OWGUI.widgetBox(self.zoomSelectToolbar, "Inv", orientation="vertical") 
    145152        btnM2S = OWGUI.button(ib, self, "", callback = self.markedToSelection) 
    146153        btnM2S.setIcon(QIcon(dlg_mark2sel)) 
     
    153160        btnSIM.setToolTip("Set Selection to Marked") 
    154161         
    155         self.hideBox = OWGUI.widgetBox(self.markTab, "Hide vertices", orientation="horizontal", addSpace=False) 
     162        self.hideBox = OWGUI.widgetBox(self.zoomSelectToolbar, "Hide", orientation="vertical") 
    156163        btnSEL = OWGUI.button(self.hideBox, self, "", callback=self.hideSelected) 
    157164        btnSEL.setIcon(QIcon(dlg_selected)) 
    158         btnSEL.setToolTip("Selected") 
     165        btnSEL.setToolTip("Hide selected") 
    159166        btnUN = OWGUI.button(self.hideBox, self, "", callback=self.hideAllButSelected) 
    160167        btnUN.setIcon(QIcon(dlg_unselected)) 
    161         btnUN.setToolTip("Unselected") 
    162         OWGUI.button(self.hideBox, self, "Show", callback=self.showAllNodes) 
    163                  
    164         T = OWToolbars.NavigateSelectToolbar 
    165         self.zoomSelectToolbar = T(self, self.hcontroArea, self.graph, self.autoSendSelection, 
    166                                   buttons = (T.IconZoom, T.IconZoomExtent, T.IconZoomSelection, ("", "", "", None, None, 0, "navigate"), T.IconPan,  
    167                                              ("Move selection", "buttonMoveSelection", "activateMoveSelection", QIcon(OWToolbars.dlg_select), Qt.ArrowCursor, 1, "select"), 
    168                                              T.IconRectangle, T.IconPolygon, ("", "", "", None, None, 0, "select"), T.IconSendSelection)) 
    169  
    170         #OWGUI.button(self.controlArea, self, "test replot", callback=self.testRefresh) 
     168        btnUN.setToolTip("Hide unselected") 
     169        btnSW = OWGUI.button(self.hideBox, self, "", callback=self.showAllNodes) 
     170        btnSW.setIcon(QIcon(dlg_showall)) 
     171        btnSW.setToolTip("Show all nodes") 
     172         
     173        OWGUI.rubber(self.zoomSelectToolbar) 
    171174         
    172175        ib = OWGUI.widgetBox(self.infoTab, "General") 
  • orange/OrangeWidgets/Prototypes/OWNetworkCanvas.py

    r3849 r3859  
    739739      self.edges = [] 
    740740       
     741      self.minEdgeWeight = sys.maxint 
     742      self.maxEdgeWeight = 0 
     743       
    741744      for (i, j) in visualizer.graph.getEdges(): 
    742745          self.edges_old[self.nEdges] = (None, i, j) 
Note: See TracChangeset for help on using the changeset viewer.