[fa597990] | 1 | """ |
---|
| 2 | Application settings |
---|
| 3 | """ |
---|
| 4 | import time |
---|
| 5 | import os |
---|
| 6 | from sans.guiframe.gui_style import GUIFRAME |
---|
[8d2f5bb] | 7 | import sans.sansview |
---|
[b1625822] | 8 | import logging |
---|
[8d2f5bb] | 9 | |
---|
[fa597990] | 10 | # Version of the application |
---|
[c329f4d] | 11 | __appname__ = "SasView" |
---|
[8d2f5bb] | 12 | __version__ = sans.sansview.__version__ |
---|
| 13 | __build__ = sans.sansview.__build__ |
---|
[204548c] | 14 | __download_page__ = 'https://sourceforge.net/projects/sansviewproject/files/' |
---|
| 15 | __update_URL__ = 'http://sansviewproject.svn.sourceforge.net/viewvc/sansviewproject/trunk/sansview.latestversion' |
---|
[fa597990] | 16 | |
---|
| 17 | |
---|
| 18 | # Debug message flag |
---|
| 19 | __EVT_DEBUG__ = False |
---|
| 20 | |
---|
| 21 | # Flag for automated testing |
---|
| 22 | __TEST__ = False |
---|
| 23 | |
---|
| 24 | # Debug message should be written to a file? |
---|
| 25 | __EVT_DEBUG_2_FILE__ = False |
---|
| 26 | __EVT_DEBUG_FILENAME__ = "debug.log" |
---|
| 27 | |
---|
| 28 | # About box info |
---|
| 29 | _do_aboutbox = True |
---|
| 30 | _do_tutorial = True |
---|
| 31 | _acknowledgement = \ |
---|
[1452132] | 32 | '''This work originally developed as part of the DANSE project funded by the NSF |
---|
| 33 | under grant DMR-0520547, and currently maintained by NIST, UMD, ORNL, ISIS, ESS |
---|
| 34 | and ILL. |
---|
[fa597990] | 35 | |
---|
| 36 | ''' |
---|
| 37 | _homepage = "http://danse.chem.utk.edu" |
---|
[015eb2b] | 38 | _download = "https://sourceforge.net/projects/sansviewproject/" |
---|
[fa597990] | 39 | _authors = [] |
---|
[1452132] | 40 | _paper = "http://sourceforge.net/apps/trac/sansviewproject/report" |
---|
| 41 | _license = "mailto:sansviewproject-developers@lists.sourceforge.net" |
---|
[fa597990] | 42 | |
---|
[50282f8] | 43 | |
---|
[cf81aaa] | 44 | icon_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "images")) |
---|
[b1625822] | 45 | logging.info("icon path: %s" % icon_path) |
---|
[cf81aaa] | 46 | media_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "media")) |
---|
| 47 | test_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "test")) |
---|
[d4c19e5] | 48 | |
---|
[1452132] | 49 | _nist_logo = "images/nist_logo.png" |
---|
| 50 | _umd_logo = "images/umd_logo.png" |
---|
| 51 | _sns_logo = "images/sns_logo.png" |
---|
[d4c19e5] | 52 | _nsf_logo = os.path.join(icon_path, "nsf_logo.png") |
---|
| 53 | _danse_logo = os.path.join(icon_path, "danse_logo.png") |
---|
| 54 | _inst_logo = os.path.join(icon_path, "utlogo.gif") |
---|
[1452132] | 55 | _nist_url = "http://www.nist.gov/" |
---|
| 56 | _umd_url = "http://www.umd.edu/" |
---|
| 57 | _sns_url = "http://neutrons.ornl.gov/" |
---|
[fa597990] | 58 | _nsf_url = "http://www.nsf.gov" |
---|
| 59 | _danse_url = "http://www.cacr.caltech.edu/projects/danse/release/index.html" |
---|
| 60 | _inst_url = "http://www.utk.edu" |
---|
[d4c19e5] | 61 | _corner_image = os.path.join(icon_path, "angles_flat.png") |
---|
| 62 | _welcome_image = os.path.join(icon_path, "SVwelcome.png") |
---|
[9cd75d7] | 63 | _copyright = "(c) 2009 - 2012, UTK, UMD, NIST, ORNL, ISIS, ESS and ILL" |
---|
[fa597990] | 64 | |
---|
[d4c19e5] | 65 | |
---|
[fa597990] | 66 | #edit the list of file state your plugin can read |
---|
[c329f4d] | 67 | APPLICATION_WLIST = 'SasView files (*.svs)|*.svs' |
---|
[fa597990] | 68 | APPLICATION_STATE_EXTENSION = '.svs' |
---|
| 69 | GUIFRAME_WIDTH = 1150 |
---|
| 70 | GUIFRAME_HEIGHT = 840 |
---|
| 71 | PLUGIN_STATE_EXTENSIONS = ['.fitv', '.inv', '.prv'] |
---|
| 72 | PLUGINS_WLIST = ['Fitting files (*.fitv)|*.fitv', |
---|
| 73 | 'Invariant files (*.inv)|*.inv', |
---|
| 74 | 'P(r) files (*.prv)|*.prv'] |
---|
| 75 | PLOPANEL_WIDTH = 415 |
---|
| 76 | PLOPANEL_HEIGTH = 370 |
---|
| 77 | DATAPANEL_WIDTH = 235 |
---|
| 78 | DATAPANEL_HEIGHT = 700 |
---|
| 79 | SPLASH_SCREEN_PATH = os.path.join(icon_path,"SVwelcome_mini.png") |
---|
| 80 | TUTORIAL_PATH = os.path.join(media_path,"Tutorial.pdf") |
---|
| 81 | DEFAULT_STYLE = GUIFRAME.MULTIPLE_APPLICATIONS|GUIFRAME.MANAGER_ON\ |
---|
| 82 | |GUIFRAME.CALCULATOR_ON|GUIFRAME.TOOLBAR_ON |
---|
| 83 | SPLASH_SCREEN_WIDTH = 512 |
---|
| 84 | SPLASH_SCREEN_HEIGHT = 366 |
---|
| 85 | SS_MAX_DISPLAY_TIME = 6000 #6 sec |
---|
[8e3dc19] | 86 | WELCOME_PANEL_ON = True |
---|
[fa597990] | 87 | WELCOME_PANEL_SHOW = False |
---|
| 88 | CLEANUP_PLOT = False |
---|
| 89 | # OPEN and SAVE project menu |
---|
| 90 | OPEN_SAVE_PROJECT_MENU = True |
---|
| 91 | #VIEW MENU |
---|
| 92 | VIEW_MENU = True |
---|
| 93 | #EDIT MENU |
---|
| 94 | EDIT_MENU = True |
---|
| 95 | |
---|
| 96 | SetupIconFile_win = os.path.join(icon_path, "ball.ico") |
---|
| 97 | SetupIconFile_mac = os.path.join(icon_path, "ball.icns") |
---|
[c329f4d] | 98 | DefaultGroupName = "." |
---|
| 99 | OutputBaseFilename = "setupSasView" |
---|
[dcbd4e2c] | 100 | |
---|
[fa597990] | 101 | FIXED_PANEL = True |
---|
| 102 | DATALOADER_SHOW = True |
---|
| 103 | CLEANUP_PLOT = False |
---|
| 104 | WELCOME_PANEL_SHOW = False |
---|
| 105 | #Show or hide toolbar at the start up |
---|
| 106 | TOOLBAR_SHOW = True |
---|
| 107 | # set a default perspective |
---|
| 108 | DEFAULT_PERSPECTIVE = 'None' |
---|
| 109 | |
---|
| 110 | def printEVT(message): |
---|
| 111 | if __EVT_DEBUG__: |
---|
| 112 | print "%g: %s" % (time.clock(), message) |
---|
| 113 | |
---|
| 114 | if __EVT_DEBUG_2_FILE__: |
---|
| 115 | out = open(__EVT_DEBUG_FILENAME__, 'a') |
---|
| 116 | out.write("%10g: %s\n" % (time.clock(), message)) |
---|
| 117 | out.close() |
---|
| 118 | |
---|