Exemple #1
0
Fichier : lium.py Projet : ikt/lium
	def freshandsoclean(self):
		self.errorcheck("refresh")
		remain = format(guibackend.days_remaining_decimal()[1], '.0f')#omg
		self.daytillrolloverprogbar.setProperty("value", remain)
		
		usedd = format(guibackend.percentage_quota_remaining(), '.0f')#omg
		self.usageremainprogbar.setProperty("value", usedd)

		daysremain = format(guibackend.days_remaining_decimal()[0], '.1f') #omg
		self.label_10.setText(daysremain + " days")
		
		quotaremain = format(guibackend.quota_remaining(), '.2f')#omg
		self.label_11.setText(quotaremain + " GB")
		
		last_update = guibackend.last_updated()
		self.label_15.setText(" "+last_update)

		self.version_check()

		self.waittime()
Exemple #2
0
Fichier : lium.py Projet : ikt/lium
	def timerEvent(self, e):
		if self.step < 10:
			self.step = self.step + 1
			timeleft = 10 - self.step
			self.label_15.setText(" Updating in "+ str(timeleft)+ " seconds!")

		if self.step == 10:
			self.starttimer.stop()
			self.runthread()
			return
			
		if self.step > 11:
			self.step = self.step - 1
			timeleft = 0 + self.step
			
			last_update = guibackend.last_updated()
			self.label_15.setText(" "+last_update)

		if self.step == 11:
			self.waittimer.stop()
			self.starttime()
Exemple #3
0
Fichier : lium.py Projet : ikt/lium
	def getdatafromthecabinet(self):
		remain = format(guibackend.days_remaining_decimal()[1], '.0f')#omg
		self.daytillrolloverprogbar.setProperty("value", remain)
		
		usedd = format(guibackend.percentage_quota_remaining(), '.0f')#omg
		self.usageremainprogbar.setProperty("value", usedd)

		daysremain = format(guibackend.days_remaining_decimal()[0], '.1f') #omg
		self.label_10.setText(daysremain + " days")
		
		quotaremain = format(guibackend.quota_remaining(), '.2f')#omg
		self.label_11.setText(quotaremain + " GB")
		
		last_update = guibackend.last_updated()
		self.label_15.setText(" "+last_update)

		plan = guibackend.serviceinfo("plan")
		self.label_25.setText(plan)

		speed = guibackend.serviceinfo("speed")
		self.label_26.setText(speed)

		cost = guibackend.serviceinfo("plan-cost")
		self.label_27.setText("$"+cost)

		carrier = guibackend.serviceinfo("carrier")
		self.label_28.setText(carrier)	

		rollover = guibackend.serviceinfo("rollover")
		self.label_291.setText(rollover)	


		# As data is in the cabinet, start auto updating
		self.starttimer = QtCore.QBasicTimer()
		self.step = 0

		self.waittimer = QtCore.QBasicTimer()

		self.starttime()