Commit 5f3c4d43 authored by Martin Drechsler's avatar Martin Drechsler

file myWidgets added

parent 5ce84bcd
# -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
import pyqtgraph as pg
from ADoutputs import daq_AO, daq_DO
from pyqtgraph.Qt import QtGui
#An example of a class
class anal_control_signal:
def __init__(self, name, channel):
self.name = name
self.ch = channel
self.initial_value = 0
self.max = 10
self.min = -10
self.step = 0.1
self.siPrefix = True
self.suffix = 'V'
self.sb = pg.SpinBox(value = self.initial_value, bounds=[self.min, self.max], step = self.step, siPrefix = self.siPrefix, suffix = self.suffix)
self.AO = daq_AO(self.ch)
def set_name(self, name):
self.name = name
def set_initial_value(self, value):
self.initial_value = value
def set_max(self, value):
self.max = value
def set_min(self, value):
self.min = value
def set_step(self, value):
self.step = value
def set_siPrefix(self, value):
self.siPrefix = value
def set_sufix(self, value):
self.sufix = value
class digital_control_signal:
def __init__(self, name, channel):
self.name = name
self.ch = channel
self.initial_value = 0
self.DO = daq_DO(self.ch)
#win = QtGui.QMainWindow()
self.cb = QtGui.QCheckBox()
def set_name(self, name):
self.name = name
def set_initial_value(self, value):
self.initial_value = value
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment