Opened 8 years ago
Closed 8 years ago
#134 closed enhancement (fixed)
update progressBar from getting data from neon
| Reported by: | yanll | Owned by: | yanll |
|---|---|---|---|
| Priority: | minor | Milestone: | alpa |
| Component: | general | Version: | 0.2 |
| Keywords: | Cc: | ||
| Blocked By: | Blocking: | ||
| Parent ID: | Parent Tickets: | ||
| Estimated Number of Hours: | 0.0 | Add Hours to Ticket: | 0 |
| Billable?: | yes | Total Hours: | 0 |
Description
1 main.py
@QtCore?.pyqtSlot(object, object)
def setUserData(self, _proton, _neutron):
self.userWidget.setProtonNeutron(_proton, _neutron)
self.protonValue = int(_proton)
self.neutronValue = int(_neutron)
#self.pulseValue = int(_pulse)
@QtCore?.pyqtSlot(str)
def setProgressData(self, value):
_value = json.loads(str(value))
self.progressName = _valuename?
self.setProgressBar(_valuemin?, _valuemax?)
def getValue(self):
if self.progressName=='proton_charge':
self.progressValue = self.protonValue
elif self.progressName=='neutron_counts':
self.progressValue = self.neutronValue
elif self.progressName=='pulse_counts':
self.progressValue = self.pulseValue
else:
pass
#value=random.randint(0,300)
return self.progressValue
2 presenter/progressBarThread.py
# time Progress Thread
def createProgressBar(self, mini,maxi):
global CSNSThreadID
CSNSThreadID += 1
self.progressThread = updateProgressBar(self, CSNSThreadID, mini, maxi)
self.progressThread.partDone.connect(self.updateTimeProgress)
self.progressThread.procDone.connect(self.fin)
self.progressThread.start()
@QtCore?.pyqtSlot(int)
def updateTimeProgress(self, val):
self.progressBar.setValue(val)
perct = '{0}%'.format(val)
Subtickets
Child Tickets
Change History (1)
comment:1 Changed 8 years ago by yanll
- Resolution set to fixed
- Status changed from new to closed
