Changeset 9382:0b2da2bb1d75 in orange


Ignore:
Timestamp:
12/17/11 13:26:30 (2 years ago)
Author:
miha <miha.stajdohar@…>
Branch:
default
Convert:
d553a6ca7c929ac68710f614147d0fabbb414822
Message:

New zoom select toolbar.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeWidgets/Unsupervised/OWNxExplorer.py

    r9371 r9382  
    5151        def __init__(self, parent=None, signalManager=None, name = 'Net Explorer',  
    5252                     NetworkCanvas=OWNxCanvas): 
    53             OWWidget.__init__(self, parent, signalManager, name) 
     53            OWWidget.__init__(self, parent, signalManager, name, noReport=True) 
    5454            #self.contextHandlers = {"": DomainContextHandler("", [ContextField("attributes", selected="markerAttributes"), ContextField("attributes", selected="tooltipAttributes"), "color"])} 
    5555            self.inputs = [("Nx View", Orange.network.NxView, self.set_network_view), 
     
    140140                self.optMethod = 3 
    141141             
    142             self.mainArea.layout().setContentsMargins(0,4,4,4) 
    143             self.controlArea.layout().setContentsMargins(4,4,0,4) 
    144              
    145142            self.networkCanvas.showMissingValues = self.showMissingValues 
    146143            self.mainArea.layout().addWidget(self.networkCanvas) 
     
    148145            self.networkCanvas.maxLinkSize = self.maxLinkSize 
    149146             
    150             self.hcontroArea = OWGUI.widgetBox(self.controlArea, orientation='horizontal') 
    151              
    152             self.tabs = OWGUI.tabWidget(self.hcontroArea) 
     147            self.tabs = OWGUI.tabWidget(self.controlArea) 
    153148             
    154149            self.verticesTab = OWGUI.createTabPage(self.tabs, "Nodes") 
     
    263258            #OWGUI.checkBox(ib, self, 'checkSendMarkedNodes', 'Send marked nodes', callback = self.send_marked_nodes, disabled=0) 
    264259             
     260            self.toolbar = OWGUI.widgetBox(self.controlArea, orientation='horizontal') 
    265261            G = self.networkCanvas.gui 
    266              
    267             self.zoomSelectToolbar = G.zoom_select_toolbar(self.hcontroArea, orientation = Qt.Vertical, 
    268                 buttons =  
    269                     [G.Spacing] * 2 +  
    270                     G.default_zoom_select_buttons +  
    271                     [ 
    272                         G.Spacing, 
    273                         ("buttonM2S", "Add marked to selection", None, None, "marked_to_selected", 'Dlg_Mark2Sel'), 
    274                         ("buttonS2M", "Add selection to marked", None, None, "selected_to_marked", 'Dlg_Sel2Mark'), 
    275                         G.Spacing, 
    276                         #("buttonSEL", "Hide selected", None, None, "hideSelectedVertices", 'Dlg_UnselectedNodes'), 
    277                         #("buttonUN", "Hide unselected", None, None, "hideUnSelectedVertices", 'Dlg_SelectedNodes'), 
    278                         #("buttonSW", "Show all nodes", None, None, "showAllVertices", 'Dlg_clear'), 
    279                     ]) 
     262            self.zoomSelectToolbar = G.zoom_select_toolbar(self.toolbar, nomargin=True, buttons =  
     263                G.default_zoom_select_buttons +  
     264                [ 
     265                    G.Spacing, 
     266                    ("buttonM2S", "Add marked to selection", None, None, "marked_to_selected", 'Dlg_Mark2Sel'), 
     267                    ("buttonS2M", "Add selection to marked", None, None, "selected_to_marked", 'Dlg_Sel2Mark'), 
     268                    #("buttonSEL", "Hide selected", None, None, "hideSelectedVertices", 'Dlg_UnselectedNodes'), 
     269                    #("buttonUN", "Hide unselected", None, None, "hideUnSelectedVertices", 'Dlg_SelectedNodes'), 
     270                    #("buttonSW", "Show all nodes", None, None, "showAllVertices", 'Dlg_clear'), 
     271                ]) 
    280272            self.zoomSelectToolbar.buttons[G.SendSelection].clicked.connect(self.send_data) 
    281273            self.zoomSelectToolbar.buttons[G.SendSelection].hide() 
    282             OWGUI.rubber(self.zoomSelectToolbar) 
     274             
     275            self.reportButton = OWGUI.button(self.toolbar, self, "&Report", self.reportAndFinish, debuggingEnabled=0) 
     276            self.reportButton.setAutoDefault(0) 
    283277             
    284278            ib = OWGUI.widgetBox(self.infoTab, "General") 
Note: See TracChangeset for help on using the changeset viewer.