diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-23 01:42:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-23 01:42:07 +0000 |
commit | a2277b6bc715464e83882b90c2a058139b8a6b54 (patch) | |
tree | ab09b14014f59b4d8e2ddd12226aa0b22e4dfc5d /ksim/monitors | |
parent | d3f79e04b34bd1f70a458b81b28fc8799498c8dc (diff) | |
download | tdeutils-a2277b6bc715464e83882b90c2a058139b8a6b54.tar.gz tdeutils-a2277b6bc715464e83882b90c2a058139b8a6b54.zip |
TQt4 port kdeutils
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1238125 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksim/monitors')
66 files changed, 463 insertions, 434 deletions
diff --git a/ksim/monitors/cpu/ksimcpu.cpp b/ksim/monitors/cpu/ksimcpu.cpp index 057edd5..37c09f7 100644 --- a/ksim/monitors/cpu/ksimcpu.cpp +++ b/ksim/monitors/cpu/ksimcpu.cpp @@ -107,8 +107,8 @@ void CpuPlugin::showAbout() KAboutApplication(&aboutData).exec(); } -CpuView::CpuView(KSim::PluginObject *parent, const char *name) - : KSim::PluginView(parent, name) +CpuView::CpuView(KSim::PluginObject *tqparent, const char *name) + : KSim::PluginView(tqparent, name) { #ifdef Q_OS_LINUX m_procStream = 0L; @@ -181,15 +181,15 @@ void CpuView::updateView() // kdDebug(2003) << "idle = " << cpuData.idle << endl; if (!m_firstTime) { - if (text.find("%T") != -1) + if (text.tqfind("%T") != -1) cpuDiff = cpuData.sys + cpuData.user + cpuData.nice; - else if (text.find("%t") != -1) + else if (text.tqfind("%t") != -1) cpuDiff = cpuData.sys + cpuData.user; - else if (text.find("%s") != -1) + else if (text.tqfind("%s") != -1) cpuDiff = cpuData.sys; - else if (text.find("%u") != -1) + else if (text.tqfind("%u") != -1) cpuDiff = cpuData.user; - else if (text.find("%n") != -1) + else if (text.tqfind("%n") != -1) cpuDiff = cpuData.nice; cpuDiff *= 100; @@ -201,7 +201,7 @@ void CpuView::updateView() cpuDiff = 100; } - current.chart()->setText(i18n("%1%").arg(cpuDiff)); + current.chart()->setText(i18n("%1%").tqarg(cpuDiff)); current.chart()->setValue(cpuDiff, 0); current.label()->setValue(cpuDiff); } @@ -225,7 +225,7 @@ void CpuView::updateCpu(CpuData &cpu, int cpuNumber) while (!m_procStream->atEnd()) { parser = m_procStream->readLine(); // remove all the entries apart from the line containing 'cpuString' - if (!cpuFound && parser.find(TQRegExp(cpuString)) != -1) { + if (!cpuFound && parser.tqfind(TQRegExp(cpuString)) != -1) { output = parser; cpuFound = true; } @@ -361,8 +361,8 @@ KSim::Progress *CpuView::addLabel() return progress; } -CpuConfig::CpuConfig(KSim::PluginObject *parent, const char *name) - : KSim::PluginPage(parent, name) +CpuConfig::CpuConfig(KSim::PluginObject *tqparent, const char *name) + : KSim::PluginPage(tqparent, name) { TQVBoxLayout * mainLayout = new TQVBoxLayout( this ); mainLayout->setSpacing( 6 ); @@ -377,27 +377,27 @@ CpuConfig::CpuConfig(KSim::PluginObject *parent, const char *name) mainLayout->addWidget( m_listView ); - TQHBoxLayout * layout = new TQHBoxLayout; - layout->setSpacing( 6 ); + TQHBoxLayout * tqlayout = new TQHBoxLayout; + tqlayout->setSpacing( 6 ); TQSpacerItem * spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); - layout->addItem(spacer); + tqlayout->addItem(spacer); m_modify = new TQPushButton( this ); m_modify->setText( i18n( "Modify..." ) ); connect( m_modify, TQT_SIGNAL( clicked() ), TQT_SLOT( modify() ) ); - layout->addWidget( m_modify ); - mainLayout->addLayout( layout ); + tqlayout->addWidget( m_modify ); + mainLayout->addLayout( tqlayout ); m_legendBox = new TQGroupBox(this); m_legendBox->setColumnLayout(0, Qt::Vertical); m_legendBox->setTitle(i18n("Chart Legend")); - m_legendBox->layout()->setSpacing(0); - m_legendBox->layout()->setMargin(0); + m_legendBox->tqlayout()->setSpacing(0); + m_legendBox->tqlayout()->setMargin(0); - m_legendLayout = new TQVBoxLayout(m_legendBox->layout()); - m_legendLayout->setAlignment(Qt::AlignTop); + m_legendLayout = new TQVBoxLayout(m_legendBox->tqlayout()); + m_legendLayout->tqsetAlignment(TQt::AlignTop); m_legendLayout->setSpacing(6); m_legendLayout->setMargin(11); @@ -420,7 +420,7 @@ CpuConfig::CpuConfig(KSim::PluginObject *parent, const char *name) for (uint i = 0; i < addCpus(); ++i) { - TQCheckListItem *item = new TQCheckListItem(m_listView, i18n("cpu %1").arg(i), TQCheckListItem::CheckBox); + TQCheckListItem *item = new TQCheckListItem(m_listView, i18n("cpu %1").tqarg(i), TQCheckListItem::CheckBox); item->setText(1, "%T"); } } @@ -438,7 +438,7 @@ void CpuConfig::readConfig() TQStringList::ConstIterator it; for (it = enabledCpus.begin(); it != enabledCpus.end(); ++it) { if (TQCheckListItem *item = - static_cast<TQCheckListItem *>(m_listView->findItem((*it), 0))) { + static_cast<TQCheckListItem *>(m_listView->tqfindItem((*it), 0))) { item->setOn(true); item->setText(1, config()->readEntry(CPU_NAME(cpuNum), "%T")); } diff --git a/ksim/monitors/cpu/ksimcpu.h b/ksim/monitors/cpu/ksimcpu.h index 8844225..79e561e 100644 --- a/ksim/monitors/cpu/ksimcpu.h +++ b/ksim/monitors/cpu/ksimcpu.h @@ -52,8 +52,9 @@ class CpuPlugin : public KSim::PluginObject class CpuView : public KSim::PluginView { Q_OBJECT + TQ_OBJECT public: - CpuView(KSim::PluginObject *parent, const char *name); + CpuView(KSim::PluginObject *tqparent, const char *name); ~CpuView(); virtual void reparseConfig(); @@ -200,8 +201,9 @@ class CpuView : public KSim::PluginView class CpuConfig : public KSim::PluginPage { Q_OBJECT + TQ_OBJECT public: - CpuConfig(KSim::PluginObject *parent, const char *name); + CpuConfig(KSim::PluginObject *tqparent, const char *name); ~CpuConfig(); virtual void saveConfig(); diff --git a/ksim/monitors/disk/ksimdisk.cpp b/ksim/monitors/disk/ksimdisk.cpp index 13f0425..cdcae83 100644 --- a/ksim/monitors/disk/ksimdisk.cpp +++ b/ksim/monitors/disk/ksimdisk.cpp @@ -103,8 +103,8 @@ void DiskPlugin::showAbout() KAboutApplication(&aboutData).exec(); } -DiskView::DiskView(KSim::PluginObject *parent, const char *name) - : KSim::PluginView(parent, name) +DiskView::DiskView(KSim::PluginObject *tqparent, const char *name) + : KSim::PluginView(tqparent, name) { #ifdef Q_OS_LINUX m_bLinux24 = true; @@ -216,13 +216,13 @@ void DiskView::updateDisplay() if (m_useSeperatly) { it.current()->first->setValue(diskData.readBlocks, diskData.writeBlocks); it.current()->first->setText(i18n("in: %1k") - .arg(KGlobal::locale()->formatNumber((float)diskData.readBlocks / 1024.0, 1)), - i18n("out: %1k").arg(KGlobal::locale()->formatNumber((float)diskData.writeBlocks / 1024.0, 1))); + .tqarg(KGlobal::locale()->formatNumber((float)diskData.readBlocks / 1024.0, 1)), + i18n("out: %1k").tqarg(KGlobal::locale()->formatNumber((float)diskData.writeBlocks / 1024.0, 1))); } else { it.current()->first->setValue(diff, 0); it.current()->first->setText(i18n("%1k") - .arg(KGlobal::locale()->formatNumber((float)diff / 1024.0, 1))); + .tqarg(KGlobal::locale()->formatNumber((float)diff / 1024.0, 1))); } it.current()->second->setMaxValue(it.current()->first->maxValue()); @@ -239,7 +239,7 @@ void DiskView::updateData(DiskList &disks) if (!m_procStream) return; - m_procStream->device()->reset(); + m_procStream->tqdevice()->reset(); fseek(m_procFile, 0L, SEEK_SET); if (m_bLinux24) @@ -248,7 +248,7 @@ void DiskView::updateData(DiskList &disks) // (3,0):(108911,48080,1713380,60831,1102644) TQRegExp regexp("\\([0-9]+,[0-9]+\\):\\([0-9]+,[0-9]+,[0-9]+,[0-9]+,[0-9]+\\)"); TQString content = m_procStream->read(); - if (content.find("disk_io") == -1) + if (content.tqfind("disk_io") == -1) { m_bLinux24 = false; @@ -267,8 +267,8 @@ void DiskView::updateData(DiskList &disks) { idx += regexp.matchedLength(); TQString diskStr = regexp.cap(0); - diskStr.replace(':', ','); - diskStr.replace(TQRegExp("\\)?\\(?"), TQString::null); + diskStr.tqreplace(':', ','); + diskStr.tqreplace(TQRegExp("\\)?\\(?"), TQString()); TQStringList list = TQStringList::split(',', diskStr); if (list.count() < 7) @@ -414,23 +414,23 @@ TQString DiskView::diskName( int major, int minor ) const switch ( major ) { case IDE0_MAJOR: - returnValue.prepend(TQString::fromLatin1("hda")); + returnValue.prepend(TQString::tqfromLatin1("hda")); break; case IDE1_MAJOR: - returnValue.prepend(TQString::fromLatin1("hdc")); + returnValue.prepend(TQString::tqfromLatin1("hdc")); break; case IDE3_MAJOR: - returnValue.prepend(TQString::fromLatin1("hde")); + returnValue.prepend(TQString::tqfromLatin1("hde")); break; case SCSI_DISK0_MAJOR: - returnValue.prepend(TQString::fromLatin1("sda")); + returnValue.prepend(TQString::tqfromLatin1("sda")); break; case SCSI_GENERIC_MAJOR: - returnValue.prepend(TQString::fromLatin1("sg0")); + returnValue.prepend(TQString::tqfromLatin1("sg0")); break; } - returnValue.at(2) = returnValue.at(2).latin1() + minor; + returnValue.tqat(2) = returnValue.tqat(2).latin1() + minor; return returnValue; #else Q_UNUSED(major); @@ -472,8 +472,8 @@ void DiskView::cleanup() m_addAll = false; } -DiskConfig::DiskConfig(KSim::PluginObject *parent, const char *name) - : KSim::PluginPage(parent, name) +DiskConfig::DiskConfig(KSim::PluginObject *tqparent, const char *name) + : KSim::PluginPage(tqparent, name) { m_layout = new TQVBoxLayout(this); m_layout->setSpacing(6); @@ -482,23 +482,23 @@ DiskConfig::DiskConfig(KSim::PluginObject *parent, const char *name) m_listview->addColumn(i18n("Disks")); m_layout->addWidget(m_listview); - TQHBoxLayout *layout = new TQHBoxLayout; - layout->setSpacing(6); + TQHBoxLayout *tqlayout = new TQHBoxLayout; + tqlayout->setSpacing(6); TQSpacerItem *spacer = new TQSpacerItem(20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum); - layout->addItem(spacer); + tqlayout->addItem(spacer); m_add = new TQPushButton(this); m_add->setText(i18n("Add...")); connect(m_add, TQT_SIGNAL(clicked()), TQT_SLOT(addItem())); - layout->addWidget(m_add); + tqlayout->addWidget(m_add); m_remove = new TQPushButton(this); m_remove->setText(i18n("Remove")); connect(m_remove, TQT_SIGNAL(clicked()), TQT_SLOT(removeItem())); - layout->addWidget(m_remove); - m_layout->addLayout(layout); + tqlayout->addWidget(m_remove); + m_layout->addLayout(tqlayout); m_buttonBox = new TQVButtonGroup(i18n("Disk Styles"), this); m_layout->addWidget(m_buttonBox); @@ -527,7 +527,7 @@ void DiskConfig::readConfig() TQStringList::ConstIterator it; for (it = list.begin(); it != list.end(); ++it) { TQString text = ((*it) == "complete" ? i18n("All Disks") : (*it)); - if (!m_listview->findItem(text, 0)) + if (!m_listview->tqfindItem(text, 0)) new TQListViewItem(m_listview, text); } } @@ -551,7 +551,7 @@ void DiskConfig::addItem() { bool ok = false; TQString text = KInputDialog::getText(i18n("Add Disk Device"), i18n("Disk name:"), - TQString::null, &ok, this); + TQString(), &ok, this); if (text.startsWith("/dev/")) text = text.mid(5); diff --git a/ksim/monitors/disk/ksimdisk.h b/ksim/monitors/disk/ksimdisk.h index 3d3679a..f122fbf 100644 --- a/ksim/monitors/disk/ksimdisk.h +++ b/ksim/monitors/disk/ksimdisk.h @@ -55,8 +55,9 @@ class DiskPlugin : public KSim::PluginObject class DiskView : public KSim::PluginView { Q_OBJECT + TQ_OBJECT public: - DiskView(KSim::PluginObject *parent, const char *name); + DiskView(KSim::PluginObject *tqparent, const char *name); ~DiskView(); virtual void reparseConfig(); @@ -105,7 +106,7 @@ class DiskView : public KSim::PluginView }; typedef TQValueList<DiskData> DiskList; - typedef QPair<KSim::Chart *, KSim::Progress *> DiskPair; + typedef TQPair<KSim::Chart *, KSim::Progress *> DiskPair; void updateData(DiskList &disks); TQString diskName( int, int ) const; @@ -115,7 +116,7 @@ class DiskView : public KSim::PluginView void init(); void cleanup(); - TQValueVector<QPair<DiskData, DiskData> > m_data; + TQValueVector<TQPair<DiskData, DiskData> > m_data; TQTimer *m_timer; bool m_bLinux24; FILE *m_procFile; @@ -131,8 +132,9 @@ class DiskView : public KSim::PluginView class DiskConfig : public KSim::PluginPage { Q_OBJECT + TQ_OBJECT public: - DiskConfig(KSim::PluginObject *parent, const char *name); + DiskConfig(KSim::PluginObject *tqparent, const char *name); ~DiskConfig(); virtual void saveConfig(); diff --git a/ksim/monitors/filesystem/filesystemstats.cpp b/ksim/monitors/filesystem/filesystemstats.cpp index 1aa156d..fa215fc 100644 --- a/ksim/monitors/filesystem/filesystemstats.cpp +++ b/ksim/monitors/filesystem/filesystemstats.cpp @@ -184,7 +184,7 @@ FilesystemStats::List FilesystemStats::readEntries() #endif #ifdef USE_FAILSAFE - TQFile file( TQString::fromLatin1( _PATH_MOUNTED ) ); + TQFile file( TQString::tqfromLatin1( _PATH_MOUNTED ) ); if ( !file.open( IO_ReadOnly ) ) return list; diff --git a/ksim/monitors/filesystem/filesystemwidget.cpp b/ksim/monitors/filesystem/filesystemwidget.cpp index aca7694..5d20213 100644 --- a/ksim/monitors/filesystem/filesystemwidget.cpp +++ b/ksim/monitors/filesystem/filesystemwidget.cpp @@ -85,8 +85,8 @@ void FilesystemWidget::Filesystem::setValue(int value) m_display->setValue(value); } -FilesystemWidget::FilesystemWidget(TQWidget *parent, const char *name) - : TQWidget(parent, name) +FilesystemWidget::FilesystemWidget(TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name) { m_list.setAutoDelete(true); m_layout = new TQVBoxLayout(this); @@ -141,7 +141,7 @@ bool FilesystemWidget::eventFilter(TQObject *o, TQEvent *e) while ((filesystem = it.current()) != 0) { ++it; - if (filesystem->display() == o) { + if (TQT_BASE_OBJECT(filesystem->display()) == TQT_BASE_OBJECT(o)) { progressBar = filesystem->display(); break; } @@ -149,17 +149,17 @@ bool FilesystemWidget::eventFilter(TQObject *o, TQEvent *e) ++i; } - if (o == progressBar && e->type() == TQEvent::MouseButtonPress) + if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(progressBar) && e->type() == TQEvent::MouseButtonPress) { - switch(static_cast<TQMouseEvent *>(e)->button()) { - case TQMouseEvent::RightButton: + switch(TQT_TQMOUSEEVENT(e)->button()) { + case Qt::RightButton: showMenu(i); break; default: break; - case TQMouseEvent::LeftButton: - if (parentWidget()->inherits("KSim::PluginView")) - static_cast<KSim::PluginView *>(parentWidget())->doCommand(); + case Qt::LeftButton: + if (tqparentWidget()->inherits("KSim::PluginView")) + static_cast<KSim::PluginView *>(tqparentWidget())->doCommand(); break; } @@ -188,11 +188,11 @@ void FilesystemWidget::processExited(KProcess *) TQStringList::Iterator it; for (it = errorList.begin(); it != errorList.end(); ++it) { - message += TQString::fromLatin1("<li>%1</li>") - .arg((*it).replace(TQRegExp("[u]?mount: "), TQString::null)); + message += TQString::tqfromLatin1("<li>%1</li>") + .tqarg((*it).tqreplace(TQRegExp("[u]?mount: "), TQString())); } - message += TQString::fromLatin1("</ul></qt>"); + message += TQString::tqfromLatin1("</ul></qt>"); KMessageBox::sorry(0, message); } diff --git a/ksim/monitors/filesystem/filesystemwidget.h b/ksim/monitors/filesystem/filesystemwidget.h index 16e1190..b709125 100644 --- a/ksim/monitors/filesystem/filesystemwidget.h +++ b/ksim/monitors/filesystem/filesystemwidget.h @@ -27,11 +27,12 @@ class KProcess; class TQVBoxLayout; -class FilesystemWidget : public QWidget +class FilesystemWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - FilesystemWidget(TQWidget *parent, const char *name); + FilesystemWidget(TQWidget *tqparent, const char *name); ~FilesystemWidget(); void append(int, const TQString &); diff --git a/ksim/monitors/filesystem/fsystemconfig.cpp b/ksim/monitors/filesystem/fsystemconfig.cpp index 67026d1..a91eae0 100644 --- a/ksim/monitors/filesystem/fsystemconfig.cpp +++ b/ksim/monitors/filesystem/fsystemconfig.cpp @@ -34,20 +34,20 @@ #include <tqlabel.h> #include <tqwhatsthis.h> -class FSysViewItem : public QCheckListItem +class FSysViewItem : public TQCheckListItem { public: - FSysViewItem(TQListView *parent, const TQString &text1, + FSysViewItem(TQListView *tqparent, const TQString &text1, const TQString &text2, const TQString &text3) - : TQCheckListItem(parent, text1, CheckBox) + : TQCheckListItem(tqparent, text1, CheckBox) { setText(1, text2); setText(2, text3); } }; -FsystemConfig::FsystemConfig(KSim::PluginObject *parent, const char *name) - : KSim::PluginPage(parent, name) +FsystemConfig::FsystemConfig(KSim::PluginObject *tqparent, const char *name) + : KSim::PluginPage(tqparent, name) { m_mainLayout = new TQGridLayout(this); m_mainLayout->setSpacing(6); @@ -71,7 +71,7 @@ FsystemConfig::FsystemConfig(KSim::PluginObject *parent, const char *name) m_intervalLabel = new TQLabel(this); m_intervalLabel->setText( i18n("Update interval:")); - m_intervalLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, + m_intervalLabel->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed)); m_mainLayout->addMultiCellWidget(m_intervalLabel, 3, 3, 0, 0); @@ -82,7 +82,7 @@ FsystemConfig::FsystemConfig(KSim::PluginObject *parent, const char *name) TQLabel *intervalLabel = new TQLabel(this); intervalLabel->setText(i18n("seconds")); - intervalLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, + intervalLabel->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed)); m_mainLayout->addMultiCellWidget(intervalLabel, 3, 3, 2, 2); @@ -107,7 +107,7 @@ void FsystemConfig::readConfig() TQStringList list = config()->readListEntry("mountEntries"); for (TQListViewItemIterator it(m_availableMounts); it.current(); ++it) { TQString string = it.current()->text(0) + ":" + splitString(it.current()->text(0)); - static_cast<TQCheckListItem *>(it.current())->setOn(list.contains(string) > 0); + static_cast<TQCheckListItem *>(it.current())->setOn(list.tqcontains(string) > 0); } } @@ -155,7 +155,7 @@ void FsystemConfig::getStats() if ( !FilesystemStats::readStats( ( *it ).dir, total, free ) ) continue; - if ( !m_availableMounts->findItem( ( *it ).dir, 0 ) ) + if ( !m_availableMounts->tqfindItem( ( *it ).dir, 0 ) ) { (void) new FSysViewItem( m_availableMounts, ( *it ).dir, ( *it ).fsname, ( *it ).type ); @@ -169,7 +169,7 @@ void FsystemConfig::getStats() TQStringList list = config()->readListEntry("mountEntries"); for (TQListViewItemIterator it(m_availableMounts); it.current(); ++it) { TQString string = it.current()->text(0) + ":" + splitString(it.current()->text(0)); - static_cast<TQCheckListItem *>(it.current())->setOn(list.contains(string) > 0); + static_cast<TQCheckListItem *>(it.current())->setOn(list.tqcontains(string) > 0); } } @@ -178,7 +178,7 @@ TQString FsystemConfig::splitString(const TQString &string) const if (string == "/" || !m_splitNames->isChecked()) return string; - int location = string.findRev("/"); + int location = string.tqfindRev("/"); TQString newString(string); return newString.remove(0, location + 1); } diff --git a/ksim/monitors/filesystem/fsystemconfig.h b/ksim/monitors/filesystem/fsystemconfig.h index 283a501..96fccf1 100644 --- a/ksim/monitors/filesystem/fsystemconfig.h +++ b/ksim/monitors/filesystem/fsystemconfig.h @@ -33,8 +33,9 @@ class TQListBoxItem; class FsystemConfig : public KSim::PluginPage { Q_OBJECT + TQ_OBJECT public: - FsystemConfig(KSim::PluginObject *parent, const char *name); + FsystemConfig(KSim::PluginObject *tqparent, const char *name); ~FsystemConfig(); virtual void saveConfig(); diff --git a/ksim/monitors/filesystem/ksimfsystem.cpp b/ksim/monitors/filesystem/ksimfsystem.cpp index 039447a..f73ce3d 100644 --- a/ksim/monitors/filesystem/ksimfsystem.cpp +++ b/ksim/monitors/filesystem/ksimfsystem.cpp @@ -81,9 +81,9 @@ void PluginModule::showAbout() KAboutApplication(&aboutData).exec(); } -Fsystem::Fsystem(KSim::PluginObject *parent, const char *name) +Fsystem::Fsystem(KSim::PluginObject *tqparent, const char *name) : DCOPObject("fsystem"), - KSim::PluginView(parent, name) + KSim::PluginView(tqparent, name) { config()->setGroup("Fsystem"); TQVBoxLayout *vbLayout = new TQVBoxLayout(this); @@ -193,7 +193,7 @@ Fsystem::MountEntryList Fsystem::makeList(const TQStringList &list) const TQStringList::ConstIterator it; for (it = list.begin(); it != list.end(); ++it) { splitList = TQStringList::split(":", (*it)); - newList.append(qMakePair(splitList[0], splitList[1])); + newList.append(tqMakePair(splitList[0], splitList[1])); } return newList; diff --git a/ksim/monitors/filesystem/ksimfsystem.h b/ksim/monitors/filesystem/ksimfsystem.h index d945820..cf8dc9e 100644 --- a/ksim/monitors/filesystem/ksimfsystem.h +++ b/ksim/monitors/filesystem/ksimfsystem.h @@ -48,11 +48,12 @@ class PluginModule : public KSim::PluginObject class Fsystem : public KSim::PluginView, public FsystemIface { Q_OBJECT + TQ_OBJECT public: /** * construtor of Fsystem, calls all init functions to create the plugin. */ - Fsystem(KSim::PluginObject *parent, const char *name); + Fsystem(KSim::PluginObject *tqparent, const char *name); ~Fsystem(); virtual void reparseConfig(); @@ -65,7 +66,7 @@ class Fsystem : public KSim::PluginView, public FsystemIface void updateFS(); private: - typedef TQValueList<QPair<TQString, TQString> > MountEntryList; + typedef TQValueList<TQPair<TQString, TQString> > MountEntryList; MountEntryList makeList(const TQStringList &list) const; FilesystemWidget *m_widget; diff --git a/ksim/monitors/i8k/ksimi8k.cpp b/ksim/monitors/i8k/ksimi8k.cpp index 46a96e0..2c209b4 100644 --- a/ksim/monitors/i8k/ksimi8k.cpp +++ b/ksim/monitors/i8k/ksimi8k.cpp @@ -72,8 +72,8 @@ void I8KPlugin::showAbout() KAboutApplication(&aboutData).exec(); } -I8KView::I8KView(KSim::PluginObject *parent, const char *name) - : KSim::PluginView(parent, name), +I8KView::I8KView(KSim::PluginObject *tqparent, const char *name) + : KSim::PluginView(tqparent, name), m_timer( 0L ), m_procFile( 0L ), m_procStream( 0L ) { initGUI(); @@ -151,15 +151,15 @@ void I8KView::closeStream() void I8KView::initGUI() { - TQVBoxLayout *layout = new TQVBoxLayout( this ); + TQVBoxLayout *tqlayout = new TQVBoxLayout( this ); m_fan1Label = new KSim::Label( this ); m_fan2Label = new KSim::Label( this ); m_tempLabel = new KSim::Label( this ); - layout->addWidget( m_fan1Label ); - layout->addWidget( m_fan2Label ); - layout->addWidget( m_tempLabel ); + tqlayout->addWidget( m_fan1Label ); + tqlayout->addWidget( m_fan2Label ); + tqlayout->addWidget( m_tempLabel ); } void I8KView::updateView() @@ -195,21 +195,21 @@ void I8KView::updateView() } if ( rightspeed > 0 ) - m_fan1Label->setText( i18n( "Right fan: %1 RPM" ).arg( rightspeed ) ); + m_fan1Label->setText( i18n( "Right fan: %1 RPM" ).tqarg( rightspeed ) ); else m_fan1Label->setText( i18n( "Right fan: Off" ) ); if ( leftspeed > 0 ) - m_fan2Label->setText( i18n( "Left fan: %1 RPM" ).arg( leftspeed ) ); + m_fan2Label->setText( i18n( "Left fan: %1 RPM" ).tqarg( leftspeed ) ); else m_fan2Label->setText( i18n( "Left fan: Off" ) ); - m_tempLabel->setText( i18n( "CPU temp: %1°%2" ).arg( cputemp ) - .arg( m_unit ) ); + m_tempLabel->setText( i18n( "CPU temp: %1°%2" ).tqarg( cputemp ) + .tqarg( m_unit ) ); } -I8KConfig::I8KConfig(KSim::PluginObject *parent, const char *name) - : KSim::PluginPage(parent, name) +I8KConfig::I8KConfig(KSim::PluginObject *tqparent, const char *name) + : KSim::PluginPage(tqparent, name) { m_unit = new TQCheckBox( i18n( "Show temperature in Fahrenheit" ), this ); @@ -218,14 +218,14 @@ I8KConfig::I8KConfig(KSim::PluginObject *parent, const char *name) m_interval->setRange( 2, 60, 1, true ); m_interval->setSuffix( i18n( " sec" ) ); - TQGridLayout *layout = new TQGridLayout( this, 3, 2, 0, + TQGridLayout *tqlayout = new TQGridLayout( this, 3, 2, 0, KDialog::spacingHint() ); - layout->addMultiCellWidget( m_unit, 0, 0, 0, 1 ); - layout->addWidget( label, 1, 0 ); - layout->addWidget( m_interval, 1, 1 ); - layout->setColStretch( 1, 1 ); - layout->setRowStretch( 2, 1 ); + tqlayout->addMultiCellWidget( m_unit, 0, 0, 0, 1 ); + tqlayout->addWidget( label, 1, 0 ); + tqlayout->addWidget( m_interval, 1, 1 ); + tqlayout->setColStretch( 1, 1 ); + tqlayout->setRowStretch( 2, 1 ); } I8KConfig::~I8KConfig() diff --git a/ksim/monitors/i8k/ksimi8k.h b/ksim/monitors/i8k/ksimi8k.h index 4258ba6..76b8796 100644 --- a/ksim/monitors/i8k/ksimi8k.h +++ b/ksim/monitors/i8k/ksimi8k.h @@ -50,8 +50,9 @@ class I8KPlugin : public KSim::PluginObject class I8KView : public KSim::PluginView { Q_OBJECT + TQ_OBJECT public: - I8KView(KSim::PluginObject *parent, const char *name); + I8KView(KSim::PluginObject *tqparent, const char *name); ~I8KView(); virtual void reparseConfig(); @@ -81,8 +82,9 @@ class I8KView : public KSim::PluginView class I8KConfig : public KSim::PluginPage { Q_OBJECT + TQ_OBJECT public: - I8KConfig(KSim::PluginObject *parent, const char *name); + I8KConfig(KSim::PluginObject *tqparent, const char *name); ~I8KConfig(); virtual void saveConfig(); diff --git a/ksim/monitors/lm_sensors/NVCtrl.c b/ksim/monitors/lm_sensors/NVCtrl.c index 6c61b8a..dd5f500 100644 --- a/ksim/monitors/lm_sensors/NVCtrl.c +++ b/ksim/monitors/lm_sensors/NVCtrl.c @@ -143,7 +143,7 @@ Bool XNVCTRLIsNvScreen ( void XNVCTRLSetAttribute ( Display *dpy, int screen, - unsigned int display_mask, + unsigned int display_tqmask, unsigned int attribute, int value ){ @@ -157,7 +157,7 @@ void XNVCTRLSetAttribute ( req->reqType = info->codes->major_opcode; req->nvReqType = X_nvCtrlSetAttribute; req->screen = screen; - req->display_mask = display_mask; + req->display_tqmask = display_tqmask; req->attribute = attribute; req->value = value; UnlockDisplay (dpy); @@ -168,7 +168,7 @@ void XNVCTRLSetAttribute ( Bool XNVCTRLQueryAttribute ( Display *dpy, int screen, - unsigned int display_mask, + unsigned int display_tqmask, unsigned int attribute, int *value ){ @@ -187,7 +187,7 @@ Bool XNVCTRLQueryAttribute ( req->reqType = info->codes->major_opcode; req->nvReqType = X_nvCtrlQueryAttribute; req->screen = screen; - req->display_mask = display_mask; + req->display_tqmask = display_tqmask; req->attribute = attribute; if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { UnlockDisplay (dpy); @@ -205,7 +205,7 @@ Bool XNVCTRLQueryAttribute ( Bool XNVCTRLQueryStringAttribute ( Display *dpy, int screen, - unsigned int display_mask, + unsigned int display_tqmask, unsigned int attribute, char **ptr ){ @@ -227,7 +227,7 @@ Bool XNVCTRLQueryStringAttribute ( req->reqType = info->codes->major_opcode; req->nvReqType = X_nvCtrlQueryStringAttribute; req->screen = screen; - req->display_mask = display_mask; + req->display_tqmask = display_tqmask; req->attribute = attribute; if (!_XReply (dpy, (xReply *) &rep, 0, False)) { UnlockDisplay (dpy); @@ -256,7 +256,7 @@ Bool XNVCTRLQueryStringAttribute ( Bool XNVCTRLQueryValidAttributeValues ( Display *dpy, int screen, - unsigned int display_mask, + unsigned int display_tqmask, unsigned int attribute, NVCTRLAttributeValidValuesRec *values ){ @@ -277,7 +277,7 @@ Bool XNVCTRLQueryValidAttributeValues ( req->reqType = info->codes->major_opcode; req->nvReqType = X_nvCtrlQueryValidAttributeValues; req->screen = screen; - req->display_mask = display_mask; + req->display_tqmask = display_tqmask; req->attribute = attribute; if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { UnlockDisplay (dpy); @@ -343,8 +343,8 @@ static Bool wire_to_event (Display *dpy, XEvent *host, xEvent *wire) re->attribute_changed.display = dpy; re->attribute_changed.time = event->u.attribute_changed.time; re->attribute_changed.screen = event->u.attribute_changed.screen; - re->attribute_changed.display_mask = - event->u.attribute_changed.display_mask; + re->attribute_changed.display_tqmask = + event->u.attribute_changed.display_tqmask; re->attribute_changed.attribute = event->u.attribute_changed.attribute; re->attribute_changed.value = event->u.attribute_changed.value; break; diff --git a/ksim/monitors/lm_sensors/NVCtrl.h b/ksim/monitors/lm_sensors/NVCtrl.h index 81c9432..5e78e27 100644 --- a/ksim/monitors/lm_sensors/NVCtrl.h +++ b/ksim/monitors/lm_sensors/NVCtrl.h @@ -26,7 +26,7 @@ /* * Integer attributes; these are settable/gettable via * XNVCTRLSetAttribute() and XNVCTRLQueryAttribute, respectively. - * Some attributes may only be read; some may require a display_mask + * Some attributes may only be read; some may require a display_tqmask * argument. This information is encoded in the "permission" comment * after each attribute #define, and can be queried at run time with * XNVCTRLQueryValidAttributeValues(). @@ -40,14 +40,14 @@ * various reasons: they represent static system information, they * can only be changed by changing an XF86Config option, etc). * - * D: The attribute requires the display mask argument. The + * D: The attribute requires the display tqmask argument. The * attributes NV_CTRL_CONNECTED_DISPLAYS and NV_CTRL_ENABLED_DISPLAYS - * will be a bitmask of what display devices are connected and what + * will be a bittqmask of what display devices are connected and what * display devices are enabled for use in X, respectively. Each bit - * in the bitmask represents a display device; it is these bits which - * should be used as the display_mask when dealing with attributes + * in the bittqmask represents a display device; it is these bits which + * should be used as the display_tqmask when dealing with attributes * designated with "D" below. For attributes that do not require the - * display mask, the argument is ignored. + * display tqmask, the argument is ignored. */ @@ -249,7 +249,7 @@ /* - * NV_CTRL_CONNECTED_DISPLAYS - returns a display mask indicating what + * NV_CTRL_CONNECTED_DISPLAYS - returns a display tqmask indicating what * display devices are connected to the GPU driving the specified X * screen. */ @@ -258,7 +258,7 @@ /* - * NV_CTRL_ENABLED_DISPLAYS - returns a display mask indicating what + * NV_CTRL_ENABLED_DISPLAYS - returns a display tqmask indicating what * display devices are enabled for use on the specified X screen. */ @@ -717,7 +717,7 @@ /* * NV_CTRL_STRING_DISPLAY_DEVICE_NAME - name of the display device - * specified in the display_mask argument. + * specified in the display_tqmask argument. */ #define NV_CTRL_STRING_DISPLAY_DEVICE_NAME 4 /* R-D */ @@ -746,7 +746,7 @@ * is no fixed range of valid values. * * ATTRIBUTE_TYPE_BITMASK : the attribute is an integer value, - * interpretted as a bitmask. + * interpretted as a bittqmask. * * ATTRIBUTE_TYPE_BOOL : the attribute is a boolean, valid values are * either 1 (on/true) or 0 (off/false). @@ -763,7 +763,7 @@ * which can only have certain values, depending on GPU. * * - * The permissions field of NVCTRLAttributeValidValuesRec is a bitmask + * The permissions field of NVCTRLAttributeValidValuesRec is a bittqmask * that may contain: * * ATTRIBUTE_TYPE_READ diff --git a/ksim/monitors/lm_sensors/NVCtrlLib.h b/ksim/monitors/lm_sensors/NVCtrlLib.h index 8d9cec4..704071c 100644 --- a/ksim/monitors/lm_sensors/NVCtrlLib.h +++ b/ksim/monitors/lm_sensors/NVCtrlLib.h @@ -55,7 +55,7 @@ Bool XNVCTRLIsNvScreen ( * Sets the attribute to the given value. The attributes and their * possible values are listed in NVCtrl.h. * - * Not all attributes require the display_mask parameter; see + * Not all attributes require the display_tqmask parameter; see * NVCtrl.h for details. * * Possible errors: @@ -66,7 +66,7 @@ Bool XNVCTRLIsNvScreen ( void XNVCTRLSetAttribute ( Display *dpy, int screen, - unsigned int display_mask, + unsigned int display_tqmask, unsigned int attribute, int value ); @@ -78,7 +78,7 @@ void XNVCTRLSetAttribute ( * If XNVCTRLQueryAttribute returns True, value will contain the * value of the specified attribute. * - * Not all attributes require the display_mask parameter; see + * Not all attributes require the display_tqmask parameter; see * NVCtrl.h for details. * * Possible errors: @@ -90,7 +90,7 @@ void XNVCTRLSetAttribute ( Bool XNVCTRLQueryAttribute ( Display *dpy, int screen, - unsigned int display_mask, + unsigned int display_tqmask, unsigned int attribute, int *value ); @@ -112,7 +112,7 @@ Bool XNVCTRLQueryAttribute ( Bool XNVCTRLQueryStringAttribute ( Display *dpy, int screen, - unsigned int display_mask, + unsigned int display_tqmask, unsigned int attribute, char **ptr ); @@ -129,7 +129,7 @@ Bool XNVCTRLQueryStringAttribute ( Bool XNVCTRLQueryValidAttributeValues ( Display *dpy, int screen, - unsigned int display_mask, + unsigned int display_tqmask, unsigned int attribute, NVCTRLAttributeValidValuesRec *values ); @@ -166,7 +166,7 @@ typedef struct { Display *display; Time time; int screen; - unsigned int display_mask; + unsigned int display_tqmask; unsigned int attribute; int value; } XNVCtrlAttributeChangedEvent; diff --git a/ksim/monitors/lm_sensors/ksimsensors.cpp b/ksim/monitors/lm_sensors/ksimsensors.cpp index eb2614f..76bc4c3 100644 --- a/ksim/monitors/lm_sensors/ksimsensors.cpp +++ b/ksim/monitors/lm_sensors/ksimsensors.cpp @@ -71,8 +71,8 @@ void PluginModule::showAbout() KAboutApplication(&aboutData).exec(); } -SensorsView::SensorsView(KSim::PluginObject *parent, const char *name) - : DCOPObject("sensors"), KSim::PluginView(parent, name) +SensorsView::SensorsView(KSim::PluginObject *tqparent, const char *name) + : DCOPObject("sensors"), KSim::PluginView(tqparent, name) { config()->setGroup("Sensors"); (new TQVBoxLayout(this))->setAutoAdd(true); diff --git a/ksim/monitors/lm_sensors/ksimsensors.h b/ksim/monitors/lm_sensors/ksimsensors.h index a8a0482..195899e 100644 --- a/ksim/monitors/lm_sensors/ksimsensors.h +++ b/ksim/monitors/lm_sensors/ksimsensors.h @@ -48,8 +48,9 @@ class PluginModule : public KSim::PluginObject class SensorsView : public KSim::PluginView, public KSimSensorsIface { Q_OBJECT + TQ_OBJECT public: - SensorsView(KSim::PluginObject *parent, const char *name); + SensorsView(KSim::PluginObject *tqparent, const char *name); ~SensorsView(); virtual void reparseConfig(); diff --git a/ksim/monitors/lm_sensors/nv_control.h b/ksim/monitors/lm_sensors/nv_control.h index d94ee95..9900a00 100644 --- a/ksim/monitors/lm_sensors/nv_control.h +++ b/ksim/monitors/lm_sensors/nv_control.h @@ -87,7 +87,7 @@ typedef struct { CARD8 nvReqType; CARD16 length B16; CARD32 screen B32; - CARD32 display_mask B32; + CARD32 display_tqmask B32; CARD32 attribute B32; } xnvCtrlQueryAttributeReq; #define sz_xnvCtrlQueryAttributeReq 16 @@ -111,7 +111,7 @@ typedef struct { CARD8 nvReqType; CARD16 length B16; CARD32 screen B32; - CARD32 display_mask B32; + CARD32 display_tqmask B32; CARD32 attribute B32; INT32 value B32; } xnvCtrlSetAttributeReq; @@ -122,7 +122,7 @@ typedef struct { CARD8 nvReqType; CARD16 length B16; CARD32 screen B32; - CARD32 display_mask B32; + CARD32 display_tqmask B32; CARD32 attribute B32; } xnvCtrlQueryStringAttributeReq; #define sz_xnvCtrlQueryStringAttributeReq 16 @@ -150,7 +150,7 @@ typedef struct { CARD8 nvReqType; CARD16 length B16; CARD32 screen B32; - CARD32 display_mask B32; + CARD32 display_tqmask B32; CARD32 attribute B32; } xnvCtrlQueryValidAttributeValuesReq; #define sz_xnvCtrlQueryValidAttributeValuesReq 16 @@ -192,7 +192,7 @@ typedef struct { CARD16 sequenceNumber B16; Time time B32; CARD32 screen B32; - CARD32 display_mask B32; + CARD32 display_tqmask B32; CARD32 attribute B32; CARD32 value B32; CARD32 pad0 B32; diff --git a/ksim/monitors/lm_sensors/sensorbase.cpp b/ksim/monitors/lm_sensors/sensorbase.cpp index a0b82c5..de94a1b 100644 --- a/ksim/monitors/lm_sensors/sensorbase.cpp +++ b/ksim/monitors/lm_sensors/sensorbase.cpp @@ -126,7 +126,7 @@ void SensorBase::update() m_sensorList.append(SensorInfo(currentSensor++, label, TQString::fromUtf8(name), TQString::fromUtf8(chip->prefix), - chipset, sensorType(TQString::fromLatin1(name)))); + chipset, sensorType(TQString::tqfromLatin1(name)))); } } } @@ -134,15 +134,15 @@ void SensorBase::update() if (m_hasNVControl) { int temp = 0; if (XNVCTRLQueryAttribute(qt_xdisplay(), qt_xscreen(), 0 /* not used? */, NV_CTRL_GPU_CORE_TEMPERATURE, &temp)) { - TQString name = TQString::fromLatin1("GPU Temp"); + TQString name = TQString::tqfromLatin1("GPU Temp"); m_sensorList.append(SensorInfo(currentSensor++, TQString::number(temp), - name, TQString::null, TQString::null, sensorType(name))); + name, TQString(), TQString(), sensorType(name))); } if (XNVCTRLQueryAttribute(qt_xdisplay(), qt_xscreen(), 0 /* not used? */, NV_CTRL_AMBIENT_TEMPERATURE, &temp)) { - TQString name = TQString::fromLatin1("GPU Ambient Temp"); + TQString name = TQString::tqfromLatin1("GPU Ambient Temp"); m_sensorList.append(SensorInfo(currentSensor++, TQString::number(temp), - name, TQString::null, TQString::null, sensorType(name))); + name, TQString(), TQString(), sensorType(name))); } } @@ -212,19 +212,19 @@ bool SensorBase::init() TQString SensorBase::sensorType(const TQString &name) { - if (name.findRev("fan", -1, false) != -1) + if (name.tqfindRev("fan", -1, false) != -1) return i18n("Rounds per minute", " RPM"); - if (name.findRev("temp", -1, false) != -1) + if (name.tqfindRev("temp", -1, false) != -1) if (SensorBase::fahrenheit()) - return TQString::fromLatin1("°F"); + return TQString::tqfromLatin1("°F"); else - return TQString::fromLatin1("°C"); + return TQString::tqfromLatin1("°C"); - if (name.findRev(TQRegExp("[^\\+]?[^\\-]?V$")) != -1) + if (name.tqfindRev(TQRegExp("[^\\+]?[^\\-]?V$")) != -1) return i18n("Volt", "V"); - return TQString::null; + return TQString(); } TQString SensorBase::chipsetString(const ChipName *c) @@ -239,7 +239,7 @@ TQString SensorBase::chipsetString(const ChipName *c) float SensorBase::formatValue(const TQString &label, float value) { - if (label.findRev("temp", -1, false) != -1) + if (label.tqfindRev("temp", -1, false) != -1) return toFahrenheit(value); return value; @@ -247,7 +247,7 @@ float SensorBase::formatValue(const TQString &label, float value) TQString SensorBase::formatString(const TQString &label, float value) { - if (label.findRev("fan", -1, false) != -1) + if (label.tqfindRev("fan", -1, false) != -1) return TQString::number(value); return TQString::number(value,'f',2); diff --git a/ksim/monitors/lm_sensors/sensorbase.h b/ksim/monitors/lm_sensors/sensorbase.h index 1c2d99c..7a39462 100644 --- a/ksim/monitors/lm_sensors/sensorbase.h +++ b/ksim/monitors/lm_sensors/sensorbase.h @@ -88,9 +88,10 @@ class SensorList : public TQValueList<SensorInfo> SensorList(const SensorInfo &sensor) { append(sensor); } }; -class SensorBase : public QObject +class SensorBase : public TQObject { Q_OBJECT + TQ_OBJECT public: static SensorBase *self(); diff --git a/ksim/monitors/lm_sensors/sensorsconfig.cpp b/ksim/monitors/lm_sensors/sensorsconfig.cpp index 2ab1235..e5f3b6a 100644 --- a/ksim/monitors/lm_sensors/sensorsconfig.cpp +++ b/ksim/monitors/lm_sensors/sensorsconfig.cpp @@ -37,13 +37,13 @@ #include <tqpopupmenu.h> #include <tqpushbutton.h> -class SensorViewItem : public QCheckListItem +class SensorViewItem : public TQCheckListItem { public: - SensorViewItem(TQListView *parent, const TQString &text1, + SensorViewItem(TQListView *tqparent, const TQString &text1, const TQString &text2, const TQString &text3, const TQString &text4) - : TQCheckListItem(parent, text1, CheckBox) + : TQCheckListItem(tqparent, text1, CheckBox) { setText(1, text2); setText(2, text3); @@ -51,8 +51,8 @@ class SensorViewItem : public QCheckListItem } }; -SensorsConfig::SensorsConfig(KSim::PluginObject *parent, const char *name) - : KSim::PluginPage(parent, name) +SensorsConfig::SensorsConfig(KSim::PluginObject *tqparent, const char *name) + : KSim::PluginPage(tqparent, name) { m_layout = new TQGridLayout(this); m_layout->setSpacing(6); @@ -86,7 +86,7 @@ SensorsConfig::SensorsConfig(KSim::PluginObject *parent, const char *name) m_updateLabel = new TQLabel(this); m_updateLabel->setText(i18n("Update interval:")); - m_updateLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, + m_updateLabel->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed)); m_layout->addMultiCellWidget(m_updateLabel, 4, 4, 0, 0); @@ -95,7 +95,7 @@ SensorsConfig::SensorsConfig(KSim::PluginObject *parent, const char *name) TQLabel *intervalLabel = new TQLabel(this); intervalLabel->setText(i18n("seconds")); - intervalLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, + intervalLabel->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed)); m_layout->addMultiCellWidget(intervalLabel, 4, 4, 2, 2); } @@ -233,7 +233,7 @@ void SensorsConfig::showEvent(TQShowEvent *) const SensorList &list = SensorBase::self()->sensorsList(); SensorList::ConstIterator it; for (it = list.begin(); it != list.end(); ++it) { - TQListViewItem *item = m_sensorView->findItem((*it).sensorName(), 1); + TQListViewItem *item = m_sensorView->tqfindItem((*it).sensorName(), 1); if (item) item->setText(3, (*it).sensorValue() + (*it).sensorUnit()); } diff --git a/ksim/monitors/lm_sensors/sensorsconfig.h b/ksim/monitors/lm_sensors/sensorsconfig.h index 80ed701..f37c599 100644 --- a/ksim/monitors/lm_sensors/sensorsconfig.h +++ b/ksim/monitors/lm_sensors/sensorsconfig.h @@ -36,8 +36,9 @@ class TQTimer; class SensorsConfig : public KSim::PluginPage { Q_OBJECT + TQ_OBJECT public: - SensorsConfig(KSim::PluginObject *parent, const char *name); + SensorsConfig(KSim::PluginObject *tqparent, const char *name); ~SensorsConfig(); void saveConfig(); diff --git a/ksim/monitors/mail/ksimmail.cpp b/ksim/monitors/mail/ksimmail.cpp index fdda6bd..260ad8e 100644 --- a/ksim/monitors/mail/ksimmail.cpp +++ b/ksim/monitors/mail/ksimmail.cpp @@ -66,13 +66,13 @@ void MailPlugin::showAbout() KAboutApplication( &about ).exec(); } -MailView::MailView( KSim::PluginObject* parent, const char* name ) - : KSim::PluginView( parent, name ) +MailView::MailView( KSim::PluginObject* tqparent, const char* name ) + : KSim::PluginView( tqparent, name ) { - TQVBoxLayout* layout = new TQVBoxLayout( this ); + TQVBoxLayout* tqlayout = new TQVBoxLayout( this ); MailLabel* label = new MailLabel( this ); - layout->addWidget( label, 0, AlignHCenter ); + tqlayout->addWidget( label, 0, AlignHCenter ); } MailView::~MailView() @@ -87,8 +87,8 @@ void MailView::updateDisplay() { } -MailLabel::MailLabel( TQWidget* parent ) - : KSim::Label( KSim::Types::Mail, parent ) +MailLabel::MailLabel( TQWidget* tqparent ) + : KSim::Label( KSim::Types::Mail, tqparent ) { // label->setPixmap( KSim::ThemeLoader::self().current().krellMail() ); configureObject( false ); @@ -101,7 +101,7 @@ MailLabel::~MailLabel() { } -void MailLabel::configureObject( bool repaint ) +void MailLabel::configureObject( bool tqrepaint ) { m_envelope.load( themeLoader().current().mailPixmap() ); m_frames = themeLoader().current().mailFrames(); @@ -112,7 +112,7 @@ void MailLabel::configureObject( bool repaint ) setPixmap( frame( m_envelope, 1 ) ); - KSim::Label::configureObject( repaint ); + KSim::Label::configureObject( tqrepaint ); } void MailLabel::paintEvent( TQPaintEvent* e ) @@ -131,17 +131,17 @@ TQPixmap MailLabel::frame( const TQPixmap& source, int number ) const { TQPixmap result( source.width(), source.height() / m_frames ); bitBlt( &result, 0, 0, &source, 0, number * source.height() / m_frames ); - if ( source.mask() ) + if ( source.tqmask() ) { - TQBitmap mask( result.size() ); - bitBlt( &mask, 0, 0, source.mask(), 0, number * source.height() / m_frames ); - result.setMask( mask ); + TQBitmap tqmask( result.size() ); + bitBlt( &tqmask, 0, 0, source.tqmask(), 0, number * source.height() / m_frames ); + result.setMask( tqmask ); } return result; } -MailConfig::MailConfig( KSim::PluginObject* parent, const char* name ) - : KSim::PluginPage( parent, name ) +MailConfig::MailConfig( KSim::PluginObject* tqparent, const char* name ) + : KSim::PluginPage( tqparent, name ) { } diff --git a/ksim/monitors/mail/ksimmail.h b/ksim/monitors/mail/ksimmail.h index f5a42d7..776d574 100644 --- a/ksim/monitors/mail/ksimmail.h +++ b/ksim/monitors/mail/ksimmail.h @@ -39,8 +39,9 @@ public: class MailView : public KSim::PluginView { Q_OBJECT + TQ_OBJECT public: - MailView( KSim::PluginObject* parent, const char* name ); + MailView( KSim::PluginObject* tqparent, const char* name ); ~MailView(); virtual void reparseConfig(); @@ -52,8 +53,9 @@ private slots: class MailLabel : public KSim::Label { Q_OBJECT + TQ_OBJECT public: - MailLabel( TQWidget* parent ); + MailLabel( TQWidget* tqparent ); virtual ~MailLabel(); virtual void configureObject( bool ); @@ -77,8 +79,9 @@ private: class MailConfig : public KSim::PluginPage { Q_OBJECT + TQ_OBJECT public: - MailConfig( KSim::PluginObject* parent, const char* name ); + MailConfig( KSim::PluginObject* tqparent, const char* name ); ~MailConfig(); virtual void saveConfig(); diff --git a/ksim/monitors/net/ksimnet.cpp b/ksim/monitors/net/ksimnet.cpp index 1bbfeb2..0c16f2d 100644 --- a/ksim/monitors/net/ksimnet.cpp +++ b/ksim/monitors/net/ksimnet.cpp @@ -99,8 +99,8 @@ void NetPlugin::showAbout() KAboutApplication(&aboutData).exec(); } -NetView::NetView(KSim::PluginObject *parent, const char *name) - : KSim::PluginView(parent, name) +NetView::NetView(KSim::PluginObject *tqparent, const char *name) + : KSim::PluginView(tqparent, name) { #ifdef __linux__ m_procStream = 0L; @@ -356,7 +356,7 @@ void NetView::updateGraph() if ( ( *it ).label() ) { timeDisplay = ( *it ).format(); - newPid = pid.arg( ( *it ).name() ); + newPid = pid.tqarg( ( *it ).name() ); if ( TQFile::exists( newPid ) && stat( TQFile::encodeName( newPid ).data(), &st ) == 0 ) { @@ -371,8 +371,8 @@ void NetView::updateGraph() } // Keep backwards compat for now - if ( timeDisplay.contains( '%' ) > 0 ) - timeDisplay.replace( '%', "" ); + if ( timeDisplay.tqcontains( '%' ) > 0 ) + timeDisplay.tqreplace( '%', "" ); ( *it ).label()->setText( netTime.toString( timeDisplay ) ); } @@ -394,16 +394,16 @@ void NetView::updateGraph() TQString receiveString = KGlobal::locale()->formatNumber( ( float ) receiveDiff / 1024.0, 1 ); TQString sendString = KGlobal::locale()->formatNumber( ( float ) sendDiff / 1024.0, 1 ); - ( *it ).chart()->setText( i18n( "in: %1k" ).arg( receiveString ), - i18n( "out: %1k" ).arg( sendString ) ); + ( *it ).chart()->setText( i18n( "in: %1k" ).tqarg( receiveString ), + i18n( "out: %1k" ).tqarg( sendString ) ); } else { ( *it ).setData( NetData() ); ( *it ).chart()->setValue( 0, 0 ); - ( *it ).chart()->setText( i18n( "in: %1k" ).arg( KGlobal::locale()->formatNumber( 0.0, 1 ) ), - i18n( "out: %1k" ).arg( KGlobal::locale()->formatNumber( 0.0, 1 ) ) ); + ( *it ).chart()->setText( i18n( "in: %1k" ).tqarg( KGlobal::locale()->formatNumber( 0.0, 1 ) ), + i18n( "out: %1k" ).tqarg( KGlobal::locale()->formatNumber( 0.0, 1 ) ) ); if ( ( *it ).label() ) ( *it ).label()->setText( i18n( "offline" ) ); @@ -468,7 +468,7 @@ void NetView::netStatistics(const TQString &device, NetData &data) while (!m_procStream->atEnd()) { parser = m_procStream->readLine(); // remove all the entries apart from the line containing 'device' - if (parser.find(device) != -1) + if (parser.tqfind(device) != -1) output = parser; } @@ -480,7 +480,7 @@ void NetView::netStatistics(const TQString &device, NetData &data) // make sure our output doesn't contain "eth0:11210107" so we dont // end up with netList[1] actually being netList[2] - output.replace(TQRegExp(":"), " "); + output.tqreplace(TQRegExp(":"), " "); TQStringList netList = TQStringList::split(' ', output); data.in = netList[1].toULong(); @@ -559,7 +559,7 @@ bool NetView::isOnline(const TQString &device) if (!file.open(IO_ReadOnly)) return -1; - return (TQTextStream(&file).read().find(device) != -1 ? true : false); + return (TQTextStream(&file).read().tqfind(device) != -1 ? true : false); #endif #ifdef __FreeBSD__ @@ -632,7 +632,7 @@ bool NetView::eventFilter( TQObject * o, TQEvent * e ) Network::List::Iterator it; for ( it = m_networkList.begin(); it != m_networkList.end(); ++it ) { - if ( o == ( *it ).chart() || o == ( *it ).label() || o == ( *it ).led() ) + if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(( *it ).chart()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(( *it ).label()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(( *it ).led()) ) { break; } @@ -642,7 +642,7 @@ bool NetView::eventFilter( TQObject * o, TQEvent * e ) if ( e->type() == TQEvent::MouseButtonPress ) { - if ( static_cast<TQMouseEvent *>( e )->button() == TQMouseEvent::RightButton ) + if ( TQT_TQMOUSEEVENT( e )->button() == Qt::RightButton ) { showMenu(i); } diff --git a/ksim/monitors/net/ksimnet.h b/ksim/monitors/net/ksimnet.h index e8a0fbc..3bd8cb1 100644 --- a/ksim/monitors/net/ksimnet.h +++ b/ksim/monitors/net/ksimnet.h @@ -43,8 +43,9 @@ class NetPlugin : public KSim::PluginObject class NetView : public KSim::PluginView { Q_OBJECT + TQ_OBJECT public: - NetView(KSim::PluginObject *parent, const char *name); + NetView(KSim::PluginObject *tqparent, const char *name); ~NetView(); virtual void reparseConfig(); diff --git a/ksim/monitors/net/netconfig.cpp b/ksim/monitors/net/netconfig.cpp index cd86824..9a19047 100644 --- a/ksim/monitors/net/netconfig.cpp +++ b/ksim/monitors/net/netconfig.cpp @@ -34,8 +34,8 @@ #include "netconfig.moc" #include "netdialog.h" -NetConfig::NetConfig(KSim::PluginObject *parent, const char *name) - : KSim::PluginPage(parent, name) +NetConfig::NetConfig(KSim::PluginObject *tqparent, const char *name) + : KSim::PluginPage(tqparent, name) { m_yes = i18n("yes"); m_no = i18n("no"); @@ -56,29 +56,29 @@ NetConfig::NetConfig(KSim::PluginObject *parent, const char *name) TQT_SLOT(modifyItem(TQListViewItem *))); mainLayout->addWidget(usingBox); - layout = new TQHBoxLayout; - layout->setSpacing(6); + tqlayout = new TQHBoxLayout; + tqlayout->setSpacing(6); TQSpacerItem *spacer = new TQSpacerItem(20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum); - layout->addItem(spacer); + tqlayout->addItem(spacer); insertButton = new TQPushButton(this); insertButton->setText(i18n("Add...")); connect(insertButton, TQT_SIGNAL(clicked()), TQT_SLOT(showNetDialog())); - layout->addWidget(insertButton); + tqlayout->addWidget(insertButton); modifyButton = new TQPushButton(this); modifyButton->setText(i18n("Modify...")); connect(modifyButton, TQT_SIGNAL(clicked()), TQT_SLOT(modifyCurrent())); - layout->addWidget(modifyButton); + tqlayout->addWidget(modifyButton); removeButton = new TQPushButton(this); removeButton->setText(i18n("Remove")); connect(removeButton, TQT_SIGNAL(clicked()), TQT_SLOT(removeCurrent())); - layout->addWidget(removeButton); + tqlayout->addWidget(removeButton); - mainLayout->addLayout(layout); + mainLayout->addLayout(tqlayout); } NetConfig::~NetConfig() @@ -144,8 +144,8 @@ void NetConfig::menu(KListView *, TQListViewItem *item, const TQPoint &) if (item) { aboutMenu->insertItem(i18n("&Add Net Device"), 3); - aboutMenu->insertItem(i18n("&Modify '%1'").arg(item->text(0)), 2); - aboutMenu->insertItem(i18n("&Remove '%1'").arg(item->text(0)), 1); + aboutMenu->insertItem(i18n("&Modify '%1'").tqarg(item->text(0)), 2); + aboutMenu->insertItem(i18n("&Remove '%1'").tqarg(item->text(0)), 1); } else { aboutMenu->insertItem(i18n("&Add Net Device"), 3); @@ -217,7 +217,7 @@ void NetConfig::removeItem(TQListViewItem *item) return; int result = KMessageBox::warningContinueCancel(0, i18n("Are you sure you " - "want to remove the net interface '%1'?").arg(item->text(0)), TQString::null, KStdGuiItem::del()); + "want to remove the net interface '%1'?").tqarg(item->text(0)), TQString(), KStdGuiItem::del()); if (result == KMessageBox::Cancel) return; diff --git a/ksim/monitors/net/netconfig.h b/ksim/monitors/net/netconfig.h index d83c20f..2d07176 100644 --- a/ksim/monitors/net/netconfig.h +++ b/ksim/monitors/net/netconfig.h @@ -33,8 +33,9 @@ class TQListViewItem; class NetConfig : public KSim::PluginPage { Q_OBJECT + TQ_OBJECT public: - NetConfig(KSim::PluginObject *parent, const char *name); + NetConfig(KSim::PluginObject *tqparent, const char *name); virtual ~NetConfig(); virtual void saveConfig(); @@ -53,7 +54,7 @@ class NetConfig : public KSim::PluginPage // Couldnt think of a better name for this :) const TQString &boolToString(bool) const; - TQHBoxLayout *layout; + TQHBoxLayout *tqlayout; TQPushButton *insertButton; TQPushButton *removeButton; TQPushButton *modifyButton; diff --git a/ksim/monitors/net/netdialog.cpp b/ksim/monitors/net/netdialog.cpp index 60a5d20..3513bf4 100644 --- a/ksim/monitors/net/netdialog.cpp +++ b/ksim/monitors/net/netdialog.cpp @@ -49,8 +49,8 @@ #include <string.h> -NetDialog::NetDialog(TQWidget *parent, const char *name) - : TQTabDialog(parent, name, true) +NetDialog::NetDialog(TQWidget *tqparent, const char *name) + : TQTabDialog(tqparent, name, true) { m_clicked = false; setCaption(kapp->makeStdCaption(i18n("Network Interface"))); @@ -65,7 +65,7 @@ NetDialog::NetDialog(TQWidget *parent, const char *name) m_generalLayout->addMultiCellWidget(m_deviceLabel, 0, 0, 0, 0); m_deviceCombo = new KComboBox(true, m_generalTab); - m_deviceCombo->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, + m_deviceCombo->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed)); m_deviceCombo->setFocus(); m_deviceCombo->setDuplicatesEnabled(false); @@ -86,10 +86,10 @@ NetDialog::NetDialog(TQWidget *parent, const char *name) m_timerBox = new TQGroupBox(m_generalTab); m_timerBox->setTitle(i18n("Timer")); m_timerBox->setColumnLayout(0, Qt::Vertical); - m_timerBox->layout()->setSpacing(0); - m_timerBox->layout()->setMargin(0); - m_timerBoxLayout = new TQVBoxLayout(m_timerBox->layout()); - m_timerBoxLayout->setAlignment(Qt::AlignTop); + m_timerBox->tqlayout()->setSpacing(0); + m_timerBox->tqlayout()->setMargin(0); + m_timerBoxLayout = new TQVBoxLayout(m_timerBox->tqlayout()); + m_timerBoxLayout->tqsetAlignment(TQt::AlignTop); m_timerBoxLayout->setSpacing(6); m_timerBoxLayout->setMargin(11); @@ -256,7 +256,7 @@ TQStringList NetDialog::createList() const for (it = output.begin(); it != output.end(); ++it) { list = TQStringList::split(' ', (*it)); (*it) = list[0].stripWhiteSpace(); - (*it).truncate((*it).find(':')); + (*it).truncate((*it).tqfind(':')); } return output; diff --git a/ksim/monitors/net/netdialog.h b/ksim/monitors/net/netdialog.h index 3f57b69..094e40a 100644 --- a/ksim/monitors/net/netdialog.h +++ b/ksim/monitors/net/netdialog.h @@ -32,11 +32,12 @@ class KComboBox; class KLineEdit; class KURLRequester; -class NetDialog : public QTabDialog +class NetDialog : public TQTabDialog { Q_OBJECT + TQ_OBJECT public: - NetDialog(TQWidget *parent, const char *name = 0); + NetDialog(TQWidget *tqparent, const char *name = 0); ~NetDialog(); const TQString deviceName() const; diff --git a/ksim/monitors/snmp/browsedialog.cpp b/ksim/monitors/snmp/browsedialog.cpp index 3085eca..3b571ef 100644 --- a/ksim/monitors/snmp/browsedialog.cpp +++ b/ksim/monitors/snmp/browsedialog.cpp @@ -29,8 +29,8 @@ using namespace KSim::Snmp; -BrowseDialog::BrowseDialog( const HostConfig &hostConfig, const TQString ¤tOid, TQWidget *parent, const char *name ) - : BrowseDialogBase( parent, name ), m_host( hostConfig ) +BrowseDialog::BrowseDialog( const HostConfig &hostConfig, const TQString ¤tOid, TQWidget *tqparent, const char *name ) + : BrowseDialogBase( tqparent, name ), m_host( hostConfig ) { stop->setGuiItem( KGuiItem( i18n( "&Stop" ), "stop" ) ); @@ -95,7 +95,7 @@ void BrowseDialog::startWalk( const Identifier &startOid ) { stopWalker(); - m_walker = new Walker( m_host, startOid, this ); + m_walker = new Walker( m_host, startOid, TQT_TQOBJECT(this) ); connect( m_walker, TQT_SIGNAL( resultReady( const Walker::Result & ) ), this, TQT_SLOT( insertBrowseItem( const Walker::Result & ) ) ); connect( m_walker, TQT_SIGNAL( finished() ), @@ -134,7 +134,7 @@ void BrowseDialog::applyFilter( TQListViewItem *item ) return; } - if ( item->text( 0 ).find( filterText, 0 /*index*/, false /*case sensitive*/ ) == -1 ) { + if ( item->text( 0 ).tqfind( filterText, 0 /*index*/, false /*case sensitive*/ ) == -1 ) { item->setVisible( false ); return; } diff --git a/ksim/monitors/snmp/browsedialog.h b/ksim/monitors/snmp/browsedialog.h index a694881..7dfb4f7 100644 --- a/ksim/monitors/snmp/browsedialog.h +++ b/ksim/monitors/snmp/browsedialog.h @@ -39,8 +39,9 @@ namespace Snmp class BrowseDialog : public BrowseDialogBase { Q_OBJECT + TQ_OBJECT public: - BrowseDialog( const HostConfig &hostConfig, const TQString ¤tOid, TQWidget *parent, const char *name = 0 ); + BrowseDialog( const HostConfig &hostConfig, const TQString ¤tOid, TQWidget *tqparent, const char *name = 0 ); TQString selectedObjectIdentifier() const; diff --git a/ksim/monitors/snmp/browsedialogbase.ui b/ksim/monitors/snmp/browsedialogbase.ui index 17459f8..c3efab1 100644 --- a/ksim/monitors/snmp/browsedialogbase.ui +++ b/ksim/monitors/snmp/browsedialogbase.ui @@ -22,15 +22,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -38,7 +38,7 @@ <string>Filter:</string> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>filter</cstring> </property> @@ -97,7 +97,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget" row="3" column="0"> + <widget class="TQLayoutWidget" row="3" column="0"> <property name="name"> <cstring>Layout1</cstring> </property> @@ -121,14 +121,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -142,7 +142,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -155,15 +155,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="2" column="0"> + <widget class="TQLayoutWidget" row="2" column="0"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>blah</cstring> </property> @@ -179,7 +179,7 @@ <string>Selected object:</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>selectedObject</cstring> </property> @@ -205,7 +205,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>71</width> <height>20</height> @@ -243,17 +243,17 @@ </connection> <connection> <sender>browserContents</sender> - <signal>executed(QListViewItem*)</signal> + <signal>executed(TQListViewItem*)</signal> <receiver>MyDialog</receiver> - <slot>objectSelected(QListViewItem*)</slot> + <slot>objectSelected(TQListViewItem*)</slot> </connection> </connections> -<slots> +<Q_SLOTS> <slot access="protected">stopAllWalks()</slot> <slot access="protected">applyFilter()</slot> - <slot access="protected">objectSelected(QListViewItem *)</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> + <slot access="protected">objectSelected(TQListViewItem *)</slot> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kdialog.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/ksim/monitors/snmp/chartmonitor.cpp b/ksim/monitors/snmp/chartmonitor.cpp index a5cfc6e..4682c3b 100644 --- a/ksim/monitors/snmp/chartmonitor.cpp +++ b/ksim/monitors/snmp/chartmonitor.cpp @@ -22,8 +22,8 @@ using namespace KSim::Snmp; -ChartMonitor::ChartMonitor( const MonitorConfig &config, TQWidget *parent, const char *name ) - : KSim::Chart( true /* displayMeter */, 0, TQString::null, parent, name ), +ChartMonitor::ChartMonitor( const MonitorConfig &config, TQWidget *tqparent, const char *name ) + : KSim::Chart( true /* displayMeter */, 0, TQString(), tqparent, name ), m_lastValue( 0 ), m_config( config ), m_firstSampleReceived( false ) { setTitle( m_config.name ); @@ -32,7 +32,7 @@ ChartMonitor::ChartMonitor( const MonitorConfig &config, TQWidget *parent, const void ChartMonitor::setData( const Value &data ) { - Q_UINT64 currentValue = convertToInt( data ); + TQ_UINT64 currentValue = convertToInt( data ); if ( data.isCounterType() ) { int diff = currentValue - m_lastValue; @@ -50,12 +50,12 @@ void ChartMonitor::setData( const Value &data ) updateDisplay(); setValue( currentValue ); if ( m_config.displayCurrentValueInline ) { - Q_UINT64 bytesPerSec = currentValue / ( m_config.refreshInterval.seconds + m_config.refreshInterval.minutes * 60 ); + TQ_UINT64 bytesPerSec = currentValue / ( m_config.refreshInterval.seconds + m_config.refreshInterval.minutes * 60 ); setText( KIO::convertSize( bytesPerSec ), 0 ); } } -Q_UINT64 ChartMonitor::convertToInt( const Value &data ) +TQ_UINT64 ChartMonitor::convertToInt( const Value &data ) { switch ( data.type() ) { case Value::TimeTicks: diff --git a/ksim/monitors/snmp/chartmonitor.h b/ksim/monitors/snmp/chartmonitor.h index 3b064f8..6713238 100644 --- a/ksim/monitors/snmp/chartmonitor.h +++ b/ksim/monitors/snmp/chartmonitor.h @@ -31,18 +31,19 @@ namespace Snmp class ChartMonitor : public KSim::Chart { Q_OBJECT + TQ_OBJECT public: - ChartMonitor( const MonitorConfig &config, TQWidget *parent, const char *name = 0 ); + ChartMonitor( const MonitorConfig &config, TQWidget *tqparent, const char *name = 0 ); public slots: void setData( const Value &data ); private: - Q_UINT64 m_lastValue; + TQ_UINT64 m_lastValue; MonitorConfig m_config; bool m_firstSampleReceived; - static Q_UINT64 convertToInt( const Value &data ); + static TQ_UINT64 convertToInt( const Value &data ); }; } diff --git a/ksim/monitors/snmp/configpage.cpp b/ksim/monitors/snmp/configpage.cpp index ee50054..ede7a52 100644 --- a/ksim/monitors/snmp/configpage.cpp +++ b/ksim/monitors/snmp/configpage.cpp @@ -43,8 +43,8 @@ static bool listViewHasSelection( TQListView *lv ) return false; } -ConfigPage::ConfigPage( Plugin *parent, const char *name ) - : KSim::PluginPage( parent, name ) +ConfigPage::ConfigPage( Plugin *tqparent, const char *name ) + : KSim::PluginPage( tqparent, name ) { ( new TQVBoxLayout( this ) )->setAutoAdd( true ); @@ -123,7 +123,7 @@ void ConfigPage::modifyHost() if ( !currentItem ) return; - HostConfigMap::Iterator hostIt = m_hosts.find( currentItem->text( 0 ) ); + HostConfigMap::Iterator hostIt = m_hosts.tqfind( currentItem->text( 0 ) ); if ( hostIt == m_hosts.end() ) return; @@ -147,7 +147,7 @@ void ConfigPage::removeHost() if ( !currentItem ) return; - HostConfigMap::Iterator hostIt = m_hosts.find( currentItem->text( 0 ) ); + HostConfigMap::Iterator hostIt = m_hosts.tqfind( currentItem->text( 0 ) ); if ( hostIt == m_hosts.end() ) return; @@ -191,7 +191,7 @@ void ConfigPage::modifyMonitor() if ( !currentItem ) return; - MonitorConfigMap::Iterator monitorIt = m_monitors.find( currentItem->text( 0 ) ); + MonitorConfigMap::Iterator monitorIt = m_monitors.tqfind( currentItem->text( 0 ) ); if ( monitorIt == m_monitors.end() ) return; @@ -215,7 +215,7 @@ void ConfigPage::removeMonitor() if ( !currentItem ) return; - MonitorConfigMap::Iterator monitorIt = m_monitors.find( currentItem->text( 0 ) ); + MonitorConfigMap::Iterator monitorIt = m_monitors.tqfind( currentItem->text( 0 ) ); if ( monitorIt == m_monitors.end() ) return; diff --git a/ksim/monitors/snmp/configpage.h b/ksim/monitors/snmp/configpage.h index 66c941c..f8b811c 100644 --- a/ksim/monitors/snmp/configpage.h +++ b/ksim/monitors/snmp/configpage.h @@ -32,17 +32,17 @@ namespace KSim namespace Snmp { -class HostItem : public QListViewItem +class HostItem : public TQListViewItem { public: - HostItem( TQListView *parent, const KSim::Snmp::HostConfig &src ) - : TQListViewItem( parent, TQString::null, TQString::null, TQString::null ) + HostItem( TQListView *tqparent, const KSim::Snmp::HostConfig &src ) + : TQListViewItem( tqparent, TQString(), TQString(), TQString() ) { setFromHostConfig( src ); } - HostItem( TQListView *parent ) - : TQListViewItem( parent, TQString::null, TQString::null, TQString::null ) + HostItem( TQListView *tqparent ) + : TQListViewItem( tqparent, TQString(), TQString(), TQString() ) {} void setFromHostConfig( const KSim::Snmp::HostConfig &src ) @@ -53,17 +53,17 @@ public: } }; -class MonitorItem : public QListViewItem +class MonitorItem : public TQListViewItem { public: - MonitorItem( TQListView *parent, const KSim::Snmp::MonitorConfig &monitor ) - : TQListViewItem( parent, TQString::null, TQString::null, TQString::null ) + MonitorItem( TQListView *tqparent, const KSim::Snmp::MonitorConfig &monitor ) + : TQListViewItem( tqparent, TQString(), TQString(), TQString() ) { setFromMonitor( monitor ); } - MonitorItem( TQListView *parent ) - : TQListViewItem( parent, TQString::null, TQString::null, TQString::null ) + MonitorItem( TQListView *tqparent ) + : TQListViewItem( tqparent, TQString(), TQString(), TQString() ) {} void setFromMonitor( const KSim::Snmp::MonitorConfig &monitor ) @@ -79,8 +79,9 @@ class Plugin; class ConfigPage : public KSim::PluginPage { Q_OBJECT + TQ_OBJECT public: - ConfigPage( Plugin *parent, const char *name ); + ConfigPage( Plugin *tqparent, const char *name ); ~ConfigPage(); virtual void saveConfig(); diff --git a/ksim/monitors/snmp/configwidget.ui b/ksim/monitors/snmp/configwidget.ui index c121184..2d6134f 100644 --- a/ksim/monitors/snmp/configwidget.ui +++ b/ksim/monitors/snmp/configwidget.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.1" stdsetdef="1"> <class>KSim::Snmp::ConfigWidget</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>ConfigWidget</cstring> </property> @@ -16,7 +16,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>hostGroup</cstring> </property> @@ -27,7 +27,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton" row="1" column="3"> + <widget class="TQPushButton" row="1" column="3"> <property name="name"> <cstring>removeHost</cstring> </property> @@ -35,7 +35,7 @@ <string>Remove</string> </property> </widget> - <widget class="QPushButton" row="1" column="2"> + <widget class="TQPushButton" row="1" column="2"> <property name="name"> <cstring>modifyHost</cstring> </property> @@ -43,7 +43,7 @@ <string>Modify...</string> </property> </widget> - <widget class="QPushButton" row="1" column="1"> + <widget class="TQPushButton" row="1" column="1"> <property name="name"> <cstring>addHost</cstring> </property> @@ -102,7 +102,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>141</width> <height>20</height> @@ -111,7 +111,7 @@ </spacer> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>monitorGroup</cstring> </property> @@ -122,7 +122,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton" row="1" column="1"> + <widget class="TQPushButton" row="1" column="1"> <property name="name"> <cstring>addMonitor</cstring> </property> @@ -130,7 +130,7 @@ <string>Add...</string> </property> </widget> - <widget class="QPushButton" row="1" column="2"> + <widget class="TQPushButton" row="1" column="2"> <property name="name"> <cstring>modifyMonitor</cstring> </property> @@ -138,7 +138,7 @@ <string>Modify...</string> </property> </widget> - <widget class="QPushButton" row="1" column="3"> + <widget class="TQPushButton" row="1" column="3"> <property name="name"> <cstring>removeMonitor</cstring> </property> @@ -156,7 +156,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>121</width> <height>20</height> @@ -207,7 +207,7 @@ <tabstop>modifyMonitor</tabstop> <tabstop>removeMonitor</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klistview.h</includehint> <includehint>klistview.h</includehint> diff --git a/ksim/monitors/snmp/hostdialog.cpp b/ksim/monitors/snmp/hostdialog.cpp index 7d66a75..b237bfe 100644 --- a/ksim/monitors/snmp/hostdialog.cpp +++ b/ksim/monitors/snmp/hostdialog.cpp @@ -35,15 +35,15 @@ using namespace KSim::Snmp; -HostDialog::HostDialog( TQWidget *parent, const char *name ) - : HostDialogBase( parent, name ) +HostDialog::HostDialog( TQWidget *tqparent, const char *name ) + : HostDialogBase( tqparent, name ) { init(); port->setValue( 161 ); } -HostDialog::HostDialog( const HostConfig &src, TQWidget *parent, const char *name ) - : HostDialogBase( parent, name ) +HostDialog::HostDialog( const HostConfig &src, TQWidget *tqparent, const char *name ) + : HostDialogBase( tqparent, name ) { init( src ); } @@ -141,7 +141,7 @@ void HostDialog::init( const HostConfig &src ) { // hide these, there's nothing to choose right now. might be that // net-snmp will support different privacy types in the future, but - // apparently not now. + // aptqparently not now. privacyTypeLabel->hide(); privacyType->hide(); @@ -163,7 +163,7 @@ void HostDialog::loadSettingsFromHostConfig( const HostConfig &src ) hostName->setText( src.name ); port->setValue( src.port ); - snmpVersion->setCurrentItem( allSnmpVersions().findIndex( snmpVersionToString( src.version ) ) ); + snmpVersion->setCurrentItem( allSnmpVersions().tqfindIndex( snmpVersionToString( src.version ) ) ); if ( src.version != SnmpVersion3 ) { communityString->setText( src.community ); @@ -172,18 +172,18 @@ void HostDialog::loadSettingsFromHostConfig( const HostConfig &src ) securityName->setText( src.securityName ); - securityLevel->setCurrentItem( allSecurityLevels().findIndex( securityLevelToString( src.securityLevel ) ) ); + securityLevel->setCurrentItem( allSecurityLevels().tqfindIndex( securityLevelToString( src.securityLevel ) ) ); if ( src.securityLevel == NoAuthPriv ) return; - authenticationType->setCurrentItem( allAuthenticationProtocols().findIndex( authenticationProtocolToString( src.authentication.protocol ) ) ); + authenticationType->setCurrentItem( allAuthenticationProtocols().tqfindIndex( authenticationProtocolToString( src.authentication.protocol ) ) ); authenticationPassphrase->setText( src.authentication.key ); if ( src.securityLevel == AuthNoPriv ) return; - privacyType->setCurrentItem( allPrivacyProtocols().findIndex( privacyProtocolToString( src.privacy.protocol ) ) ); + privacyType->setCurrentItem( allPrivacyProtocols().tqfindIndex( privacyProtocolToString( src.privacy.protocol ) ) ); privacyPassphrase->setText( src.privacy.key ); } diff --git a/ksim/monitors/snmp/hostdialog.h b/ksim/monitors/snmp/hostdialog.h index 68ddfe1..d384881 100644 --- a/ksim/monitors/snmp/hostdialog.h +++ b/ksim/monitors/snmp/hostdialog.h @@ -33,9 +33,10 @@ namespace Snmp class HostDialog : public HostDialogBase { Q_OBJECT + TQ_OBJECT public: - HostDialog( TQWidget *parent, const char *name = 0 ); - HostDialog( const HostConfig &src, TQWidget *parent, const char *name = 0 ); + HostDialog( TQWidget *tqparent, const char *name = 0 ); + HostDialog( const HostConfig &src, TQWidget *tqparent, const char *name = 0 ); HostConfig settings() const; diff --git a/ksim/monitors/snmp/hostdialogbase.ui b/ksim/monitors/snmp/hostdialogbase.ui index 1ee9ee4..935d013 100644 --- a/ksim/monitors/snmp/hostdialogbase.ui +++ b/ksim/monitors/snmp/hostdialogbase.ui @@ -24,7 +24,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -46,7 +46,7 @@ <cstring>hostName</cstring> </property> </widget> - <widget class="QLabel" row="0" column="2"> + <widget class="TQLabel" row="0" column="2"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -57,7 +57,7 @@ <cstring>port</cstring> </property> </widget> - <widget class="QSpinBox" row="0" column="3"> + <widget class="TQSpinBox" row="0" column="3"> <property name="name"> <cstring>port</cstring> </property> @@ -78,14 +78,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>91</width> <height>20</height> </size> </property> </spacer> - <widget class="QButtonGroup" row="1" column="0" rowspan="1" colspan="5"> + <widget class="TQButtonGroup" row="1" column="0" rowspan="1" colspan="5"> <property name="name"> <cstring>buttonGroup2</cstring> </property> @@ -96,11 +96,11 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QWidgetStack" row="2" column="0" rowspan="1" colspan="3"> + <widget class="TQWidgetStack" row="2" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>authenticationDetails</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>snmpV1Page</cstring> </property> @@ -111,7 +111,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -132,7 +132,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>41</height> @@ -149,7 +149,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>160</width> <height>20</height> @@ -166,7 +166,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>snmpV3Page</cstring> </property> @@ -177,7 +177,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel6</cstring> </property> @@ -188,7 +188,7 @@ <cstring>securityName</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel7</cstring> </property> @@ -199,7 +199,7 @@ <cstring>securityLevel</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>authenticationTypeLabel</cstring> </property> @@ -210,7 +210,7 @@ <cstring>authenticationType</cstring> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>privacyTypeLabel</cstring> </property> @@ -221,7 +221,7 @@ <cstring>privacyType</cstring> </property> </widget> - <widget class="QLabel" row="5" column="0"> + <widget class="TQLabel" row="5" column="0"> <property name="name"> <cstring>privacyPassphraseLabel</cstring> </property> @@ -232,7 +232,7 @@ <cstring>privacyPassphrase</cstring> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>authenticationPassphraseLabel</cstring> </property> @@ -253,7 +253,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>71</width> <height>20</height> @@ -265,7 +265,7 @@ <cstring>securityName</cstring> </property> </widget> - <widget class="QComboBox" row="4" column="1"> + <widget class="TQComboBox" row="4" column="1"> <property name="name"> <cstring>privacyType</cstring> </property> @@ -281,12 +281,12 @@ <enum>Password</enum> </property> </widget> - <widget class="QComboBox" row="1" column="1"> + <widget class="TQComboBox" row="1" column="1"> <property name="name"> <cstring>securityLevel</cstring> </property> </widget> - <widget class="QComboBox" row="2" column="1"> + <widget class="TQComboBox" row="2" column="1"> <property name="name"> <cstring>authenticationType</cstring> </property> @@ -309,7 +309,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -333,7 +333,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel2_2</cstring> </property> @@ -344,7 +344,7 @@ <cstring>snmpVersion</cstring> </property> </widget> - <widget class="QComboBox" row="0" column="1"> + <widget class="TQComboBox" row="0" column="1"> <property name="name"> <cstring>snmpVersion</cstring> </property> @@ -359,7 +359,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>351</width> <height>20</height> @@ -382,15 +382,15 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget" row="3" column="0" rowspan="1" colspan="5"> + <widget class="TQLayoutWidget" row="3" column="0" rowspan="1" colspan="5"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>testHostButton</cstring> </property> @@ -408,14 +408,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>220</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -429,7 +429,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -508,13 +508,13 @@ <tabstop>buttonCancel</tabstop> <tabstop>communityString</tabstop> </tabstops> -<slots> +<Q_SLOTS> <slot access="private">showSnmpAuthenticationDetailsForVersion(const QString &)</slot> <slot>enableDisabledAuthenticationAndPrivacyElementsForSecurityLevel(const QString &)</slot> <slot>checkValidity()</slot> <slot access="protected">testHost()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kdialog.h</includehint> <includehint>klineedit.h</includehint> diff --git a/ksim/monitors/snmp/identifier.cpp b/ksim/monitors/snmp/identifier.cpp index 32d6d8b..355f019 100644 --- a/ksim/monitors/snmp/identifier.cpp +++ b/ksim/monitors/snmp/identifier.cpp @@ -87,7 +87,7 @@ TQString Identifier::toString( PrintFlags flags ) const u_char *buf = ( u_char* )calloc( buflen, 1 ); if ( !buf ) - return TQString::null; + return TQString(); int oldOutpuFormat = SnmpLib::self()->netsnmp_ds_get_int( NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OID_OUTPUT_FORMAT ); SnmpLib::self()->netsnmp_ds_set_int( NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OID_OUTPUT_FORMAT, @@ -100,7 +100,7 @@ TQString Identifier::toString( PrintFlags flags ) const if ( overflow ) { free( buf ); - return TQString::null; + return TQString(); } TQString result = TQString::fromAscii( ( char* )buf ); diff --git a/ksim/monitors/snmp/labelmonitor.cpp b/ksim/monitors/snmp/labelmonitor.cpp index 2245a09..e8ae261 100644 --- a/ksim/monitors/snmp/labelmonitor.cpp +++ b/ksim/monitors/snmp/labelmonitor.cpp @@ -21,8 +21,8 @@ using namespace KSim::Snmp; -LabelMonitor::LabelMonitor( const MonitorConfig &config, TQWidget *parent, const char *name ) - : KSim::Label( parent, name ), m_config( config ) +LabelMonitor::LabelMonitor( const MonitorConfig &config, TQWidget *tqparent, const char *name ) + : KSim::Label( tqparent, name ), m_config( config ) { } @@ -32,8 +32,8 @@ void LabelMonitor::setData( const Value &data ) if ( m_config.useCustomFormatString ) { TQString text = m_config.customFormatString; - text.replace( "%n", m_config.name ); - text.replace( "%s", dataString ); + text.tqreplace( "%n", m_config.name ); + text.tqreplace( "%s", dataString ); setText( text ); } else setText( m_config.name + ": " + dataString ); diff --git a/ksim/monitors/snmp/labelmonitor.h b/ksim/monitors/snmp/labelmonitor.h index 606165b..6ff8404 100644 --- a/ksim/monitors/snmp/labelmonitor.h +++ b/ksim/monitors/snmp/labelmonitor.h @@ -33,8 +33,9 @@ namespace Snmp class LabelMonitor : public KSim::Label { Q_OBJECT + TQ_OBJECT public: - LabelMonitor( const MonitorConfig &config, TQWidget *parent, const char *name = 0 ); + LabelMonitor( const MonitorConfig &config, TQWidget *tqparent, const char *name = 0 ); public slots: void setData( const Value &data ); diff --git a/ksim/monitors/snmp/monitor.cpp b/ksim/monitors/snmp/monitor.cpp index 052d2c0..414f4d9 100644 --- a/ksim/monitors/snmp/monitor.cpp +++ b/ksim/monitors/snmp/monitor.cpp @@ -24,8 +24,8 @@ using namespace KSim::Snmp; -Monitor::Monitor( const HostConfig &host, const Identifier &oid, int refresh, TQObject *parent, const char *name ) - : TQObject( parent, name ), m_oid( oid ), m_session( host ) +Monitor::Monitor( const HostConfig &host, const Identifier &oid, int refresh, TQObject *tqparent, const char *name ) + : TQObject( tqparent, name ), m_oid( oid ), m_session( host ) { if ( refresh > 0 ) m_timerId = startTimer( refresh ); diff --git a/ksim/monitors/snmp/monitor.h b/ksim/monitors/snmp/monitor.h index 083e97f..5b88b46 100644 --- a/ksim/monitors/snmp/monitor.h +++ b/ksim/monitors/snmp/monitor.h @@ -31,11 +31,12 @@ namespace KSim namespace Snmp { -class Monitor : public TQObject, public QThread +class Monitor : public TQObject, public TQThread { Q_OBJECT + TQ_OBJECT public: - Monitor( const HostConfig &host, const Identifier &oid, int refresh, TQObject *parent = 0, const char *name = 0 ); + Monitor( const HostConfig &host, const Identifier &oid, int refresh, TQObject *tqparent = 0, const char *name = 0 ); virtual ~Monitor(); signals: diff --git a/ksim/monitors/snmp/monitorconfig.cpp b/ksim/monitors/snmp/monitorconfig.cpp index 4b4b024..6a77813 100644 --- a/ksim/monitors/snmp/monitorconfig.cpp +++ b/ksim/monitors/snmp/monitorconfig.cpp @@ -39,7 +39,7 @@ bool MonitorConfig::load( KConfigBase &config, const HostConfigMap &hosts ) if ( hostName.isEmpty() ) return false; - HostConfigMap::ConstIterator hostIt = hosts.find( hostName ); + HostConfigMap::ConstIterator hostIt = hosts.tqfind( hostName ); if ( hostIt == hosts.end() ) return false; @@ -93,7 +93,7 @@ void MonitorConfig::save( KConfigBase &config ) const config.writeEntry( "DisplayCurrentValueInline", displayCurrentValueInline ); } -TQWidget *MonitorConfig::createMonitorWidget( TQWidget *parent, const char *name ) +TQWidget *MonitorConfig::createMonitorWidget( TQWidget *tqparent, const char *name ) { TQWidget *w; @@ -103,11 +103,11 @@ TQWidget *MonitorConfig::createMonitorWidget( TQWidget *parent, const char *name return 0; if ( display == Label ) - w = new LabelMonitor( *this, parent, name ); + w = new LabelMonitor( *this, tqparent, name ); else - w = new ChartMonitor( *this, parent, name ); + w = new ChartMonitor( *this, tqparent, name ); - Monitor *monitor = new Monitor( host, id, refresh, w ); + Monitor *monitor = new Monitor( host, id, refresh, TQT_TQOBJECT(w) ); TQObject::connect( monitor, TQT_SIGNAL( newData( const Value & ) ), w, TQT_SLOT( setData( const Value & ) ) ); return w; @@ -117,11 +117,11 @@ TQString KSim::Snmp::monitorDisplayTypeToString( MonitorConfig::DisplayType type { switch ( type ) { - case MonitorConfig::Label: return TQString::fromLatin1( "Label" ); - case MonitorConfig::Chart: return TQString::fromLatin1( "Chart" ); + case MonitorConfig::Label: return TQString::tqfromLatin1( "Label" ); + case MonitorConfig::Chart: return TQString::tqfromLatin1( "Chart" ); default: assert( false ); }; - return TQString::null; + return TQString(); } MonitorConfig::DisplayType KSim::Snmp::stringToMonitorDisplayType( TQString string, bool *ok ) diff --git a/ksim/monitors/snmp/monitorconfig.h b/ksim/monitors/snmp/monitorconfig.h index cf2d525..00554d7 100644 --- a/ksim/monitors/snmp/monitorconfig.h +++ b/ksim/monitors/snmp/monitorconfig.h @@ -41,7 +41,7 @@ struct MonitorConfig bool isNull() const { return name.isEmpty() || host.isNull(); } - TQWidget *createMonitorWidget( TQWidget *parent, const char *name = 0 ); + TQWidget *createMonitorWidget( TQWidget *tqparent, const char *name = 0 ); HostConfig host; TQString name; diff --git a/ksim/monitors/snmp/monitordialog.cpp b/ksim/monitors/snmp/monitordialog.cpp index 1bda0aa..297a818 100644 --- a/ksim/monitors/snmp/monitordialog.cpp +++ b/ksim/monitors/snmp/monitordialog.cpp @@ -37,14 +37,14 @@ using namespace KSim::Snmp; -MonitorDialog::MonitorDialog( const HostConfigMap &hosts, TQWidget *parent, const char *name ) - : MonitorDialogBase( parent, name ), m_hosts( hosts ) +MonitorDialog::MonitorDialog( const HostConfigMap &hosts, TQWidget *tqparent, const char *name ) + : MonitorDialogBase( tqparent, name ), m_hosts( hosts ) { init(); } -MonitorDialog::MonitorDialog( const MonitorConfig &monitor, const HostConfigMap &hosts, TQWidget *parent, const char *name ) - : MonitorDialogBase( parent, name ), m_hosts( hosts ) +MonitorDialog::MonitorDialog( const MonitorConfig &monitor, const HostConfigMap &hosts, TQWidget *tqparent, const char *name ) + : MonitorDialogBase( tqparent, name ), m_hosts( hosts ) { init( monitor ); } @@ -144,14 +144,14 @@ void MonitorDialog::init( const MonitorConfig &monitor ) assert( allHosts.findIndex( monitor.host.name ) != -1 ); - host->setCurrentItem( allHosts.findIndex( monitor.host.name ) ); + host->setCurrentItem( allHosts.tqfindIndex( monitor.host.name ) ); oid->setText( monitor.oid ); updateIntervalMinutes->setValue( monitor.refreshInterval.minutes ); updateIntervalSeconds->setValue( monitor.refreshInterval.seconds ); - displayType->setCurrentItem( allDisplayTypes().findIndex( monitorDisplayTypeToString( monitor.display ) ) ); + displayType->setCurrentItem( allDisplayTypes().tqfindIndex( monitorDisplayTypeToString( monitor.display ) ) ); customFormatStringCheckBox->setChecked( monitor.useCustomFormatString ); customFormatString->setEnabled( monitor.useCustomFormatString ); @@ -166,7 +166,7 @@ void MonitorDialog::init( const MonitorConfig &monitor ) HostConfig MonitorDialog::currentHost() const { - HostConfigMap::ConstIterator hostIt = m_hosts.find( host->currentText() ); + HostConfigMap::ConstIterator hostIt = m_hosts.tqfind( host->currentText() ); if ( hostIt == m_hosts.end() ) return HostConfig(); diff --git a/ksim/monitors/snmp/monitordialog.h b/ksim/monitors/snmp/monitordialog.h index b6d0b40..62ab5e2 100644 --- a/ksim/monitors/snmp/monitordialog.h +++ b/ksim/monitors/snmp/monitordialog.h @@ -32,9 +32,10 @@ namespace Snmp class MonitorDialog : public MonitorDialogBase { Q_OBJECT + TQ_OBJECT public: - MonitorDialog( const HostConfigMap &hosts, TQWidget *parent, const char *name = 0 ); - MonitorDialog( const MonitorConfig &monitor, const HostConfigMap &hosts, TQWidget *parent, const char *name = 0 ); + MonitorDialog( const HostConfigMap &hosts, TQWidget *tqparent, const char *name = 0 ); + MonitorDialog( const MonitorConfig &monitor, const HostConfigMap &hosts, TQWidget *tqparent, const char *name = 0 ); MonitorConfig monitorConfig() const; diff --git a/ksim/monitors/snmp/monitordialogbase.ui b/ksim/monitors/snmp/monitordialogbase.ui index 13d6b06..bb6a059 100644 --- a/ksim/monitors/snmp/monitordialogbase.ui +++ b/ksim/monitors/snmp/monitordialogbase.ui @@ -22,7 +22,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -30,7 +30,7 @@ <string>Display type:</string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -38,7 +38,7 @@ <string>Update interval:</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -46,7 +46,7 @@ <string>Object identifier:</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -54,7 +54,7 @@ <string>Name:</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1_3</cstring> </property> @@ -62,7 +62,7 @@ <string>Host:</string> </property> </widget> - <widget class="QGroupBox" row="5" column="0" rowspan="1" colspan="4"> + <widget class="TQGroupBox" row="5" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>labelOptions</cstring> </property> @@ -73,7 +73,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>customFormatStringCheckBox</cstring> </property> @@ -81,7 +81,7 @@ <string>Use custom format string:</string> </property> </widget> - <widget class="QLineEdit" row="0" column="1"> + <widget class="TQLineEdit" row="0" column="1"> <property name="name"> <cstring>customFormatString</cstring> </property> @@ -89,7 +89,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel1_4</cstring> </property> @@ -104,21 +104,21 @@ <property name="text"> <string>The text in the edit box is what is displayed except that any occurrence of <b>%s</b> will be replaced with the snmp object value and any occurrence of <b>%n</b> will be replaced with the name of this monitor (see Name input field) .</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> </grid> </widget> - <widget class="QLayoutWidget" row="3" column="1" rowspan="1" colspan="3"> + <widget class="TQLayoutWidget" row="3" column="1" rowspan="1" colspan="3"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>updateIntervalMinutes</cstring> </property> @@ -126,7 +126,7 @@ <number>60</number> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -134,7 +134,7 @@ <string>minutes</string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>updateIntervalSeconds</cstring> </property> @@ -145,7 +145,7 @@ <number>1</number> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -163,7 +163,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>141</width> <height>20</height> @@ -172,15 +172,15 @@ </spacer> </hbox> </widget> - <widget class="QLayoutWidget" row="4" column="1" rowspan="1" colspan="3"> + <widget class="TQLayoutWidget" row="4" column="1" rowspan="1" colspan="3"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>Chart</string> @@ -205,7 +205,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>271</width> <height>20</height> @@ -224,14 +224,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>244</width> <height>20</height> </size> </property> </spacer> - <widget class="QLineEdit" row="0" column="1"> + <widget class="TQLineEdit" row="0" column="1"> <property name="name"> <cstring>monitorName</cstring> </property> @@ -246,19 +246,19 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>210</width> <height>20</height> </size> </property> </spacer> - <widget class="QComboBox" row="1" column="1"> + <widget class="TQComboBox" row="1" column="1"> <property name="name"> <cstring>host</cstring> </property> </widget> - <widget class="QLayoutWidget" row="9" column="0" rowspan="1" colspan="4"> + <widget class="TQLayoutWidget" row="9" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>Layout1</cstring> </property> @@ -282,14 +282,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -303,7 +303,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -330,15 +330,15 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLabel" row="7" column="0" rowspan="1" colspan="4"> + <widget class="TQLabel" row="7" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>status</cstring> </property> <property name="text"> - <string>blehStatus</string> + <string>blehtqStatus</string> </property> </widget> - <widget class="QGroupBox" row="6" column="0" rowspan="1" colspan="4"> + <widget class="TQGroupBox" row="6" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>chartOptions</cstring> </property> @@ -349,7 +349,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>displayCurrentValueInline</cstring> </property> @@ -367,7 +367,7 @@ <string>Browse...</string> </property> </widget> - <widget class="QLineEdit" row="2" column="1" rowspan="1" colspan="2"> + <widget class="TQLineEdit" row="2" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>oid</cstring> </property> @@ -428,11 +428,11 @@ <tabstop>buttonOk</tabstop> <tabstop>buttonCancel</tabstop> </tabstops> -<slots> +<Q_SLOTS> <slot access="protected">checkValues()</slot> <slot access="protected">browse()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kdialog.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/ksim/monitors/snmp/probedialog.cpp b/ksim/monitors/snmp/probedialog.cpp index 4667fc3..8edfe69 100644 --- a/ksim/monitors/snmp/probedialog.cpp +++ b/ksim/monitors/snmp/probedialog.cpp @@ -38,8 +38,8 @@ static const char * const probeIdentifiers[] = 0 }; -ProbeDialog::ProbeDialog( const HostConfig &hostConfig, TQWidget *parent, const char *name ) - : KProgressDialog( parent, name, i18n( "SNMP Host Probe" ), TQString::null, true /* modal */ ), +ProbeDialog::ProbeDialog( const HostConfig &hostConfig, TQWidget *tqparent, const char *name ) + : KProgressDialog( tqparent, name, i18n( "SNMP Host Probe" ), TQString(), true /* modal */ ), m_host( hostConfig ), m_currentMonitor( 0 ), m_canceled( false ) { setLabel( i18n( "Probing for common object identifiers..." ) ); @@ -77,7 +77,7 @@ void ProbeDialog::probeOne() Identifier oid = m_probeOIDs.pop(); delete m_currentMonitor; - m_currentMonitor = new Monitor( m_host, oid, 0 /* no refresh */, this ); + m_currentMonitor = new Monitor( m_host, oid, 0 /* no refresh */, TQT_TQOBJECT(this) ); connect( m_currentMonitor, TQT_SIGNAL( newData( const Identifier &, const Value & ) ), this, TQT_SLOT( probeResult( const Identifier &, const Value & ) ) ); diff --git a/ksim/monitors/snmp/probedialog.h b/ksim/monitors/snmp/probedialog.h index 9e88eda..9ce949f 100644 --- a/ksim/monitors/snmp/probedialog.h +++ b/ksim/monitors/snmp/probedialog.h @@ -38,8 +38,9 @@ class Monitor; class ProbeDialog : public KProgressDialog { Q_OBJECT + TQ_OBJECT public: - ProbeDialog( const HostConfig &hostConfig, TQWidget *parent, const char *name = 0 ); + ProbeDialog( const HostConfig &hostConfig, TQWidget *tqparent, const char *name = 0 ); struct ProbeResult { diff --git a/ksim/monitors/snmp/proberesultdialog.cpp b/ksim/monitors/snmp/proberesultdialog.cpp index bed1e21..fbdd4e6 100644 --- a/ksim/monitors/snmp/proberesultdialog.cpp +++ b/ksim/monitors/snmp/proberesultdialog.cpp @@ -27,10 +27,10 @@ using namespace KSim::Snmp; ProbeResultDialog::ProbeResultDialog( const HostConfig &hostConfig, const ProbeDialog::ProbeResultList &probeResults, - TQWidget *parent, const char *name ) - : ProbeResultDialogBase( parent, name ) + TQWidget *tqparent, const char *name ) + : ProbeResultDialogBase( tqparent, name ) { - info->setText( i18n( "Results of scanning host %1:" ).arg( hostConfig.name ) ); + info->setText( i18n( "Results of scanning host %1:" ).tqarg( hostConfig.name ) ); for ( ProbeDialog::ProbeResultList::ConstIterator it = probeResults.begin(); it != probeResults.end(); ++it ) diff --git a/ksim/monitors/snmp/proberesultdialog.h b/ksim/monitors/snmp/proberesultdialog.h index 2166a69..47e012a 100644 --- a/ksim/monitors/snmp/proberesultdialog.h +++ b/ksim/monitors/snmp/proberesultdialog.h @@ -33,9 +33,10 @@ namespace Snmp class ProbeResultDialog : public ProbeResultDialogBase { Q_OBJECT + TQ_OBJECT public: ProbeResultDialog( const HostConfig &hostConfig, const ProbeDialog::ProbeResultList &probeResults, - TQWidget *parent, const char *name = 0 ); + TQWidget *tqparent, const char *name = 0 ); private: void addResultItem( const ProbeDialog::ProbeResult &result ); diff --git a/ksim/monitors/snmp/proberesultdialogbase.ui b/ksim/monitors/snmp/proberesultdialogbase.ui index 01b0c70..be32c72 100644 --- a/ksim/monitors/snmp/proberesultdialogbase.ui +++ b/ksim/monitors/snmp/proberesultdialogbase.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>KSim::Snmp::ProbeResultDialogBase</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>ProbeResultDialogBase</cstring> </property> @@ -22,7 +22,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>info</cstring> </property> @@ -60,7 +60,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout1</cstring> </property> @@ -84,14 +84,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -117,7 +117,7 @@ <slot>accept()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klistview.h</includehint> </includehints> diff --git a/ksim/monitors/snmp/session.cpp b/ksim/monitors/snmp/session.cpp index 6d63fab..07dc77e 100644 --- a/ksim/monitors/snmp/session.cpp +++ b/ksim/monitors/snmp/session.cpp @@ -54,7 +54,7 @@ Session::Session( const HostConfig &source ) d->source = source; - // unicode madness + // tqunicode madness d->host = source.name.ascii(); d->community = source.community.ascii(); d->securityName = source.securityName.ascii(); @@ -235,7 +235,7 @@ bool Session::snmpGet( const Identifier &identifier, Value &value, ErrorInfo *er if ( !snmpGet( ids, vars, error ) ) return false; - ValueMap::ConstIterator it = vars.find( identifier ); + ValueMap::ConstIterator it = vars.tqfind( identifier ); if ( it == vars.end() ) { if ( error ) *error = ErrorInfo( ErrorInfo::ErrMissingVariables ); diff --git a/ksim/monitors/snmp/snmp.cpp b/ksim/monitors/snmp/snmp.cpp index a050acb..d79c596 100644 --- a/ksim/monitors/snmp/snmp.cpp +++ b/ksim/monitors/snmp/snmp.cpp @@ -57,7 +57,7 @@ static TQStringList allStrings( const EnumStringMapInfo *array ) { TQStringList result; for ( uint i = 0; array[ i ].stringValue; ++i ) - result << TQString::fromLatin1( array[ i ].stringValue ); + result << TQString::tqfromLatin1( array[ i ].stringValue ); return result; } @@ -65,10 +65,10 @@ static TQString enumToString( const EnumStringMapInfo *array, int value ) { for ( uint i = 0; array[ i ].stringValue; ++i ) if ( array[ i ].enumValue == value ) - return TQString::fromLatin1( array[ i ].stringValue ); + return TQString::tqfromLatin1( array[ i ].stringValue ); assert( false ); - return TQString::null; + return TQString(); } static int stringToEnum( const EnumStringMapInfo *array, TQString string, bool *ok ) @@ -76,7 +76,7 @@ static int stringToEnum( const EnumStringMapInfo *array, TQString string, bool * string = string.lower(); uint i; for ( i = 0; array[ i ].stringValue; ++i ) - if ( TQString::fromLatin1( array[ i ].stringValue ).lower() == string ) { + if ( TQString::tqfromLatin1( array[ i ].stringValue ).lower() == string ) { if ( ok ) *ok = true; return array[ i ].enumValue; } @@ -291,11 +291,11 @@ int KSim::Snmp::sessionErrorCode( netsnmp_session &session ) static TQString messageForErrorCode( int errorCode ) { if ( errorCode >= SNMPERR_MAX && errorCode <= SNMPERR_GENERR ) - return TQString::fromLatin1( SnmpLib::self()->snmp_api_errstring( errorCode ) ); + return TQString::tqfromLatin1( SnmpLib::self()->snmp_api_errstring( errorCode ) ); if ( errorCode >= SNMP_ERR_NOERROR && errorCode <= MAX_SNMP_ERR ) - return TQString::fromLatin1( SnmpLib::self()->snmp_errstring( errorCode ) ); + return TQString::tqfromLatin1( SnmpLib::self()->snmp_errstring( errorCode ) ); - return TQString::null; + return TQString(); } ErrorInfo::ErrorInfo() diff --git a/ksim/monitors/snmp/value.cpp b/ksim/monitors/snmp/value.cpp index a244c59..2803aec 100644 --- a/ksim/monitors/snmp/value.cpp +++ b/ksim/monitors/snmp/value.cpp @@ -79,7 +79,7 @@ ValueImpl::ValueImpl( variable_list *var ) } case ASN_COUNTER64: { type = Value::Counter64; - ctr64 = ( ( ( Q_UINT64 )var->val.counter64->high ) << 32 ) | ( var->val.counter64->low ); + ctr64 = ( ( ( TQ_UINT64 )var->val.counter64->high ) << 32 ) | ( var->val.counter64->low ); break; } case ASN_TIMETICKS: { @@ -176,7 +176,7 @@ Value::Value( const TQHostAddress &address ) d->addr = address; } -Value::Value( Q_UINT64 counter ) +Value::Value( TQ_UINT64 counter ) { d = new ValueImpl; d->type = Counter64; @@ -273,7 +273,7 @@ int Value::toTimeTicks() const return toInt(); } -Q_UINT64 Value::toCounter64() const +TQ_UINT64 Value::toCounter64() const { assert( d->type == Counter64 ); return d->ctr64; @@ -294,13 +294,13 @@ TQString Value::toString( int conversionFlags ) const case Value::TimeTicks: return formatTimeTicks( toTimeTicks(), conversionFlags ); // not using i18n here, because it may be called from within a worker thread, and I'm // not sure it makes sense to translate it anyway - case Value::NoSuchObject: return TQString::fromLatin1( "No Such Object" ); - case Value::NoSuchInstance: return TQString::fromLatin1( "No Such Instance" ); - case Value::EndOfMIBView: return TQString::fromLatin1( "End Of MIB View" ); + case Value::NoSuchObject: return TQString::tqfromLatin1( "No Such Object" ); + case Value::NoSuchInstance: return TQString::tqfromLatin1( "No Such Instance" ); + case Value::EndOfMIBView: return TQString::tqfromLatin1( "End Of MIB View" ); case Value::Invalid: - case Value::Null: return TQString::null; + case Value::Null: return TQString(); } - return TQString::null; + return TQString(); } TQString Value::formatTimeTicks( int ticks, int conversionFlags ) @@ -321,7 +321,7 @@ TQString Value::formatTimeTicks( int ticks, int conversionFlags ) if ( days > 0 ) result += TQString::number( days ) + "d:"; - result += TQString::fromAscii( "%1h:%2m" ).arg( hours ).arg( minutes ); + result += TQString(TQString::fromAscii( "%1h:%2m" )).tqarg( hours ).tqarg( minutes ); if ( conversionFlags & TimeTicksWithSeconds ) result += ":" + TQString::number( seconds ) + "s"; diff --git a/ksim/monitors/snmp/value.h b/ksim/monitors/snmp/value.h index 5b2d6cd..d1461d8 100644 --- a/ksim/monitors/snmp/value.h +++ b/ksim/monitors/snmp/value.h @@ -68,7 +68,7 @@ public: Value( const TQByteArray &data ); Value( const Identifier &oid ); Value( const TQHostAddress &address ); - Value( Q_UINT64 counter ); + Value( TQ_UINT64 counter ); Value( const Value &rhs ); Value &operator=( const Value &rhs ); @@ -87,7 +87,7 @@ public: uint toCounter() const; uint toGauge() const; int toTimeTicks() const; - Q_UINT64 toCounter64() const; + TQ_UINT64 toCounter64() const; TQString toString( int conversionFlags = 0 ) const; diff --git a/ksim/monitors/snmp/value_p.h b/ksim/monitors/snmp/value_p.h index 000c32d..4ff2d8f 100644 --- a/ksim/monitors/snmp/value_p.h +++ b/ksim/monitors/snmp/value_p.h @@ -51,7 +51,7 @@ struct ValueImpl TQVariant data; Identifier oid; TQHostAddress addr; - Q_UINT64 ctr64; + TQ_UINT64 ctr64; }; } diff --git a/ksim/monitors/snmp/view.cpp b/ksim/monitors/snmp/view.cpp index 9515645..c6482ab 100644 --- a/ksim/monitors/snmp/view.cpp +++ b/ksim/monitors/snmp/view.cpp @@ -29,8 +29,8 @@ using namespace KSim::Snmp; -View::View( Plugin *parent, const char *name ) - : KSim::PluginView( parent, name ) +View::View( Plugin *tqparent, const char *name ) + : KSim::PluginView( tqparent, name ) { m_layout = new TQVBoxLayout( this ); diff --git a/ksim/monitors/snmp/view.h b/ksim/monitors/snmp/view.h index 01e29e3..af27e23 100644 --- a/ksim/monitors/snmp/view.h +++ b/ksim/monitors/snmp/view.h @@ -35,8 +35,9 @@ class Plugin; class View : public KSim::PluginView { Q_OBJECT + TQ_OBJECT public: - View( Plugin *parent, const char *name ); + View( Plugin *tqparent, const char *name ); ~View(); virtual void reparseConfig(); diff --git a/ksim/monitors/snmp/walker.cpp b/ksim/monitors/snmp/walker.cpp index 0aa6c0a..70af99d 100644 --- a/ksim/monitors/snmp/walker.cpp +++ b/ksim/monitors/snmp/walker.cpp @@ -38,8 +38,8 @@ namespace static const uint walkerRefresh = 0; -Walker::Walker( const HostConfig &host, const Identifier &startOid, TQObject *parent, const char *name ) - : TQObject( parent, name ), m_stop( false ), m_oid( startOid ), m_session( host ) +Walker::Walker( const HostConfig &host, const Identifier &startOid, TQObject *tqparent, const char *name ) + : TQObject( tqparent, name ), m_stop( false ), m_oid( startOid ), m_session( host ) { m_timerId = startTimer( walkerRefresh ); start(); diff --git a/ksim/monitors/snmp/walker.h b/ksim/monitors/snmp/walker.h index 3ff38b7..c9f8e52 100644 --- a/ksim/monitors/snmp/walker.h +++ b/ksim/monitors/snmp/walker.h @@ -33,11 +33,12 @@ namespace KSim namespace Snmp { -class Walker : public TQObject, public QThread +class Walker : public TQObject, public TQThread { Q_OBJECT + TQ_OBJECT public: - Walker( const HostConfig &host, const Identifier &startOid, TQObject *parent, const char *name = 0 ); + Walker( const HostConfig &host, const Identifier &startOid, TQObject *tqparent, const char *name = 0 ); virtual ~Walker(); struct Result |