Changeset 97f05432 in sasview


Ignore:
Timestamp:
Oct 7, 2016 3:45:57 PM (5 years ago)
Author:
davidm
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:
7451b88
Parents:
e207c3f (diff), 2366fb2 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'ESS_GUI' of https://github.com/SasView/sasview into ESS_GUI

Location:
src/sas/qtgui
Files:
2 added
6 edited

Legend:

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

    • Property mode changed from 100755 to 100644
    rf51ed67 r2366fb2  
    99import SasviewLogger 
    1010 
     11def updatePaths(): 
     12    # Update paths 
     13    # TEMPORARY KLUDGE TO ALLOW INSTALL-LESS RUNS 
     14    # THIS WILL GO AWAY ONCE MERGED 
     15    ####################################################################### 
     16    import imp 
     17    import os 
     18    import sys 
     19    def addpath(path): 
     20        """ 
     21        Add a directory to the python path environment, and to the PYTHONPATH 
     22        environment variable for subprocesses. 
     23        """ 
     24        path = os.path.abspath(path) 
     25        if 'PYTHONPATH' in os.environ: 
     26            PYTHONPATH = path + os.pathsep + os.environ['PYTHONPATH'] 
     27        else: 
     28            PYTHONPATH = path 
     29        os.environ['PYTHONPATH'] = PYTHONPATH 
     30        sys.path.insert(0, path) 
     31 
     32    def import_package(modname, path): 
     33        """Import a package into a particular point in the python namespace""" 
     34        mod = imp.load_source(modname, os.path.abspath(os.path.join(path,'__init__.py'))) 
     35        sys.modules[modname] = mod 
     36        mod.__path__ = [os.path.abspath(path)] 
     37        return mod 
     38 
     39    root = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "..")) 
     40    addpath(os.path.join(root, 'src')) 
     41    #addpath(os.path.join(root, '../sasmodels/')) 
     42    import sas 
     43    from distutils.util import get_platform 
     44    sas.sasview = import_package('sas.sasview', os.path.join(root,'sasview')) 
     45    platform = '%s-%s'%(get_platform(),sys.version[:3]) 
     46    build_path = os.path.join(root, 'build','lib.'+platform) 
     47    sys.path.append(build_path) 
     48    ####################################################################### 
     49 
    1150class MainSasViewWindow(QtGui.QMainWindow, Ui_MainWindow): 
    1251    # Main window of the application 
     
    1857        self.workspace = QtGui.QWorkspace(self) 
    1958        self.setCentralWidget(self.workspace) 
     59 
     60        updatePaths() 
    2061 
    2162        # Create the gui manager 
  • src/sas/qtgui/AboutBox.py

    rf51ed67 re207c3f  
    6060        self.cmdLinkILL.clicked.connect(functools.partial( 
    6161            GuiUtils.openLink, LocalConfig._ill_url)) 
     62        self.cmdLinkANSTO.clicked.connect(functools.partial( 
     63            GuiUtils.openLink, LocalConfig._ansto_url)) 
    6264 
    6365        self.cmdOK.clicked.connect(self.close) 
  • src/sas/qtgui/LocalConfig.py

    re540cd2 re207c3f  
    6969_ess_logo = os.path.join(icon_path, "ess_logo.png") 
    7070_ill_logo = os.path.join(icon_path, "ill_logo.png") 
     71_ansto_logo = os.path.join(icon_path, "ansto_logo.png") 
    7172_nsf_logo = os.path.join(icon_path, "nsf_logo.png") 
    7273_danse_logo = os.path.join(icon_path, "danse_logo.png") 
     
    7980_ess_url = "http://ess-scandinavia.eu/" 
    8081_ill_url = "http://www.ill.eu/" 
     82_ansto_url = "http://www.ansto.gov.au/" 
    8183_danse_url = "http://www.cacr.caltech.edu/projects/danse/release/index.html" 
    8284_inst_url = "http://www.utk.edu" 
  • src/sas/qtgui/UI/AboutUI.ui

    rf82ab8c re207c3f  
    77    <x>0</x> 
    88    <y>0</y> 
    9     <width>695</width> 
     9    <width>1107</width> 
    1010    <height>449</height> 
    1111   </rect> 
     
    160160      </widget> 
    161161     </item> 
     162     <item row="0" column="7"> 
     163      <widget class="QPushButton" name="cmdLinkANSTO"> 
     164       <property name="text"> 
     165        <string/> 
     166       </property> 
     167       <property name="icon"> 
     168        <iconset resource="../images/images.qrc"> 
     169         <normaloff>:/about/ansto_logo.png</normaloff>:/about/ansto_logo.png</iconset> 
     170       </property> 
     171       <property name="iconSize"> 
     172        <size> 
     173         <width>175</width> 
     174         <height>48</height> 
     175        </size> 
     176       </property> 
     177      </widget> 
     178     </item> 
    162179    </layout> 
    163180   </item> 
     
    217234     </property> 
    218235     <property name="text"> 
    219       <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This work originally developed as part of the DANSE project funded by the NSF under grant DMR-0520547, and currently maintained by NIST, UMD, ORNL, ISIS, ESS and ILL.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> 
     236      <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This work originally developed as part of the DANSE project funded by the NSF under grant DMR-0520547, and currently maintained by NIST, UMD, ORNL, ISIS, ESS, ILL and last but not least ANSTO.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> 
    220237     </property> 
    221238     <property name="wordWrap"> 
  • src/sas/qtgui/UnitTesting/AboutBoxTest.py

    re540cd2 re207c3f  
    7575                LocalConfig._ess_url, 
    7676                LocalConfig._ill_url, 
     77                LocalConfig._ansto_url, 
    7778                LocalConfig._inst_url] 
    7879 
  • src/sas/qtgui/images/images.qrc

    r51b2b51 re207c3f  
    11<RCC> 
    22  <qresource prefix="about"> 
     3    <file>ansto_logo.png</file> 
    34    <file>danse_logo.png</file> 
    45    <file>ess_logo.png</file> 
Note: See TracChangeset for help on using the changeset viewer.