Updated gui.panel.note and simplified hooke.plugin.note.
[hooke.git] / hooke / plugin / results.py
1 #!/usr/bin/env python
2
3 '''
4 results.py
5
6 Results commands for Hooke.
7
8 Copyright 2010 by Dr. Rolf Schmidt (Concordia University, Canada)
9
10 This program is released under the GNU General Public License version 2.
11 '''
12
13 class resultsCommands(object):
14     '''
15     Results commands to show a certain type of results and to clear results
16     '''
17
18     def _plug_init(self):
19         pass
20
21     def do_clear_results(self):
22         '''
23         Deletes all fitting results from the curve.
24         '''
25         plot = self.GetActivePlot()
26         if plot is not None:
27             plot.results.clear()
28         self.UpdatePlot()
29
30
31     def do_show_results(self):
32         '''
33         Select which type of result should be displayed on the plot.
34         '''
35         self.results_str = self.GetStringFromConfig('results', 'show_results', 'result_type')
36         self.UpdatePlot()