RTC Toolkit 6.0.0
Loading...
Searching...
No Matches
gui.qecpu.QeCpu Class Reference

QeCpu is a small text bsaed widget that presents the running process cpu usage. More...

Inheritance diagram for gui.qecpu.QeCpu:

Public Member Functions

 __init__ (self, parent=None)
 Initializes the QeCpu.
 
 calculate_cpu (self)
 Slot that is triggered every second.
 
 cpu_percent (self)
 Accesor method for the cpu value.
 

Public Attributes

 calculate_cpu
 

Static Public Attributes

 cpu_percent_changed = Signal(float)
 

Protected Attributes

 _timer = QTimer(self)
 
 _process = psutil.Process()
 
 _cpu_percent = self._process.cpu_percent()
 

Detailed Description

QeCpu is a small text bsaed widget that presents the running process cpu usage.

It uses a QTimer to automatically update every second.

Constructor & Destructor Documentation

◆ __init__()

gui.qecpu.QeCpu.__init__ ( self,
parent = None )

Initializes the QeCpu.

Please set parent to a suitable paret wigdet.

Member Function Documentation

◆ calculate_cpu()

gui.qecpu.QeCpu.calculate_cpu ( self)

Slot that is triggered every second.

It calculates the cpu value and emits the signal. Also requests an update on the widget's graphical representation.

◆ cpu_percent()

gui.qecpu.QeCpu.cpu_percent ( self)

Accesor method for the cpu value.

Member Data Documentation

◆ _cpu_percent

gui.qecpu.QeCpu._cpu_percent = self._process.cpu_percent()
protected

◆ _process

gui.qecpu.QeCpu._process = psutil.Process()
protected

◆ _timer

gui.qecpu.QeCpu._timer = QTimer(self)
protected

◆ calculate_cpu

gui.qecpu.QeCpu.calculate_cpu

◆ cpu_percent_changed

gui.qecpu.QeCpu.cpu_percent_changed = Signal(float)
static

The documentation for this class was generated from the following file: