- Timestamp:
- Oct 15, 2013 8:22:10 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
bcdaqwidgets/trunk/src/bcdaqwidgets_demos/pyside_probe.py
r1402 r1443 1 1 #!/usr/bin/env python 2 2 3 ########### SVN repository information ################### 4 # $Date$ 5 # $Author$ 6 # $Revision$ 7 # $URL$ 8 # $Id$ 9 ########### SVN repository information ################### 3 ''' 4 PySide implementation of EPICS probe 10 5 11 # from Matt Newville, CARS, University of Chicago 6 :author: Matt Newville, CARS, University of Chicago 7 :note: Does not use bcdaqwidgets 8 ''' 12 9 13 10 import epics … … 16 13 from PySide.QtGui import QWidget, QLabel, QLineEdit, QGridLayout, QApplication 17 14 18 sys.path.insert(0, os.path.abspath('..'))19 import bcdaqwidgets20 21 15 class PVProbe(QWidget): 22 ''' 16 '''frame that monitors a user-entered EPICS PV''' 23 17 def __init__(self, parent=None): 24 18 QWidget.__init__(self, parent) … … 42 36 43 37 def onPVNameReturn(self): 38 '''responds when user enters a new PV''' 44 39 if self.pv is not None: 45 40 self.pv.remove_callback() … … 48 43 49 44 def onPVChange(self, pvname=None, char_value=None, **kws): 45 '''updates the widget (not thread-safe)''' 50 46 self.value.setText(char_value) 51 47 52 if __name__ == '__main__': 48 49 def main(): 53 50 app = QApplication(sys.argv) 54 51 probe = PVProbe() 55 52 probe.show() 56 53 sys.exit(app.exec_()) 54 55 56 if __name__ == '__main__': 57 main() 58 59 60 ########### SVN repository information ################### 61 # $Date$ 62 # $Author$ 63 # $Revision$ 64 # $URL$ 65 # $Id$ 66 ########### SVN repository information ###################
Note: See TracChangeset
for help on using the changeset viewer.