summaryrefslogtreecommitdiffstats
path: root/kcontrol/hwmanager/devicepropsdlg.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2012-04-13 15:01:58 -0500
committerTimothy Pearson <[email protected]>2012-04-13 15:01:58 -0500
commit56d7df49f2739055ace9b11287cb1eaf54f977ba (patch)
treee41a84bdeaa97853909c9a7117ac9514fa8fe019 /kcontrol/hwmanager/devicepropsdlg.cpp
parentc815b90f868a7251ab1c4078d7fcb2db1743255d (diff)
downloadtdebase-56d7df49f2739055ace9b11287cb1eaf54f977ba.tar.gz
tdebase-56d7df49f2739055ace9b11287cb1eaf54f977ba.zip
Part 2 of prior commit
Diffstat (limited to 'kcontrol/hwmanager/devicepropsdlg.cpp')
-rw-r--r--kcontrol/hwmanager/devicepropsdlg.cpp29
1 files changed, 26 insertions, 3 deletions
diff --git a/kcontrol/hwmanager/devicepropsdlg.cpp b/kcontrol/hwmanager/devicepropsdlg.cpp
index e51e805d2..f5747c1c5 100644
--- a/kcontrol/hwmanager/devicepropsdlg.cpp
+++ b/kcontrol/hwmanager/devicepropsdlg.cpp
@@ -33,6 +33,7 @@
#include <tqfiledialog.h>
#include <kbuttonbox.h>
+#include <kcombobox.h>
#include <klocale.h>
#include <kapplication.h>
#include <klineedit.h>
@@ -276,6 +277,9 @@ DevicePropertiesDialog::DevicePropertiesDialog(TDEGenericDevice* device, TQWidge
base->tabBarWidget->removePage(base->tabMonitor);
}
+ if (m_device->type() == TDEGenericDeviceType::CPU) {
+ connect(base->comboCPUGovernor, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(setCPUGovernor(const TQString &)));
+ }
if ((m_device->type() == TDEGenericDeviceType::OtherSensor) || (m_device->type() == TDEGenericDeviceType::ThermalSensor)) {
base->groupSensors->setColumnLayout(0, TQt::Vertical );
base->groupSensors->layout()->setSpacing( KDialog::spacingHint() );
@@ -423,6 +427,17 @@ void DevicePropertiesDialog::populateDeviceInformation() {
else {
base->labelDependentCPUs->setText(i18n("<none>"));
}
+ base->comboCPUGovernor->setEnabled(cdevice->canSetGovernor());
+ TQStringList governorPolicies = cdevice->availableGovernors();
+ if ((uint)governorPolicies.count() != (uint)base->comboCPUGovernor->count()) {
+ base->comboCPUGovernor->clear();
+ int i=0;
+ for (TQStringList::Iterator it = governorPolicies.begin(); it != governorPolicies.end(); ++it) {
+ base->comboCPUGovernor->insertItem(*it, i);
+ i++;
+ }
+ }
+ base->comboCPUGovernor->setCurrentItem(cdevice->governor(), false);
}
if ((m_device->type() == TDEGenericDeviceType::OtherSensor) || (m_device->type() == TDEGenericDeviceType::ThermalSensor)) {
@@ -520,9 +535,7 @@ void DevicePropertiesDialog::populateDeviceInformation() {
base->sliderBacklightBrightness->setMinValue(0);
base->sliderBacklightBrightness->setMaxValue(bdevice->brightnessSteps()-1);
base->sliderBacklightBrightness->setValue(bdevice->rawBrightness());
- if (!bdevice->canSetBrightness()) {
- base->sliderBacklightBrightness->setEnabled(false);
- }
+ base->sliderBacklightBrightness->setEnabled(bdevice->canSetBrightness());
}
if (m_device->type() == TDEGenericDeviceType::Monitor) {
@@ -562,10 +575,20 @@ void DevicePropertiesDialog::populateDeviceInformation() {
else {
base->labelDisplayResolutions->setText(i18n("<unknown>"));
}
+
+ // RandR warning
+ base->labelRandrWarning->setText("<qt><b>NOTE: Any further integration of displays into TDE <i>REQUIRES</i> multi GPU support and other features slated for RandR 2.0.</b><p>Development on such features has been sorely lacking for well over a year as of 2012; if you want to see Linux come up to Windows and Macintosh standards in this area <i>please tell the Xorg developers</i> at http://www.x.org/wiki/XorgMailingLists<p>The TDE project badly needs these features before it can proceed with graphical monitor configuration tools:<br> * GPU object support<br> * The ability to query the active driver name for any Xorg output<p><b>To recap, this is <i>not a TDE shortcoming</i>, but rather is the result of a lack of fundamental Linux support for graphics configuration!</b></qt>");
}
}
}
+void DevicePropertiesDialog::setCPUGovernor(const TQString &governor) {
+ TDECPUDevice* cdevice = static_cast<TDECPUDevice*>(m_device);
+
+ cdevice->setGovernor(governor);
+ populateDeviceInformation();
+}
+
void DevicePropertiesDialog::setBacklightBrightness(int value) {
TDEBacklightDevice* bdevice = static_cast<TDEBacklightDevice*>(m_device);