1 | """ |
---|
2 | Application settings |
---|
3 | """ |
---|
4 | import os |
---|
5 | import time |
---|
6 | from sans.guiframe.gui_style import GUIFRAME |
---|
7 | # Version of the application |
---|
8 | __appname__ = "DummyView" |
---|
9 | __version__ = '0.0.0' |
---|
10 | __download_page__ = 'https://sourceforge.net/projects/sansviewproject/files/' |
---|
11 | __update_URL__ = 'http://sansviewproject.svn.sourceforge.net/viewvc/sansviewproject/trunk/sansview.latestversion' |
---|
12 | |
---|
13 | |
---|
14 | # Debug message flag |
---|
15 | __EVT_DEBUG__ = True |
---|
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 | _nsf_logo = "images/nsf_logo.png" |
---|
39 | _danse_logo = "images/danse_logo.png" |
---|
40 | _inst_logo = "images/utlogo.gif" |
---|
41 | _nsf_url = "http://www.nsf.gov" |
---|
42 | _danse_url = "http://www.cacr.caltech.edu/projects/danse/release/index.html" |
---|
43 | _inst_url = "http://www.utk.edu" |
---|
44 | _corner_image = "images/angles_flat.png" |
---|
45 | _welcome_image = "images/SVwelcome.png" |
---|
46 | _copyright = "(c) 2008, University of Tennessee" |
---|
47 | #edit the lists below of file state your plugin can read |
---|
48 | #for sansview this how you can edit these lists |
---|
49 | #PLUGIN_STATE_EXTENSIONS = ['.prv','.fitv', '.inv'] |
---|
50 | #APPLICATION_STATE_EXTENSION = '.svs' |
---|
51 | #PLUGINS_WLIST = ['P(r) files (*.prv)|*.prv', |
---|
52 | # 'Fitting files (*.fitv)|*.fitv', |
---|
53 | # 'Invariant files (*.inv)|*.inv'] |
---|
54 | #APPLICATION_WLIST = 'SansView files (*.svs)|*.svs' |
---|
55 | APPLICATION_WLIST = '' |
---|
56 | APPLICATION_STATE_EXTENSION = None |
---|
57 | PLUGINS_WLIST = [] |
---|
58 | PLUGIN_STATE_EXTENSIONS = [] |
---|
59 | SPLASH_SCREEN_PATH = "images/danse_logo.png" |
---|
60 | DEFAULT_STYLE = GUIFRAME.SINGLE_APPLICATION |
---|
61 | SPLASH_SCREEN_WIDTH = 500 |
---|
62 | SPLASH_SCREEN_HEIGHT = 300 |
---|
63 | WELCOME_PANEL_ON = False |
---|
64 | TUTORIAL_PATH = None |
---|
65 | SS_MAX_DISPLAY_TIME = 4000 #4 sec |
---|
66 | PLOPANEL_WIDTH = 350 |
---|
67 | PLOPANEL_HEIGTH = 350 |
---|
68 | GUIFRAME_WIDTH = 1000 |
---|
69 | GUIFRAME_HEIGHT = 800 |
---|
70 | SetupIconFile_win = os.path.join("images", "ball.ico") |
---|
71 | SetupIconFile_mac = os.path.join("images", "ball.icns") |
---|
72 | DefaultGroupName = "DANSE" |
---|
73 | OutputBaseFilename = "setupGuiFrame" |
---|
74 | DATAPANEL_WIDTH = 235 |
---|
75 | DATAPANEL_HEIGHT = 700 |
---|
76 | FIXED_PANEL = True |
---|
77 | DATALOADER_SHOW = True |
---|
78 | CLEANUP_PLOT = False |
---|
79 | WELCOME_PANEL_SHOW = False |
---|
80 | #Show or hide toolbar at the start up |
---|
81 | TOOLBAR_SHOW = True |
---|
82 | # set a default perspective |
---|
83 | DEFAULT_PERSPECTIVE = 'None' |
---|
84 | # OPEN and SAVE project menu |
---|
85 | OPEN_SAVE_PROJECT_MENU = True |
---|
86 | CLEANUP_PLOT = False |
---|
87 | # OPEN and SAVE project menu |
---|
88 | OPEN_SAVE_PROJECT_MENU = False |
---|
89 | #VIEW MENU |
---|
90 | VIEW_MENU = False |
---|
91 | #EDIT MENU |
---|
92 | EDIT_MENU = False |
---|
93 | import wx.lib.newevent |
---|
94 | (StatusBarEvent, EVT_STATUS) = wx.lib.newevent.NewEvent() |
---|
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 | |
---|