From c663b6440964f6ac48027143ac9e63298991f9d0 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:33:34 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kcontrol/usbview/kcmusb.cpp | 68 ++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 34 deletions(-) (limited to 'kcontrol/usbview/kcmusb.cpp') diff --git a/kcontrol/usbview/kcmusb.cpp b/kcontrol/usbview/kcmusb.cpp index 24cb1f1bd..f3a5a85df 100644 --- a/kcontrol/usbview/kcmusb.cpp +++ b/kcontrol/usbview/kcmusb.cpp @@ -8,13 +8,13 @@ * * ***************************************************************************/ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -23,10 +23,10 @@ #include "usbdevices.h" #include "kcmusb.moc" -typedef KGenericFactory USBFactory; +typedef KGenericFactory USBFactory; K_EXPORT_COMPONENT_FACTORY (kcm_usb, USBFactory("kcmusb") ) -USBViewer::USBViewer(QWidget *parent, const char *name, const QStringList &) +USBViewer::USBViewer(TQWidget *parent, const char *name, const TQStringList &) : KCModule(USBFactory::instance(), parent, name) { setButtons(Help); @@ -34,38 +34,38 @@ USBViewer::USBViewer(QWidget *parent, const char *name, const QStringList &) setQuickHelp( i18n("

USB Devices

This module allows you to see" " the devices attached to your USB bus(es).")); - QVBoxLayout *vbox = new QVBoxLayout(this, 0, KDialog::spacingHint()); - QGroupBox *gbox = new QGroupBox(i18n("USB Devices"), this); + TQVBoxLayout *vbox = new TQVBoxLayout(this, 0, KDialog::spacingHint()); + TQGroupBox *gbox = new TQGroupBox(i18n("USB Devices"), this); gbox->setColumnLayout( 0, Qt::Horizontal ); vbox->addWidget(gbox); - QVBoxLayout *vvbox = new QVBoxLayout(gbox->layout(), KDialog::spacingHint()); + TQVBoxLayout *vvbox = new TQVBoxLayout(gbox->layout(), KDialog::spacingHint()); - QSplitter *splitter = new QSplitter(gbox); + TQSplitter *splitter = new TQSplitter(gbox); vvbox->addWidget(splitter); - _devices = new QListView(splitter); + _devices = new TQListView(splitter); _devices->addColumn(i18n("Device")); _devices->setRootIsDecorated(true); _devices->header()->hide(); _devices->setMinimumWidth(200); - _devices->setColumnWidthMode(0, QListView::Maximum); + _devices->setColumnWidthMode(0, TQListView::Maximum); - QValueList sizes; + TQValueList sizes; sizes.append(200); splitter->setSizes(sizes); - _details = new QTextView(splitter); + _details = new TQTextView(splitter); - splitter->setResizeMode(_devices, QSplitter::KeepSize); + splitter->setResizeMode(_devices, TQSplitter::KeepSize); - QTimer *refreshTimer = new QTimer(this); + TQTimer *refreshTimer = new TQTimer(this); // 1 sec seems to be a good compromise between latency and polling load. refreshTimer->start(1000); - connect(refreshTimer, SIGNAL(timeout()), SLOT(refresh())); - connect(_devices, SIGNAL(selectionChanged(QListViewItem*)), - this, SLOT(selectionChanged(QListViewItem*))); + connect(refreshTimer, TQT_SIGNAL(timeout()), TQT_SLOT(refresh())); + connect(_devices, TQT_SIGNAL(selectionChanged(TQListViewItem*)), + this, TQT_SLOT(selectionChanged(TQListViewItem*))); KAboutData *about = new KAboutData(I18N_NOOP("kcmusb"), I18N_NOOP("KDE USB Viewer"), @@ -97,12 +97,12 @@ static Q_UINT32 key_parent( USBDevice &dev ) return dev.bus()*256 + dev.parent(); } -static void delete_recursive( QListViewItem *item, const QIntDict &new_items ) +static void delete_recursive( TQListViewItem *item, const TQIntDict &new_items ) { if (!item) return; - QListViewItemIterator it( item ); + TQListViewItemIterator it( item ); while ( it.current() ) { if (!new_items.find(it.current()->text(1).toUInt())) { delete_recursive( it.current()->firstChild(), new_items); @@ -114,7 +114,7 @@ static void delete_recursive( QListViewItem *item, const QIntDict void USBViewer::refresh() { - QIntDict new_items; + TQIntDict new_items; if (!USBDevice::parse("/proc/bus/usb/devices")) USBDevice::parseSys("/sys/bus/usb/devices"); @@ -126,33 +126,33 @@ void USBViewer::refresh() { found = false; - QPtrListIterator it(USBDevice::devices()); + TQPtrListIterator it(USBDevice::devices()); for ( ; it.current(); ++it) if (it.current()->level() == level) { Q_UINT32 k = key(*it.current()); if (level == 0) { - QListViewItem *item = _items.find(k); + TQListViewItem *item = _items.find(k); if (!item) { - item = new QListViewItem(_devices, + item = new TQListViewItem(_devices, it.current()->product(), - QString::number(k)); + TQString::number(k)); } new_items.insert(k, item); found = true; } else { - QListViewItem *parent = new_items.find(key_parent(*it.current())); + TQListViewItem *parent = new_items.find(key_parent(*it.current())); if (parent) { - QListViewItem *item = _items.find(k); + TQListViewItem *item = _items.find(k); if (!item) { - item = new QListViewItem(parent, + item = new TQListViewItem(parent, it.current()->product(), - QString::number(k) ); + TQString::number(k) ); } new_items.insert(k, item); parent->setOpen(true); @@ -174,7 +174,7 @@ void USBViewer::refresh() } -void USBViewer::selectionChanged(QListViewItem *item) +void USBViewer::selectionChanged(TQListViewItem *item) { if (item) { -- cgit v1.2.1