Commits

Aleš Erjavec  committed 2db45be

Rebased patches

  • Participants
  • Parent commits 377536d

Comments (0)

Files changed (4)

File main-welcome

-# HG changeset patch
-# User Ales Erjavec <ales.erjavec@fri.uni-lj.si>
-# Date 1369665761 -7200
-#      Mon May 27 16:42:41 2013 +0200
-# Node ID e70d4ac91ab25113787b70ad2069e47a9df3d435
-# Parent  0d11c6062e58096df6a05ea7835632cc9ecf2fe8
-imported patch main-welcome
-
-diff --git a/Orange/OrangeCanvas/main.py b/Orange/OrangeCanvas/main.py
---- a/Orange/OrangeCanvas/main.py
-+++ b/Orange/OrangeCanvas/main.py
-@@ -16,7 +16,7 @@ from contextlib import nested
- import pkg_resources
- 
- from PyQt4.QtGui import QFont, QColor
--from PyQt4.QtCore import Qt, QDir
-+from PyQt4.QtCore import Qt, QDir, QTimer
- 
- from Orange import OrangeCanvas
- from Orange.OrangeCanvas.application.application import CanvasApplication
-@@ -205,6 +205,10 @@ def main(argv=None):
-         widget_registry.register_widget
-     )
- 
-+    want_welcome = \
-+        settings.value("startup/show-welcome-screen", True, type=bool) \
-+        and not options.no_welcome
-+
-     want_splash = \
-         settings.value("startup/show-splash-screen", True, type=bool) and \
-         not options.no_splash
-@@ -239,22 +243,9 @@ def main(argv=None):
-     canvas_window.show()
-     canvas_window.raise_()
- 
--    want_welcome = \
--        settings.value("startup/show-welcome-screen", True, type=bool) \
--        and not options.no_welcome
--
--    # Process events to make sure the canvas_window layout has
--    # a chance to activate (the welcome dialog is modal and will
--    # block the event queue, plus we need a chance to receive open file
--    # signals when running without a splash screen)
--    app.processEvents()
--
-     app.fileOpenRequest.connect(canvas_window.open_scheme_file)
- 
--    if want_welcome and not args and not open_requests:
--        canvas_window.welcome_dialog()
--
--    elif args:
-+    if args:
-         log.info("Loading a scheme from the command line argument %r",
-                  args[0])
-         canvas_window.load_scheme(args[0])
-@@ -263,6 +254,9 @@ def main(argv=None):
-                  open_requests[-1])
-         canvas_window.load_scheme(open_requests[-1].toLocalFile())
- 
-+    if want_welcome and not args and not open_requests:
-+        QTimer.singleShot(0, canvas_window.welcome_action.trigger)
-+
-     stdout_redirect = \
-         settings.value("output/redirect-stdout", True, type=bool)
- 

File scheme-refactor

 # HG changeset patch
-# Parent 24841b5a1675c08b9aca57c3b0ed929d3b6c14ae
+# Parent f0c6018bb07c01564f1b5ff9ee367028f38c1b4e
 Eventfull scheme
 
 diff --git a/Orange/OrangeCanvas/scheme/events.py b/Orange/OrangeCanvas/scheme/events.py
 diff --git a/Orange/OrangeCanvas/scheme/link.py b/Orange/OrangeCanvas/scheme/link.py
 --- a/Orange/OrangeCanvas/scheme/link.py
 +++ b/Orange/OrangeCanvas/scheme/link.py
-@@ -5,12 +5,13 @@ Scheme Link
+@@ -5,11 +5,12 @@ Scheme Link
  
  """
  
  from PyQt4.QtCore import pyqtSignal as Signal
  from PyQt4.QtCore import pyqtProperty as Property
  
- from .utils import name_lookup
+ from ..utils import name_lookup
++from .events import LinkEvent
  from .errors import IncompatibleChannelTypeError
-+from .events import LinkEvent
  
  
- def compatible_channels(source_channel, sink_channel):
 @@ -39,7 +40,7 @@ def can_connect(source_node, sink_node):
  def possible_links(source_node, sink_node):
      """
 +from .events import NodeEvent
 +
  
- class SchemeNode(QObject):
+ class UserMessage(object):
      """
-@@ -88,6 +90,7 @@ class SchemeNode(QObject):
+@@ -115,6 +117,7 @@ class SchemeNode(QObject):
          """
          if self.__title != title:
              self.__title = unicode(title)
              self.title_changed.emit(self.__title)
  
      def title(self):
-@@ -107,6 +110,7 @@ class SchemeNode(QObject):
+@@ -134,6 +137,7 @@ class SchemeNode(QObject):
          """
          if self.__position != pos:
              self.__position = pos
              self.position_changed.emit(pos)
  
      def position(self):
-@@ -126,6 +130,7 @@ class SchemeNode(QObject):
+@@ -153,6 +157,7 @@ class SchemeNode(QObject):
          """
          if self.__progress != value:
              self.__progress = value
              self.progress_changed.emit(value)
  
      def progress(self):
-@@ -145,6 +150,7 @@ class SchemeNode(QObject):
+@@ -172,6 +177,7 @@ class SchemeNode(QObject):
          """
          if self.__processing_state != state:
              self.__processing_state = state
              self.processing_state_changed.emit(state)
  
      def processing_state(self):
-@@ -159,6 +165,7 @@ class SchemeNode(QObject):
+@@ -186,6 +192,7 @@ class SchemeNode(QObject):
      def set_tool_tip(self, tool_tip):
          if self.__tool_tip != tool_tip:
              self.__tool_tip = tool_tip
  
      def tool_tip(self):
          return self.__tool_tip
-@@ -166,6 +173,11 @@ class SchemeNode(QObject):
-     tool_tip = Property(str, fset=set_tool_tip,
-                         fget=tool_tip)
+@@ -208,6 +215,11 @@ class SchemeNode(QObject):
+     #: The node's state message has changed
+     state_message_changed = Signal(UserMessage)
  
 +    def _send_change_event(self):
 +        QCoreApplication.sendEvent(
  
 @@ -29,6 +29,12 @@ from .errors import (
  
- from .readwrite import scheme_to_ows_stream, parse_scheme
+ from . import readwrite
  
 +from .events import (
 +    SchemeEvent, SchemeChangeEvent, NodeEvent, NodeErrorEvent, LinkEvent, LinkErrorEvent,
-main-welcome
 log-view
 window-file-path
 cat-menu-test
 qvariant-remove
 scheme-baseitem
 pyside-testing
-widget-meta-desc-remove
 scheme-runner
 tool-list
 scheme-refactor

File widget-meta-desc-remove

-# HG changeset patch
-# Parent bdb53b70301811107788a46767b6f41b28f11154
-diff --git a/Orange/OrangeWidgets/Classify/OWCN2.py b/Orange/OrangeWidgets/Classify/OWCN2.py
---- a/Orange/OrangeWidgets/Classify/OWCN2.py
-+++ b/Orange/OrangeWidgets/Classify/OWCN2.py
-@@ -1,10 +1,9 @@
-+""""
-+CN2 Rules learner widget
-+========================
-+
- """
--<name>CN2</name>
--<description>Rule-based (CN2) learner/classifier.</description>
--<icon>icons/CN2.svg</icon>
--<contact>Ales Erjavec (ales.erjavec(@at@)fri.uni-lj.si)</contact>
--<priority>300</priority>
--"""
-+
- from OWWidget import *
- import OWGUI, orange, orngCN2, sys
- 
-diff --git a/Orange/OrangeWidgets/Classify/OWKNN.py b/Orange/OrangeWidgets/Classify/OWKNN.py
---- a/Orange/OrangeWidgets/Classify/OWKNN.py
-+++ b/Orange/OrangeWidgets/Classify/OWKNN.py
-@@ -1,9 +1,7 @@
- """
--<name>k Nearest Neighbours</name>
--<description>K-nearest neighbours learner/classifier.</description>
--<icon>icons/kNearestNeighbours.svg</icon>
--<contact>Janez Demsar (janez.demsar(@at@)fri.uni-lj.si)</contact>
--<priority>25</priority>
-+k Nearest Neighbours
-+====================
-+
- """
- from OWWidget import *
- import OWGUI
-@@ -61,10 +59,6 @@
-     def __init__(self, parent=None, signalManager = None, name='kNN'):
-         OWWidget.__init__(self, parent, signalManager, name, wantMainArea = 0, resizingEnabled = 0)
- 
--        self.callbackDeposit = []
--
--        self.inputs = [("Data", ExampleTable, self.setData), ("Preprocess", PreprocessedLearner, self.setPreprocessor)]
--        self.outputs = [("Learner", orange.Learner),("kNN Classifier", orange.kNNClassifier)]
- 
-         self.metricsList = [("Euclidean", orange.ExamplesDistanceConstructor_Euclidean),
-                        ("Hamming", orange.ExamplesDistanceConstructor_Hamming),
-diff --git a/Orange/OrangeWidgets/Data/OWDiscretize.py b/Orange/OrangeWidgets/Data/OWDiscretize.py
---- a/Orange/OrangeWidgets/Data/OWDiscretize.py
-+++ b/Orange/OrangeWidgets/Data/OWDiscretize.py
-@@ -1,10 +1,3 @@
--"""
--<name>Discretize</name>
--<description>Discretization of continuous attributes.</description>
--<icon>icons/Discretize.svg</icon>
--<contact>Ales Erjavec (ales.erjavec(@at@)fri.uni-lj.si)</contact>
--<priority>2100</priority>
--"""
- 
- import orange
- from OWWidget import *
-diff --git a/Orange/OrangeWidgets/Data/OWFile.py b/Orange/OrangeWidgets/Data/OWFile.py
---- a/Orange/OrangeWidgets/Data/OWFile.py
-+++ b/Orange/OrangeWidgets/Data/OWFile.py
-@@ -1,9 +1,9 @@
- """
--<name>File</name>
--<description>Reads data from a file.</description>
--<icon>icons/File.svg</icon>
--<contact>Janez Demsar (janez.demsar(@at@)fri.uni-lj.si)</contact>
--<priority>10</priority>
-+File widget
-+===========
-+
-+
-+
- """
- 
- # Don't move this - the line number of the call is important
-@@ -82,8 +82,8 @@
-     def __init__(self, parent=None, signalManager = None):
-         OWWidget.__init__(self, parent, signalManager, "File", wantMainArea = 0, resizingEnabled = 1)
- 
--        self.inputs = []
--        self.outputs = [("Data", ExampleTable)]
-+#        self.inputs = []
-+#        self.outputs = [("Data", ExampleTable)]
- 
-         self.recentFiles=["(none)"]
-         self.symbolDC = "?"
-diff --git a/Orange/OrangeWidgets/Visualize/OWScatterPlot.py b/Orange/OrangeWidgets/Visualize/OWScatterPlot.py
---- a/Orange/OrangeWidgets/Visualize/OWScatterPlot.py
-+++ b/Orange/OrangeWidgets/Visualize/OWScatterPlot.py
-@@ -1,9 +1,7 @@
- """
--<name>Scatterplot</name>
--<description>Scatterplot visualization.</description>
--<contact>Gregor Leban (gregor.leban@fri.uni-lj.si)</contact>
--<icon>icons/ScatterPlot.svg</icon>
--<priority>1000</priority>
-+Scatter plot widget
-+===================
-+
- """
- from OWWidget import *
- from OWScatterPlotGraph import *
-@@ -88,9 +86,6 @@
-     def __init__(self, parent=None, signalManager=None):
-         OWWidget.__init__(self, parent, signalManager, "Scatter Plot", TRUE)
- 
--        self.inputs =  [("Data", ExampleTable, self.setData, Default), ("Data Subset", ExampleTable, self.setSubsetData), ("Features", AttributeList, self.setShownAttributes), ("Evaluation Results", orngTest.ExperimentResults, self.setTestResults), ("VizRank Learner", orange.Learner, self.setVizRankLearner)]
--        self.outputs = [("Selected Data", ExampleTable), ("Other Data", ExampleTable)]
--
-         self.graph = OWScatterPlotGraph(self, self.mainArea, "ScatterPlot")
-         self.vizrank = OWVizRank(self, self.signalManager, self.graph, orngVizRank.SCATTERPLOT, "ScatterPlot")
-         self.optimizationDlg = self.vizrank