source:
sasview/guiframe/data_state.py
@
cbf22e5
Last change on this file since cbf22e5 was 584c4c4, checked in by Gervaise Alina <gervyh@…>, 14 years ago | |
---|---|
|
|
File size: 1.8 KB |
Rev | Line | |
---|---|---|
[3feed3e] | 1 | ################################################################################ |
2 | #This software was developed by the University of Tennessee as part of the | |
3 | #Distributed Data Analysis of Neutron Scattering Experiments (DANSE) | |
4 | #project funded by the US National Science Foundation. | |
5 | # | |
6 | #See the license text in license.txt | |
7 | # | |
8 | #copyright 2010, University of Tennessee | |
9 | ################################################################################ | |
10 | """ | |
11 | """ | |
12 | ||
13 | class DataState(object): | |
14 | """ | |
15 | Store information about data | |
16 | """ | |
17 | def __init__(self, data, parent=None): | |
18 | """ | |
19 | ||
20 | """ | |
21 | self.parent = parent | |
[584c4c4] | 22 | self.data = data |
23 | self.name = "" | |
24 | self.path = None | |
25 | self.theory_list = [] | |
26 | self.state_list = [] | |
27 | self.message = "" | |
[3feed3e] | 28 | |
29 | def set_name(self, name): | |
[584c4c4] | 30 | self.name = name |
[3feed3e] | 31 | def get_name(self): |
[584c4c4] | 32 | return self.name |
[3feed3e] | 33 | def set_data(self, data): |
[584c4c4] | 34 | self.data = data |
[3feed3e] | 35 | |
36 | def get_data(self): | |
[584c4c4] | 37 | return self.data |
[3feed3e] | 38 | |
39 | def set_path(self, path): | |
40 | """ | |
41 | Set the path of the loaded data | |
42 | """ | |
[584c4c4] | 43 | self.path = path |
[3feed3e] | 44 | |
45 | def get_path(self): | |
46 | """ | |
47 | return the path of the loaded data | |
48 | """ | |
[584c4c4] | 49 | return self.path |
[3feed3e] | 50 | |
51 | def set_theory(self, theory): | |
52 | """ | |
53 | """ | |
[584c4c4] | 54 | self.theory_list.append(theory) |
[3feed3e] | 55 | |
56 | def get_theory(self): | |
[584c4c4] | 57 | return self.theory_list |
[3feed3e] | 58 | |
59 | def set_state(self, state): | |
60 | """ | |
61 | """ | |
[584c4c4] | 62 | #self.theory_list.append(state) |
[3feed3e] | 63 | return |
64 | ||
65 | def get_state(self): | |
[584c4c4] | 66 | return self.state_list |
[3feed3e] | 67 | |
68 | def get_message(self): | |
69 | """ | |
70 | return message | |
71 | """ | |
[584c4c4] | 72 | return self.message |
[3feed3e] | 73 | |
74 |
Note: See TracBrowser
for help on using the repository browser.