Ignore:
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeWidgets/Data/OWPaintData.py

    r11096 r11313  
    691691    settingsList = ["commitOnChange"] 
    692692    def __init__(self, parent=None, signalManager=None, name="Data Generator"): 
    693         OWWidget.__init__(self, parent, signalManager, name, wantGraph=True) 
     693        OWWidget.__init__(self, parent, signalManager, name) 
    694694         
    695695        self.outputs = [("Data", ExampleTable)] 
  • Orange/OrangeWidgets/OWDlgs.py

    r10463 r11314  
    2222class OWChooseImageSizeDlg(OWBaseWidget): 
    2323    settingsList = ["selectedSize", "customX", "customY", "lastSaveDirName", "penWidthFactor"] 
    24     def __init__(self, graph, extraButtons = [], defaultName="graph", parent=None): 
     24    def __init__(self, graph, extraButtons = [], defaultName="graph", parent=None, saveMatplotlib=None): 
    2525        OWBaseWidget.__init__(self, parent, None, "Image settings", modal = TRUE, resizingEnabled = 0) 
    2626 
     
    5555        #self.printButton =          OWGUI.button(self.space, self, "Print", callback = self.printPic) 
    5656        self.saveImageButton =      OWGUI.button(box, self, "Save Image", callback = self.saveImage) 
    57         if not (_have_gl and isinstance(graph, QGLWidget)): 
     57 
     58        # If None we try to determine if save can succeed automatically 
     59        if saveMatplotlib is None: 
     60            saveMatplotlib = self.canSaveToMatplotlib(graph) 
     61 
     62        if saveMatplotlib and not (_have_gl and isinstance(graph, QGLWidget)): 
    5863            self.saveMatplotlibButton = OWGUI.button(box, self, "Save Graph as matplotlib Script", callback = self.saveToMatplotlib) 
    5964        for (text, funct) in extraButtons: 
     
    214219        QDialog.accept(self) 
    215220 
     221    def canSaveToMatplotlib(self, graph): 
     222        if _have_qwt and isinstance(graph, QwtPlot): 
     223            # TODO: check all curve items. 
     224            return True 
     225 
     226        elif isinstance(graph, QGraphicsScene): 
     227            items = graph.items() 
     228            supported = set([QGraphicsRectItem, QGraphicsLineItem, 
     229                             QGraphicsTextItem, OWQCanvasFuncts.OWCanvasText]) 
     230            return all(type(item) in supported for item in items) 
     231        else: 
     232            return False 
     233 
    216234    # ############################################################ 
    217235    # EXTRA FUNCTIONS ############################################ 
  • docs/conf.py

    r11049 r11312  
    177177# relative to this directory. They are copied after the builtin static files, 
    178178# so a file named "default.css" will overwrite the builtin "default.css". 
    179 html_static_path = ["../Orange/doc/widgets"] 
     179# html_static_path = [] 
    180180 
    181181# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 
  • docs/widgets/rst/index.rst

    r11050 r11312  
    77---- 
    88 
    9 .. The first row shows how to insert rst documentation, the rest  
    10    link to the old documentation that is copied to '_static'  
    119 
    1210.. list-table:: 
     
    656654   unsupervized/kmeansclustering.rst 
    657655   unsupervized/mds.rst 
    658    unsupervized/pca.rst 
     656   unsupervized/PCA.rst 
    659657 
    660658**************** 
Note: See TracChangeset for help on using the changeset viewer.