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