Commits

Miha Stajdohar committed f2263e6

Yet some more bugs regarding new data model.

Comments (0)

Files changed (2)

_modelmaps/widgets/OWModelEmbedder.py

             self.information("No learning data given.")
             return
         if self.model is None: return
-        if "model" not in self.model.domain: return
-        if "attributes" in self.model.domain:
-            attr = self.model["attributes"].value.split(', ')
 
-        modelType = self.model["model"].value.upper()
+        modelType = self.model.type.upper()
+        attr = self.model.attributes
 
         projWidget = None
         if modelType == "SCATTERPLOT" or modelType == "SCATTTERPLOT":
             self.ow.setData(self.data)
             self.ow.setShownAttributes(attr)
             self.ow.handleNewSignals()
-            xAnchors, yAnchors = self.model["anchors"].value
+            xAnchors, yAnchors = self.model.XAnchors, self.model.YAnchors
             self.ow.updateGraph(None, setAnchors=1, XAnchors=xAnchors, YAnchors=yAnchors)
 
         if modelType == "TREE":
             self.setWidget(OWClassificationTreeGraph.OWClassificationTreeGraph)
-            classifier = self.model["classifier"].value
+            classifier = self.model.classifier
             self.ow.ctree(classifier)
 
         if modelType == "BAYES":
             self.setWidget(OWNomogram.OWNomogram)
-            classifier = self.model["classifier"].value
+            classifier = self.model.classifier
             self.ow.classifier(classifier)
 
         if modelType == "KNN":

_modelmaps/widgets/OWModelMap.py

             v.set_image(PIXMAP_CACHE[fn])
 
 class OWModelMap(OWNxExplorer, OWNxHist):
-#    settingsList = ["vertexSize", "lastSizeAttribute", "lastColorAttribute", 
-#                    "maxVertexSize", "minVertexSize", "tabIndex", 
-#                    "colorSettings", "selectedSchemaIndex", "iterations", 
-#                    "radius", "vizAccurancy", "vizAttributes", 
-#                    "autoSendSelection", "spinExplicit", "spinPercentage",
-#                    "maxLinkSize", "renderAntialiased", "labelsOnMarkedOnly",
-#                    "invertSize", "optMethod", "lastVertexSizeColumn", 
-#                    "lastColorColumn", "lastNameComponentAttribute", 
-#                    "lastLabelColumns", "lastTooltipColumns", "showWeights",
-#                    "showIndexes",  "showEdgeLabels", "edgeColorSettings", 
-#                    "selectedEdgeSchemaIndex", "showMissingValues", "fontSize", 
-#                    "mdsTorgerson", "mdsAvgLinkage", "mdsSteps", "mdsRefresh", 
-#                    "mdsStressDelta", "organism","showTextMiningInfo", 
-#                    "toolbarSelection", "minComponentEdgeWidth", 
-#                    "maxComponentEdgeWidth", "mdsFromCurrentPos"]
-#    
+
     settingsList = ["autoSendSelection", "spinExplicit", "spinPercentage",
         "maxLinkSize", "minVertexSize", "maxVertexSize", "networkCanvas.animate_plot",
         "networkCanvas.animate_points", "networkCanvas.antialias_plot",
         self.autoSendSelection = False
         self.minVertexSize = 16
         self.maxVertexSize = 16
-        self.lastColorAttribute = ""
-        self.lastSizeAttribute = ""
         self.vizAccurancy = False
         self.vizAttributes = False
         self.radius = 100
 
             self.set_node_colors()
 
-    def set_node_colors(self):
-        if self.graph is None:
-            return
-
-        self.networkCanvas.set_node_colors(self.colorCombo.currentText())
-        self.lastColorAttribute = self.colorCombo.currentText()
-        #self.networkCanvas.updateData()
-        #self.networkCanvas.replot()
-
     def sendSignals(self):
         if self.graph is None or self.graph_matrix is None:
             return
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.