summaryrefslogtreecommitdiffstats
path: root/kcontrol/hwmanager/devicepropsdlg.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-04-06 19:27:38 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-04-06 19:27:38 -0500
commit5f27e3ead5c7d78075ff7fdcfa7a17c1403c826b (patch)
tree083077ee859d91880aafaefddf1ed8b5e26269fd /kcontrol/hwmanager/devicepropsdlg.cpp
parent520b27baef7cd2e3a8b7b757564a9b78cd61e506 (diff)
downloadtdebase-5f27e3ead5c7d78075ff7fdcfa7a17c1403c826b.tar.gz
tdebase-5f27e3ead5c7d78075ff7fdcfa7a17c1403c826b.zip
Enhance device manager module
Diffstat (limited to 'kcontrol/hwmanager/devicepropsdlg.cpp')
-rw-r--r--kcontrol/hwmanager/devicepropsdlg.cpp66
1 files changed, 16 insertions, 50 deletions
diff --git a/kcontrol/hwmanager/devicepropsdlg.cpp b/kcontrol/hwmanager/devicepropsdlg.cpp
index 16b01adc9..43892ce8c 100644
--- a/kcontrol/hwmanager/devicepropsdlg.cpp
+++ b/kcontrol/hwmanager/devicepropsdlg.cpp
@@ -42,62 +42,28 @@ DevicePropertiesDialog::DevicePropertiesDialog(TDEGenericDevice* device, TQWidge
enableButtonOK( false );
if (m_device) {
+ base = new DevicePropertiesDialogBase(plainPage());
+
TQGridLayout *mainGrid = new TQGridLayout(plainPage(), 1, 1, 0, spacingHint());
mainGrid->setRowStretch(1, 1);
mainGrid->setRowStretch(1, 1);
-
- TQTabWidget *mainTabs = new TQTabWidget(plainPage());
-
- TQWidget *genericPropertiesTab = new TQWidget(this);
-
- TQGridLayout *generalTabLayout = new TQGridLayout(genericPropertiesTab, 4, 2, 0, spacingHint() );
+ mainGrid->addWidget(base, 0, 0);
- int row = 0;
- TQLabel *label;
- label = new TQLabel(i18n("Device Name:"), genericPropertiesTab);
- generalTabLayout->addWidget(label, row, 0);
- label = new TQLabel(m_device->friendlyName(), genericPropertiesTab);
- generalTabLayout->addWidget(label, row, 1);
- row++;
- label = new TQLabel(i18n("Device Node:"), genericPropertiesTab);
- generalTabLayout->addWidget(label, row, 0);
- label = new TQLabel(m_device->deviceNode(), genericPropertiesTab);
- generalTabLayout->addWidget(label, row, 1);
- row++;
- label = new TQLabel(i18n("System Path:"), genericPropertiesTab);
- generalTabLayout->addWidget(label, row, 0);
- label = new TQLabel(m_device->systemPath(), genericPropertiesTab);
- generalTabLayout->addWidget(label, row, 1);
- row++;
- label = new TQLabel(i18n("Subsystem Type:"), genericPropertiesTab);
- generalTabLayout->addWidget(label, row, 0);
- label = new TQLabel(m_device->subsystem(), genericPropertiesTab);
- generalTabLayout->addWidget(label, row, 1);
- row++;
- label = new TQLabel(i18n("Device Driver:"), genericPropertiesTab);
- generalTabLayout->addWidget(label, row, 0);
- label = new TQLabel((m_device->deviceDriver().isNull())?i18n("<none>"):m_device->deviceDriver(), genericPropertiesTab);
- generalTabLayout->addWidget(label, row, 1);
- row++;
- label = new TQLabel(i18n("Device Class:"), genericPropertiesTab);
- generalTabLayout->addWidget(label, row, 0);
- label = new TQLabel((m_device->PCIClass().isNull())?i18n("<n/a>"):m_device->PCIClass(), genericPropertiesTab);
- generalTabLayout->addWidget(label, row, 1);
- row++;
+ base->labelDeviceType->setText(m_device->friendlyDeviceType());
+ base->iconDeviceType->setPixmap(m_device->icon(KIcon::SizeSmall));
+ base->labelDeviceName->setText(m_device->friendlyName());
+ base->labelDeviceNode->setText((m_device->deviceNode().isNull())?i18n("<none>"):m_device->deviceNode());
+ base->labelSystemPath->setText(m_device->systemPath());
+ base->labelSubsytemType->setText(m_device->subsystem());
+ base->labelDeviceDriver->setText((m_device->deviceDriver().isNull())?i18n("<none>"):m_device->deviceDriver());
+ base->labelDeviceClass->setText((m_device->PCIClass().isNull())?i18n("<n/a>"):m_device->PCIClass());
if (m_device->subsystem() == "pci") {
- TQString busid = m_device->systemPath();
- busid = busid.remove(0, busid.findRev("/")+1);
- busid = busid.remove(0, busid.find(":")+1);
- label = new TQLabel(i18n("Bus ID:"), genericPropertiesTab);
- generalTabLayout->addWidget(label, row, 0);
- label = new TQLabel(busid, genericPropertiesTab);
- generalTabLayout->addWidget(label, row, 1);
- row++;
+ base->labelBusID->setText(m_device->busID());
+ }
+ else {
+ base->labelBusID->hide();
+ base->stocklabelBusID->hide();
}
-
- mainTabs->addTab(genericPropertiesTab, i18n("&General"));
-
- mainGrid->addWidget(mainTabs, 0, 0);
}
}