[4a5de6f] | 1 | """ |
---|
[7116b6e0] | 2 | Application settings |
---|
[4a5de6f] | 3 | """ |
---|
| 4 | import time |
---|
[dc7e46ac] | 5 | import os |
---|
[3e943e8] | 6 | from sans.guiframe.gui_style import GUIFRAME |
---|
[4a5de6f] | 7 | |
---|
| 8 | # Version of the application |
---|
| 9 | __appname__ = "PrView" |
---|
[009f827] | 10 | __version__ = '0.3.0' |
---|
[4a5de6f] | 11 | __download_page__ = 'http://danse.chem.utk.edu' |
---|
[0bae207] | 12 | __update_URL__ = 'http://danse.chem.utk.edu/prview_version.php' |
---|
[4a5de6f] | 13 | |
---|
| 14 | |
---|
| 15 | # Debug message flag |
---|
[357b79b] | 16 | __EVT_DEBUG__ = False |
---|
[4a5de6f] | 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 | _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 | |
---|
[f1181977] | 32 | If you use DANSE applications to do scientific research that leads to publication, |
---|
| 33 | we ask that you acknowledge the use of the software with the following sentence: |
---|
| 34 | |
---|
| 35 | "This work benefited from DANSE software developed under NSF award DMR-0520547." |
---|
[4a5de6f] | 36 | ''' |
---|
| 37 | _homepage = "http://danse.chem.utk.edu" |
---|
[9362f85] | 38 | _download = "http://danse.chem.utk.edu/prview.html" |
---|
[4a5de6f] | 39 | _authors = [] |
---|
| 40 | _paper = "http://danse.us/trac/sans/newticket" |
---|
| 41 | _license = "mailto:sansdanse@gmail.com" |
---|
| 42 | |
---|
| 43 | _nsf_logo = "images/nsf_logo.png" |
---|
| 44 | _danse_logo = "images/danse_logo.png" |
---|
| 45 | _inst_logo = "images/utlogo.gif" |
---|
| 46 | _nsf_url = "http://www.nsf.gov" |
---|
| 47 | _danse_url = "http://www.cacr.caltech.edu/projects/danse/release/index.html" |
---|
| 48 | _inst_url = "http://www.utk.edu" |
---|
[357b79b] | 49 | _corner_image = "images/prview.jpg" |
---|
[4a5de6f] | 50 | _copyright = "(c) 2008, University of Tennessee" |
---|
[3e943e8] | 51 | #edit the list of file state your plugin can read |
---|
[72ecf3f3] | 52 | # About box info |
---|
| 53 | _do_aboutbox=True |
---|
| 54 | _do_tutorial = False |
---|
[3e943e8] | 55 | APPLICATION_STATE_EXTENSION = '.prv' |
---|
[fcc5680] | 56 | APPLICATION_WLIST = 'P(r) files (*.prv)|*.prv' |
---|
[3e943e8] | 57 | DEFAULT_STYLE = GUIFRAME.DEFAULT_STYLE |
---|
[468d2a96] | 58 | GUIFRAME_WIDTH = 900 |
---|
[fcc5680] | 59 | GUIFRAME_HEIGHT = 780 |
---|
| 60 | PLUGIN_STATE_EXTENSIONS = ['.prv'] |
---|
| 61 | PLUGINS_WLIST = ['P(r) files (*.prv)|*.prv'] |
---|
[468d2a96] | 62 | PLOPANEL_WIDTH = 350 |
---|
| 63 | PLOPANEL_HEIGTH = 350 |
---|
[b1a9e8b] | 64 | SPLASH_SCREEN_PATH = os.path.join("images", "danse_logo.png") |
---|
[3e943e8] | 65 | SPLASH_SCREEN_WIDTH = 500 |
---|
| 66 | SPLASH_SCREEN_HEIGHT = 300 |
---|
| 67 | SS_MAX_DISPLAY_TIME = 3000 #3 sec |
---|
[5e175e1] | 68 | SetupIconFile_win = os.path.join("images", "ball.ico") |
---|
| 69 | SetupIconFile_mac = os.path.join("images", "ball.icns") |
---|
[dc7e46ac] | 70 | DefaultGroupName = "DANSE" |
---|
| 71 | OutputBaseFilename = "setupPrView" |
---|
[57b551e] | 72 | DATAPANEL_WIDTH = 235 |
---|
[4851fcbc] | 73 | DATAPANEL_HEIGHT = 700 |
---|
[57b551e] | 74 | FIXED_PANEL = True |
---|
| 75 | DATALOADER_SHOW = True |
---|
| 76 | CLEANUP_PLOT = False |
---|
| 77 | WELCOME_PANEL_SHOW = False |
---|
| 78 | #Show or hide toolbar at the start up |
---|
| 79 | TOOLBAR_SHOW = True |
---|
[4206aa1] | 80 | #Open Save project menu |
---|
| 81 | OPEN_SAVE_PROJECT_MENU = True |
---|
[83a0940] | 82 | #VIEW MENU |
---|
| 83 | VIEW_MENU = True |
---|
| 84 | #EDIT MENU |
---|
| 85 | EDIT_MENU = True |
---|
[57b551e] | 86 | # set a default perspective |
---|
| 87 | DEFAULT_PERSPECTIVE = 'None' |
---|
[4a5de6f] | 88 | import wx.lib.newevent |
---|
| 89 | (StatusBarEvent, EVT_STATUS) = wx.lib.newevent.NewEvent() |
---|
| 90 | |
---|
| 91 | def printEVT(message): |
---|
| 92 | if __EVT_DEBUG__: |
---|
| 93 | print "%g: %s" % (time.clock(), message) |
---|
| 94 | |
---|
| 95 | if __EVT_DEBUG_2_FILE__: |
---|
| 96 | out = open(__EVT_DEBUG_FILENAME__, 'a') |
---|
| 97 | out.write("%10g: %s\n" % (time.clock(), message)) |
---|
| 98 | out.close() |
---|
| 99 | |
---|