Changeset 1594
- Timestamp:
- Nov 6, 2014 12:05:39 AM (8 years ago)
- Location:
- pvMail/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
pvMail/trunk/docs/source/conf.py
r1593 r1594 45 45 return Mock() 46 46 47 MOCK_MODULES = [ 'pyepics', 'argparse', 'epics', 'traits', 'traitsui.api', ]48 47 MOCK_MODULES = PvMail.__install_requires__ 48 MOCK_MODULES.append('epics') 49 49 50 50 for mod_name in MOCK_MODULES: -
pvMail/trunk/docs/source/pvMail/pvMail.rst
r1593 r1594 14 14 :show-inheritance: 15 15 16 .. 17 :mod:`traits_gui` Module 18 ------------------------ 19 20 .. automodule:: PvMail.traits_gui 21 :members: 22 :undoc-members: 23 :show-inheritance: 16 :mod:`traits_gui` Module 17 ------------------------ 24 18 19 .. automodule:: PvMail.traits_gui 20 :members: 21 :undoc-members: 22 :show-inheritance: 23 -
pvMail/trunk/src/PvMail/__init__.py
r1593 r1594 23 23 ] 24 24 __keywords__ = ['EPICS', 'PV', 'email', 'monitor'] 25 __install_requires__ = ('pyepics', 'traits', 'traitsui', )25 __install_requires__ = ['pyepics', 'traits', 'traitsui', ] 26 26 27 27 __project_name__ = "PvMail" -
pvMail/trunk/src/PvMail/traits_gui.py
r1593 r1594 24 24 import pvMail 25 25 26 from traits .api import HasTraits, String, List, Bool, Generic27 from traitsui .api import Item, View, StatusItem, Action, Handler26 from traits import api as traitsapi 27 from traitsui import api as traitsuiapi 28 28 29 29 … … 31 31 32 32 33 class ActionHandler( Handler):33 class ActionHandler(traitsuiapi.Handler): 34 34 '''implements controls for PvMail GUI application''' 35 35 … … 80 80 81 81 82 class PvMail_GUI( HasTraits):82 class PvMail_GUI(traitsapi.HasTraits): 83 83 ''' 84 84 GUI used for pvMail, 85 85 declared using Enthought's Traits module 86 86 ''' 87 triggerPV = String(87 triggerPV = traitsapi.String( 88 88 desc="EPICS PV name on which to trigger an email", 89 89 label="trigger PV",) 90 messagePV = String(90 messagePV = traitsapi.String( 91 91 desc="EPICS string PV name with short message text", 92 92 label="message PV",) 93 recipients = List(94 trait= String,93 recipients = traitsapi.List( 94 trait=traitsapi.String, 95 95 value=["", "",], 96 96 desc="email addresses of message recipients", 97 97 label="email address(es)",) 98 actionRun = Action(name = "Run",98 actionRun = traitsuiapi.Action(name = "Run", 99 99 desc = "start watching for trigger PV to go from 0 to 1", 100 100 action = "do_run") 101 actionStop = Action(name = "Stop",101 actionStop = traitsuiapi.Action(name = "Stop", 102 102 desc = "stop watching trigger PV", 103 103 action = "do_stop") 104 104 105 status_label = String('status:')106 status_msg = String107 running = Bool(False)108 pvm = Generic(None)105 status_label = traitsapi.String('status:') 106 status_msg = traitsapi.String 107 running = traitsapi.Bool(False) 108 pvm = traitsapi.Generic(None) 109 109 110 view = View('triggerPV',110 view = traitsuiapi.View('triggerPV', 111 111 'messagePV', 112 112 'recipients', 113 Item('running', style = 'readonly', label = 'Running?', ),113 traitsuiapi.Item('running', style = 'readonly', label = 'Running?', ), 114 114 title="PvMail GUI", 115 115 width=500, … … 118 118 handler = ActionHandler(), 119 119 statusbar = [ 120 StatusItem(name = 'status_label', width = 80),121 StatusItem(name = 'status_msg', width = 0.5),120 traitsuiapi.StatusItem(name = 'status_label', width = 80), 121 traitsuiapi.StatusItem(name = 'status_msg', width = 0.5), 122 122 ], 123 123 resizable=True)
Note: See TracChangeset
for help on using the changeset viewer.