Commits

iorodeo committed 0525499 Draft

Added README, INSTALL, and worked on python packaging.

Comments (0)

Files changed (8)

python/PulseSkipper/pulse_skipper/pulse_skipper.py

+from __future__ import print_function
+import sys
+import serial
+import functools
+from PyQt4 import QtCore
+from PyQt4 import QtGui
+from pulse_skipper_ui import Ui_MainWindow 
+from pulse_skipper_serial import PulseSkipperSerial
+
+
+class PulseSkipper(QtGui.QMainWindow, Ui_MainWindow):
+
+    DEFAULT_PORT = '/dev/pulse-skipper'
+
+    def __init__(self, parent=None):
+        super(PulseSkipper,self).__init__(parent)
+        self.setupUi(self)
+        self.connectActions()
+        self.initialize()
+
+    def main(self):
+        self.show()
+
+    def connectActions(self):
+        self.connectPushButton.pressed.connect(self.connectPressed)
+        self.connectPushButton.clicked.connect(self.connectClicked)
+        self.skipPushButton.clicked.connect(self.skipClicked)
+        self.resetPushButton.clicked.connect(self.resetClicked)
+        numberToggledCallback = functools.partial(self.displayToggled,'number')
+        self.numberRadioButton.toggled.connect(numberToggledCallback)
+        binaryToggledCallback = functools.partial(self.displayToggled,'binary')
+        self.binaryRadioButton.toggled.connect(binaryToggledCallback)
+        self.portLineEdit.editingFinished.connect(self.portChanged)
+
+    def initialize(self):
+        self.dev = None
+        self.port = PulseSkipper.DEFAULT_PORT
+        self.portLineEdit.setText(self.port)
+        self.setEnabledOnDisconnect()
+        self.numberRadioButton.setChecked(True)
+        self.binaryRadioButton.setChecked(False)
+
+    def portChanged(self):
+        self.port = str(self.portLineEdit.text())
+        print(self.port)
+
+    def connectPressed(self):
+        self.portLineEdit.setEnabled(False)
+        self.connectPushButton.setText('Disconnect')
+
+    def connectClicked(self):
+        if self.dev is None:
+            try:
+                self.dev = PulseSkipperSerial(self.port)
+                #self.dev = True
+            except serial.serialutil.SerialException, e: 
+                errMsg = '{0}'.format(str(e)) 
+                QtGui.QMessageBox.critical(self,'Error',errMsg) 
+                self.portLineEdit.setEnabled(True) 
+                self.connectPushButton.setText('Connect')
+                self.dev = None
+            if self.dev is not None:
+                self.setEnabledOnConnect()
+                self.setDisplay()
+
+        else: 
+            self.portLineEdit.setEnabled(True) 
+            self.connectPushButton.setText('Connect') 
+            self.setEnabledOnDisconnect()
+            self.dev.close() 
+            #self.dev = None 
+
+
+    def skipClicked(self):
+        skipValue = self.skipSpinBox.value()
+        self.dev.skipPulse(skipValue)
+
+    def resetClicked(self):
+        self.dev.resetCount()
+
+    def displayToggled(self, name):
+        if self.dev is not None:
+            self.setDisplay()
+
+    def setDisplay(self):
+        if self.binaryRadioButton.isChecked():
+            self.dev.setDisplayBinary()
+        else:
+            self.dev.setDisplayNumber()
+
+    def setEnabledOnDisconnect(self):
+        self.pulseGroupBox.setEnabled(False)
+        self.displayGroupBox.setEnabled(False)
+
+    def setEnabledOnConnect(self):
+        self.pulseGroupBox.setEnabled(True)
+        self.displayGroupBox.setEnabled(True)
+
+def runApp():
+    app = QtGui.QApplication(sys.argv)
+    win = PulseSkipper()
+    win.main()
+    app.exec_()
+
+
+# -----------------------------------------------------------------------------
+if __name__ == '__main__':
+    runApp()
+

python/PulseSkipper/pulse_skipper/pulse_skipper.ui

+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>411</width>
+    <height>331</height>
+   </rect>
+  </property>
+  <property name="minimumSize">
+   <size>
+    <width>0</width>
+    <height>0</height>
+   </size>
+  </property>
+  <property name="maximumSize">
+   <size>
+    <width>16777215</width>
+    <height>16777215</height>
+   </size>
+  </property>
+  <property name="windowTitle">
+   <string>Pulse Skipper</string>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <layout class="QVBoxLayout" name="verticalLayout_3">
+    <item>
+     <widget class="QGroupBox" name="deviceGroupBox">
+      <property name="title">
+       <string>Device</string>
+      </property>
+      <layout class="QHBoxLayout" name="horizontalLayout">
+       <item>
+        <widget class="QLabel" name="label">
+         <property name="text">
+          <string>Port</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLineEdit" name="portLineEdit">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <spacer name="horizontalSpacer_2">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeType">
+          <enum>QSizePolicy::Fixed</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>15</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <widget class="QPushButton" name="connectPushButton">
+         <property name="text">
+          <string>Connect</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <spacer name="horizontalSpacer">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>189</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+    </item>
+    <item>
+     <widget class="Line" name="line_2">
+      <property name="orientation">
+       <enum>Qt::Horizontal</enum>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <widget class="QGroupBox" name="pulseGroupBox">
+      <property name="sizePolicy">
+       <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+        <horstretch>0</horstretch>
+        <verstretch>0</verstretch>
+       </sizepolicy>
+      </property>
+      <property name="minimumSize">
+       <size>
+        <width>0</width>
+        <height>0</height>
+       </size>
+      </property>
+      <property name="title">
+       <string>Pulse</string>
+      </property>
+      <layout class="QVBoxLayout" name="verticalLayout">
+       <item>
+        <widget class="QWidget" name="widget_2" native="true">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>0</height>
+          </size>
+         </property>
+         <property name="maximumSize">
+          <size>
+           <width>16777215</width>
+           <height>16777215</height>
+          </size>
+         </property>
+         <layout class="QHBoxLayout" name="horizontalLayout_3">
+          <item>
+           <widget class="QPushButton" name="resetPushButton">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="minimumSize">
+             <size>
+              <width>120</width>
+              <height>0</height>
+             </size>
+            </property>
+            <property name="maximumSize">
+             <size>
+              <width>120</width>
+              <height>16777215</height>
+             </size>
+            </property>
+            <property name="text">
+             <string>Reset Counter</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <spacer name="horizontalSpacer_4">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType">
+             <enum>QSizePolicy::Fixed</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>10</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+          <item>
+           <widget class="QPushButton" name="skipPushButton">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="minimumSize">
+             <size>
+              <width>120</width>
+              <height>0</height>
+             </size>
+            </property>
+            <property name="maximumSize">
+             <size>
+              <width>120</width>
+              <height>16777215</height>
+             </size>
+            </property>
+            <property name="text">
+             <string>Skip</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <spacer name="horizontalSpacer_6">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType">
+             <enum>QSizePolicy::Fixed</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>10</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+          <item>
+           <widget class="QSpinBox" name="skipSpinBox">
+            <property name="minimum">
+             <number>1</number>
+            </property>
+            <property name="maximum">
+             <number>9</number>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <spacer name="horizontalSpacer_3">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>40</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+         </layout>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+    </item>
+    <item>
+     <widget class="Line" name="line">
+      <property name="orientation">
+       <enum>Qt::Horizontal</enum>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <widget class="QGroupBox" name="displayGroupBox">
+      <property name="sizePolicy">
+       <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+        <horstretch>0</horstretch>
+        <verstretch>0</verstretch>
+       </sizepolicy>
+      </property>
+      <property name="minimumSize">
+       <size>
+        <width>150</width>
+        <height>0</height>
+       </size>
+      </property>
+      <property name="title">
+       <string>Display</string>
+      </property>
+      <layout class="QVBoxLayout" name="verticalLayout_2">
+       <item>
+        <widget class="QRadioButton" name="numberRadioButton">
+         <property name="text">
+          <string>Number</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QRadioButton" name="binaryRadioButton">
+         <property name="text">
+          <string>Binary</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+    </item>
+    <item>
+     <spacer name="verticalSpacer">
+      <property name="orientation">
+       <enum>Qt::Vertical</enum>
+      </property>
+      <property name="sizeHint" stdset="0">
+       <size>
+        <width>20</width>
+        <height>54</height>
+       </size>
+      </property>
+     </spacer>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QMenuBar" name="menubar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>411</width>
+     <height>25</height>
+    </rect>
+   </property>
+  </widget>
+  <widget class="QStatusBar" name="statusbar"/>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>

python/PulseSkipper/pulse_skipper/pulse_skipper_serial.py

+from __future__ import print_function
+import serial
+import time
+
+class PulseSkipperSerial(serial.Serial):
+
+    def __init__(self,port='/dev/ttyUSB8'):
+        super(PulseSkipperSerial,self).__init__(port=port,baudrate=9600,timeout=5.0)
+        time.sleep(2.0)
+
+    def skipPulse(self,n):
+        assert (n>=1 and n<=9), 'pulse number must be in range [1,9]'
+        self.write('{0}'.format(n))
+
+    def resetCount(self):
+        self.write('r')
+
+    def getCount(self):
+        self.write('c')
+        value = self.readline()
+        value = value.split(',')
+        value = int(value[0])
+        return value 
+
+    def setDisplayBinary(self):
+        self.write('b')
+
+    def setDisplayNumber(self):
+        self.write('n')
+
+
+# ---------------------------------------------------------------
+if __name__ == '__main__':
+
+    dev = PulseSkipperSerial(port='/dev/ttyUSB8')
+    for i in range(5):
+        count = dev.getCount()
+        print('{0} count: {1}'.format(i, count))
+        time.sleep(2)
+
+
+
+

python/PulseSkipper/pulse_skipper/pulse_skipper_ui.py

+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file 'pulse_skipper.ui'
+#
+# Created: Tue Oct  2 16:48:16 2012
+#      by: PyQt4 UI code generator 4.8.3
+#
+# WARNING! All changes made in this file will be lost!
+
+from PyQt4 import QtCore, QtGui
+
+try:
+    _fromUtf8 = QtCore.QString.fromUtf8
+except AttributeError:
+    _fromUtf8 = lambda s: s
+
+class Ui_MainWindow(object):
+    def setupUi(self, MainWindow):
+        MainWindow.setObjectName(_fromUtf8("MainWindow"))
+        MainWindow.resize(411, 331)
+        MainWindow.setMinimumSize(QtCore.QSize(0, 0))
+        MainWindow.setMaximumSize(QtCore.QSize(16777215, 16777215))
+        self.centralwidget = QtGui.QWidget(MainWindow)
+        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
+        self.verticalLayout_3 = QtGui.QVBoxLayout(self.centralwidget)
+        self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3"))
+        self.deviceGroupBox = QtGui.QGroupBox(self.centralwidget)
+        self.deviceGroupBox.setObjectName(_fromUtf8("deviceGroupBox"))
+        self.horizontalLayout = QtGui.QHBoxLayout(self.deviceGroupBox)
+        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
+        self.label = QtGui.QLabel(self.deviceGroupBox)
+        self.label.setObjectName(_fromUtf8("label"))
+        self.horizontalLayout.addWidget(self.label)
+        self.portLineEdit = QtGui.QLineEdit(self.deviceGroupBox)
+        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
+        sizePolicy.setHorizontalStretch(0)
+        sizePolicy.setVerticalStretch(0)
+        sizePolicy.setHeightForWidth(self.portLineEdit.sizePolicy().hasHeightForWidth())
+        self.portLineEdit.setSizePolicy(sizePolicy)
+        self.portLineEdit.setObjectName(_fromUtf8("portLineEdit"))
+        self.horizontalLayout.addWidget(self.portLineEdit)
+        spacerItem = QtGui.QSpacerItem(15, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum)
+        self.horizontalLayout.addItem(spacerItem)
+        self.connectPushButton = QtGui.QPushButton(self.deviceGroupBox)
+        self.connectPushButton.setObjectName(_fromUtf8("connectPushButton"))
+        self.horizontalLayout.addWidget(self.connectPushButton)
+        spacerItem1 = QtGui.QSpacerItem(189, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
+        self.horizontalLayout.addItem(spacerItem1)
+        self.verticalLayout_3.addWidget(self.deviceGroupBox)
+        self.line_2 = QtGui.QFrame(self.centralwidget)
+        self.line_2.setFrameShape(QtGui.QFrame.HLine)
+        self.line_2.setFrameShadow(QtGui.QFrame.Sunken)
+        self.line_2.setObjectName(_fromUtf8("line_2"))
+        self.verticalLayout_3.addWidget(self.line_2)
+        self.pulseGroupBox = QtGui.QGroupBox(self.centralwidget)
+        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
+        sizePolicy.setHorizontalStretch(0)
+        sizePolicy.setVerticalStretch(0)
+        sizePolicy.setHeightForWidth(self.pulseGroupBox.sizePolicy().hasHeightForWidth())
+        self.pulseGroupBox.setSizePolicy(sizePolicy)
+        self.pulseGroupBox.setMinimumSize(QtCore.QSize(0, 0))
+        self.pulseGroupBox.setObjectName(_fromUtf8("pulseGroupBox"))
+        self.verticalLayout = QtGui.QVBoxLayout(self.pulseGroupBox)
+        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
+        self.widget_2 = QtGui.QWidget(self.pulseGroupBox)
+        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
+        sizePolicy.setHorizontalStretch(0)
+        sizePolicy.setVerticalStretch(0)
+        sizePolicy.setHeightForWidth(self.widget_2.sizePolicy().hasHeightForWidth())
+        self.widget_2.setSizePolicy(sizePolicy)
+        self.widget_2.setMinimumSize(QtCore.QSize(0, 0))
+        self.widget_2.setMaximumSize(QtCore.QSize(16777215, 16777215))
+        self.widget_2.setObjectName(_fromUtf8("widget_2"))
+        self.horizontalLayout_3 = QtGui.QHBoxLayout(self.widget_2)
+        self.horizontalLayout_3.setMargin(0)
+        self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3"))
+        self.resetPushButton = QtGui.QPushButton(self.widget_2)
+        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
+        sizePolicy.setHorizontalStretch(0)
+        sizePolicy.setVerticalStretch(0)
+        sizePolicy.setHeightForWidth(self.resetPushButton.sizePolicy().hasHeightForWidth())
+        self.resetPushButton.setSizePolicy(sizePolicy)
+        self.resetPushButton.setMinimumSize(QtCore.QSize(120, 0))
+        self.resetPushButton.setMaximumSize(QtCore.QSize(120, 16777215))
+        self.resetPushButton.setObjectName(_fromUtf8("resetPushButton"))
+        self.horizontalLayout_3.addWidget(self.resetPushButton)
+        spacerItem2 = QtGui.QSpacerItem(10, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum)
+        self.horizontalLayout_3.addItem(spacerItem2)
+        self.skipPushButton = QtGui.QPushButton(self.widget_2)
+        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
+        sizePolicy.setHorizontalStretch(0)
+        sizePolicy.setVerticalStretch(0)
+        sizePolicy.setHeightForWidth(self.skipPushButton.sizePolicy().hasHeightForWidth())
+        self.skipPushButton.setSizePolicy(sizePolicy)
+        self.skipPushButton.setMinimumSize(QtCore.QSize(120, 0))
+        self.skipPushButton.setMaximumSize(QtCore.QSize(120, 16777215))
+        self.skipPushButton.setObjectName(_fromUtf8("skipPushButton"))
+        self.horizontalLayout_3.addWidget(self.skipPushButton)
+        spacerItem3 = QtGui.QSpacerItem(10, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum)
+        self.horizontalLayout_3.addItem(spacerItem3)
+        self.skipSpinBox = QtGui.QSpinBox(self.widget_2)
+        self.skipSpinBox.setMinimum(1)
+        self.skipSpinBox.setMaximum(9)
+        self.skipSpinBox.setObjectName(_fromUtf8("skipSpinBox"))
+        self.horizontalLayout_3.addWidget(self.skipSpinBox)
+        spacerItem4 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
+        self.horizontalLayout_3.addItem(spacerItem4)
+        self.verticalLayout.addWidget(self.widget_2)
+        self.verticalLayout_3.addWidget(self.pulseGroupBox)
+        self.line = QtGui.QFrame(self.centralwidget)
+        self.line.setFrameShape(QtGui.QFrame.HLine)
+        self.line.setFrameShadow(QtGui.QFrame.Sunken)
+        self.line.setObjectName(_fromUtf8("line"))
+        self.verticalLayout_3.addWidget(self.line)
+        self.displayGroupBox = QtGui.QGroupBox(self.centralwidget)
+        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Preferred)
+        sizePolicy.setHorizontalStretch(0)
+        sizePolicy.setVerticalStretch(0)
+        sizePolicy.setHeightForWidth(self.displayGroupBox.sizePolicy().hasHeightForWidth())
+        self.displayGroupBox.setSizePolicy(sizePolicy)
+        self.displayGroupBox.setMinimumSize(QtCore.QSize(150, 0))
+        self.displayGroupBox.setObjectName(_fromUtf8("displayGroupBox"))
+        self.verticalLayout_2 = QtGui.QVBoxLayout(self.displayGroupBox)
+        self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
+        self.numberRadioButton = QtGui.QRadioButton(self.displayGroupBox)
+        self.numberRadioButton.setObjectName(_fromUtf8("numberRadioButton"))
+        self.verticalLayout_2.addWidget(self.numberRadioButton)
+        self.binaryRadioButton = QtGui.QRadioButton(self.displayGroupBox)
+        self.binaryRadioButton.setObjectName(_fromUtf8("binaryRadioButton"))
+        self.verticalLayout_2.addWidget(self.binaryRadioButton)
+        self.verticalLayout_3.addWidget(self.displayGroupBox)
+        spacerItem5 = QtGui.QSpacerItem(20, 54, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+        self.verticalLayout_3.addItem(spacerItem5)
+        MainWindow.setCentralWidget(self.centralwidget)
+        self.menubar = QtGui.QMenuBar(MainWindow)
+        self.menubar.setGeometry(QtCore.QRect(0, 0, 411, 25))
+        self.menubar.setObjectName(_fromUtf8("menubar"))
+        MainWindow.setMenuBar(self.menubar)
+        self.statusbar = QtGui.QStatusBar(MainWindow)
+        self.statusbar.setObjectName(_fromUtf8("statusbar"))
+        MainWindow.setStatusBar(self.statusbar)
+
+        self.retranslateUi(MainWindow)
+        QtCore.QMetaObject.connectSlotsByName(MainWindow)
+
+    def retranslateUi(self, MainWindow):
+        MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "Pulse Skipper", None, QtGui.QApplication.UnicodeUTF8))
+        self.deviceGroupBox.setTitle(QtGui.QApplication.translate("MainWindow", "Device", None, QtGui.QApplication.UnicodeUTF8))
+        self.label.setText(QtGui.QApplication.translate("MainWindow", "Port", None, QtGui.QApplication.UnicodeUTF8))
+        self.connectPushButton.setText(QtGui.QApplication.translate("MainWindow", "Connect", None, QtGui.QApplication.UnicodeUTF8))
+        self.pulseGroupBox.setTitle(QtGui.QApplication.translate("MainWindow", "Pulse", None, QtGui.QApplication.UnicodeUTF8))
+        self.resetPushButton.setText(QtGui.QApplication.translate("MainWindow", "Reset Counter", None, QtGui.QApplication.UnicodeUTF8))
+        self.skipPushButton.setText(QtGui.QApplication.translate("MainWindow", "Skip", None, QtGui.QApplication.UnicodeUTF8))
+        self.displayGroupBox.setTitle(QtGui.QApplication.translate("MainWindow", "Display", None, QtGui.QApplication.UnicodeUTF8))
+        self.numberRadioButton.setText(QtGui.QApplication.translate("MainWindow", "Number", None, QtGui.QApplication.UnicodeUTF8))
+        self.binaryRadioButton.setText(QtGui.QApplication.translate("MainWindow", "Binary", None, QtGui.QApplication.UnicodeUTF8))
+

python/pulse_skipper.py

-from __future__ import print_function
-import sys
-import serial
-import functools
-from PyQt4 import QtCore
-from PyQt4 import QtGui
-from pulse_skipper_ui import Ui_MainWindow 
-from pulse_skipper_serial import PulseSkipperSerial
-
-
-class PulseSkipper(QtGui.QMainWindow, Ui_MainWindow):
-
-    DEFAULT_PORT = '/dev/ttyUSB8'
-
-    def __init__(self, parent=None):
-        super(PulseSkipper,self).__init__(parent)
-        self.setupUi(self)
-        self.connectActions()
-        self.initialize()
-
-    def main(self):
-        self.show()
-
-    def connectActions(self):
-        self.connectPushButton.pressed.connect(self.connectPressed)
-        self.connectPushButton.clicked.connect(self.connectClicked)
-        self.skipPushButton.clicked.connect(self.skipClicked)
-        self.resetPushButton.clicked.connect(self.resetClicked)
-        numberToggledCallback = functools.partial(self.displayToggled,'number')
-        self.numberRadioButton.toggled.connect(numberToggledCallback)
-        binaryToggledCallback = functools.partial(self.displayToggled,'binary')
-        self.binaryRadioButton.toggled.connect(binaryToggledCallback)
-
-    def initialize(self):
-        self.dev = None
-        self.port = PulseSkipper.DEFAULT_PORT
-        self.portLineEdit.setText(self.port)
-        self.setEnabledOnDisconnect()
-        self.numberRadioButton.setChecked(True)
-        self.binaryRadioButton.setChecked(False)
-
-
-    def connectPressed(self):
-        self.portLineEdit.setEnabled(False)
-        self.connectPushButton.setText('Disconnect')
-
-    def connectClicked(self):
-        if self.dev is None:
-            try:
-                self.dev = PulseSkipperSerial(self.port)
-                #self.dev = True
-            except serial.serialutil.SerialException, e: 
-                errMsg = '{0}'.format(str(e)) 
-                QtGui.QMessageBox.critical(self,'Error',errMsg) 
-                self.portLineEdit.setEnabled(True) 
-                self.connectPushButton.setText('Connect')
-                self.dev = None
-            if self.dev is not None:
-                self.setEnabledOnConnect()
-                self.setDisplay()
-
-        else: 
-            self.portLineEdit.setEnabled(True) 
-            self.connectPushButton.setText('Connect') 
-            self.setEnabledOnDisconnect()
-            self.dev.close() 
-            #self.dev = None 
-
-
-    def skipClicked(self):
-        skipValue = self.skipSpinBox.value()
-        self.dev.skipPulse(skipValue)
-
-    def resetClicked(self):
-        self.dev.resetCount()
-
-    def displayToggled(self, name):
-        if self.dev is not None:
-            self.setDisplay()
-
-    def setDisplay(self):
-        if self.binaryRadioButton.isChecked():
-            self.dev.setDisplayBinary()
-        else:
-            self.dev.setDisplayNumber()
-
-    def setEnabledOnDisconnect(self):
-        self.pulseGroupBox.setEnabled(False)
-        self.displayGroupBox.setEnabled(False)
-
-    def setEnabledOnConnect(self):
-        self.pulseGroupBox.setEnabled(True)
-        self.displayGroupBox.setEnabled(True)
-
-def runApp():
-    app = QtGui.QApplication(sys.argv)
-    win = PulseSkipper()
-    win.main()
-    app.exec_()
-
-
-# -----------------------------------------------------------------------------
-if __name__ == '__main__':
-    runApp()
-

python/pulse_skipper.ui

-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>MainWindow</class>
- <widget class="QMainWindow" name="MainWindow">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>411</width>
-    <height>331</height>
-   </rect>
-  </property>
-  <property name="minimumSize">
-   <size>
-    <width>0</width>
-    <height>0</height>
-   </size>
-  </property>
-  <property name="maximumSize">
-   <size>
-    <width>16777215</width>
-    <height>16777215</height>
-   </size>
-  </property>
-  <property name="windowTitle">
-   <string>Pulse Skipper</string>
-  </property>
-  <widget class="QWidget" name="centralwidget">
-   <layout class="QVBoxLayout" name="verticalLayout_3">
-    <item>
-     <widget class="QGroupBox" name="deviceGroupBox">
-      <property name="title">
-       <string>Device</string>
-      </property>
-      <layout class="QHBoxLayout" name="horizontalLayout">
-       <item>
-        <widget class="QLabel" name="label">
-         <property name="text">
-          <string>Port</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QLineEdit" name="portLineEdit">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <spacer name="horizontalSpacer_2">
-         <property name="orientation">
-          <enum>Qt::Horizontal</enum>
-         </property>
-         <property name="sizeType">
-          <enum>QSizePolicy::Fixed</enum>
-         </property>
-         <property name="sizeHint" stdset="0">
-          <size>
-           <width>15</width>
-           <height>20</height>
-          </size>
-         </property>
-        </spacer>
-       </item>
-       <item>
-        <widget class="QPushButton" name="connectPushButton">
-         <property name="text">
-          <string>Connect</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <spacer name="horizontalSpacer">
-         <property name="orientation">
-          <enum>Qt::Horizontal</enum>
-         </property>
-         <property name="sizeHint" stdset="0">
-          <size>
-           <width>189</width>
-           <height>20</height>
-          </size>
-         </property>
-        </spacer>
-       </item>
-      </layout>
-     </widget>
-    </item>
-    <item>
-     <widget class="Line" name="line_2">
-      <property name="orientation">
-       <enum>Qt::Horizontal</enum>
-      </property>
-     </widget>
-    </item>
-    <item>
-     <widget class="QGroupBox" name="pulseGroupBox">
-      <property name="sizePolicy">
-       <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
-        <horstretch>0</horstretch>
-        <verstretch>0</verstretch>
-       </sizepolicy>
-      </property>
-      <property name="minimumSize">
-       <size>
-        <width>0</width>
-        <height>0</height>
-       </size>
-      </property>
-      <property name="title">
-       <string>Pulse</string>
-      </property>
-      <layout class="QVBoxLayout" name="verticalLayout">
-       <item>
-        <widget class="QWidget" name="widget_2" native="true">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="minimumSize">
-          <size>
-           <width>0</width>
-           <height>0</height>
-          </size>
-         </property>
-         <property name="maximumSize">
-          <size>
-           <width>16777215</width>
-           <height>16777215</height>
-          </size>
-         </property>
-         <layout class="QHBoxLayout" name="horizontalLayout_3">
-          <item>
-           <widget class="QPushButton" name="resetPushButton">
-            <property name="sizePolicy">
-             <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-              <horstretch>0</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
-            </property>
-            <property name="minimumSize">
-             <size>
-              <width>120</width>
-              <height>0</height>
-             </size>
-            </property>
-            <property name="maximumSize">
-             <size>
-              <width>120</width>
-              <height>16777215</height>
-             </size>
-            </property>
-            <property name="text">
-             <string>Reset Counter</string>
-            </property>
-           </widget>
-          </item>
-          <item>
-           <spacer name="horizontalSpacer_4">
-            <property name="orientation">
-             <enum>Qt::Horizontal</enum>
-            </property>
-            <property name="sizeType">
-             <enum>QSizePolicy::Fixed</enum>
-            </property>
-            <property name="sizeHint" stdset="0">
-             <size>
-              <width>10</width>
-              <height>20</height>
-             </size>
-            </property>
-           </spacer>
-          </item>
-          <item>
-           <widget class="QPushButton" name="skipPushButton">
-            <property name="sizePolicy">
-             <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-              <horstretch>0</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
-            </property>
-            <property name="minimumSize">
-             <size>
-              <width>120</width>
-              <height>0</height>
-             </size>
-            </property>
-            <property name="maximumSize">
-             <size>
-              <width>120</width>
-              <height>16777215</height>
-             </size>
-            </property>
-            <property name="text">
-             <string>Skip</string>
-            </property>
-           </widget>
-          </item>
-          <item>
-           <spacer name="horizontalSpacer_6">
-            <property name="orientation">
-             <enum>Qt::Horizontal</enum>
-            </property>
-            <property name="sizeType">
-             <enum>QSizePolicy::Fixed</enum>
-            </property>
-            <property name="sizeHint" stdset="0">
-             <size>
-              <width>10</width>
-              <height>20</height>
-             </size>
-            </property>
-           </spacer>
-          </item>
-          <item>
-           <widget class="QSpinBox" name="skipSpinBox">
-            <property name="minimum">
-             <number>1</number>
-            </property>
-            <property name="maximum">
-             <number>9</number>
-            </property>
-           </widget>
-          </item>
-          <item>
-           <spacer name="horizontalSpacer_3">
-            <property name="orientation">
-             <enum>Qt::Horizontal</enum>
-            </property>
-            <property name="sizeHint" stdset="0">
-             <size>
-              <width>40</width>
-              <height>20</height>
-             </size>
-            </property>
-           </spacer>
-          </item>
-         </layout>
-        </widget>
-       </item>
-      </layout>
-     </widget>
-    </item>
-    <item>
-     <widget class="Line" name="line">
-      <property name="orientation">
-       <enum>Qt::Horizontal</enum>
-      </property>
-     </widget>
-    </item>
-    <item>
-     <widget class="QGroupBox" name="displayGroupBox">
-      <property name="sizePolicy">
-       <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
-        <horstretch>0</horstretch>
-        <verstretch>0</verstretch>
-       </sizepolicy>
-      </property>
-      <property name="minimumSize">
-       <size>
-        <width>150</width>
-        <height>0</height>
-       </size>
-      </property>
-      <property name="title">
-       <string>Display</string>
-      </property>
-      <layout class="QVBoxLayout" name="verticalLayout_2">
-       <item>
-        <widget class="QRadioButton" name="numberRadioButton">
-         <property name="text">
-          <string>Number</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QRadioButton" name="binaryRadioButton">
-         <property name="text">
-          <string>Binary</string>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </widget>
-    </item>
-    <item>
-     <spacer name="verticalSpacer">
-      <property name="orientation">
-       <enum>Qt::Vertical</enum>
-      </property>
-      <property name="sizeHint" stdset="0">
-       <size>
-        <width>20</width>
-        <height>54</height>
-       </size>
-      </property>
-     </spacer>
-    </item>
-   </layout>
-  </widget>
-  <widget class="QMenuBar" name="menubar">
-   <property name="geometry">
-    <rect>
-     <x>0</x>
-     <y>0</y>
-     <width>411</width>
-     <height>25</height>
-    </rect>
-   </property>
-  </widget>
-  <widget class="QStatusBar" name="statusbar"/>
- </widget>
- <resources/>
- <connections/>
-</ui>

python/pulse_skipper_serial.py

-from __future__ import print_function
-import serial
-import time
-
-class PulseSkipperSerial(serial.Serial):
-
-    def __init__(self,port='/dev/ttyUSB8'):
-        super(PulseSkipperSerial,self).__init__(port=port,baudrate=9600,timeout=5.0)
-        time.sleep(2.0)
-
-    def skipPulse(self,n):
-        assert (n>=1 and n<=9), 'pulse number must be in range [1,9]'
-        self.write('{0}'.format(n))
-
-    def resetCount(self):
-        self.write('r')
-
-    def getCount(self):
-        self.write('c')
-        value = self.readline()
-        value = value.split(',')
-        value = int(value[0])
-        return value 
-
-    def setDisplayBinary(self):
-        self.write('b')
-
-    def setDisplayNumber(self):
-        self.write('n')
-
-
-# ---------------------------------------------------------------
-if __name__ == '__main__':
-
-    dev = PulseSkipperSerial(port='/dev/ttyUSB8')
-    for i in range(5):
-        count = dev.getCount()
-        print('{0} count: {1}'.format(i, count))
-        time.sleep(2)
-
-
-
-

python/pulse_skipper_ui.py

-# -*- coding: utf-8 -*-
-
-# Form implementation generated from reading ui file 'pulse_skipper.ui'
-#
-# Created: Tue Oct  2 16:48:16 2012
-#      by: PyQt4 UI code generator 4.8.3
-#
-# WARNING! All changes made in this file will be lost!
-
-from PyQt4 import QtCore, QtGui
-
-try:
-    _fromUtf8 = QtCore.QString.fromUtf8
-except AttributeError:
-    _fromUtf8 = lambda s: s
-
-class Ui_MainWindow(object):
-    def setupUi(self, MainWindow):
-        MainWindow.setObjectName(_fromUtf8("MainWindow"))
-        MainWindow.resize(411, 331)
-        MainWindow.setMinimumSize(QtCore.QSize(0, 0))
-        MainWindow.setMaximumSize(QtCore.QSize(16777215, 16777215))
-        self.centralwidget = QtGui.QWidget(MainWindow)
-        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
-        self.verticalLayout_3 = QtGui.QVBoxLayout(self.centralwidget)
-        self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3"))
-        self.deviceGroupBox = QtGui.QGroupBox(self.centralwidget)
-        self.deviceGroupBox.setObjectName(_fromUtf8("deviceGroupBox"))
-        self.horizontalLayout = QtGui.QHBoxLayout(self.deviceGroupBox)
-        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
-        self.label = QtGui.QLabel(self.deviceGroupBox)
-        self.label.setObjectName(_fromUtf8("label"))
-        self.horizontalLayout.addWidget(self.label)
-        self.portLineEdit = QtGui.QLineEdit(self.deviceGroupBox)
-        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
-        sizePolicy.setHorizontalStretch(0)
-        sizePolicy.setVerticalStretch(0)
-        sizePolicy.setHeightForWidth(self.portLineEdit.sizePolicy().hasHeightForWidth())
-        self.portLineEdit.setSizePolicy(sizePolicy)
-        self.portLineEdit.setObjectName(_fromUtf8("portLineEdit"))
-        self.horizontalLayout.addWidget(self.portLineEdit)
-        spacerItem = QtGui.QSpacerItem(15, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum)
-        self.horizontalLayout.addItem(spacerItem)
-        self.connectPushButton = QtGui.QPushButton(self.deviceGroupBox)
-        self.connectPushButton.setObjectName(_fromUtf8("connectPushButton"))
-        self.horizontalLayout.addWidget(self.connectPushButton)
-        spacerItem1 = QtGui.QSpacerItem(189, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
-        self.horizontalLayout.addItem(spacerItem1)
-        self.verticalLayout_3.addWidget(self.deviceGroupBox)
-        self.line_2 = QtGui.QFrame(self.centralwidget)
-        self.line_2.setFrameShape(QtGui.QFrame.HLine)
-        self.line_2.setFrameShadow(QtGui.QFrame.Sunken)
-        self.line_2.setObjectName(_fromUtf8("line_2"))
-        self.verticalLayout_3.addWidget(self.line_2)
-        self.pulseGroupBox = QtGui.QGroupBox(self.centralwidget)
-        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
-        sizePolicy.setHorizontalStretch(0)
-        sizePolicy.setVerticalStretch(0)
-        sizePolicy.setHeightForWidth(self.pulseGroupBox.sizePolicy().hasHeightForWidth())
-        self.pulseGroupBox.setSizePolicy(sizePolicy)
-        self.pulseGroupBox.setMinimumSize(QtCore.QSize(0, 0))
-        self.pulseGroupBox.setObjectName(_fromUtf8("pulseGroupBox"))
-        self.verticalLayout = QtGui.QVBoxLayout(self.pulseGroupBox)
-        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
-        self.widget_2 = QtGui.QWidget(self.pulseGroupBox)
-        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
-        sizePolicy.setHorizontalStretch(0)
-        sizePolicy.setVerticalStretch(0)
-        sizePolicy.setHeightForWidth(self.widget_2.sizePolicy().hasHeightForWidth())
-        self.widget_2.setSizePolicy(sizePolicy)
-        self.widget_2.setMinimumSize(QtCore.QSize(0, 0))
-        self.widget_2.setMaximumSize(QtCore.QSize(16777215, 16777215))
-        self.widget_2.setObjectName(_fromUtf8("widget_2"))
-        self.horizontalLayout_3 = QtGui.QHBoxLayout(self.widget_2)
-        self.horizontalLayout_3.setMargin(0)
-        self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3"))
-        self.resetPushButton = QtGui.QPushButton(self.widget_2)
-        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
-        sizePolicy.setHorizontalStretch(0)
-        sizePolicy.setVerticalStretch(0)
-        sizePolicy.setHeightForWidth(self.resetPushButton.sizePolicy().hasHeightForWidth())
-        self.resetPushButton.setSizePolicy(sizePolicy)
-        self.resetPushButton.setMinimumSize(QtCore.QSize(120, 0))
-        self.resetPushButton.setMaximumSize(QtCore.QSize(120, 16777215))
-        self.resetPushButton.setObjectName(_fromUtf8("resetPushButton"))
-        self.horizontalLayout_3.addWidget(self.resetPushButton)
-        spacerItem2 = QtGui.QSpacerItem(10, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum)
-        self.horizontalLayout_3.addItem(spacerItem2)
-        self.skipPushButton = QtGui.QPushButton(self.widget_2)
-        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
-        sizePolicy.setHorizontalStretch(0)
-        sizePolicy.setVerticalStretch(0)
-        sizePolicy.setHeightForWidth(self.skipPushButton.sizePolicy().hasHeightForWidth())
-        self.skipPushButton.setSizePolicy(sizePolicy)
-        self.skipPushButton.setMinimumSize(QtCore.QSize(120, 0))
-        self.skipPushButton.setMaximumSize(QtCore.QSize(120, 16777215))
-        self.skipPushButton.setObjectName(_fromUtf8("skipPushButton"))
-        self.horizontalLayout_3.addWidget(self.skipPushButton)
-        spacerItem3 = QtGui.QSpacerItem(10, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum)
-        self.horizontalLayout_3.addItem(spacerItem3)
-        self.skipSpinBox = QtGui.QSpinBox(self.widget_2)
-        self.skipSpinBox.setMinimum(1)
-        self.skipSpinBox.setMaximum(9)
-        self.skipSpinBox.setObjectName(_fromUtf8("skipSpinBox"))
-        self.horizontalLayout_3.addWidget(self.skipSpinBox)
-        spacerItem4 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
-        self.horizontalLayout_3.addItem(spacerItem4)
-        self.verticalLayout.addWidget(self.widget_2)
-        self.verticalLayout_3.addWidget(self.pulseGroupBox)
-        self.line = QtGui.QFrame(self.centralwidget)
-        self.line.setFrameShape(QtGui.QFrame.HLine)
-        self.line.setFrameShadow(QtGui.QFrame.Sunken)
-        self.line.setObjectName(_fromUtf8("line"))
-        self.verticalLayout_3.addWidget(self.line)
-        self.displayGroupBox = QtGui.QGroupBox(self.centralwidget)
-        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Preferred)
-        sizePolicy.setHorizontalStretch(0)
-        sizePolicy.setVerticalStretch(0)
-        sizePolicy.setHeightForWidth(self.displayGroupBox.sizePolicy().hasHeightForWidth())
-        self.displayGroupBox.setSizePolicy(sizePolicy)
-        self.displayGroupBox.setMinimumSize(QtCore.QSize(150, 0))
-        self.displayGroupBox.setObjectName(_fromUtf8("displayGroupBox"))
-        self.verticalLayout_2 = QtGui.QVBoxLayout(self.displayGroupBox)
-        self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
-        self.numberRadioButton = QtGui.QRadioButton(self.displayGroupBox)
-        self.numberRadioButton.setObjectName(_fromUtf8("numberRadioButton"))
-        self.verticalLayout_2.addWidget(self.numberRadioButton)
-        self.binaryRadioButton = QtGui.QRadioButton(self.displayGroupBox)
-        self.binaryRadioButton.setObjectName(_fromUtf8("binaryRadioButton"))
-        self.verticalLayout_2.addWidget(self.binaryRadioButton)
-        self.verticalLayout_3.addWidget(self.displayGroupBox)
-        spacerItem5 = QtGui.QSpacerItem(20, 54, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
-        self.verticalLayout_3.addItem(spacerItem5)
-        MainWindow.setCentralWidget(self.centralwidget)
-        self.menubar = QtGui.QMenuBar(MainWindow)
-        self.menubar.setGeometry(QtCore.QRect(0, 0, 411, 25))
-        self.menubar.setObjectName(_fromUtf8("menubar"))
-        MainWindow.setMenuBar(self.menubar)
-        self.statusbar = QtGui.QStatusBar(MainWindow)
-        self.statusbar.setObjectName(_fromUtf8("statusbar"))
-        MainWindow.setStatusBar(self.statusbar)
-
-        self.retranslateUi(MainWindow)
-        QtCore.QMetaObject.connectSlotsByName(MainWindow)
-
-    def retranslateUi(self, MainWindow):
-        MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "Pulse Skipper", None, QtGui.QApplication.UnicodeUTF8))
-        self.deviceGroupBox.setTitle(QtGui.QApplication.translate("MainWindow", "Device", None, QtGui.QApplication.UnicodeUTF8))
-        self.label.setText(QtGui.QApplication.translate("MainWindow", "Port", None, QtGui.QApplication.UnicodeUTF8))
-        self.connectPushButton.setText(QtGui.QApplication.translate("MainWindow", "Connect", None, QtGui.QApplication.UnicodeUTF8))
-        self.pulseGroupBox.setTitle(QtGui.QApplication.translate("MainWindow", "Pulse", None, QtGui.QApplication.UnicodeUTF8))
-        self.resetPushButton.setText(QtGui.QApplication.translate("MainWindow", "Reset Counter", None, QtGui.QApplication.UnicodeUTF8))
-        self.skipPushButton.setText(QtGui.QApplication.translate("MainWindow", "Skip", None, QtGui.QApplication.UnicodeUTF8))
-        self.displayGroupBox.setTitle(QtGui.QApplication.translate("MainWindow", "Display", None, QtGui.QApplication.UnicodeUTF8))
-        self.numberRadioButton.setText(QtGui.QApplication.translate("MainWindow", "Number", None, QtGui.QApplication.UnicodeUTF8))
-        self.binaryRadioButton.setText(QtGui.QApplication.translate("MainWindow", "Binary", None, QtGui.QApplication.UnicodeUTF8))
-