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 | __build__ = '1' |
---|
11 | __download_page__ = 'https://sourceforge.net/projects/sansviewproject/files/' |
---|
12 | __update_URL__ = 'http://sansviewproject.svn.sourceforge.net/viewvc/sansviewproject/trunk/sansview.latestversion' |
---|
13 | |
---|
14 | |
---|
15 | # Debug message flag |
---|
16 | __EVT_DEBUG__ = True |
---|
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 | _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) 2008, University of Tennessee" |
---|
48 | #edit the lists below of file state your plugin can read |
---|
49 | #for sansview this how you can edit these lists |
---|
50 | #PLUGIN_STATE_EXTENSIONS = ['.prv','.fitv', '.inv'] |
---|
51 | #APPLICATION_STATE_EXTENSION = '.svs' |
---|
52 | #PLUGINS_WLIST = ['P(r) files (*.prv)|*.prv', |
---|
53 | # 'Fitting files (*.fitv)|*.fitv', |
---|
54 | # 'Invariant files (*.inv)|*.inv'] |
---|
55 | #APPLICATION_WLIST = 'SansView files (*.svs)|*.svs' |
---|
56 | APPLICATION_WLIST = '' |
---|
57 | APPLICATION_STATE_EXTENSION = None |
---|
58 | PLUGINS_WLIST = [] |
---|
59 | PLUGIN_STATE_EXTENSIONS = [] |
---|
60 | SPLASH_SCREEN_PATH = "images/danse_logo.png" |
---|
61 | DEFAULT_STYLE = GUIFRAME.SINGLE_APPLICATION |
---|
62 | SPLASH_SCREEN_WIDTH = 500 |
---|
63 | SPLASH_SCREEN_HEIGHT = 300 |
---|
64 | WELCOME_PANEL_ON = False |
---|
65 | TUTORIAL_PATH = None |
---|
66 | SS_MAX_DISPLAY_TIME = 4000 #4 sec |
---|
67 | PLOPANEL_WIDTH = 350 |
---|
68 | PLOPANEL_HEIGTH = 350 |
---|
69 | GUIFRAME_WIDTH = 1000 |
---|
70 | GUIFRAME_HEIGHT = 800 |
---|
71 | SetupIconFile_win = os.path.join("images", "ball.ico") |
---|
72 | SetupIconFile_mac = os.path.join("images", "ball.icns") |
---|
73 | DefaultGroupName = "DANSE" |
---|
74 | OutputBaseFilename = "setupGuiFrame" |
---|
75 | DATAPANEL_WIDTH = 235 |
---|
76 | DATAPANEL_HEIGHT = 700 |
---|
77 | FIXED_PANEL = True |
---|
78 | DATALOADER_SHOW = True |
---|
79 | CLEANUP_PLOT = False |
---|
80 | WELCOME_PANEL_SHOW = False |
---|
81 | #Show or hide toolbar at the start up |
---|
82 | TOOLBAR_SHOW = True |
---|
83 | # set a default perspective |
---|
84 | DEFAULT_PERSPECTIVE = 'None' |
---|
85 | # OPEN and SAVE project menu |
---|
86 | OPEN_SAVE_PROJECT_MENU = True |
---|
87 | CLEANUP_PLOT = False |
---|
88 | # OPEN and SAVE project menu |
---|
89 | OPEN_SAVE_PROJECT_MENU = False |
---|
90 | #VIEW MENU |
---|
91 | VIEW_MENU = False |
---|
92 | #EDIT MENU |
---|
93 | EDIT_MENU = False |
---|
94 | import wx.lib.newevent |
---|
95 | (StatusBarEvent, EVT_STATUS) = wx.lib.newevent.NewEvent() |
---|
96 | |
---|
97 | def printEVT(message): |
---|
98 | if __EVT_DEBUG__: |
---|
99 | print "%g: %s" % (time.clock(), message) |
---|
100 | |
---|
101 | if __EVT_DEBUG_2_FILE__: |
---|
102 | out = open(__EVT_DEBUG_FILENAME__, 'a') |
---|
103 | out.write("%10g: %s\n" % (time.clock(), message)) |
---|
104 | out.close() |
---|
105 | |
---|