Miha Stajdohar avatar Miha Stajdohar committed a0bf3c8

Fixed signal bugs and button images.

Comments (0)

Files changed (8)

_network/widgets/OWNxExplorer.py

 from operator import itemgetter
 
 try:
+    raise ImportError
     from OWNxCanvasQt import *
 
     class OWNxExplorer(OWWidget):

_network/widgets/OWNxExplorerQwt.py

+import os
+
 import OWToolbars
 import OWColorPalette
 import orngMDS
 from OWWidget import *
 from OWNxCanvas import *
 
-_dir = os.path.dirname(__file__) + "/../icons/"
-dlg_mark2sel = _dir + "Dlg_Mark2Sel.png"
-dlg_sel2mark = _dir + "Dlg_Sel2Mark.png"
-dlg_selIsmark = _dir + "Dlg_SelisMark.png"
-dlg_selected = _dir + "Dlg_HideSelection.png"
-dlg_unselected = _dir + "Dlg_UnselectedNodes.png"
-dlg_showall = _dir + "Dlg_clear.png"
+from Orange import core, data, network
+
+_dir = os.path.join(os.path.dirname(__file__), 'icons')
+dlg_mark2sel = os.path.join(_dir, "Dlg_Mark2Sel.png")
+dlg_sel2mark = os.path.join(_dir, "Dlg_Sel2Mark.png")
+dlg_selIsmark = os.path.join(_dir, "Dlg_SelisMark.png")
+dlg_selected = os.path.join(_dir, "Dlg_HideSelection.png")
+dlg_unselected = os.path.join(_dir, "Dlg_UnselectedNodes.png")
+dlg_showall = os.path.join(_dir, "Dlg_clear.png")
 
 class OWNxExplorerQwt(OWWidget):
     settingsList = ["autoSendSelection", "spinExplicit", "spinPercentage",
 
         OWWidget.__init__(self, parent, signalManager, name)
         #self.contextHandlers = {"": DomainContextHandler("", [ContextField("attributes", selected="markerAttributes"), ContextField("attributes", selected="tooltipAttributes"), "color"])}
-        self.inputs = [("Network", Orange.network.Graph, self.set_graph, Default),
-                       ("Nx View", Orange.network.NxView, self.set_network_view),
-                       ("Items", Orange.data.Table, self.setItems),
-                       ("Marked Items", Orange.data.Table, self.markItems),
-                       ("Item Subset", Orange.data.Table, self.setExampleSubset),
-                       ("Distances", Orange.core.SymMatrix, self.set_items_distance_matrix)]
+        self.inputs = [("Network", network.Graph, self.set_graph, Default),
+                       ("Items", data.Table, self.set_items),
+                       ("Item Subset", data.Table, self.mark_items),
+                       ("Distances", core.SymMatrix, self.set_items_distance_matrix),
+                       ("Net View", network.NxView, self.set_network_view)]
 
-        self.outputs = [("Selected Network", Orange.network.Graph),
-                        ("Distance Matrix", Orange.core.SymMatrix),
-                        ("Selected Items", Orange.data.Table),
-                        ("Other Items", Orange.data.Table),
-                        ("Marked Items", Orange.data.Table),
+        self.outputs = [("Selected Network", network.Graph),
+                        ("Distance Matrix", core.SymMatrix),
+                        ("Marked Items", data.Table),
+                        ("Selected Items", data.Table),
+                        ("Other Items", data.Table),
                         ("Features", AttributeList)]
 
         self.markerAttributes = []
             for v in vertices:
                 self.graph_base.items()[v][att] = str(self.editValue)
 
-        self.setItems(self.graph_base.items())
+        self.set_items(self.graph_base.items())
 
     def drawForce(self):
         if self.btnForce.isChecked() and self.graph is not None:
             self.progressBarSet(i * 100.0 / len(components))
 
         self.lastNameComponentAttribute = self.nameComponentCombo.currentText()
-        self.setItems(Orange.data.Table([self.graph_base.items(), keyword_table]))
+        self.set_items(Orange.data.Table([self.graph_base.items(), keyword_table]))
         self.progressBarFinished()
 
     def nameComponents_old(self):
         self.lastNameComponentAttribute = self.nameComponentCombo.currentText()
         #print "self.lastNameComponentAttribute:", self.lastNameComponentAttribute
         items = Orange.data.Table([self.graph_base.items(), keyword_table])
-        self.setItems(items)
+        self.set_items(items)
 
         #for item in items:
         #    print item
         self.networkCanvas.callbackSelectVertex = self._network_view.nodes_selected
         self.set_graph(self.graph_base)
 
-    def setItems(self, items=None):
+    def set_items(self, items=None):
         self.error('')
 
         if self.graph is None or items is None:
             self.networkCanvas.set_marked_nodes([])
             self.networkCanvas.replot()
 
-    def markItems(self, items):
+    def mark_items(self, items):
         self.markInputCombo.clear()
         self.markInputRadioButton.setEnabled(False)
         self.markInputItems = items
Add a comment to this file

_network/widgets/icons/Dlg_HideSelection.png

Added
New image
Add a comment to this file

_network/widgets/icons/Dlg_Mark2Sel.png

Added
New image
Add a comment to this file

_network/widgets/icons/Dlg_Sel2Mark.png

Added
New image
Add a comment to this file

_network/widgets/icons/Dlg_SelisMark.png

Added
New image
Add a comment to this file

_network/widgets/icons/Dlg_UnselectedNodes.png

Added
New image
Add a comment to this file

_network/widgets/icons/Dlg_clear.png

Added
New image
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.