Retrieve CPU freq information and update the related widgets accordingly. Definition at line 849 of file guidance-power-manager.py. 00849 : """ Retrieve CPU freq information and update the related widgets accordingly. """ if not SHOW_CPUFREQ: return if len(self.powermanager.cpus) == 0: return policy = self.powermanager.getCpuPolicy() text = "" if self.freq_name.has_key(policy): policyString = unicode(self.freq_name[policy]) text = i18nc("%1 is one of the CPU policies", "<b>CPU Frequency:</b> %1", policyString) else: text = i18nc("%1 is one of the CPU policies", "<b>CPU Frequency:</b> %1", policy) self.CpuMainLabel.setText(text) for cpu in self.powermanager.cpus: cpustate = self.powermanager.getCpuState(cpu) if not cpustate['online']: self.CpuProgress[cpu].setEnabled(False) else: self.CpuProgress[cpu].setEnabled(True) self.CpuProgress[cpu].setMaximum(cpustate['max']) self.CpuProgress[cpu].setValue(cpustate['cur']) if policy != "" or policy and self.cb_freq: self.policyActions[policy].setChecked(True) def changePoweredBrightness(self, level=None):
|