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