Ignore:
Files:
244 added
98 edited

Legend:

Unmodified
Added
Removed
  • MANIFEST.in

    r10845 r11173  
    22recursive-include Orange/doc * 
    33 
    4 recursive-include Orange/OrangeWidgets *.png *.gs *.vs *.obj *.html 
    5 recursive-include Orange/OrangeCanvas *.png *.pyw *.txt 
     4recursive-include Orange/OrangeWidgets *.png *.svg *.gs *.vs *.obj *.html 
     5recursive-include Orange/OrangeCanvas *.png *.svg *.qss *.pyw *.txt 
    66recursive-include Orange/orng *.cfg *.c 
    77 
  • Orange/OrangeWidgets/Associate/OWAssociationRules.py

    r9671 r11217  
    22<name>Association Rules</name> 
    33<description>Induces association rules from data.</description> 
    4 <icon>icons/AssociationRules.png</icon> 
     4<icon>icons/AssociationRules.svg</icon> 
    55<contact>Janez Demsar (janez.demsar(@at@)fri.uni-lj.si)</contact> 
    66<priority>100</priority> 
  • Orange/OrangeWidgets/Associate/OWAssociationRulesTreeViewer.py

    r10810 r11217  
    22<name>Association Rules Explorer</name> 
    33<description>Association rules tree viewer.</description> 
    4 <icon>icons/AssociationRulesTreeViewer.png</icon> 
     4<icon>icons/AssociationRulesExplorer.svg</icon> 
    55<contact>Janez Demsar (janez.demsar(@at@)fri.uni-lj.si)</contact> 
    66<priority>300</priority> 
  • Orange/OrangeWidgets/Associate/OWAssociationRulesViewer.py

    r9671 r11217  
    22<name>Association Rules Filter</name> 
    33<description>Association rules filter and viewer.</description> 
    4 <icon>icons/AssociationRulesViewer.png</icon> 
     4<icon>icons/AssociationRulesFilter.svg</icon> 
    55<contact>Janez Demsar (janez.demsar(@at@)fri.uni-lj.si)</contact> 
    66<priority>200</priority> 
  • Orange/OrangeWidgets/Associate/OWItemsets.py

    r9671 r11217  
    22<name>Itemsets</name> 
    33<description>Finds frequent itemsets in the data.</description> 
    4 <icon>icons/Itemsets.png</icon> 
     4<icon>icons/Itemsets.svg</icon> 
    55<contact>Janez Demsar (janez.demsar(@at@)fri.uni-lj.si)</contact> 
    66<priority>1000</priority> 
  • Orange/OrangeWidgets/Associate/OWItemsetsExplorer.py

    r9671 r11217  
    22<name>Itemsets Explorer</name> 
    33<description>Itemsets explorer.</description> 
    4 <icon>icons/ItemsetsExplorer.png</icon> 
     4<icon>icons/ItemsetsExplorer.svg</icon> 
    55<contact>Janez Demsar (janez.demsar(@at@)fri.uni-lj.si)</contact> 
    66<priority>1100</priority> 
  • Orange/OrangeWidgets/Associate/__init__.py

    r10423 r11262  
     1""" 
     2========= 
     3Associate 
     4========= 
    15 
     6Widgets for association rules. 
     7 
     8""" 
     9 
     10# Category description for the widget registry 
     11 
     12NAME = "Associate" 
     13 
     14DESCRIPTION = "Widgets for association rules." 
     15 
     16BACKGROUND = "#ACE3CE" 
     17 
     18ICON = "icons/Category-Associate.svg" 
     19 
     20PRIORITY = 7 
  • Orange/OrangeWidgets/Classify/OWC45Tree.py

    r10844 r11096  
    22<name>C4.5</name> 
    33<description>C45 (classification tree) learner/classifier.</description> 
    4 <icon>icons/C45.png</icon> 
     4<icon>icons/C4.5.svg</icon> 
    55<contact>Janez Demsar (janez.demsar(@at@)fri.uni-lj.si)</contact> 
    66<priority>35</priority> 
  • Orange/OrangeWidgets/Classify/OWCN2.py

    r9671 r11287  
    22<name>CN2</name> 
    33<description>Rule-based (CN2) learner/classifier.</description> 
    4 <icon>icons/CN2.png</icon> 
     4<icon>icons/CN2.svg</icon> 
    55<contact>Ales Erjavec (ales.erjavec(@at@)fri.uni-lj.si)</contact> 
    66<priority>300</priority> 
     
    1010 
    1111from orngWrap import PreprocessedLearner 
     12 
     13NAME = "CN2" 
     14 
     15DESCRIPTION = "Rule-based (CN2) learner/classifier" 
     16 
     17AUTHOR = "Ales Erjavec" 
     18 
     19PRIORITY = 300 
     20 
     21ICON = "icons/CN2.svg" 
     22 
     23# Sphinx documentation label reference 
     24HELP_REF = "CN2 Rules" 
     25 
     26INPUTS = ( 
     27    dict(name="Data", type=ExampleTable, handler="dataset", 
     28         doc="Training data set", 
     29         id="train-data"), 
     30 
     31    dict(name="Preprocess", type=PreprocessedLearner, 
     32         handler="setPreprocessor", 
     33         doc="Data preprocessor", 
     34         id="preprocessor") 
     35) 
     36 
     37OUTPUTS = ( 
     38    dict(name="Learner", type=orange.Learner, 
     39         doc="A CN2 Rules learner instance", 
     40         id="learner"), 
     41 
     42    dict(name="Classifier", type=orange.Classifier, 
     43         doc="A rule classifier induced from given training data.", 
     44         id="classifier"), 
     45 
     46    dict(name="Unordered CN2 Classifier", type=orngCN2.CN2UnorderedClassifier, 
     47         doc="Same as 'Classifier'", 
     48         id="unordered-cn2-classifier") 
     49) 
     50 
    1251 
    1352class CN2ProgressBar(orange.ProgressCallback): 
  • Orange/OrangeWidgets/Classify/OWCN2RulesViewer.py

    r9671 r11096  
    22<name>CN2 Rules Viewer</name> 
    33<description>Viewer of classification rules.</description> 
    4 <icon>icons/CN2RulesViewer.png</icon> 
     4<icon>icons/CN2RulesViewer.svg</icon> 
    55<contact>Ales Erjavec (ales.erjavec(@at@)fri.uni-lj.si)</contact> 
    66<priority>2120</priority> 
  • Orange/OrangeWidgets/Classify/OWClassificationTree.py

    r11015 r11216  
    22<name>Classification Tree</name> 
    33<description>Classification tree learner/classifier.</description> 
    4 <icon>icons/ClassificationTree.png</icon> 
     4<icon>icons/ClassificationTree.svg</icon> 
    55<contact>Janez Demsar (janez.demsar(@at@)fri.uni-lj.si)</contact> 
    66<priority>30</priority> 
  • Orange/OrangeWidgets/Classify/OWClassificationTreeGraph.py

    r11038 r11216  
    11"""<name>Classification Tree Graph</name> 
    22<description>Classification tree viewer (graph view).</description> 
    3 <icon>icons/ClassificationTreeGraph.png</icon> 
     3<icon>icons/ClassificationTreeGraph.svg</icon> 
    44<contact>Blaz Zupan (blaz.zupan(@at@)fri.uni-lj.si)</contact> 
    55<priority>2110</priority> 
  • Orange/OrangeWidgets/Classify/OWClassificationTreeViewer.py

    r10552 r11096  
    22<name>Classification Tree Viewer</name> 
    33<description>Classification tree viewer (hierarchical list view).</description> 
    4 <icon>icons/ClassificationTreeViewer.png</icon> 
     4<icon>icons/ClassificationTreeViewer.svg</icon> 
    55<contact>Janez Demsar (janez.demsar(@at@)fri.uni-lj.si)</contact> 
    66<priority>2100</priority> 
  • Orange/OrangeWidgets/Classify/OWEnsemble.py

    r10759 r11096  
    22<name>Ensemble</name> 
    33<description>Ensemble classification</description> 
    4 <icons>icons/Ensemble.png</icons> 
     4<icon>icons/Ensemble.svg</icon> 
    55<contact>Ales Erjavec (ales.erjavec(@at@)fri.uni-lj.si)</contact> 
    66<priority>330</priority> 
  • Orange/OrangeWidgets/Classify/OWITree.py

    r10743 r11096  
    22<name>Interactive Tree Builder</name> 
    33<description>Interactive Tree Builder</description> 
    4 <icon>icons/ITree.png</icon> 
     4<icon>icons/InteractiveTreeBuilder.svg</icon> 
    55<contact>Janez Demsar (janez.demsar(@at@)fri.uni-lj.si)</contact> 
    66<priority>50</priority> 
  • Orange/OrangeWidgets/Classify/OWKNN.py

    r9671 r11287  
    22<name>k Nearest Neighbours</name> 
    33<description>K-nearest neighbours learner/classifier.</description> 
    4 <icon>icons/kNearestNeighbours.png</icon> 
     4<icon>icons/kNearestNeighbours.svg</icon> 
    55<contact>Janez Demsar (janez.demsar(@at@)fri.uni-lj.si)</contact> 
    66<priority>25</priority> 
     
    1010from exceptions import Exception 
    1111from orngWrap import PreprocessedLearner 
     12 
     13NAME = "k Nearest Neighbours" 
     14 
     15ID = "orange.widgets.classify.knn" 
     16 
     17DESCRIPTION = "K-nearest neighbours learner/classifier." 
     18 
     19ICON = "icons/kNearestNeighbours.svg" 
     20 
     21AUTHOR = "Janez Demsar" 
     22 
     23PRIORITY = 25 
     24 
     25HELP_REF = "k-Nearest Neighbours" 
     26 
     27KEYWORDS = ["knn"] 
     28 
     29INPUTS = ( 
     30    InputSignal(name="Data", 
     31                type=ExampleTable, 
     32                handler="setData", 
     33                doc="Training data set", 
     34                id="train-data"), 
     35 
     36    InputSignal(name="Preprocess", 
     37                type=PreprocessedLearner, 
     38                handler="setPreprocessor", 
     39                id="preprocessor") 
     40) 
     41 
     42OUTPUTS = ( 
     43    OutputSignal(name="Learner", 
     44                 type=orange.Learner, 
     45                 doc="The kNN learner with settings as specified in " 
     46                     "the dialog", 
     47                 id="learner"), 
     48 
     49    OutputSignal(name="kNN Classifier", 
     50                 type=orange.kNNClassifier, 
     51                 doc="A kNN classifier trained on 'Data'.", 
     52                 id="knn-classifier") 
     53) 
     54 
     55WIDGET_CLASS = "OWKNN" 
     56 
    1257 
    1358class OWKNN(OWWidget): 
     
    117162        self.send("kNN Classifier", self.classifier) 
    118163 
    119 ############################################################################## 
    120 # Test the widget, run from DOS prompt 
    121 # > python OWDataTable.py) 
    122 # Make sure that a sample data set (adult_sample.tab) is in the directory 
    123164 
    124 if __name__=="__main__": 
    125     a=QApplication(sys.argv) 
    126     ow=OWKNN() 
     165if __name__ == "__main__": 
     166    a = QApplication(sys.argv) 
     167    ow = OWKNN() 
    127168 
    128 ##    dataset = orange.ExampleTable('adult_sample') 
    129 ##    ow.setData(dataset) 
     169    dataset = orange.ExampleTable('adult_sample') 
     170    ow.setData(dataset) 
    130171 
    131172    ow.show() 
  • Orange/OrangeWidgets/Classify/OWLoadClassifier.py

    r10595 r11217  
    11"""<name>Load Classifier</name> 
    22<description>Load saved orange classifiers from a file</description> 
    3 <icon>icons/LoadClassifier.png</icon> 
     3<icon>icons/LoadClassifier.svg</icon> 
    44<contact>Ales Erjavec (ales.erjavec(@at@)fri.uni.uni-lj.si)</contact> 
    55<priority>3050</priority> 
  • Orange/OrangeWidgets/Classify/OWLogisticRegression.py

    r9671 r11096  
    22<name>Logistic Regression</name> 
    33<description>Logistic regression learner/classifier.</description> 
    4 <icon>icons/LogisticRegression.png</icon> 
     4<icon>icons/LogisticRegression.svg</icon> 
    55<contact>Martin Mozina (martin.mozina(@at@)fri.uni-lj.si)</contact> 
    66<priority>15</priority> 
  • Orange/OrangeWidgets/Classify/OWMajority.py

    r9671 r11096  
    22<name>Majority</name> 
    33<description>Majority class learner/classifier.</description> 
    4 <icon>icons/Majority.png</icon> 
     4<icon>icons/Majority.svg</icon> 
    55<contact>Janez Demsar (janez.demsar(@at@)fri.uni-lj.si)</contact> 
    66<priority>20</priority> 
  • Orange/OrangeWidgets/Classify/OWNaiveBayes.py

    r9671 r11096  
    22<name>Naive Bayes</name> 
    33<description>Naive Bayesian learner/classifier.</description> 
    4 <icon>icons/NaiveBayes.png</icon> 
     4<icon>icons/NaiveBayes.svg</icon> 
    55<contact>Janez Demsar (janez.demsar(@at@)fri.uni-lj.si)</contact> 
    66<priority>10</priority> 
     
    1111from orngWrap import PreprocessedLearner 
    1212from exceptions import Exception 
     13 
     14NAME = "Naive Bayes" 
     15DESCRIPTION = "Naive Bayesian learner/classifier." 
     16 
     17ICON = "icons/NaiveBayes.svg" 
     18CATEGORY = "Classify" 
     19PRIORITY = 10 
     20 
     21INPUTS = [("Data", ExampleTable, "setData"), 
     22          ("Preprocess", PreprocessedLearner, "setPreprocessor")] 
     23 
     24OUTPUTS = [("Learner", orange.Learner), 
     25           ("Naive Bayesian Classifier", orange.BayesClassifier)] 
     26 
    1327 
    1428import warnings 
  • Orange/OrangeWidgets/Classify/OWNomogram.py

    r9671 r11096  
    22<name>Nomogram</name> 
    33<description>Nomogram viewer for Naive Bayesian, logistic regression or CN2 (EVC only) classifiers.</description> 
    4 <icon>icons/Nomogram.png</icon> 
     4<icon>icons/Nomogram.svg</icon> 
    55<contact>Martin Mozina (martin.mozina(@at@)fri.uni-lj.si)</contact> 
    66<priority>2500</priority> 
  • Orange/OrangeWidgets/Classify/OWRandomForest.py

    r10587 r11096  
    22<name>Random Forest</name> 
    33<description>Random forest learner/classifier.</description> 
    4 <icon>icons/RandomForest.png</icon> 
     4<icon>icons/RandomForest.svg</icon> 
    55<contact>Marko Toplak (marko.toplak(@at@)gmail.com)</contact> 
    66<priority>320</priority> 
  • Orange/OrangeWidgets/Classify/OWSVM.py

    r10730 r11096  
    33<name>SVM</name> 
    44<description>Support Vector Machines learner/classifier.</description> 
    5 <icon>icons/BasicSVM.png</icon> 
     5<icon>icons/SVM.svg</icon> 
    66<contact>Ales Erjavec (ales.erjavec(@at@)fri.uni-lj.si)</contact> 
    77<priority>100</priority> 
  • Orange/OrangeWidgets/Classify/OWSaveClassifier.py

    r10595 r11096  
    11"""<name>Save Classifier</name> 
    22<description>Save orange classifiers to a file</description> 
    3 <icon>icons/SaveClassifier.png</icon> 
     3<icon>icons/SaveClassifier.svg</icon> 
    44<contact>Ales Erjavec (ales.erjavec(@at@)fri.uni-lj.si)</contact> 
    55<priority>3000</priority> 
  • Orange/OrangeWidgets/Classify/__init__.py

    r10423 r11095  
     1""" 
     2======== 
     3Classify 
     4======== 
     5 
     6Classification algorithms. 
     7 
     8""" 
     9 
     10# Category description for the widget registry 
     11 
     12NAME = "Classify" 
     13 
     14DESCRIPTION = "Classification algorithms." 
     15 
     16BACKGROUND = "#FAC1D9" 
     17 
     18ICON = "icons/Category-Classify.svg" 
     19 
     20PRIORITY = 3 
  • Orange/OrangeWidgets/Data/OWConcatenate.py

    r9671 r11096  
    22<name>Concatenate</name> 
    33<description>Concatenates Example Tables.</description> 
    4 <icon>icons/Concatenate.png</icon> 
     4<icon>icons/Concatenate.svg</icon> 
    55<priority>1111</priority> 
    66<contact>Janez Demsar (janez.demsar(@at@)fri.uni-lj.si)</contact> 
  • Orange/OrangeWidgets/Data/OWContinuize.py

    r9671 r11096  
    22<name>Continuize</name> 
    33<description>Turns discrete attributes into continuous and, optionally, normalizes the continuous values.</description> 
    4 <icon>icons/Continuize.png</icon> 
     4<icon>icons/Continuize.svg</icon> 
    55<contact>Janez Demsar (janez.demsar(@at@)fri.uni-lj.si)</contact> 
    66<priority>2110</priority> 
  • Orange/OrangeWidgets/Data/OWDataDomain.py

    r9996 r11096  
    22<name>Select Attributes</name> 
    33<description>Manual selection of attributes.</description> 
    4 <icon>icons/SelectAttributes.png</icon> 
     4<icon>icons/SelectAttributes.svg</icon> 
    55<priority>1100</priority> 
    66<contact>Ales Erjavec (ales.erjavec@fri.uni-lj.si)</contact> 
  • Orange/OrangeWidgets/Data/OWDataInfo.py

    r9671 r11217  
    11"""<name>Info</name> 
    22<description>Shows data information.</description> 
    3 <icon>icons/DataInfo.png</icon> 
     3<icon>icons/DataInfo.svg</icon> 
    44<priority>80</priority> 
    55<contact>Ales Erjavec (ales.erjavec@fri.uni-lj.si)</contact>""" 
  • Orange/OrangeWidgets/Data/OWDataSampler.py

    r9671 r11096  
    22<name>Data Sampler</name> 
    33<description>Selects a subset of instances from the data set.</description> 
    4 <icon>icons/DataSampler.png</icon> 
     4<icon>icons/DataSampler.svg</icon> 
    55<contact>Aleksander Sadikov (aleksander.sadikov(@at@)fri.uni-lj.si)</contact> 
    66<priority>1125</priority> 
  • Orange/OrangeWidgets/Data/OWDataTable.py

    r10703 r11096  
    77""" 
    88 
    9 # OWDataTable.py 
    10 # 
    11 # wishes: 
    12 # ignore attributes, filter examples by attribute values, do 
    13 # all sorts of preprocessing (including discretization) on the table, 
    14 # output a new table and export it in variety of formats. 
    15  
    169from OWWidget import * 
    1710import OWGUI 
     
    1912from orngDataCaching import * 
    2013import OWColorPalette 
     14 
     15 
     16NAME = "Data Table" 
     17 
     18DESCRIPTION = "Shows data in a spreadsheet." 
     19 
     20LONG_DESCRIPTION = """Data Table widget takes one or more data sets 
     21on its input and presents them in a spreadsheet format. 
     22 
     23""" 
     24 
     25ICON = "icons/DataTable.svg" 
     26 
     27PRIORITY = 100 
     28 
     29AUTHOR = "Peter Juvan" 
     30 
     31AUTHOR_EMAIL = "peter.juvan(@at@)fri.uni-lj.si" 
     32 
     33INPUTS = [("Data", ExampleTable, "dataset", Multiple + Default)] 
     34 
     35OUTPUTS = [("Selected Data", ExampleTable, Default), 
     36           ("Other Data", ExampleTable)] 
    2137 
    2238############################################################################## 
  • Orange/OrangeWidgets/Data/OWDiscretize.py

    r9671 r11287  
    22<name>Discretize</name> 
    33<description>Discretization of continuous attributes.</description> 
    4 <icon>icons/Discretize.png</icon> 
     4<icon>icons/Discretize.svg</icon> 
    55<contact>Ales Erjavec (ales.erjavec(@at@)fri.uni-lj.si)</contact> 
    66<priority>2100</priority> 
    77""" 
     8 
    89import orange 
    910from OWWidget import * 
    1011from OWGraph import * 
    1112import OWGUI 
     13 
     14 
     15NAME = "Discretize" 
     16DESCRIPTION = "Discretization of continuous attributes." 
     17 
     18MAINTAINER = "Ales Erjavec" 
     19MAINTAINER_EMAIL = "ales.erjavec < at > fri.uni-lj.si" 
     20 
     21CATEGORY = "Data" 
     22PRIORITY = 2100 
     23ICON = "icons/Discretize.svg" 
     24 
     25INPUTS = [("Data", orange.ExampleTable, "setData")] 
     26OUTPUTS = [("Data", orange.ExampleTable,)] 
     27 
     28WIDGET_CLASS = "OWDiscretize" 
     29 
    1230 
    1331def frange(low, up, steps): 
  • Orange/OrangeWidgets/Data/OWEditDomain.py

    r10726 r11096  
    22<name>Edit Domain</name> 
    33<description>Edit domain variables</description> 
    4 <icon>icons/EditDomain.png</icon> 
     4<icon>icons/EditDomain.svg</icon> 
    55<contact>Ales Erjavec (ales.erjavec(@ at @)fri.uni-lj.si)</contact> 
    66<priority>3125</priority> 
  • Orange/OrangeWidgets/Data/OWFeatureConstructor.py

    r9671 r11096  
    22<name>Feature Constructor</name> 
    33<description>Construct a new continuous attribute computed from existing attributes.</description> 
    4 <icon>icons/FeatureConstructor.png</icon> 
     4<icon>icons/FeatureConstructor.svg</icon> 
    55<priority>3100</priority> 
    66<contact>Janez Demsar (janez.demsar(@at@)fri.uni-lj.si)</contact> 
  • Orange/OrangeWidgets/Data/OWFile.py

    r10856 r11287  
    22<name>File</name> 
    33<description>Reads data from a file.</description> 
    4 <icon>icons/File.png</icon> 
     4<icon>icons/File.svg</icon> 
    55<contact>Janez Demsar (janez.demsar(@at@)fri.uni-lj.si)</contact> 
    66<priority>10</priority> 
     
    1515import orngIO 
    1616 
    17 warnings.filterwarnings("error", ".*" , orange.KernelWarning, "OWFile", 11) 
     17NAME = "File" 
     18ID = "orange.widgets.data.file" 
     19 
     20DESCRIPTION = """ 
     21Read a data table from a supported file format on the the file system and 
     22send it to the the output. 
     23""" 
     24 
     25LONG_DESCRIPTION = """ 
     26This is the widget you will probably use at the start of every schema to read 
     27the input data file (data table with examples). The widget maintains a 
     28history of most recently used data files. For convenience, the history 
     29also includes a directory with the sample data sets that come with Orange. 
     30""" 
     31 
     32ICON = "icons/File.svg" 
     33AUTHOR = "Janez Demsar" 
     34MAINTAINER_EMAIL = "janez.demsar(@at@)fri.uni-lj.si" 
     35PRIORITY = 10 
     36CATEGORY = "Data" 
     37 
     38KEYWORDS = ["data", "file", "load", "read"] 
     39 
     40OUTPUTS = ( 
     41    {"name": "Data", 
     42     "type": orange.ExampleTable, 
     43     "doc": "Attribute-valued data set read from the input file.", 
     44    }, 
     45) 
     46 
     47WIDGET_CLASS = "OWFile" 
     48 
     49# This is why the 'call''s line number is important. Actually you can 
     50# move it but you need to make sure the following filter's lineno is updated 
     51warnings.filterwarnings("error", ".*", orange.KernelWarning, "OWFile", 11) 
     52 
    1853 
    1954class FileNameContextHandler(ContextHandler): 
     
    2964        if "type" in var.attributes and "origin" not in var.attributes: 
    3065            var.attributes["origin"] = dirname 
    31                   
     66 
    3267 
    3368class OWFile(OWWidget): 
     
    4580    formats.update(dict((ft[1][2:], ft[0]) for ft in registeredFileTypes)) 
    4681      
    47                   
    4882    def __init__(self, parent=None, signalManager = None): 
    4983        OWWidget.__init__(self, parent, signalManager, "File", wantMainArea = 0, resizingEnabled = 1) 
  • Orange/OrangeWidgets/Data/OWImageViewer.py

    r9671 r11096  
    33<contact>Ales Erjavec (ales.erjavec(@at@)fri.uni-lj.si)</contact> 
    44<priority>4050</priority> 
    5 <icon>icons/ImageViewer.png</icon> 
     5<icon>icons/ImageViewer.svg</icon> 
    66""" 
    77 
  • Orange/OrangeWidgets/Data/OWImpute.py

    r9671 r11096  
    22<name>Impute</name> 
    33<description>Imputes unknown values.</description> 
    4 <icon>icons/Impute.png</icon> 
     4<icon>icons/Impute.svg</icon> 
    55<priority>2130</priority> 
    66<contact>Janez Demsar</contact> 
  • Orange/OrangeWidgets/Data/OWMergeData.py

    r9671 r11096  
    22<name>Merge Data</name> 
    33<description>Merge datasets based on values of selected attributes.</description> 
    4 <icon>icons/MergeData.png</icon> 
     4<icon>icons/MergeData.svg</icon> 
    55<priority>1110</priority> 
    66<contact>Peter Juvan (peter.juvan@fri.uni-lj.si)</contact> 
  • Orange/OrangeWidgets/Data/OWMultiMergeData.py

    r10692 r11096  
    22<name>Multi-key Merge Data</name> 
    33<description>Merge datasets based on values of selected tuples of attributes.</description> 
    4 <icon>icons/MergeData.png</icon> 
     4<icon>icons/MergeData.svg</icon> 
    55<priority>100</priority> 
    66<contact>Peter Husen (phusen@bmb.sdu.dk)</contact> 
  • Orange/OrangeWidgets/Data/OWOutliers.py

    r9671 r11096  
    22<name>Outliers</name> 
    33<description>Indentification of outliers</description> 
    4 <icon>icons/Outliers.png</icon> 
     4<icon>icons/Outliers.svg</icon> 
    55<contact>Marko Toplak (marko.toplak(@at@)gmail.com)</contact>  
    66<priority>2150</priority> 
  • Orange/OrangeWidgets/Data/OWPaintData.py

    r10727 r11096  
    44<contact>Ales Erjavec (ales.erjavec(@at@)fri.uni-lj.si)</contact> 
    55<priority>40</priority> 
    6 <icon>icons/PaintData.png</icon> 
     6<icon>icons/PaintData.svg</icon> 
    77""" 
    88 
  • Orange/OrangeWidgets/Data/OWPreprocess.py

    r10764 r11096  
    11"""<name>Preprocess</name> 
    22<description>Construct and apply data preprocessors</description> 
    3 <icon>icons/Preprocess.png</icon> 
     3<icon>icons/Preprocess.svg</icon> 
    44<priority>2105</priority> 
    55<contact>Ales Erjavec (ales.erjavec(@at@)fri.uni-lj.si)</contact> 
  • Orange/OrangeWidgets/Data/OWPythonScript.py

    r11012 r11216  
    22<name>Python Script</name> 
    33<description>Executes python script.</description> 
    4 <icon>icons/PythonScript.png</icon> 
     4<icon>icons/PythonScript.svg</icon> 
    55<contact>Miha Stajdohar (miha.stajdohar(@at@)gmail.com)</contact>  
    66<priority>3150</priority> 
  • Orange/OrangeWidgets/Data/OWRank.py

    r9671 r11096  
    22<name>Rank</name> 
    33<description>Ranks and filters attributes by their relevance.</description> 
    4 <icon>icons/Rank.png</icon> 
     4<icon>icons/Rank.svg</icon> 
    55<contact>Janez Demsar (janez.demsar(@at@)fri.uni-lj.si)</contact> 
    66<priority>1102</priority> 
  • Orange/OrangeWidgets/Data/OWSave.py

    r10674 r11096  
    22<name>Save</name> 
    33<description>Saves data to a file.</description> 
    4 <icon>icons/Save.png</icon> 
     4<icon>icons/Save.svg</icon> 
    55<contact>Janez Demsar (janez.demsar(@at@)fri.uni-lj.si)</contact> 
    66<priority>90</priority> 
  • Orange/OrangeWidgets/Data/OWSelectData.py

    r9671 r11096  
    22<name>Select Data</name> 
    33<description>Selects instances from the data set based on conditions over attributes.</description> 
    4 <icon>icons/SelectData.png</icon> 
     4<icon>icons/SelectData.svg</icon> 
    55<priority>1150</priority> 
    66<contact>Peter Juvan (peter.juvan@fri.uni-lj.si)</contact> 
  • Orange/OrangeWidgets/Data/__init__.py

    r10423 r11252  
     1""" 
     2Data 
     3==== 
     4 
     5""" 
     6 
     7# Category description for the widget registry 
     8 
     9NAME = "Data" 
     10 
     11ID = "orange.widgets.data" 
     12 
     13DESCRIPTION = """Widgets for data manipulation""" 
     14 
     15LONG_DESRIPTION = """ 
     16This category contains widgets for data manipulation. This includes 
     17loading, importing, saving, preprocessing, selection, etc. 
     18 
     19""" 
     20 
     21ICON = "icons/Category-Data.svg" 
     22 
     23BACKGROUND = "#FFD39F" 
     24 
     25PRIORITY = 1 
  • Orange/OrangeWidgets/Evaluate/OWCalibrationPlot.py

    r10752 r11096  
    33<description>Displays calibration plot based on evaluation of classifiers.</description> 
    44<contact>Tomaz Curk</contact> 
    5 <icon>icons/CalibrationPlot.png</icon> 
     5<icon>icons/CalibrationPlot.svg</icon> 
    66<priority>1030</priority> 
    77""" 
  • Orange/OrangeWidgets/Evaluate/OWConfusionMatrix.py

    r10752 r11096  
    33<description>Shows a confusion matrix.</description> 
    44<contact>Janez Demsar</contact> 
    5 <icon>icons/ConfusionMatrix.png</icon> 
     5<icon>icons/ConfusionMatrix.svg</icon> 
    66<priority>1001</priority> 
    77""" 
  • Orange/OrangeWidgets/Evaluate/OWLiftCurve.py

    r10752 r11096  
    33<description>Displays a lift curve based on evaluation of classifiers.</description> 
    44<contact>Tomaz Curk</contact> 
    5 <icon>icons/LiftCurve.png</icon> 
     5<icon>icons/LiftCurve.svg</icon> 
    66<priority>1020</priority> 
    77""" 
  • Orange/OrangeWidgets/Evaluate/OWPredictions.py

    r10841 r11217  
    22<name>Predictions</name> 
    33<description>Displays predictions of models for a particular data set.</description> 
    4 <icon>icons/Predictions.png</icon> 
     4<icon>icons/Predictions.svg</icon> 
    55<contact>Blaz Zupan (blaz.zupan(@at@)fri.uni-lj.si)</contact> 
    66<priority>300</priority> 
  • Orange/OrangeWidgets/Evaluate/OWROC.py

    r10752 r11096  
    33<description>Displays Receiver Operating Characteristics curve based on evaluation of classifiers.</description> 
    44<contact>Tomaz Curk</contact> 
    5 <icon>icons/ROCAnalysis.png</icon> 
     5<icon>icons/ROCAnalysis.svg</icon> 
    66<priority>1010</priority> 
    77""" 
  • Orange/OrangeWidgets/Evaluate/OWTestLearners.py

    r11000 r11217  
    22<name>Test Learners</name> 
    33<description>Estimates the predictive performance of learners on a data set.</description> 
    4 <icon>icons/TestLearners.png</icon> 
     4<icon>icons/TestLearners1.svg</icon> 
    55<contact>Blaz Zupan (blaz.zupan(@at@)fri.uni-lj.si)</contact> 
    66<priority>200</priority> 
  • Orange/OrangeWidgets/Evaluate/__init__.py

    r10423 r11095  
     1""" 
     2======== 
     3Evaluate 
     4======== 
     5 
     6Evaluate classification/regression performance. 
     7 
     8""" 
     9 
     10# Category description for the widget registry 
     11 
     12NAME = "Evaluate" 
     13 
     14DESCRIPTION = "Evaluate classification/regression performance." 
     15 
     16BACKGROUND = "#C3F3F3" 
     17 
     18ICON = "icons/Category-Evaluate.svg" 
     19 
     20PRIORITY = 5 
  • Orange/OrangeWidgets/OWBaseWidget.py

    r10651 r11296  
    2222from OWContexts import * 
    2323import sys, time, random, user, os, os.path, cPickle, copy 
     24import logging 
     25 
    2426import orange 
    2527from Orange import misc 
     
    2729from Orange.utils import debugging as orngDebugging 
    2830from string import * 
    29 from orngSignalManager import * 
     31 
     32from Orange.OrangeCanvas.registry.description import ( 
     33    Default, NonDefault, Single, Multiple, Explicit, Dynamic, 
     34    InputSignal, OutputSignal 
     35) 
     36 
     37from Orange.OrangeCanvas.scheme.widgetsscheme import ( 
     38    SignalLink, WidgetsSignalManager, SignalWrapper 
     39) 
     40 
    3041import OWGUI 
     42 
     43 
     44_log = logging.getLogger(__name__) 
    3145 
    3246ERROR = 0 
    3347WARNING = 1 
    3448 
    35 TRUE=1 
    36 FALSE=0 
     49TRUE = 1 
     50FALSE = 0 
     51 
    3752 
    3853def unisetattr(self, name, value, grandparent): 
     
    105120 
    106121 
    107  
    108 ################## 
    109 # this definitions are needed only to define ExampleTable as subclass of ExampleTableWithClass 
    110122from orange import ExampleTable 
    111123 
     
    121133    def __new__(cls, *arg, **args): 
    122134        self = QDialog.__new__(cls) 
    123          
    124         #print "arg", arg 
    125         #print "args: ", args 
     135 
    126136        self.currentContexts = {}   # the "currentContexts" MUST be the first thing assigned to a widget 
    127137        self._useContexts = 1       # do you want to use contexts 
     
    147157        self.savePosition = savePosition 
    148158        if savePosition: 
    149             self.settingsList = getattr(self, "settingsList", []) + ["widgetWidth", "widgetHeight", "widgetXPosition", "widgetYPosition", "widgetShown", "savedWidgetGeometry"] 
     159            self.settingsList = getattr(self, "settingsList", []) + ["widgetShown", "savedWidgetGeometry"] 
    150160 
    151161        # directories are better defined this way, otherwise .ini files get written in many places 
     
    163173        self.parent = parent 
    164174        self.needProcessing = 0     # used by signalManager 
    165         if not signalManager: self.signalManager = globalSignalManager        # use the global instance of signalManager  - not advised 
    166         else:                 self.signalManager = signalManager              # use given instance of signal manager 
     175 
     176        self.signalManager = signalManager 
    167177 
    168178        self.inputs = []     # signalName:(dataType, handler, onlySingleConnection) 
     
    193203        self.asyncCalls = [] 
    194204        self.asyncBlock = False 
    195          
    196         self.connect(self, SIGNAL("blockingStateChanged(bool)"), lambda bool :self.signalManager.log.info("Blocking state changed %s %s" % (str(self), str(bool)))) 
    197  
    198205 
    199206    # uncomment this when you need to see which events occured 
     
    270277    # call this function if needed in __init__ of the widget 
    271278    def safeProcessEvents(self): 
    272         keys = ["widgetXPosition", "widgetYPosition", "widgetShown", "widgetWidth", "widgetHeight"] 
     279        keys = ["widgetShown"] 
    273280        vals = [(key, getattr(self, key, None)) for key in keys] 
    274281        qApp.processEvents() 
     
    330337    def resizeEvent(self, ev): 
    331338        QDialog.resizeEvent(self, ev) 
    332         if self.savePosition: 
    333             self.widgetWidth = self.width() 
    334             self.widgetHeight = self.height() 
     339        # Don't store geometry if the widget is not visible 
     340        # (the widget receives the resizeEvent before showEvent and we must not 
     341        # overwrite the the savedGeometry before then) 
     342        if self.savePosition and self.isVisible(): 
    335343            self.savedWidgetGeometry = str(self.saveGeometry()) 
    336344 
     
    350358        if self.savePosition: 
    351359            self.widgetShown = 0 
    352             self.widgetXPosition = self.frameGeometry().x() 
    353             self.widgetYPosition = self.frameGeometry().y() 
    354360            self.savedWidgetGeometry = str(self.saveGeometry()) 
    355361        QDialog.hideEvent(self, ev) 
     
    372378    def closeEvent(self, ev): 
    373379        if self.savePosition: 
    374             self.widgetXPosition = self.frameGeometry().x() 
    375             self.widgetYPosition = self.frameGeometry().y() 
    376380            self.savedWidgetGeometry = str(self.saveGeometry()) 
    377381        QDialog.closeEvent(self, ev) 
     
    389393            self.parent.setTabText(self.parent.indexOf(self), caption) 
    390394        else: 
    391             self.captionTitle = caption     # we have to save caption title in case progressbar will change it 
     395            # we have to save caption title in case progressbar will change it 
     396            self.captionTitle = unicode(caption) 
    392397            self.setWindowTitle(caption) 
    393398 
     
    400405 
    401406    def send(self, signalName, value, id = None): 
    402         if not self.hasOutputName(signalName): 
    403             print "Warning! Signal '%s' is not a valid signal name for the '%s' widget. Please fix the signal name." % (signalName, self.captionTitle) 
    404  
    405407        if self.linksOut.has_key(signalName): 
    406408            self.linksOut[signalName][id] = value 
     
    408410            self.linksOut[signalName] = {id:value} 
    409411 
    410         self.signalManager.send(self, signalName, value, id) 
    411  
     412        if self.signalManager is not None: 
     413            self.signalManager.send(self, signalName, value, id) 
    412414 
    413415    def getdeepattr(self, attr, **argkw): 
     
    718720        self.needProcessing = 1 
    719721 
    720  
    721722    # ############################################ 
    722723    # PROGRESS BAR FUNCTIONS 
     724 
     725    progressBarValueChanged = pyqtSignal(float) 
     726    """Progress bar value has changed""" 
     727 
     728    processingStateChanged = pyqtSignal(int) 
     729    """Processing state has changed""" 
     730 
    723731    def progressBarInit(self): 
    724732        self.progressBarValue = 0 
     
    727735        if self.progressBarHandler: 
    728736            self.progressBarHandler(self, 0) 
     737        self.processingStateChanged.emit(1) 
    729738 
    730739    def progressBarSet(self, value): 
    731740        if value > 0: 
    732             self.progressBarValue = value 
     741            self.__progressBarValue = value 
    733742            usedTime = max(1, time.time() - self.startTime) 
    734             totalTime = (100.0*usedTime)/float(value) 
     743            totalTime = (100.0 * usedTime) / float(value) 
    735744            remainingTime = max(0, totalTime - usedTime) 
    736             h = int(remainingTime/3600) 
    737             min = int((remainingTime - h*3600)/60) 
    738             sec = int(remainingTime - h*3600 - min*60) 
    739             if h > 0: text = "%(h)d:%(min)02d:%(sec)02d" % vars() 
    740             else:     text = "%(min)d:%(sec)02d" % vars() 
     745            h = int(remainingTime / 3600) 
     746            min = int((remainingTime - h * 3600) / 60) 
     747            sec = int(remainingTime - h * 3600 - min * 60) 
     748            if h > 0: 
     749                text = "%(h)d:%(min)02d:%(sec)02d" % vars() 
     750            else: 
     751                text = "%(min)d:%(sec)02d" % vars() 
    741752            self.setWindowTitle(self.captionTitle + " (%(value).2f%% complete, remaining time: %(text)s)" % vars()) 
    742753        else: 
    743             self.setWindowTitle(self.captionTitle + " (0% complete)" ) 
    744         if self.progressBarHandler: self.progressBarHandler(self, value) 
     754            self.setWindowTitle(self.captionTitle + " (0% complete)") 
     755        if self.progressBarHandler: 
     756            self.progressBarHandler(self, value) 
     757 
     758        self.progressBarValueChanged.emit(value) 
     759 
    745760        qApp.processEvents() 
    746761 
     762    def progressBarValue(self): 
     763        return self.__progressBarValue 
     764 
     765    progressBarValue = pyqtProperty(float, fset=progressBarSet, 
     766                                    fget=progressBarValue) 
     767 
    747768    def progressBarAdvance(self, value): 
    748         self.progressBarSet(self.progressBarValue+value) 
     769        self.progressBarSet(self.progressBarValue + value) 
    749770 
    750771    def progressBarFinished(self): 
    751772        self.setWindowTitle(self.captionTitle) 
    752         if self.progressBarHandler: self.progressBarHandler(self, 101) 
     773        if self.progressBarHandler: 
     774            self.progressBarHandler(self, 101) 
     775        self.processingStateChanged.emit(0) 
    753776 
    754777    # handler must be a function, that receives 2 arguments. First is the widget instance, the second is the value between -1 and 101 
     
    765788        self.widgetStateHandler = handler 
    766789 
    767  
    768790    # if we are in debug mode print the event into the file 
    769     def printEvent(self, text, eventVerbosity = 1): 
    770         self.signalManager.addEvent(self.captionTitle + ": " + text, eventVerbosity = eventVerbosity) 
     791    def printEvent(self, text, eventVerbosity=1): 
     792        text = self.captionTitle + ": " + text 
     793 
     794        if eventVerbosity > 0: 
     795            _log.debug(text) 
     796        else: 
     797            _log.info(text) 
     798 
    771799        if self.eventHandler: 
    772             self.eventHandler(self.captionTitle + ": " + text, eventVerbosity) 
     800            self.eventHandler(text, eventVerbosity) 
    773801 
    774802    def openWidgetHelp(self): 
    775         if "widgetInfo" in self.__dict__:  # This widget is on a canvas. 
     803        if "widgetInfo" in self.__dict__ and \ 
     804                hasattr(qApp, "canvasDlg"): 
     805            # This widget is on a canvas. 
    776806            qApp.canvasDlg.helpWindow.showHelpFor(self.widgetInfo, True) 
    777          
    778     def focusInEvent(self, *ev): 
    779         #print "focus in" 
    780         #if qApp.canvasDlg.settings["synchronizeHelp"]:  on ubuntu: pops up help window on first widget focus for every widget    
    781         #    qApp.canvasDlg.helpWindow.showHelpFor(self, True) 
    782         QDialog.focusInEvent(self, *ev) 
    783          
    784      
     807 
    785808    def keyPressEvent(self, e): 
    786809        if e.key() in (Qt.Key_Help, Qt.Key_F1): 
    787810            self.openWidgetHelp() 
    788 #            e.ignore() 
    789811        elif (int(e.modifiers()), e.key()) in OWBaseWidget.defaultKeyActions: 
    790812            OWBaseWidget.defaultKeyActions[int(e.modifiers()), e.key()](self) 
     
    792814            QDialog.keyPressEvent(self, e) 
    793815 
    794     def information(self, id = 0, text = None): 
     816    def information(self, id=0, text=None): 
    795817        self.setState("Info", id, text) 
    796         #self.setState("Warning", id, text) 
    797  
    798     def warning(self, id = 0, text = ""): 
     818 
     819    def warning(self, id=0, text=""): 
    799820        self.setState("Warning", id, text) 
    800         #self.setState("Info", id, text)        # if we want warning just set information 
    801  
    802     def error(self, id = 0, text = ""): 
     821 
     822    def error(self, id=0, text=""): 
    803823        self.setState("Error", id, text) 
    804824 
     
    811831                    changed = 1 
    812832        else: 
    813             if type(id) == str: 
    814                 text = id; id = 0       # if we call information(), warning(), or error() function with only one parameter - a string - then set id = 0 
     833            if isinstance(id, basestring): 
     834                # if we call information(), warning(), or error() function 
     835                # with only one parameter - a string - then set id = 0 
     836                text = id 
     837                id = 0 
    815838            if not text: 
    816839                if self.widgetState[stateType].has_key(id): 
     
    836859            #qApp.processEvents() 
    837860        return changed 
    838      
     861 
     862    widgetStateChanged = pyqtSignal(QString, int, QString) 
     863    """Widget state has changed first arg is the state type 
     864    ('Info', 'Warning' or 'Error') the second is the message id 
     865    and finally the message string.""" 
     866 
    839867    def widgetStateToHtml(self, info=True, warning=True, error=True): 
    840868        pixmaps = self.getWidgetStateIcons() 
     
    844872                    "Error": "canvasIcons:error.png"} 
    845873        for show, what in [(info, "Info"), (warning, "Warning"),(error, "Error")]: 
    846             if self.widgetState[what]: 
     874            if show and self.widgetState[what]: 
    847875                items.append('<img src="%s" style="float: left;"> %s' % (iconPath[what], "\n".join(self.widgetState[what].values()))) 
    848876        return "<br>".join(items) 
     
    917945            (Qt.ControlModifier, Qt.Key_W): lambda self: self.setVisible(not self.isVisible())} 
    918946 
    919  
    920947    def scheduleSignalProcessing(self): 
    921         self.signalManager.scheduleSignalProcessing(self) 
     948        """ 
     949        Schedule signal processing by the signal manager. 
     950 
     951        ..note:: The processing is already scheduled at the most appropriate 
     952                 time so you should have few uses for this method. 
     953        """ 
     954        if self.signalManager is not None: 
     955            self.signalManager.scheduleSignalProcessing(self) 
    922956 
    923957    def setBlocking(self, state=True): 
  • Orange/OrangeWidgets/OWReport.py

    r10966 r11291  
    1  # Widgets cannot be reset to the settings they had at the time of reporting. 
    2  # The reason lies in the OWGUI callback mechanism: callbacks are triggered only 
    3  # when the controls are changed by the user. If the related widget's attribute 
    4  # is changed programmatically, the control is updated but the callback is not 
    5  # called. This is done intentionally and with a very solid reason: it enables us 
    6  # to do multiple changes without, for instance, the widget being redrawn every time. 
    7  # Besides, it would probably lead to cycles or at least a great number of redundant calls.  
    8  # However, since setting attributes does not trigger callbacks, setting the attributes 
    9  # here would have not other effect than changing the widget's controls and leaving it 
    10  # in undefined (possibly invalid) state. The reason why we do not have these problems 
    11  # in "normal" use of settings is that the context independent settings are loaded only 
    12  # when the widget is initialized and the context dependent settings are retrieved when 
    13  # the new data is sent and the widget "knows" it has to reconfigure. 
    14  # The only solution would be to require all the widgets have a method for updating 
    15  # everything from scratch according to settings. This would require a lot of work, which 
    16  # could even not be feasible. For instance, there are widget which get the data, compute 
    17  # something and discard the data. This is good since it is memory efficient, but it 
    18  # may prohibit the widget from implementing the update-from-the-scratch method.   
    19   
    20   
     1# Widgets cannot be reset to the settings they had at the time of reporting. 
     2# The reason lies in the OWGUI callback mechanism: callbacks are triggered only 
     3# when the controls are changed by the user. If the related widget's attribute 
     4# is changed programmatically, the control is updated but the callback is not 
     5# called. This is done intentionally and with a very solid reason: it enables 
     6# us to do multiple changes without, for instance, the widget being redrawn 
     7# every time. Besides, it would probably lead to cycles or at least a great 
     8# number of redundant calls. However, since setting attributes does not trigger 
     9# callbacks, setting the attributes here would have not other effect than 
     10# changing the widget's controls and leaving it in undefined (possibly 
     11# invalid) state. The reason why we do not have these problems in "normal" use 
     12# of settings is that the context independent settings are loaded only when 
     13# the widget is initialized and the context dependent settings are retrieved 
     14# when the new data is sent and the widget "knows" it has to reconfigure. 
     15# The only solution would be to require all the widgets have a method for 
     16# updating everything from scratch according to settings. This would require 
     17# a lot of work, which 
     18# could even not be feasible. For instance, there are widget which get the 
     19# data, compute something and discard the data. This is good since it is 
     20# memory efficient, but it may prohibit the widget from implementing the 
     21# update-from-the-scratch method. 
     22 
     23import os 
     24import time 
     25import tempfile 
     26import shutil 
     27import re 
     28import pickle 
     29import binascii 
     30import xml.dom.minidom 
     31 
    2132from OWWidget import * 
    22 from OWWidget import * 
     33 
    2334from PyQt4.QtWebKit import * 
    2435 
    2536from Orange.utils import environ 
    2637 
    27 import os, time, tempfile, shutil, re, shutil, pickle, binascii 
    28 import xml.dom.minidom 
    29  
    30 report = None 
    31  
    3238 
    3339def get_instance(): 
    34     """Return the global ReportWindow instance or None if it was not yet 
    35     initialized. 
    36  
    3740    """ 
    38     if hasattr(qApp, "canvasDlg") and hasattr(qApp.canvasDlg, "reportWindow"): 
    39         return qApp.canvasDlg.reportWindow 
    40     else: 
    41         return report 
     41    Return the global `ReportWindow` instance. 
     42    """ 
     43    app = QApplication.instance() 
     44    if not hasattr(app, "_reportWindow"): 
     45        report = ReportWindow() 
     46        app._reportWindow = report 
     47        app.sendPostedEvents(report, 0) 
     48 
     49        app.aboutToQuit.connect(report.removeTemp) 
     50        # event loop will still process deferred delete events 
     51        # after aboutToQuit is emitted 
     52        app.aboutToQuit.connect(report.deleteLater) 
     53 
     54    return app._reportWindow 
    4255 
    4356 
     
    5063        QListWidget.__init__(self, parent) 
    5164        self.widget = widget 
    52          
     65 
    5366    def dropEvent(self, ev): 
    5467        QListWidget.dropEvent(self, ev) 
     
    5770    def mousePressEvent(self, ev): 
    5871        QListWidget.mousePressEvent(self, ev) 
    59         node = self.currentItem()  
     72        node = self.currentItem() 
    6073        if ev.button() == Qt.RightButton and node: 
    6174            self.widget.nodePopup.popup(ev.globalPos()) 
    6275 
    63      
     76 
    6477class ReportWindow(OWWidget): 
    65     indexfile = os.path.join(environ.widget_install_dir, "report", "index.html") 
    66      
     78    indexfile = os.path.join(environ.widget_install_dir, 
     79                             "report", "index.html") 
     80 
    6781    def __init__(self): 
    6882        OWWidget.__init__(self, None, None, "Report") 
    6983        self.dontScroll = False 
    70         global report 
    71         report = self 
     84        self.widgets = [] 
    7285        self.counter = 0 
    73          
     86 
    7487        self.tempdir = tempfile.mkdtemp("", "orange-report-") 
    7588 
     
    87100 
    88101        self.reportBrowser = QWebView(self.mainArea) 
    89         self.reportBrowser.setUrl(QUrl.fromLocalFile(self.indexfile)) 
    90         self.reportBrowser.page().mainFrame().addToJavaScriptWindowObject("myself", self) 
     102#        self.reportBrowser.setUrl(QUrl.fromLocalFile(self.indexfile)) 
     103        self.reportBrowser.setHtml(open(self.indexfile, "rb").read()) 
    91104        frame = self.reportBrowser.page().mainFrame() 
     105        frame.addToJavaScriptWindowObject("myself", self) 
     106        frame.setScrollBarPolicy(Qt.Vertical, Qt.ScrollBarAsNeeded) 
    92107        self.javascript = frame.evaluateJavaScript 
    93         frame.setScrollBarPolicy(Qt.Vertical, Qt.ScrollBarAsNeeded) 
     108 
    94109        self.mainArea.layout().addWidget(self.reportBrowser) 
    95110 
    96111        box = OWGUI.widgetBox(self.controlArea) 
    97 #        exportButton = OWGUI.button(box, self, "&Export", self.saveXML) 
    98 #        OWGUI.button(box, self, "&Import", self.loadXML) 
    99112        saveButton = OWGUI.button(box, self, "&Save", self.saveReport) 
    100113        printButton = OWGUI.button(box, self, "&Print", self.printReport) 
    101114        saveButton.setAutoDefault(0) 
    102          
     115 
    103116        self.nodePopup = QMenu("Widget") 
    104         self.showWidgetAction = self.nodePopup.addAction( "Show widget", self.showActiveNodeWidget) 
     117        self.showWidgetAction = self.nodePopup.addAction("Show widget", self.showActiveNodeWidget) 
    105118        self.nodePopup.addSeparator() 
    106         #self.renameAction = self.nodePopup.addAction( "&Rename", self.renameActiveNode, Qt.Key_F2) 
    107119        self.deleteAction = self.nodePopup.addAction("Remove", self.removeActiveNode, Qt.Key_Delete) 
    108120        self.deleteAllAction = self.nodePopup.addAction("Remove All", self.clearReport) 
     
    110122 
    111123        self.resize(900, 850) 
    112         
    113     # this should have been __del__, but it doesn't get called! 
     124 
    114125    def removeTemp(self): 
    115126        try: 
     
    118129            pass 
    119130 
    120  
    121131    def __call__(self, name, data, widgetId, icon, wtime=None): 
    122132        if not self.isVisible(): 
     
    124134        else: 
    125135            self.raise_() 
     136 
    126137        self.counter += 1 
    127138        elid = "N%03i" % self.counter 
     
    136147        self.tree.addItem(widnode) 
    137148        self.treeItems[elid] = widnode 
     149 
    138150        self.addEntry(widnode) 
    139          
    140         
     151 
     152    def appendReport(self, name, report, sender=None): 
     153        """ 
     154        Append a report section titled `name` and with html contents 
     155        `report`. `sender` if specified can be a OWBaseWidget instance 
     156        that is sending this report. 
     157 
     158        """ 
     159        if not self.isVisible(): 
     160            self.show() 
     161        else: 
     162            self.raise_() 
     163 
     164        if sender is not None: 
     165            icon = sender.windowIcon() 
     166            widgetId = sender.widgetId 
     167        else: 
     168            icon = QIcon() 
     169            widgetId = -1 
     170 
     171        self.counter += 1 
     172        elid = "N%03i" % self.counter 
     173 
     174        widnode = QListWidgetItem(icon, name, self.tree) 
     175        widnode.setFlags(Qt.ItemIsEnabled | Qt.ItemIsSelectable | \ 
     176                         Qt.ItemIsDragEnabled | Qt.ItemIsEditable) 
     177        widnode.elementId = elid 
     178        widnode.widgetId = widgetId 
     179        widnode.time = time.strftime("%a %b %d %y, %H:%M:%S") 
     180        widnode.data = report 
     181        widnode.name = name 
     182        self.tree.addItem(widnode) 
     183 
     184        self.treeItems[elid] = widnode 
     185 
     186        self.addEntry(widnode) 
     187 
    141188    def addEntry(self, widnode, scrollIntoView=True): 
    142         newEntry = """ 
    143         <div id="%s" onClick="myself.changeItem(this.id);"> 
    144             <a name="%s" /> 
    145             <h1>%s<span class="timestamp">%s</span></h1> 
    146             <div class="insideh1"> 
    147                 %s 
    148             </div> 
    149         </div> 
    150         """ % (widnode.elementId, widnode.elementId, widnode.name, widnode.time, widnode.data) 
     189        newEntry = ( 
     190            '<div id="%s" onClick="myself.changeItem(this.id);">' 
     191            '    <a name="%s">' 
     192            '    <h1>%s<span class="timestamp">%s</span></h1>' 
     193            '    <div class="insideh1">' 
     194            '        %s' 
     195            '    </div>' 
     196            '</div>' 
     197        ) % (widnode.elementId, widnode.elementId, widnode.name, 
     198             widnode.time, widnode.data) 
     199 
    151200        widnode.content = newEntry 
    152         self.javascript("document.body.innerHTML += '%s'" % escape(newEntry)) 
     201 
     202        body = self.bodyFrame() 
     203 
     204        body.appendInside(newEntry) 
     205 
    153206        if scrollIntoView: 
    154207            self.javascript("document.getElementById('%s').scrollIntoView();" % widnode.elementId) 
    155208 
     209    def bodyFrame(self): 
     210        main = self.reportBrowser.page().mainFrame() 
     211        return main.findFirstElement("body") 
    156212 
    157213    def selectionChanged(self, current, previous): 
     
    164220                    newsel.className = 'selected'; 
    165221                    newsel.scrollIntoView();""" % current.elementId) 
    166 #            if not self.dontScroll: 
    167 #                self.javascript("newsel.scrollIntoView(document.getElementById('%s'));" % current.elementId) 
    168222            self.showWidgetAction.setEnabled(current.widgetId >= 0) 
    169223        if previous: 
    170224            self.javascript("document.getElementById('%s').className = '';" % previous.elementId) 
    171          
    172          
     225 
    173226    def rebuildHtml(self): 
    174         self.javascript("document.body.innerHTML = ''") 
     227        self.bodyFrame().setInnerXml("") 
    175228        for i in range(self.tree.count()): 
    176229            self.addEntry(self.tree.item(i)) 
     230 
    177231        selected = self.tree.selectedItems() 
    178232        if selected: 
    179233            self.selectionChanged(selected[0], None) 
    180          
    181          
    182     @pyqtSignature("QString")  
     234 
     235    @pyqtSignature("QString") 
    183236    def changeItem(self, elid): 
    184237        self.dontScroll = True 
     
    187240        self.tree.scrollToItem(item) 
    188241        self.dontScroll = False 
    189   
     242 
    190243    def raiseWidget(self, node): 
    191244        for widget in self.widgets: 
     
    195248            return 
    196249        widget.instance.reshow() 
    197          
     250 
    198251    def showActiveNodeWidget(self): 
    199252        node = self.tree.currentItem() 
    200253        if node: 
    201254            self.raiseWidget(node) 
    202              
     255 
    203256    re_h1 = re.compile(r'<h1>(?P<name>.*?)<span class="timestamp">') 
    204257    def itemChanged(self, node): 
     
    217270        self.tree.clear() 
    218271        self.rebuildHtml() 
    219          
     272 
    220273    def printReport(self): 
    221274        printer = QPrinter() 
    222275        printDialog = QPrintDialog(printer, self) 
    223276        printDialog.setWindowTitle("Print report") 
     277 
    224278        if (printDialog.exec_() != QDialog.Accepted): 
    225279            return 
    226         getattr(self.reportBrowser, "print")(printer) 
    227          
    228          
    229     def createDirectory(self): 
    230         tmpPathName = os.tempnam(orange-report) 
    231         os.mkdir(tmpPathName) 
    232         return tmpPathName 
    233      
     280 
     281        self.reportBrowser.print_(printer) 
     282 
    234283    def getUniqueFileName(self, patt): 
    235284        for i in xrange(1000000): 
    236285            fn = os.path.join(self.tempdir, patt % i) 
    237286            if not os.path.exists(fn): 
    238                 return "file:///"+fn, fn 
    239  
    240     img_re = re.compile(r'<IMG.*?\ssrc="(?P<imgname>[^"]*)"', re.DOTALL+re.IGNORECASE) 
     287                return "file:///" + fn, fn 
     288 
     289    img_re = re.compile(r'<IMG.*?\ssrc="(?P<imgname>[^"]*)"', 
     290                        re.DOTALL + re.IGNORECASE) 
    241291    browser_re = re.compile(r'<!--browsercode(.*?)-->') 
     292 
     293    def getSaveDir(self): 
     294        """ 
     295        Return the initial file system path for the 'Save' dialog. 
     296        """ 
     297        if hasattr(self, "saveDir"): 
     298            # set by orngCanvas.OrangeCanvasDlg 
     299            return self.saveDir 
     300        else: 
     301            settings = QSettings() 
     302            savedir = QDesktopServices.storageLocation( 
     303                QDesktopServices.DocumentsLocation 
     304            ) 
     305 
     306            if PYQT_VERSION < 0x40803: 
     307                savedir = settings.value("OWReport/save-directory", 
     308                                         defaultValue=savedir).toString() 
     309            else: 
     310                savedir = settings.value("OWReport/save-directory", 
     311                                         defaultValue=savedir, 
     312                                         type=unicode) 
     313            return savedir 
     314 
     315    def storeSaveDir(self, savedir): 
     316        """ 
     317        Store the chosen folder path for subsequent save dialog 
     318        initialization. 
     319 
     320        """ 
     321        if hasattr(self, "saveDir"): 
     322            self.saveDir = savedir 
     323        else: 
     324            settings = QSettings() 
     325            settings.setValue("OWReport/save-directory", savedir) 
     326 
    242327    def saveReport(self): 
    243         filename = QFileDialog.getSaveFileName(self, "Save Report", self.saveDir, "Web page (*.html *.htm)") 
     328        """ 
     329        Save the report to a html file chosen by the user. 
     330        """ 
     331        savedir = self.getSaveDir() 
     332        filename = QFileDialog.getSaveFileName(self, "Save Report", savedir, 
     333                                               "Web page (*.html *.htm)") 
    244334        filename = unicode(filename) 
    245          
     335 
    246336        if not filename: 
    247337            return 
    248          
     338 
    249339        path, fname = os.path.split(filename) 
    250         self.saveDir = path 
     340 
     341        self.storeSaveDir(path) 
     342 
    251343        if not os.path.exists(path): 
    252344            try: 
    253345                os.makedirs(path) 
    254346            except: 
    255                 QMessageBox.error(None, "Error", "Cannot create directory "+path) 
     347                QMessageBox.error(None, "Error", 
     348                                  "Cannot create directory " + path) 
    256349 
    257350        tt = file(self.indexfile, "rt").read() 
    258          
     351 
    259352        index = "<br/>".join('<a href="#%s">%s</a>' % (self.tree.item(i).elementId, self.re_h1.search(self.tree.item(i).content).group("name")) 
    260353                             for i in range(self.tree.count())) 
     
    297390            tt = tt.replace(filepref, subdir+"/") 
    298391        file(filename, "wb").write(tt.encode("utf8")) 
    299   
    300  
    301     def saveXML(self): 
    302         filename = QFileDialog.getSaveFileName(self, "Export Report", self.saveDir, "XML file (*.xml)") 
    303         filename = unicode(filename) 
    304         if not filename: 
    305             return 
    306  
    307         outf = file(filename, "wt") 
    308         outf.write('<?xml version="1.0" encoding="ascii"?>\n<report version="1.0">\n') 
    309          
    310         for i in range(self.tree.count()): 
    311             item = self.tree.item(i) 
    312             outf.write('<entry name="%s" time="%s">\n' % (item.name, item.time)) 
    313  
    314             filepref = "file:///"+self.tempdir 
    315             if filepref[-1] != os.sep: 
    316                 filepref += os.sep 
    317             lfilepref = len(filepref) 
    318             imspos = -1 
    319             data = item.data 
    320             while True: 
    321                 imspos = data.find(filepref, imspos+1) 
    322                 if imspos == -1: 
    323                     break 
    324                 imname = data[imspos+lfilepref:data.find('"', imspos)] 
    325                 fname = os.path.join(filepref[8:], imname) 
    326                 outf.write('    <binary name="%s"><![CDATA[%s]]></binary>\n' % (imname, binascii.b2a_base64(file(fname, "rb").read()))) 
    327                 
    328             data = data.replace(filepref, "binary:///") 
    329             outf.write("<content><![CDATA[%s]]></content>\n\n\n" % data) 
    330             outf.write('</entry>\n') 
    331         outf.write('</report>') 
    332          
    333  
    334     def loadXML(self): 
    335         filename = QFileDialog.getOpenFileName(self, "Import Report", self.saveDir, "XML file (*.xml)") 
    336         filename = unicode(filename) 
    337          
    338         if not filename: 
    339             return 
    340  
    341         filepref = "file:///"+self.tempdir 
    342         if 1:#try: 
    343             x = xml.dom.minidom.parse(file(str(filename))) 
    344             x.normalize() 
    345             entries = [] 
    346             files = [] 
    347             for entry in x.getElementsByTagName("entry"): 
    348                 data = entry.getElementsByTagName("content")[0].firstChild.data 
    349                 for fle in entry.getElementsByTagName("binary"): 
    350                     name = oname = fle.getAttribute("name") 
    351                     base, ext = os.path.splitext(name) 
    352                     i = 0 
    353                     while os.path.exists(os.path.join(self.tempdir, name)): 
    354                         i += 1 
    355                         name = "%s%04i%s" % (base, i, ext) 
    356                     data = data.replace("binary:///"+oname, filepref+"/"+name) 
    357                     filedata = binascii.a2b_base64(fle.firstChild.data) 
    358                     files.append((name, filedata))  
    359                 name = entry.getAttribute("name") 
    360                 time = entry.getAttribute("time") 
    361                 entries.append((name, data, None, QIcon(), time)) 
    362                  
    363             for fname, fdata in files: 
    364                 print fname, len(fdata) 
    365                 file(os.path.join(self.tempdir, fname), "wb").write(fdata) 
    366             for entry in entries: 
    367                 print entry[1] 
    368                 self(*entry) 
    369         #except: 
    370             pass 
    371             # !!!!!!!!!!! 
    372          
     392 
     393 
    373394def getDepth(item, expanded=True): 
    374395    ccount = item.childCount() 
  • Orange/OrangeWidgets/OWWidget.py

    r10966 r11291  
    77from OWBaseWidget import * 
    88 
     9 
    910class OWWidget(OWBaseWidget): 
    10     def __init__(self, parent=None, signalManager=None, title="Orange Widget", wantGraph=False, wantStatusBar=False, savePosition=True, wantMainArea=1, noReport=False, showSaveGraph=1, resizingEnabled=1, wantStateInfoWidget=None, **args): 
     11    def __init__(self, parent=None, signalManager=None, title="Orange Widget", 
     12                 wantGraph=False, wantStatusBar=False, savePosition=True, 
     13                 wantMainArea=1, noReport=False, showSaveGraph=1, 
     14                 resizingEnabled=1, wantStateInfoWidget=None, 
     15                 **args): 
    1116        """ 
    1217        Initialization 
     
    5863 
    5964        self.__reportData = None 
    60         if OWReport.get_instance() and not noReport and hasattr(self, "sendReport"): 
     65        if not noReport and hasattr(self, "sendReport"): 
    6166            self.buttonBackground.show() 
    6267            self.reportButton = OWGUI.button(self.buttonBackground, self, "&Report", self.reportAndFinish, debuggingEnabled=0) 
     
    169174        self.sendReport() 
    170175        self.finishReport() 
    171          
    172     def startReport(self, name=None, needDirectory=False): 
     176 
     177    def startReport(self, name=None): 
    173178        if self.__reportData is not None: 
    174179            print "Cannot open a new report when an old report is still active" 
     
    176181        self.reportName = name or self.windowTitle() 
    177182        self.__reportData = "" 
    178         if needDirectory: 
    179             return OWReport.get_instance().createDirectory() 
    180         else: 
    181             return True 
     183        return True 
    182184 
    183185    def reportSection(self, title): 
     
    208210        if self.__reportData is None: 
    209211            self.startReport() 
    210              
     212 
    211213        if type(filenameOrFunc) in [str, unicode]: 
    212214            self.__reportData += '    <IMG src="%s"/>\n' % filenameOrFunc 
     
    283285        elif ifNone is not None: 
    284286            self.reportRaw(ifNone) 
    285          
    286  
    287         
     287 
    288288    def finishReport(self): 
    289289        if self.__reportData is not None: 
    290             OWReport.get_instance()(self.reportName, self.__reportData or "", self.widgetId, self.windowIcon())#, self.getSettings(False)) 
     290            report = OWReport.get_instance() 
     291#            report(self.reportName, self.__reportData or "", 
     292#                   self.widgetId, self.windowIcon()) 
     293            report.appendReport(self.reportName, self.__reportData, 
     294                                sender=self) 
    291295            self.__reportData = None 
    292296 
  • Orange/OrangeWidgets/Prototypes/__init__.py

    r10423 r11262  
     1""" 
     2========== 
     3Prototypes 
     4========== 
     5 
     6Various widgets not polished for regular use. 
     7 
     8""" 
     9 
     10# Category description for the widget registry 
     11 
     12NAME = "Prototypes" 
     13 
     14DESCRIPTION = "Various widgets not polished for regular use." 
     15 
     16ICON = "icons/Category-Prototypes.svg" 
     17 
     18BACKGROUND = "#FAC1D9" 
  • Orange/OrangeWidgets/Regression/OWEarth.py

    r10776 r11217  
    33<description>Multivariate Adaptive Regression Splines (MARS)</description> 
    44<category>Regression</category> 
    5 <icon>icons/Earth.png<icon> 
     5<icon>icons/EarthMars.svg</icon> 
    66<priority>100</priority> 
    77<tags>MARS, Multivariate, Adaptive, Regression, Splines</tags> 
  • Orange/OrangeWidgets/Regression/OWKNNRegression.py

    r9671 r11301  
    22<name>k Nearest Neighbours Regression</name> 
    33<description>K-nearest neighbours learner/predictor.</description> 
    4 <icon>icons/kNearestNeighbours.png</icon> 
     4<icon>icons/kNearestNeighbours.svg</icon> 
    55<contact>Janez Demsar (janez.demsar(@at@)fri.uni-lj.si)</contact> 
    66<priority>20</priority> 
    77<keywords>knn</keywords> 
    88""" 
     9from OWWidget import * 
    910 
    10 from OWKNN import * 
     11from OWKNN import OWKNN 
     12from orngWrap import PreprocessedLearner 
     13 
    1114 
    1215class OWKNNRegression(OWKNN): 
  • Orange/OrangeWidgets/Regression/OWLinearRegression.py

    r10961 r11096  
    22<name>Linear Regression</name> 
    33<description>Linear Regression</name> 
    4 <icon>icons/LinearRegression.png</icon> 
     4<icon>icons/LinearRegression.svg</icon> 
    55<priority>10</priority> 
    66<category>Regression</category> 
  • Orange/OrangeWidgets/Regression/OWMean.py

    r9671 r11096  
    22<name>Mean</name> 
    33<description>Mean regression</description> 
    4 <icon>icons/Mean.png</icon> 
     4<icon>icons/Mean.svg</icon> 
    55<priority>5</priority> 
    66<contact>Ales Erjavec (ales.erjavec(@at@)fri.uni-lj.si)</contact> 
  • Orange/OrangeWidgets/Regression/OWPade.py

    r9671 r11096  
    22<name>Pade</name> 
    33<description>Computes local partial derivatives</description> 
    4 <icon>icons/Pade.png</icon> 
     4<icon>icons/Pade.svg</icon> 
    55<priority>3500</priority> 
    66""" 
  • Orange/OrangeWidgets/Regression/OWRandomForestRegression.py

    r10587 r11096  
    22<name>Random Forest Regression</name> 
    33<description>Random forest regression.</description> 
    4 <icon>icons/RandomForest.png</icon> 
     4<icon>icons/RandomForestRegression.svg</icon> 
    55<contact>Marko Toplak (marko.toplak(@at@)gmail.com)</contact> 
    66<priority>320</priority> 
  • Orange/OrangeWidgets/Regression/OWRegressionTree.py

    r10552 r11096  
    22<name>Regression Tree</name> 
    33<description>Constructs a tree regression learner and given data a regression tree classifier</description> 
    4 <icon>RegressionTree.png</icon> 
     4<icon>icons/RegressionTree.svg</icon> 
    55<contact>Ales Erjavec (ales.erjavec(@at@)fri.uni-lj.si)</contact> 
    66<priority>110</priority> 
  • Orange/OrangeWidgets/Regression/OWRegressionTreeViewer2D.py

    r10552 r11096  
    22<name> Regression Tree Graph</name> 
    33<description>Regression tree viewer (graph view).</description> 
    4 <icon>icons/RegressionTreeGraph.png</icon> 
     4<icon>icons/RegressionTreeGraph.svg</icon> 
    55<contact>Ales Erjavec (ales.erjavec(@at@)fri.uni-lj.si)</contact> 
    66<priority>2110</priority> 
  • Orange/OrangeWidgets/Regression/OWSVMRegression.py

    r10729 r11096  
    33<name>SVM Regression</name> 
    44<description>Support Vector Machine Regression.</description> 
    5 <icon>icons/BasicSVM.png</icon> 
     5<icon>icons/SVMRegression.svg</icon> 
    66<contact>Ales Erjavec (ales.erjavec(@at@)fri.uni-lj.si)</contact> 
    77<priority>100</priority> 
  • Orange/OrangeWidgets/Regression/__init__.py

    r10423 r11095  
     1""" 
     2========== 
     3Regression 
     4========== 
     5 
     6Prediction of continuous class variables. 
     7 
     8""" 
     9 
     10# Category description for the widget registry 
     11 
     12NAME = "Regression" 
     13 
     14DESCRIPTION = "Prediction of continuous class variables." 
     15 
     16BACKGROUND = "#E5BBFB" 
     17 
     18ICON = "icons/Category-Regression.svg" 
     19 
     20PRIORITY = 4 
  • Orange/OrangeWidgets/Unsupervised/OWAttributeDistance.py

    r9671 r11217  
    22<name>Attribute Distance</name> 
    33<description>Computes attribute distance for given data set.</description> 
    4 <icon>icons/AttributeDistance.png</icon> 
     4<icon>icons/Distance.svg</icon> 
    55<contact>Blaz Zupan (blaz.zupan(@at@)fri.uni-lj.si)</contact> 
    66<priority>1400</priority> 
  • Orange/OrangeWidgets/Unsupervised/OWDistanceFile.py

    r10466 r11217  
    33<description>Loads a distance matrix from a file</description> 
    44<contact>Janez Demsar</contact> 
    5 <icon>icons/DistanceFile.png</icon> 
     5<icon>icons/LoadDistances.svg</icon> 
    66<priority>1100</priority> 
    77""" 
  • Orange/OrangeWidgets/Unsupervised/OWDistanceMap.py

    r9671 r11217  
    22<name>Distance Map</name> 
    33<description>Displays distance matrix as a heat map.</description> 
    4 <icon>icons/DistanceMap.png</icon> 
     4<icon>icons/DistanceMatrix.svg</icon> 
    55<contact>Blaz Zupan (blaz.zupan(@at@)fri.uni-lj.si)</contact> 
    66<priority>1200</priority> 
  • Orange/OrangeWidgets/Unsupervised/OWExampleDistance.py

    r9671 r11217  
    22<name>Example Distance</name> 
    33<description>Computes a distance matrix from a set of data examples.</description> 
    4 <icon>icons/ExampleDistance.png</icon> 
     4<icon>icons/Distance.svg</icon> 
    55<contact>Blaz Zupan (blaz.zupan(@at@)fri.uni-lj.si)</contact> 
    66<priority>1300</priority> 
  • Orange/OrangeWidgets/Unsupervised/OWHierarchicalClustering.py

    r10762 r11217  
    22<name>Hierarchical Clustering</name> 
    33<description>Hierarchical clustering based on distance matrix, and a dendrogram viewer.</description> 
    4 <icon>icons/HierarchicalClustering.png</icon> 
     4<icon>icons/HierarchicalClustering.svg</icon> 
    55<contact>Ales Erjavec (ales.erjavec(@at@)fri.uni-lj.si)</contact>  
    66<priority>2100</priority> 
  • Orange/OrangeWidgets/Unsupervised/OWKMeans.py

    r10995 r11217  
    22<name>k-Means Clustering</name> 
    33<description>k-means clustering.</description> 
    4 <icon>icons/KMeans.png</icon> 
     4<icon>icons/kMeansClustering.svg</icon> 
    55<contact>Blaz Zupan (blaz.zupan(@at@)fri.uni-lj.si)</contact> 
    66<priority>2300</priority> 
  • Orange/OrangeWidgets/Unsupervised/OWMDS.py

    r9671 r11217  
    22<name>MDS</name> 
    33<description>Multi dimensional scaling</description> 
    4 <icon>icons/MDS.png</icon> 
     4<icon>icons/MDS.svg</icon> 
    55<contact>Ales Erjavec (ales.erjavec(@at@)fri.uni-lj.si)</contact> 
    66<priority>2500</priority> 
  • Orange/OrangeWidgets/Unsupervised/OWPCA.py

    r10848 r11217  
    33<description>Perform Principal Component Analysis</description> 
    44<contact>ales.erjavec(@ at @)fri.uni-lj.si</contact> 
    5 <icons>icons/PCA.png</icons> 
     5<icon>icons/PCA.svg</icon> 
    66<tags>pca,principal,component,projection</tags> 
    77<priority>3050</priority> 
  • Orange/OrangeWidgets/Unsupervised/OWSOM.py

    r10455 r11217  
    22<name>SOM</name> 
    33<description>Self organizing maps learner.</description> 
    4 <icon>icons/SOM.png</icon> 
     4<icon>icons/SOM.svg</icon> 
    55<contact>Ales Erjavec (ales.erjevec(@at@)fri.uni.lj.si)</contact>  
    66<priority>5010</priority> 
  • Orange/OrangeWidgets/Unsupervised/OWSOMVisualizer.py

    r9671 r11217  
    22<name>SOM Visualizer</name> 
    33<description>Visualizes a trained self organising maps.</description> 
    4 <icon>icons/SOMVisualizer.png</icon> 
     4<icon>icons/SOMVisualizer.svg</icon> 
    55<contact>Ales Erjavec (ales.erjavec(@at@)fri.uni-lj.si)</contact>  
    66<priority>5020</priority> 
  • Orange/OrangeWidgets/Unsupervised/OWSaveDistanceFile.py

    r10738 r11217  
    33<description>Saves a distance matrix to a file</description> 
    44<contact>Miha Stajdohar</contact> 
    5 <icon>icons/SaveDistanceFile.png</icon> 
     5<icon>icons/SaveDistances.svg</icon> 
    66<priority>1150</priority> 
    77""" 
  • Orange/OrangeWidgets/Unsupervised/OWSymMatrixTransform.py

    r9671 r11217  
    33<description>Tranforms matrix according to selected criteria</description> 
    44<contact>Miha Stajdohar</contact> 
    5 <icon>icons/DistanceFile.png</icon> 
     5<icon>icons/MatrixTransformation.svg</icon> 
    66<priority>1110</priority> 
    77""" 
  • Orange/OrangeWidgets/Unsupervised/__init__.py

    r10423 r11262  
     1""" 
     2============ 
     3Unsupervised 
     4============ 
    15 
     6Unsupervised learning. 
     7 
     8""" 
     9 
     10# Category description for the widget registry 
     11 
     12NAME = "Unsupervised" 
     13 
     14DESCRIPTION = "Unsupervised learning." 
     15 
     16BACKGROUND = "#CAE1EF" 
     17 
     18ICON = "icons/Category-Unsupervised.svg" 
     19 
     20PRIORITY = 6 
  • Orange/OrangeWidgets/Visualize/OWAttributeStatistics.py

    r9671 r11096  
    33<description>Basic attribute statistics.</description> 
    44<contact>Jure Zabkar (jure.zabkar@fri.uni-lj.si)</contact> 
    5 <icon>icons/AttributeStatistics.png</icon> 
     5<icon>icons/AttributeStatistics.svg</icon> 
    66<priority>200</priority> 
    77""" 
  • Orange/OrangeWidgets/Visualize/OWCorrespondenceAnalysis.py

    r9671 r11096  
    11"""<name>Correspondence Analysis</name> 
    22<description>Takes a ExampleTable and runs correspondence analysis</description> 
    3 <icon>icons/CorrespondenceAnalysis.png</icon> 
     3<icon>icons/CorrespondenceAnalysis.svg</icon> 
    44<priority>3300</priority> 
    55<contact>Ales Erjavec (ales.erjavec(@ at @)fri.uni-lj.si</contact> 
  • Orange/OrangeWidgets/Visualize/OWDistributions.py

    r10493 r11096  
    33<description>Displays attribute value distributions.</description> 
    44<contact>Tomaz Curk</contact> 
    5 <icon>icons/Distribution.png</icon> 
     5<icon>icons/Distribution.svg</icon> 
    66<priority>100</priority> 
    77""" 
  • Orange/OrangeWidgets/Visualize/OWLinProj.py

    r10913 r11096  
    33<description>Create a linear projection.</description> 
    44<contact>Gregor Leban (gregor.leban@fri.uni-lj.si)</contact> 
    5 <icon>icons/LinearProjection.png</icon> 
     5<icon>icons/LinearProjection.svg</icon> 
    66<priority>2000</priority> 
    77""" 
  • Orange/OrangeWidgets/Visualize/OWMosaicDisplay.py

    r9671 r11096  
    33<description>Shows a mosaic display.</description> 
    44<contact>Gregor Leban (gregor.leban@fri.uni-lj.si)</contact> 
    5 <icon>icons/MosaicDisplay.png</icon> 
     5<icon>icons/MosaicDisplay.svg</icon> 
    66<priority>4100</priority> 
    77""" 
  • Orange/OrangeWidgets/Visualize/OWMultiCorrespondenceAnalysis.py

    r9671 r11096  
    11"""<name>Multi Correspondence Analysis</name> 
    22<description>Takes a ExampleTable and runs multi correspondence analysis</description> 
    3 <icon>icons/CorrespondenceAnalysis.png</icon> 
     3<icon>icons/CorrespondenceAnalysis.svg</icon> 
    44<priority>3350</priority> 
    55<contact>Ales Erjavec (ales.erjavec(@ at @)fri.uni-lj.si</contact> 
  • Orange/OrangeWidgets/Visualize/OWParallelCoordinates.py

    r10466 r11096  
    33<description>Parallel coordinates (multiattribute) visualization.</description> 
    44<contact>Gregor Leban (gregor.leban@fri.uni-lj.si)</contact> 
    5 <icon>icons/ParallelCoordinates.png</icon> 
     5<icon>icons/ParallelCoordinates.svg</icon> 
    66<priority>3200</priority> 
    77""" 
  • Orange/OrangeWidgets/Visualize/OWPolyviz.py

    r9671 r11096  
    33<description>Polyviz (multiattribute) visualization.</description> 
    44<contact>Gregor Leban (gregor.leban@fri.uni-lj.si)</contact> 
    5 <icon>icons/Polyviz.png</icon> 
     5<icon>icons/Polyviz.svg</icon> 
    66<priority>3150</priority> 
    77""" 
  • Orange/OrangeWidgets/Visualize/OWRadviz.py

    r9671 r11096  
    33<description>Create a radviz projection.</description> 
    44<contact>Gregor Leban (gregor.leban@fri.uni-lj.si)</contact> 
    5 <icon>icons/Radviz.png</icon> 
     5<icon>icons/Radviz.svg</icon> 
    66<priority>3100</priority> 
    77""" 
  • Orange/OrangeWidgets/Visualize/OWScatterPlot.py

    r9671 r11287  
    33<description>Scatterplot visualization.</description> 
    44<contact>Gregor Leban (gregor.leban@fri.uni-lj.si)</contact> 
    5 <icon>icons/ScatterPlot.png</icon> 
     5<icon>icons/ScatterPlot.svg</icon> 
    66<priority>1000</priority> 
    77""" 
    8 # ScatterPlot.py 
    9 # 
    10 # Show data using scatterplot 
    11 # 
    128from OWWidget import * 
    139from OWScatterPlotGraph import * 
     
    1915 
    2016 
    21 ########################################################################################### 
     17NAME = "Scatter Plot" 
     18 
     19DESCRIPTION = "Scatter plot graph visualization" 
     20 
     21LONG_DESCRIPTION = """ 
     22This widget provides a standard 2-dimensional scatter plot 
     23visualization for both continuous and discrete-valued attributes. 
     24""" 
     25 
     26ID = "orange.widgets.visualization.scatterplot" 
     27 
     28ICON = "icons/ScatterPlot.svg" 
     29 
     30AUTHOR = "Gregor Leban" 
     31 
     32PRIORITY = 1000 
     33 
     34INPUTS = ( 
     35    dict(name="Data", type=ExampleTable, handler="setData", flags=Default, 
     36         doc="Primary input data set.", 
     37         id="primary-data"), 
     38 
     39    dict(name="Data Subset", type=ExampleTable, handler="setSubsetData", 
     40         doc="Additional data set with a subset of instances in 'Data'", 
     41         id="subset-data"), 
     42 
     43    dict(name="Features", type=AttributeList, handler="setShownAttributes", 
     44         doc="A subset of features in 'Data' to display", 
     45         id="feature-subset"), 
     46 
     47    dict(name="Evaluation Results", type=orngTest.ExperimentResults, 
     48         handler="setTestResults", 
     49         id="evaluation-results"), 
     50 
     51    dict(name="VizRank Learner", type=orange.Learner, 
     52         handler="setVizRankLearner", 
     53         id="vizrank-learner"), 
     54) 
     55 
     56OUTPUTS = ( 
     57    dict(name="Selected Data", type=ExampleTable, 
     58         doc="Selected data subset", 
     59         id="selected-data"), 
     60 
     61    dict(name="Other Data", type=ExampleTable, 
     62         doc="Data subset not included in 'Selected Data'", 
     63         id="unselected-data") 
     64) 
     65 
     66 
     67############################################################################### 
    2268##### WIDGET : Scatterplot visualization 
    23 ########################################################################################### 
     69############################################################################### 
    2470class OWScatterPlot(OWWidget): 
    25     settingsList = ["graph.pointWidth", "graph.showXaxisTitle", "graph.showYLaxisTitle", "showGridlines", "graph.showAxisScale", "graph.useAntialiasing", 
    26                     "graph.showLegend", "graph.jitterSize", "graph.jitterContinuous", "graph.showFilledSymbols", "graph.showProbabilities", 
    27                     "graph.alphaValue", "graph.showDistributions", "autoSendSelection", "toolbarSelection", "graph.sendSelectionOnUpdate", 
    28                     "colorSettings", "selectedSchemaIndex", "VizRankLearnerName"] 
    29     jitterSizeNums = [0.0, 0.1,   0.5,  1,  2 , 3,  4 , 5 , 7 ,  10,   15,   20 ,  30 ,  40 ,  50 ] 
     71    settingsList = ["graph.pointWidth", "graph.showXaxisTitle", 
     72                    "graph.showYLaxisTitle", "showGridlines", 
     73                    "graph.showAxisScale", "graph.useAntialiasing", 
     74                    "graph.showLegend", "graph.jitterSize", 
     75                    "graph.jitterContinuous", "graph.showFilledSymbols", 
     76                    "graph.showProbabilities", "graph.alphaValue", 
     77                    "graph.showDistributions", "autoSendSelection", 
     78                    "toolbarSelection", "graph.sendSelectionOnUpdate", 
     79                    "colorSettings", "selectedSchemaIndex", 
     80                    "VizRankLearnerName"] 
     81 
     82    jitterSizeNums = [0.0, 0.1, 0.5, 1, 2, 3, 4, 5, 7, 10, 15, 20, 30, 40, 50] 
    3083 
    3184    contextHandlers = {"": DomainContextHandler("", ["attrX", "attrY", 
     
    3386                                                     ("attrLabel", DomainContextHandler.Optional + DomainContextHandler.IncludeMetaAttributes)])} 
    3487 
    35     def __init__(self, parent=None, signalManager = None): 
     88    def __init__(self, parent=None, signalManager=None): 
    3689        OWWidget.__init__(self, parent, signalManager, "Scatter Plot", TRUE) 
    3790 
  • Orange/OrangeWidgets/Visualize/OWSieveDiagram.py

    r9671 r11096  
    33<description>Sieve diagram.</description> 
    44<contact>Gregor Leban (gregor.leban@fri.uni-lj.si)</contact> 
    5 <icon>icons/SieveDiagram.png</icon> 
     5<icon>icons/SieveDiagram.svg</icon> 
    66<priority>4200</priority> 
    77""" 
  • Orange/OrangeWidgets/Visualize/OWSieveMultigram.py

    r9671 r11096  
    33<description>Sieve multigram.</description> 
    44<contact>Gregor Leban (gregor.leban@fri.uni-lj.si)</contact> 
    5 <icon>icons/SieveMultigram.png</icon> 
     5<icon>icons/SieveMultigram.svg</icon> 
    66<priority>4300</priority> 
    77""" 
  • Orange/OrangeWidgets/Visualize/OWSurveyPlot.py

    r9671 r11096  
    33<description>Survey plot (multiattribute) visualization.</description> 
    44<contact>Gregor Leban (gregor.leban@fri.uni-lj.si)</contact> 
    5 <icon>icons/SurveyPlot.png</icon> 
     5<icon>icons/SurveyPlot.svg</icon> 
    66<priority>3250</priority> 
    77""" 
  • Orange/OrangeWidgets/Visualize/__init__.py

    r10423 r11095  
     1""" 
     2========= 
     3Visualize 
     4========= 
     5 
     6Widgets for data visualization. 
     7 
     8""" 
     9 
     10# Category description for the widget registry 
     11 
     12NAME = "Visualize" 
     13 
     14DESCRIPTION = "Widgets for data visualization." 
     15 
     16BACKGROUND = "#FFB7B1" 
     17 
     18ICON = "icons/Category-Visualize.svg" 
     19 
     20PRIORITY = 2 
  • Orange/OrangeWidgets/__init__.py

    r9671 r11264  
    11""" 
    2     This file is here so that the documentation generator can import the 'plot' module.  
     2 
    33""" 
     4import pkg_resources 
     5 
     6 
     7# Entry point for main Orange categories/widgets discovery 
     8def widget_discovery(discovery): 
     9    from . import ( 
     10        Associate, Classify, Data, Evaluate, Regression, 
     11        Unsupervised, Visualize, Prototypes 
     12    ) 
     13    dist = pkg_resources.get_distribution("Orange") 
     14    for pkg in [Data, Visualize, Classify, Regression, Evaluate, Unsupervised, 
     15                Associate, Prototypes]: 
     16        discovery.process_category_package(pkg, distribution=dist) 
     17 
     18 
     19# Intersphinx documentation root's (registered in setup.py) 
     20intersphinx = ( 
     21     # root in development mode 
     22     ("{DEVELOP_ROOT}/docs/build/html/", None), 
     23     # URL is taken from PKG-INFO (Home-page) 
     24     ("{URL}/docs/latest/", 
     25      "{URL}/docs/latest/_objects/") 
     26) 
  • setup.cfg

    r9618 r11264  
    11[build_sphinx] 
    2 source-dir = docs/reference/rst 
    3 build-dir = docs/reference/build 
     2source-dir = docs 
     3build-dir = docs/build 
    44all_files = 1 
  • setup.py

    r11085 r11288  
    643643             all_with_extension(path="datasets", extensions=("tab", "csv", "basket")) +\ 
    644644             all_with_extension(path="testing/regression/tests_20", extensions=("net", "tab", "basket", "csv")), 
    645         "Orange.OrangeCanvas": ["icons/*.png", "orngCanvas.pyw", "WidgetTabs.txt"], 
    646         "Orange.OrangeWidgets": ["icons/*.png", "icons/backgrounds/*.png", "report/index.html"], 
    647         "Orange.OrangeWidgets.Associate": ["icons/*.png"], 
    648         "Orange.OrangeWidgets.Classify": ["icons/*.png"], 
    649         "Orange.OrangeWidgets.Data": ["icons/*.png"], 
    650         "Orange.OrangeWidgets.Evaluate": ["icons/*.png"], 
    651         "Orange.OrangeWidgets.Prototypes": ["icons/*.png"], 
    652         "Orange.OrangeWidgets.Regression": ["icons/*.png"], 
    653         "Orange.OrangeWidgets.Unsupervised": ["icons/*.png"], 
    654         "Orange.OrangeWidgets.Visualize": ["icons/*.png"], 
    655         "Orange.OrangeWidgets.Visualize Qt": ["icons/*.png"], 
     645        "Orange.OrangeCanvas": ["icons/*.png", "icons/*.svg", 
     646                                "orngCanvas.pyw", "WidgetTabs.txt"], 
     647        "Orange.OrangeCanvas.styles": ["*.qss", "orange/*.svg"], 
     648        "Orange.OrangeWidgets": ["icons/*.png", "icons/backgrounds/*.png", 
     649                                 "report/index.html"], 
     650        "Orange.OrangeWidgets.Associate": ["icons/*.png", "icons/*.svg"], 
     651        "Orange.OrangeWidgets.Classify": ["icons/*.png", "icons/*.svg"], 
     652        "Orange.OrangeWidgets.Data": ["icons/*.png", "icons/*.svg"], 
     653        "Orange.OrangeWidgets.Evaluate": ["icons/*.png", "icons/*.svg"], 
     654        "Orange.OrangeWidgets.Prototypes": ["icons/*.png", "icons/*.svg"], 
     655        "Orange.OrangeWidgets.Regression": ["icons/*.png", "icons/*.svg"], 
     656        "Orange.OrangeWidgets.Unsupervised": ["icons/*.png", "icons/*.svg"], 
     657        "Orange.OrangeWidgets.Visualize": ["icons/*.png", "icons/*.svg"], 
     658        "Orange.OrangeWidgets.Visualize Qt": ["icons/*.png", "icons/*.svg"], 
    656659        "Orange.OrangeWidgets.plot": ["*.gs", "*.vs"], 
    657660        "Orange.OrangeWidgets.plot.primitives": ["*.obj"], 
     
    747750) 
    748751 
    749 # TODO: Use entry points for automatic script creation 
    750 # http://packages.python.org/distribute/setuptools.html#automatic-script-creation 
    751752ENTRY_POINTS = { 
     753    'gui_scripts': ( 
     754            'orange-canvas = Orange.OrangeCanvas.main:main', 
     755    ), 
     756    'orange.canvas.help': ( 
     757            'intersphinx = Orange.OrangeWidgets:intersphinx', 
     758    ) 
    752759} 
     760 
    753761 
    754762def setup_package(): 
     
    776784        zip_safe = False, 
    777785 
    778         # TODO: Should migrate those for distribute (using entry points) 
    779786        cmdclass = cmdclass, 
    780787        ext_modules = ext_modules, 
    781         scripts = ( 
    782             "bin/orange-canvas", 
    783         ), 
    784788    ) 
    785789 
Note: See TracChangeset for help on using the changeset viewer.