Changeset f82ab8c in sasview for src/sas/qtgui/GuiUtils.py


Ignore:
Timestamp:
Jun 29, 2016 8:04:43 AM (8 years ago)
Author:
Piotr Rozyczko <piotr.rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
481ff26
Parents:
9e426c1
Message:

More dialogs, drag and drop onto File Load

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/GuiUtils.py

    r9e426c1 rf82ab8c  
    99import warnings 
    1010import re 
     11import webbrowser 
     12import urlparse 
     13 
    1114warnings.simplefilter("ignore") 
    1215import logging 
     
    2528#from sas.sasgui.guiframe.events import StatusEvent 
    2629#from sas.sasgui.guiframe.events import NewPlotEvent 
     30 
    2731from sas.sasgui.guiframe.dataFitting import Data1D 
    2832from sas.sasgui.guiframe.dataFitting import Data2D 
     
    200204 
    201205    # Update Main window status bar with "str" 
     206    # Old "StatusEvent" 
    202207    statusBarUpdateSignal = QtCore.pyqtSignal(str) 
    203208 
     
    207212    # New data in current perspective 
    208213    updateModelFromPerspectiveSignal = QtCore.pyqtSignal(QtGui.QStandardItem) 
     214 
     215    # New plot requested from the GUI manager 
     216    # Old "NewPlotEvent" 
     217    plotRequestedSignal = QtCore.pyqtSignal(str) 
     218 
    209219 
    210220def updateModelItem(item, update_data, name=""): 
     
    310320    return info_item 
    311321 
     322def openLink(url): 
     323    """ 
     324    Open a URL in an external browser. 
     325    Check the URL first, though. 
     326    """ 
     327    parsed_url = urlparse.urlparse(url) 
     328    if parsed_url.scheme: 
     329        webbrowser.open(url) 
     330    else: 
     331        msg = "Attempt at opening an invalid URL" 
     332        raise AttributeError, msg 
Note: See TracChangeset for help on using the changeset viewer.