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