[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 |
---|
| 11 | __appname__ = "SansView" |
---|
[8d2f5bb] | 12 | __version__ = sans.sansview.__version__ |
---|
| 13 | __build__ = sans.sansview.__build__ |
---|
[fa597990] | 14 | __download_page__ = 'http://danse.chem.utk.edu' |
---|
| 15 | __update_URL__ = 'http://danse.chem.utk.edu/sansview_version.php' |
---|
| 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 = \ |
---|
| 32 | '''This software was developed by the University of Tennessee as part of the |
---|
| 33 | Distributed Data Analysis of Neutron Scattering Experiments (DANSE) |
---|
| 34 | project funded by the US National Science Foundation. |
---|
| 35 | |
---|
| 36 | ''' |
---|
| 37 | _homepage = "http://danse.chem.utk.edu" |
---|
[015eb2b] | 38 | _download = "https://sourceforge.net/projects/sansviewproject/" |
---|
[fa597990] | 39 | _authors = [] |
---|
| 40 | _paper = "http://danse.us/trac/sans/newticket" |
---|
| 41 | _license = "mailto:sansdanse@gmail.com" |
---|
| 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 | |
---|
| 49 | _nsf_logo = os.path.join(icon_path, "nsf_logo.png") |
---|
| 50 | _danse_logo = os.path.join(icon_path, "danse_logo.png") |
---|
| 51 | _inst_logo = os.path.join(icon_path, "utlogo.gif") |
---|
[fa597990] | 52 | _nsf_url = "http://www.nsf.gov" |
---|
| 53 | _danse_url = "http://www.cacr.caltech.edu/projects/danse/release/index.html" |
---|
| 54 | _inst_url = "http://www.utk.edu" |
---|
[d4c19e5] | 55 | _corner_image = os.path.join(icon_path, "angles_flat.png") |
---|
| 56 | _welcome_image = os.path.join(icon_path, "SVwelcome.png") |
---|
[015eb2b] | 57 | _copyright = "(c) 2009 - 2012, University of Tennessee" |
---|
[fa597990] | 58 | |
---|
[d4c19e5] | 59 | |
---|
[fa597990] | 60 | #edit the list of file state your plugin can read |
---|
| 61 | APPLICATION_WLIST = 'SansView files (*.svs)|*.svs' |
---|
| 62 | APPLICATION_STATE_EXTENSION = '.svs' |
---|
| 63 | GUIFRAME_WIDTH = 1150 |
---|
| 64 | GUIFRAME_HEIGHT = 840 |
---|
| 65 | PLUGIN_STATE_EXTENSIONS = ['.fitv', '.inv', '.prv'] |
---|
| 66 | PLUGINS_WLIST = ['Fitting files (*.fitv)|*.fitv', |
---|
| 67 | 'Invariant files (*.inv)|*.inv', |
---|
| 68 | 'P(r) files (*.prv)|*.prv'] |
---|
| 69 | PLOPANEL_WIDTH = 415 |
---|
| 70 | PLOPANEL_HEIGTH = 370 |
---|
| 71 | DATAPANEL_WIDTH = 235 |
---|
| 72 | DATAPANEL_HEIGHT = 700 |
---|
| 73 | SPLASH_SCREEN_PATH = os.path.join(icon_path,"SVwelcome_mini.png") |
---|
| 74 | TUTORIAL_PATH = os.path.join(media_path,"Tutorial.pdf") |
---|
| 75 | DEFAULT_STYLE = GUIFRAME.MULTIPLE_APPLICATIONS|GUIFRAME.MANAGER_ON\ |
---|
| 76 | |GUIFRAME.CALCULATOR_ON|GUIFRAME.TOOLBAR_ON |
---|
| 77 | SPLASH_SCREEN_WIDTH = 512 |
---|
| 78 | SPLASH_SCREEN_HEIGHT = 366 |
---|
| 79 | SS_MAX_DISPLAY_TIME = 6000 #6 sec |
---|
[8e3dc19] | 80 | WELCOME_PANEL_ON = True |
---|
[fa597990] | 81 | WELCOME_PANEL_SHOW = False |
---|
| 82 | CLEANUP_PLOT = False |
---|
| 83 | # OPEN and SAVE project menu |
---|
| 84 | OPEN_SAVE_PROJECT_MENU = True |
---|
| 85 | #VIEW MENU |
---|
| 86 | VIEW_MENU = True |
---|
| 87 | #EDIT MENU |
---|
| 88 | EDIT_MENU = True |
---|
| 89 | |
---|
| 90 | SetupIconFile_win = os.path.join(icon_path, "ball.ico") |
---|
| 91 | SetupIconFile_mac = os.path.join(icon_path, "ball.icns") |
---|
| 92 | DefaultGroupName = "DANSE" |
---|
| 93 | OutputBaseFilename = "setupSansView" |
---|
[dcbd4e2c] | 94 | |
---|
[fa597990] | 95 | FIXED_PANEL = True |
---|
| 96 | DATALOADER_SHOW = True |
---|
| 97 | CLEANUP_PLOT = False |
---|
| 98 | WELCOME_PANEL_SHOW = False |
---|
| 99 | #Show or hide toolbar at the start up |
---|
| 100 | TOOLBAR_SHOW = True |
---|
| 101 | # set a default perspective |
---|
| 102 | DEFAULT_PERSPECTIVE = 'None' |
---|
| 103 | |
---|
| 104 | def printEVT(message): |
---|
| 105 | if __EVT_DEBUG__: |
---|
| 106 | print "%g: %s" % (time.clock(), message) |
---|
| 107 | |
---|
| 108 | if __EVT_DEBUG_2_FILE__: |
---|
| 109 | out = open(__EVT_DEBUG_FILENAME__, 'a') |
---|
| 110 | out.write("%10g: %s\n" % (time.clock(), message)) |
---|
| 111 | out.close() |
---|
| 112 | |
---|