Ignore:
Timestamp:
01/26/12 16:13:31 (2 years ago)
Author:
mstajdohar
Branch:
default
Message:

Bug fixes.

File:
1 edited

Legend:

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

    r9546 r9577  
    1919 
    2020from orngScaleLinProjData import * 
    21 from OWNxExplorerQt import * 
     21from OWNxExplorer import * 
    2222from OWkNNOptimization import OWVizRank 
    2323from OWNxHist import * 
     
    3333              ("RADVIZ",            "Visualize/icons/Radviz"), 
    3434              ("POLYVIZ",           "Visualize/icons/Polyviz"), 
     35              ("NaiveLearner",      "Classify/icons/NaiveBayes"), 
    3536              ("BAYES",             "Classify/icons/NaiveBayes"), 
     37              ("kNNLearner",        "Classify/icons/kNearestNeighbours"), 
    3638              ("KNN",               "Classify/icons/kNearestNeighbours"), 
    3739              ("SVM",               "Classify/icons/BasicSVM")] 
     
    4648    for model, path in ICON_PATHS: 
    4749        MODEL_IMAGES[model + size] = "%s%s_%s.png" % (dir, path, size) 
    48  
    49 dir = os.path.dirname(__file__) + "/../icons/" 
    50 dlg_mark2sel   = dir + "Dlg_Mark2Sel.png" 
    51 dlg_sel2mark   = dir + "Dlg_Sel2Mark.png" 
    52 dlg_selIsmark  = dir + "Dlg_SelisMark.png" 
    53 dlg_selected   = dir + "Dlg_SelectedNodes.png" 
    54 dlg_unselected = dir + "Dlg_UnselectedNodes.png" 
    55 dlg_showall    = dir + "Dlg_clear.png" 
    5650 
    5751class ModelItem(orangeqt.ModelItem): 
     
    252246            v.set_image(PIXMAP_CACHE[fn]) 
    253247 
    254 class OWModelMapQt(OWNxExplorerQt, OWNxHist): 
    255     settingsList = ["vertexSize", "lastSizeAttribute", "lastColorAttribute",  
    256                     "maxVertexSize", "minVertexSize", "tabIndex",  
    257                     "colorSettings", "selectedSchemaIndex", "iterations",  
    258                     "radius", "vizAccurancy", "vizAttributes",  
    259                     "autoSendSelection", "spinExplicit", "spinPercentage", 
    260                     "maxLinkSize", "renderAntialiased", "labelsOnMarkedOnly", 
    261                     "invertSize", "optMethod", "lastVertexSizeColumn",  
    262                     "lastColorColumn", "lastNameComponentAttribute",  
    263                     "lastLabelColumns", "lastTooltipColumns", "showWeights", 
    264                     "showIndexes",  "showEdgeLabels", "edgeColorSettings",  
    265                     "selectedEdgeSchemaIndex", "showMissingValues", "fontSize",  
    266                     "mdsTorgerson", "mdsAvgLinkage", "mdsSteps", "mdsRefresh",  
    267                     "mdsStressDelta", "organism","showTextMiningInfo",  
    268                     "toolbarSelection", "minComponentEdgeWidth",  
    269                     "maxComponentEdgeWidth", "mdsFromCurrentPos"] 
     248class OWModelMapQt(OWNxExplorer, OWNxHist): 
     249#    settingsList = ["vertexSize", "lastSizeAttribute", "lastColorAttribute",  
     250#                    "maxVertexSize", "minVertexSize", "tabIndex",  
     251#                    "colorSettings", "selectedSchemaIndex", "iterations",  
     252#                    "radius", "vizAccurancy", "vizAttributes",  
     253#                    "autoSendSelection", "spinExplicit", "spinPercentage", 
     254#                    "maxLinkSize", "renderAntialiased", "labelsOnMarkedOnly", 
     255#                    "invertSize", "optMethod", "lastVertexSizeColumn",  
     256#                    "lastColorColumn", "lastNameComponentAttribute",  
     257#                    "lastLabelColumns", "lastTooltipColumns", "showWeights", 
     258#                    "showIndexes",  "showEdgeLabels", "edgeColorSettings",  
     259#                    "selectedEdgeSchemaIndex", "showMissingValues", "fontSize",  
     260#                    "mdsTorgerson", "mdsAvgLinkage", "mdsSteps", "mdsRefresh",  
     261#                    "mdsStressDelta", "organism","showTextMiningInfo",  
     262#                    "toolbarSelection", "minComponentEdgeWidth",  
     263#                    "maxComponentEdgeWidth", "mdsFromCurrentPos"] 
     264#     
     265    settingsList = ["autoSendSelection", "spinExplicit", "spinPercentage", 
     266        "maxLinkSize", "minVertexSize", "maxVertexSize", "networkCanvas.animate_plot", 
     267        "networkCanvas.animate_points", "networkCanvas.antialias_plot",  
     268        "networkCanvas.antialias_points", "networkCanvas.antialias_lines",  
     269        "networkCanvas.auto_adjust_performance", "invertSize", "optMethod",  
     270        "lastVertexSizeColumn", "lastColorColumn", "networkCanvas.show_indices", "networkCanvas.show_weights", 
     271        "lastNameComponentAttribute", "lastLabelColumns", "lastTooltipColumns", 
     272        "showWeights", "showEdgeLabels", "colorSettings",  
     273        "selectedSchemaIndex", "edgeColorSettings", "selectedEdgeSchemaIndex", 
     274        "showMissingValues", "fontSize", "mdsTorgerson", "mdsAvgLinkage", 
     275        "mdsSteps", "mdsRefresh", "mdsStressDelta", "organism","showTextMiningInfo",  
     276        "toolbarSelection", "minComponentEdgeWidth", "maxComponentEdgeWidth", 
     277        "mdsFromCurrentPos", "labelsOnMarkedOnly", "tabIndex",  
     278        "networkCanvas.trim_label_words", "opt_from_curr", "networkCanvas.explore_distances", 
     279        "networkCanvas.show_component_distances", "fontWeight", "networkCanvas.state", 
     280        "networkCanvas.selection_behavior"]  
    270281     
    271282    def __init__(self, parent=None, signalManager=None, name="Model Map"): 
    272         OWNxExplorerQt.__init__(self, parent, signalManager, name,  
     283        OWNxExplorer.__init__(self, parent, signalManager, name,  
    273284                               NetworkCanvas=OWModelMapCanvas) 
    274285         
     
    299310        self.tabs.insertTab(0, self.matrixTab, "Matrix") 
    300311        self.tabs.insertTab(1, self.modelTab, "Model Info") 
    301  
     312        self.tabs.setCurrentIndex(self.tabIndex) 
     313         
    302314        self.networkCanvas.appendToSelection = 0 
    303315        self.networkCanvas.minVertexSize = self.minVertexSize 
     
    329341        self.attrDifferenceBox = OWGUI.listBox(vizPredAcc, self, "attrDifference", "attrDifferenceList", "Attribute difference", selectionMode=QListWidget.NoSelection) 
    330342         
    331         self.attBox.setVisible(0) 
     343        self.attBox.hide() 
    332344        self.visualizeInfo() 
    333345         
     
    336348        self.matrixTab.layout().addStretch(1) 
    337349        self.modelTab.layout().addStretch(1) 
    338         self.setMinimumWidth(900) 
    339         self.controlArea.setMinimumWidth(378) 
    340350         
    341351    def plotAccuracy(self, vertices=None): 
     
    435445         
    436446    def set_node_sizes(self): 
    437         OWNxExplorerQt.set_node_sizes(self) 
     447        OWNxExplorer.set_node_sizes(self) 
    438448        self.networkCanvas.loadIcons() 
    439449        self.networkCanvas.replot() 
Note: See TracChangeset for help on using the changeset viewer.