summaryrefslogtreecommitdiffstats
path: root/ksim/monitors
diff options
context:
space:
mode:
Diffstat (limited to 'ksim/monitors')
-rw-r--r--ksim/monitors/cpu/ksimcpu.cpp112
-rw-r--r--ksim/monitors/cpu/ksimcpu.h40
-rw-r--r--ksim/monitors/disk/ksimdisk.cpp122
-rw-r--r--ksim/monitors/disk/ksimdisk.h40
-rw-r--r--ksim/monitors/filesystem/filesystemstats.cpp16
-rw-r--r--ksim/monitors/filesystem/filesystemstats.h14
-rw-r--r--ksim/monitors/filesystem/filesystemwidget.cpp68
-rw-r--r--ksim/monitors/filesystem/filesystemwidget.h28
-rw-r--r--ksim/monitors/filesystem/fsystemconfig.cpp66
-rw-r--r--ksim/monitors/filesystem/fsystemconfig.h12
-rw-r--r--ksim/monitors/filesystem/ksimfsystem.cpp32
-rw-r--r--ksim/monitors/filesystem/ksimfsystem.h6
-rw-r--r--ksim/monitors/i8k/ksimi8k.cpp40
-rw-r--r--ksim/monitors/i8k/ksimi8k.h10
-rw-r--r--ksim/monitors/lm_sensors/ksimsensors.cpp30
-rw-r--r--ksim/monitors/lm_sensors/ksimsensors.h8
-rw-r--r--ksim/monitors/lm_sensors/ksimsensorsiface.h4
-rw-r--r--ksim/monitors/lm_sensors/sensorbase.cpp70
-rw-r--r--ksim/monitors/lm_sensors/sensorbase.h56
-rw-r--r--ksim/monitors/lm_sensors/sensorsconfig.cpp102
-rw-r--r--ksim/monitors/lm_sensors/sensorsconfig.h16
-rw-r--r--ksim/monitors/mail/ksimmail.cpp22
-rw-r--r--ksim/monitors/mail/ksimmail.h10
-rw-r--r--ksim/monitors/net/ksimnet.cpp90
-rw-r--r--ksim/monitors/net/ksimnet.h18
-rw-r--r--ksim/monitors/net/netconfig.cpp60
-rw-r--r--ksim/monitors/net/netconfig.h22
-rw-r--r--ksim/monitors/net/netdevices.h30
-rw-r--r--ksim/monitors/net/netdialog.cpp126
-rw-r--r--ksim/monitors/net/netdialog.h50
-rw-r--r--ksim/monitors/snmp/browsedialog.cpp34
-rw-r--r--ksim/monitors/snmp/browsedialog.h12
-rw-r--r--ksim/monitors/snmp/chartmonitor.cpp4
-rw-r--r--ksim/monitors/snmp/chartmonitor.h2
-rw-r--r--ksim/monitors/snmp/configpage.cpp78
-rw-r--r--ksim/monitors/snmp/configpage.h24
-rw-r--r--ksim/monitors/snmp/hostconfig.cpp12
-rw-r--r--ksim/monitors/snmp/hostconfig.h22
-rw-r--r--ksim/monitors/snmp/hostdialog.cpp18
-rw-r--r--ksim/monitors/snmp/hostdialog.h8
-rw-r--r--ksim/monitors/snmp/identifier.cpp10
-rw-r--r--ksim/monitors/snmp/identifier.h14
-rw-r--r--ksim/monitors/snmp/labelmonitor.cpp6
-rw-r--r--ksim/monitors/snmp/labelmonitor.h2
-rw-r--r--ksim/monitors/snmp/monitor.cpp26
-rw-r--r--ksim/monitors/snmp/monitor.h10
-rw-r--r--ksim/monitors/snmp/monitorconfig.cpp34
-rw-r--r--ksim/monitors/snmp/monitorconfig.h26
-rw-r--r--ksim/monitors/snmp/monitordialog.cpp24
-rw-r--r--ksim/monitors/snmp/monitordialog.h4
-rw-r--r--ksim/monitors/snmp/probedialog.cpp20
-rw-r--r--ksim/monitors/snmp/probedialog.h8
-rw-r--r--ksim/monitors/snmp/proberesultdialog.cpp8
-rw-r--r--ksim/monitors/snmp/proberesultdialog.h2
-rw-r--r--ksim/monitors/snmp/session.cpp12
-rw-r--r--ksim/monitors/snmp/session.h2
-rw-r--r--ksim/monitors/snmp/snmp.cpp50
-rw-r--r--ksim/monitors/snmp/snmp.h30
-rw-r--r--ksim/monitors/snmp/snmplib.cpp4
-rw-r--r--ksim/monitors/snmp/snmplib.h12
-rw-r--r--ksim/monitors/snmp/value.cpp72
-rw-r--r--ksim/monitors/snmp/value.h14
-rw-r--r--ksim/monitors/snmp/value_p.h6
-rw-r--r--ksim/monitors/snmp/view.cpp10
-rw-r--r--ksim/monitors/snmp/view.h4
-rw-r--r--ksim/monitors/snmp/walker.cpp18
-rw-r--r--ksim/monitors/snmp/walker.h26
67 files changed, 994 insertions, 994 deletions
diff --git a/ksim/monitors/cpu/ksimcpu.cpp b/ksim/monitors/cpu/ksimcpu.cpp
index 9e6d089..441c1de 100644
--- a/ksim/monitors/cpu/ksimcpu.cpp
+++ b/ksim/monitors/cpu/ksimcpu.cpp
@@ -20,15 +20,15 @@
#include "ksimcpu.h"
#include "ksimcpu.moc"
-#include <qtextstream.h>
-#include <qregexp.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qfile.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qglobal.h>
-#include <qpushbutton.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqfile.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqglobal.h>
+#include <tqpushbutton.h>
#include <klistview.h>
#include <kdebug.h>
@@ -67,7 +67,7 @@
#endif
#endif
-#define CPU_NAME(cpu) "Cpu" + QString::number(cpu) + "_options"
+#define CPU_NAME(cpu) "Cpu" + TQString::number(cpu) + "_options"
#define CPU_SPEED 1000
KSIM_INIT_PLUGIN(CpuPlugin)
@@ -94,7 +94,7 @@ KSim::PluginPage *CpuPlugin::createConfigPage(const char *className)
void CpuPlugin::showAbout()
{
- QString version = kapp->aboutData()->version();
+ TQString version = kapp->aboutData()->version();
KAboutData aboutData(instanceName(),
I18N_NOOP("KSim CPU Plugin"), version.latin1(),
@@ -113,11 +113,11 @@ CpuView::CpuView(KSim::PluginObject *parent, const char *name)
#ifdef Q_OS_LINUX
m_procStream = 0L;
if ((m_procFile = fopen("/proc/stat", "r")))
- m_procStream = new QTextStream(m_procFile, IO_ReadOnly);
+ m_procStream = new TQTextStream(m_procFile, IO_ReadOnly);
#endif
- m_mainLayout = new QVBoxLayout(this);
- QSpacerItem *item = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Expanding);
+ m_mainLayout = new TQVBoxLayout(this);
+ TQSpacerItem *item = new TQSpacerItem(0, 0, TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_mainLayout->addItem(item);
m_firstTime = true;
@@ -125,8 +125,8 @@ CpuView::CpuView(KSim::PluginObject *parent, const char *name)
m_cpus = createList();
addDisplay();
- m_timer = new QTimer(this);
- connect(m_timer, SIGNAL(timeout()), SLOT(updateView()));
+ m_timer = new TQTimer(this);
+ connect(m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(updateView()));
m_timer->start(CPU_SPEED);
updateView();
}
@@ -168,7 +168,7 @@ void CpuView::updateView()
CpuData cpuData;
updateCpu(cpuData, current.number());
- QString text = current.format();
+ TQString text = current.format();
current.setData(cpuData);
cpuData -= current.oldData();
int cpuDiff = 0;
@@ -216,22 +216,22 @@ void CpuView::updateCpu(CpuData &cpu, int cpuNumber)
return;
bool cpuFound = false;
- QString output;
- QString parser;
- QString cpuString;
+ TQString output;
+ TQString parser;
+ TQString cpuString;
cpuString.setNum(cpuNumber).prepend("cpu");
// Parse the proc file
while (!m_procStream->atEnd()) {
parser = m_procStream->readLine();
// remove all the entries apart from the line containing 'cpuString'
- if (!cpuFound && parser.find(QRegExp(cpuString)) != -1) {
+ if (!cpuFound && parser.find(TQRegExp(cpuString)) != -1) {
output = parser;
cpuFound = true;
}
}
- QStringList cpuList = QStringList::split(' ', output);
+ TQStringList cpuList = TQStringList::split(' ', output);
if (!cpuList.isEmpty()) {
cpu.name = cpuList[0].stripWhiteSpace();
@@ -308,8 +308,8 @@ CpuView::CpuList CpuView::createList()
CpuList list;
int number = 0;
- QStringList cpus = config()->readListEntry("Cpus");
- QStringList::ConstIterator it;
+ TQStringList cpus = config()->readListEntry("Cpus");
+ TQStringList::ConstIterator it;
for (it = cpus.begin(); it != cpus.end(); ++it) {
list.append(Cpu((*it), config()->readEntry(CPU_NAME(number),
"%T"), number));
@@ -364,63 +364,63 @@ KSim::Progress *CpuView::addLabel()
CpuConfig::CpuConfig(KSim::PluginObject *parent, const char *name)
: KSim::PluginPage(parent, name)
{
- QVBoxLayout * mainLayout = new QVBoxLayout( this );
+ TQVBoxLayout * mainLayout = new TQVBoxLayout( this );
mainLayout->setSpacing( 6 );
m_listView = new KListView(this);
m_listView->addColumn(i18n("Available CPUs"));
m_listView->addColumn(i18n("Chart Format"));
m_listView->setAllColumnsShowFocus(true);
- m_listView->setSelectionMode(QListView::Single);
- connect( m_listView, SIGNAL( doubleClicked( QListViewItem * ) ),
- SLOT( modify( QListViewItem * ) ) );
+ m_listView->setSelectionMode(TQListView::Single);
+ connect( m_listView, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ),
+ TQT_SLOT( modify( TQListViewItem * ) ) );
mainLayout->addWidget( m_listView );
- QHBoxLayout * layout = new QHBoxLayout;
+ TQHBoxLayout * layout = new QHBoxLayout;
layout->setSpacing( 6 );
- QSpacerItem * spacer = new QSpacerItem( 20, 20,
- QSizePolicy::Expanding, QSizePolicy::Minimum );
+ TQSpacerItem * spacer = new TQSpacerItem( 20, 20,
+ TQSizePolicy::Expanding, TQSizePolicy::Minimum );
layout->addItem(spacer);
- m_modify = new QPushButton( this );
+ m_modify = new TQPushButton( this );
m_modify->setText( i18n( "Modify..." ) );
- connect( m_modify, SIGNAL( clicked() ), SLOT( modify() ) );
+ connect( m_modify, TQT_SIGNAL( clicked() ), TQT_SLOT( modify() ) );
layout->addWidget( m_modify );
mainLayout->addLayout( layout );
- m_legendBox = new QGroupBox(this);
+ 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_legendLayout = new QVBoxLayout(m_legendBox->layout());
+ m_legendLayout = new TQVBoxLayout(m_legendBox->layout());
m_legendLayout->setAlignment(Qt::AlignTop);
m_legendLayout->setSpacing(6);
m_legendLayout->setMargin(11);
- m_totalNiceLabel = new QLabel(i18n("%T - Total CPU time (sys + user + nice)"), m_legendBox);
+ m_totalNiceLabel = new TQLabel(i18n("%T - Total CPU time (sys + user + nice)"), m_legendBox);
m_legendLayout->addWidget(m_totalNiceLabel);
- m_totalLabel = new QLabel(i18n("%t - Total CPU time (sys + user)"), m_legendBox);
+ m_totalLabel = new TQLabel(i18n("%t - Total CPU time (sys + user)"), m_legendBox);
m_legendLayout->addWidget(m_totalLabel);
- m_sysLabel = new QLabel(i18n("%s - Total sys time"), m_legendBox);
+ m_sysLabel = new TQLabel(i18n("%s - Total sys time"), m_legendBox);
m_legendLayout->addWidget(m_sysLabel);
- m_userLabel = new QLabel(i18n("%u - Total user time"), m_legendBox);
+ m_userLabel = new TQLabel(i18n("%u - Total user time"), m_legendBox);
m_legendLayout->addWidget(m_userLabel);
- m_niceLabel = new QLabel(i18n("%n - Total nice time"), m_legendBox);
+ m_niceLabel = new TQLabel(i18n("%n - Total nice time"), m_legendBox);
m_legendLayout->addWidget(m_niceLabel);
mainLayout->addWidget( m_legendBox );
for (uint i = 0; i < addCpus(); ++i)
{
- QCheckListItem *item = new QCheckListItem(m_listView, i18n("cpu %1").arg(i), QCheckListItem::CheckBox);
+ TQCheckListItem *item = new TQCheckListItem(m_listView, i18n("cpu %1").arg(i), TQCheckListItem::CheckBox);
item->setText(1, "%T");
}
}
@@ -432,13 +432,13 @@ CpuConfig::~CpuConfig()
void CpuConfig::readConfig()
{
config()->setGroup("CpuPlugin");
- QStringList enabledCpus(config()->readListEntry("Cpus"));
+ TQStringList enabledCpus(config()->readListEntry("Cpus"));
int cpuNum = 0;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = enabledCpus.begin(); it != enabledCpus.end(); ++it) {
- if (QCheckListItem *item =
- static_cast<QCheckListItem *>(m_listView->findItem((*it), 0))) {
+ if (TQCheckListItem *item =
+ static_cast<TQCheckListItem *>(m_listView->findItem((*it), 0))) {
item->setOn(true);
item->setText(1, config()->readEntry(CPU_NAME(cpuNum), "%T"));
}
@@ -451,10 +451,10 @@ void CpuConfig::saveConfig()
config()->setGroup("CpuPlugin");
int cpuNum = 0;
- QStringList enabledCpus;
- for (QListViewItemIterator it(m_listView); it.current(); ++it) {
+ TQStringList enabledCpus;
+ for (TQListViewItemIterator it(m_listView); it.current(); ++it) {
config()->writeEntry(CPU_NAME(cpuNum), it.current()->text(1));
- if (static_cast<QCheckListItem *>(it.current())->isOn())
+ if (static_cast<TQCheckListItem *>(it.current())->isOn())
enabledCpus.append(it.current()->text(0));
++cpuNum;
}
@@ -465,18 +465,18 @@ void CpuConfig::saveConfig()
uint CpuConfig::addCpus()
{
#ifdef Q_OS_LINUX
- QStringList output;
- QString parser;
- QFile file("/proc/stat");
+ TQStringList output;
+ TQString parser;
+ TQFile file("/proc/stat");
if (!file.open(IO_ReadOnly))
return 0;
// Parse the proc file
- QTextStream procStream(&file);
+ TQTextStream procStream(&file);
while (!procStream.atEnd()) {
parser = procStream.readLine();
- if (QRegExp("cpu").search(parser, 0) != -1
- && QRegExp("cpu0").search(parser, 0) == -1) {
+ if (TQRegExp("cpu").search(parser, 0) != -1
+ && TQRegExp("cpu0").search(parser, 0) == -1) {
output.append(parser);
}
}
@@ -495,13 +495,13 @@ uint CpuConfig::addCpus()
#endif
}
-void CpuConfig::modify( QListViewItem * item )
+void CpuConfig::modify( TQListViewItem * item )
{
if ( !item )
return;
bool ok = false;
- QString text = KInputDialog::getText( i18n( "Modify CPU Format" ), i18n( "Chart format:" ),
+ TQString text = KInputDialog::getText( i18n( "Modify CPU Format" ), i18n( "Chart format:" ),
item->text( 1 ), &ok, this );
if ( ok )
diff --git a/ksim/monitors/cpu/ksimcpu.h b/ksim/monitors/cpu/ksimcpu.h
index b129ec0..03914b7 100644
--- a/ksim/monitors/cpu/ksimcpu.h
+++ b/ksim/monitors/cpu/ksimcpu.h
@@ -67,7 +67,7 @@ class CpuView : public KSim::PluginView
public:
CpuData() { user = nice = sys = idle = 0; }
- QString name;
+ TQString name;
unsigned long user;
unsigned long nice;
unsigned long sys;
@@ -96,8 +96,8 @@ class CpuView : public KSim::PluginView
m_label = 0;
}
- Cpu(const QString &name,
- const QString &format,
+ Cpu(const TQString &name,
+ const TQString &format,
int number)
: m_name(name),
m_format(format),
@@ -139,7 +139,7 @@ class CpuView : public KSim::PluginView
return m_old;
}
- const QString &format() const
+ const TQString &format() const
{
return m_format;
}
@@ -169,14 +169,14 @@ class CpuView : public KSim::PluginView
private:
CpuData m_data;
CpuData m_old;
- QString m_name;
- QString m_format;
+ TQString m_name;
+ TQString m_format;
KSim::Chart *m_chart;
KSim::Progress *m_label;
int m_num;
};
- typedef QValueList<Cpu> CpuList;
+ typedef TQValueList<Cpu> CpuList;
void updateCpu(CpuData &cpu, int cpuNumber);
CpuList createList();
@@ -186,14 +186,14 @@ class CpuView : public KSim::PluginView
KSim::Chart *addChart();
KSim::Progress *addLabel();
- QTimer *m_timer;
- QVBoxLayout *m_mainLayout;
+ TQTimer *m_timer;
+ TQVBoxLayout *m_mainLayout;
bool m_firstTime;
CpuList m_cpus;
#ifdef __linux__
FILE *m_procFile;
- QTextStream *m_procStream;
+ TQTextStream *m_procStream;
#endif
};
@@ -208,21 +208,21 @@ class CpuConfig : public KSim::PluginPage
virtual void readConfig();
private slots:
- void modify( QListViewItem * );
+ void modify( TQListViewItem * );
void modify();
private:
uint addCpus();
KListView *m_listView;
- QGroupBox *m_legendBox;
- QLabel *m_totalNiceLabel;
- QLabel *m_totalLabel;
- QLabel *m_sysLabel;
- QLabel *m_userLabel;
- QLabel *m_niceLabel;
- QVBoxLayout *m_legendLayout;
-
- QPushButton * m_modify;
+ TQGroupBox *m_legendBox;
+ TQLabel *m_totalNiceLabel;
+ TQLabel *m_totalLabel;
+ TQLabel *m_sysLabel;
+ TQLabel *m_userLabel;
+ TQLabel *m_niceLabel;
+ TQVBoxLayout *m_legendLayout;
+
+ TQPushButton * m_modify;
};
#endif
diff --git a/ksim/monitors/disk/ksimdisk.cpp b/ksim/monitors/disk/ksimdisk.cpp
index 2fe3560..5be9b80 100644
--- a/ksim/monitors/disk/ksimdisk.cpp
+++ b/ksim/monitors/disk/ksimdisk.cpp
@@ -20,13 +20,13 @@
#include "ksimdisk.h"
#include "ksimdisk.moc"
-#include <qtextstream.h>
-#include <qregexp.h>
-#include <qtimer.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qvbuttongroup.h>
-#include <qpushbutton.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqvbuttongroup.h>
+#include <tqpushbutton.h>
#include <kdebug.h>
#include <kaboutapplication.h>
@@ -90,7 +90,7 @@ KSim::PluginPage *DiskPlugin::createConfigPage(const char *className)
void DiskPlugin::showAbout()
{
- QString version = kapp->aboutData()->version();
+ TQString version = kapp->aboutData()->version();
KAboutData aboutData(instanceName(),
I18N_NOOP("KSim Disk Plugin"), version.latin1(),
@@ -110,23 +110,23 @@ DiskView::DiskView(KSim::PluginObject *parent, const char *name)
m_bLinux24 = true;
m_procStream = 0L;
if ((m_procFile = fopen("/proc/stat", "r")))
- m_procStream = new QTextStream(m_procFile, IO_ReadOnly);
+ m_procStream = new TQTextStream(m_procFile, IO_ReadOnly);
#endif
config()->setGroup("DiskPlugin");
- m_list = config()->readListEntry("Disks", QStringList() << "complete");
+ m_list = config()->readListEntry("Disks", TQStringList() << "complete");
m_useSeperatly = config()->readBoolEntry("UseSeperatly", true);
m_firstTime = 1;
m_addAll = false;
- m_layout = new QVBoxLayout(this);
- QSpacerItem *item = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Expanding);
+ m_layout = new TQVBoxLayout(this);
+ TQSpacerItem *item = new TQSpacerItem(0, 0, TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_layout->addItem(item);
init();
- m_timer = new QTimer(this);
- connect(m_timer, SIGNAL(timeout()), SLOT(updateDisplay()));
+ m_timer = new TQTimer(this);
+ connect(m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(updateDisplay()));
m_timer->start(DISK_SPEED);
updateDisplay();
}
@@ -144,7 +144,7 @@ DiskView::~DiskView()
void DiskView::reparseConfig()
{
config()->setGroup("DiskPlugin");
- QStringList list = config()->readListEntry("Disks", QStringList() << "complete");
+ TQStringList list = config()->readListEntry("Disks", TQStringList() << "complete");
m_useSeperatly = config()->readBoolEntry("UseSeperatly", true);
if (list != m_list) {
@@ -152,7 +152,7 @@ void DiskView::reparseConfig()
m_timer->stop();
cleanup();
- QPtrListIterator<DiskPair> it(m_diskList);
+ TQPtrListIterator<DiskPair> it(m_diskList);
for (; it.current(); ++it) {
delete it.current()->first;
delete it.current()->second;
@@ -165,7 +165,7 @@ void DiskView::reparseConfig()
}
}
-DiskView::DiskData DiskView::findDiskData(const DiskList& diskList, QString diskName)
+DiskView::DiskData DiskView::findDiskData(const DiskList& diskList, TQString diskName)
{
if (diskName == "complete")
diskName = i18n("All Disks");
@@ -203,7 +203,7 @@ void DiskView::updateDisplay()
}
// merge all the disks into one
- QPtrListIterator<DiskPair> it(m_diskList);
+ TQPtrListIterator<DiskPair> it(m_diskList);
for (int i = 0; it.current(); ++it, ++i) {
DiskData diskData = findDiskData(diskList, m_list[i]);
m_data[i].second = m_data[i].first;
@@ -246,8 +246,8 @@ void DiskView::updateData(DiskList &disks)
{
// here we need a regexp to match something like:
// (3,0):(108911,48080,1713380,60831,1102644)
- QRegExp regexp("\\([0-9]+,[0-9]+\\):\\([0-9]+,[0-9]+,[0-9]+,[0-9]+,[0-9]+\\)");
- QString content = m_procStream->read();
+ 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)
{
m_bLinux24 = false;
@@ -257,7 +257,7 @@ void DiskView::updateData(DiskList &disks)
fclose(m_procFile);
if ((m_procFile = fopen("/proc/diskstats", "r")))
- m_procStream = new QTextStream(m_procFile, IO_ReadOnly);
+ m_procStream = new TQTextStream(m_procFile, IO_ReadOnly);
updateData(disks);
return;
@@ -266,11 +266,11 @@ void DiskView::updateData(DiskList &disks)
while ((idx = regexp.search(content, idx)) != -1)
{
idx += regexp.matchedLength();
- QString diskStr = regexp.cap(0);
+ TQString diskStr = regexp.cap(0);
diskStr.replace(':', ',');
- diskStr.replace(QRegExp("\\)?\\(?"), QString::null);
+ diskStr.replace(TQRegExp("\\)?\\(?"), TQString::null);
- QStringList list = QStringList::split(',', diskStr);
+ TQStringList list = TQStringList::split(',', diskStr);
if (list.count() < 7)
continue;
@@ -322,14 +322,14 @@ void DiskView::updateData(DiskList &disks)
// (field 9) times the number of milliseconds spent doing I/O since the
// last update of this field. This can provide an easy measure of both
// I/O completion time and the backlog that may be accumulating.
- QString content = m_procStream->read();
- QStringList lines = QStringList::split('\n', content);
+ TQString content = m_procStream->read();
+ TQStringList lines = TQStringList::split('\n', content);
- for(QStringList::ConstIterator it = lines.begin();
+ for(TQStringList::ConstIterator it = lines.begin();
it != lines.end(); ++it)
{
- QString diskStr = (*it).simplifyWhiteSpace();
- QStringList list = QStringList::split(' ', diskStr);
+ TQString diskStr = (*it).simplifyWhiteSpace();
+ TQStringList list = TQStringList::split(' ', diskStr);
if (list.count() < 14)
continue;
@@ -391,7 +391,7 @@ void DiskView::updateData(DiskList &disks)
DiskData diskData;
diskData.name = device.device_name
- + QString::number(device.unit_number);
+ + TQString::number(device.unit_number);
diskData.major = device.device_number;
diskData.minor = 0;
diskData.total = readBlocks + writeBlocks;
@@ -407,26 +407,26 @@ void DiskView::updateData(DiskList &disks)
#endif
}
-QString DiskView::diskName( int major, int minor ) const
+TQString DiskView::diskName( int major, int minor ) const
{
#ifdef Q_OS_LINUX
- QString returnValue;
+ TQString returnValue;
switch ( major )
{
case IDE0_MAJOR:
- returnValue.prepend(QString::fromLatin1("hda"));
+ returnValue.prepend(TQString::fromLatin1("hda"));
break;
case IDE1_MAJOR:
- returnValue.prepend(QString::fromLatin1("hdc"));
+ returnValue.prepend(TQString::fromLatin1("hdc"));
break;
case IDE3_MAJOR:
- returnValue.prepend(QString::fromLatin1("hde"));
+ returnValue.prepend(TQString::fromLatin1("hde"));
break;
case SCSI_DISK0_MAJOR:
- returnValue.prepend(QString::fromLatin1("sda"));
+ returnValue.prepend(TQString::fromLatin1("sda"));
break;
case SCSI_GENERIC_MAJOR:
- returnValue.prepend(QString::fromLatin1("sg0"));
+ returnValue.prepend(TQString::fromLatin1("sg0"));
break;
}
@@ -457,7 +457,7 @@ void DiskView::init()
{
m_data.resize(m_list.size());
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = m_list.begin(); it != m_list.end(); ++it) {
if ((*it) == "complete")
m_addAll = true;
@@ -475,42 +475,42 @@ void DiskView::cleanup()
DiskConfig::DiskConfig(KSim::PluginObject *parent, const char *name)
: KSim::PluginPage(parent, name)
{
- m_layout = new QVBoxLayout(this);
+ m_layout = new TQVBoxLayout(this);
m_layout->setSpacing(6);
m_listview = new KListView(this);
m_listview->addColumn(i18n("Disks"));
m_layout->addWidget(m_listview);
- QHBoxLayout *layout = new QHBoxLayout;
+ TQHBoxLayout *layout = new QHBoxLayout;
layout->setSpacing(6);
- QSpacerItem *spacer = new QSpacerItem(20, 20,
- QSizePolicy::Expanding, QSizePolicy::Minimum);
+ TQSpacerItem *spacer = new TQSpacerItem(20, 20,
+ TQSizePolicy::Expanding, TQSizePolicy::Minimum);
layout->addItem(spacer);
- m_add = new QPushButton(this);
+ m_add = new TQPushButton(this);
m_add->setText(i18n("Add..."));
- connect(m_add, SIGNAL(clicked()), SLOT(addItem()));
+ connect(m_add, TQT_SIGNAL(clicked()), TQT_SLOT(addItem()));
layout->addWidget(m_add);
- m_remove = new QPushButton(this);
+ m_remove = new TQPushButton(this);
m_remove->setText(i18n("Remove"));
- connect(m_remove, SIGNAL(clicked()), SLOT(removeItem()));
+ connect(m_remove, TQT_SIGNAL(clicked()), TQT_SLOT(removeItem()));
layout->addWidget(m_remove);
m_layout->addLayout(layout);
- m_buttonBox = new QVButtonGroup(i18n("Disk Styles"), this);
+ m_buttonBox = new TQVButtonGroup(i18n("Disk Styles"), this);
m_layout->addWidget(m_buttonBox);
- m_totalButton = new QRadioButton(m_buttonBox);
+ m_totalButton = new TQRadioButton(m_buttonBox);
m_totalButton->setText(i18n("Display the read and write data as one"));
- m_bothButton = new QRadioButton(m_buttonBox);
+ m_bothButton = new TQRadioButton(m_buttonBox);
m_bothButton->setText(i18n("Display the read and write data"
"\nseparately as in/out data"));
- QSpacerItem *vSpacer = new QSpacerItem(20, 20,
- QSizePolicy::Minimum, QSizePolicy::Expanding);
+ TQSpacerItem *vSpacer = new TQSpacerItem(20, 20,
+ TQSizePolicy::Minimum, TQSizePolicy::Expanding);
m_layout->addItem(vSpacer);
}
@@ -522,20 +522,20 @@ void DiskConfig::readConfig()
{
config()->setGroup("DiskPlugin");
m_buttonBox->setButton(config()->readBoolEntry("UseSeperatly", true));
- QStringList list = config()->readListEntry("Disks");
+ TQStringList list = config()->readListEntry("Disks");
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = list.begin(); it != list.end(); ++it) {
- QString text = ((*it) == "complete" ? i18n("All Disks") : (*it));
+ TQString text = ((*it) == "complete" ? i18n("All Disks") : (*it));
if (!m_listview->findItem(text, 0))
- new QListViewItem(m_listview, text);
+ new TQListViewItem(m_listview, text);
}
}
void DiskConfig::saveConfig()
{
- QStringList list;
- for (QListViewItemIterator it(m_listview); it.current(); ++it) {
+ TQStringList list;
+ for (TQListViewItemIterator it(m_listview); it.current(); ++it) {
if (it.current()->text(0) == i18n("All Disks"))
list.append("complete");
else
@@ -550,14 +550,14 @@ void DiskConfig::saveConfig()
void DiskConfig::addItem()
{
bool ok = false;
- QString text = KInputDialog::getText(i18n("Add Disk Device"), i18n("Disk name:"),
- QString::null, &ok, this);
+ TQString text = KInputDialog::getText(i18n("Add Disk Device"), i18n("Disk name:"),
+ TQString::null, &ok, this);
if (text.startsWith("/dev/"))
text = text.mid(5);
if (ok)
- new QListViewItem(m_listview, text);
+ new TQListViewItem(m_listview, text);
}
void DiskConfig::removeItem()
@@ -565,6 +565,6 @@ void DiskConfig::removeItem()
if (!m_listview->selectedItem())
return;
- QListViewItem *item = m_listview->selectedItem();
+ TQListViewItem *item = m_listview->selectedItem();
delete item;
}
diff --git a/ksim/monitors/disk/ksimdisk.h b/ksim/monitors/disk/ksimdisk.h
index de4c8ba..e336448 100644
--- a/ksim/monitors/disk/ksimdisk.h
+++ b/ksim/monitors/disk/ksimdisk.h
@@ -20,12 +20,12 @@
#ifndef KSIMDISK_H
#define KSIMDISK_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <pluginmodule.h>
#include <stdio.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qvaluevector.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
+#include <tqvaluevector.h>
class QTextStream;
class QTimer;
@@ -94,7 +94,7 @@ class DiskView : public KSim::PluginView
return *this;
}
- QString name;
+ TQString name;
int major;
int minor;
unsigned long total;
@@ -104,27 +104,27 @@ class DiskView : public KSim::PluginView
unsigned long writeBlocks;
};
- typedef QValueList<DiskData> DiskList;
+ typedef TQValueList<DiskData> DiskList;
typedef QPair<KSim::Chart *, KSim::Progress *> DiskPair;
void updateData(DiskList &disks);
- QString diskName( int, int ) const;
+ TQString diskName( int, int ) const;
DiskPair *addDisk();
- DiskData findDiskData(const DiskList& diskList, QString diskName);
+ DiskData findDiskData(const DiskList& diskList, TQString diskName);
void init();
void cleanup();
- QValueVector<QPair<DiskData, DiskData> > m_data;
- QTimer *m_timer;
+ TQValueVector<QPair<DiskData, DiskData> > m_data;
+ TQTimer *m_timer;
bool m_bLinux24;
FILE *m_procFile;
- QTextStream *m_procStream;
- QVBoxLayout *m_layout;
- QPtrList<DiskPair> m_diskList;
+ TQTextStream *m_procStream;
+ TQVBoxLayout *m_layout;
+ TQPtrList<DiskPair> m_diskList;
int m_firstTime;
bool m_useSeperatly;
- QStringList m_list;
+ TQStringList m_list;
bool m_addAll;
};
@@ -143,12 +143,12 @@ class DiskConfig : public KSim::PluginPage
void removeItem();
private:
- QVBoxLayout *m_layout;
+ TQVBoxLayout *m_layout;
KListView *m_listview;
- QPushButton *m_add;
- QPushButton *m_remove;
- QVButtonGroup *m_buttonBox;
- QRadioButton *m_totalButton;
- QRadioButton *m_bothButton;
+ TQPushButton *m_add;
+ TQPushButton *m_remove;
+ TQVButtonGroup *m_buttonBox;
+ TQRadioButton *m_totalButton;
+ TQRadioButton *m_bothButton;
};
#endif
diff --git a/ksim/monitors/filesystem/filesystemstats.cpp b/ksim/monitors/filesystem/filesystemstats.cpp
index eeb5c62..1aa156d 100644
--- a/ksim/monitors/filesystem/filesystemstats.cpp
+++ b/ksim/monitors/filesystem/filesystemstats.cpp
@@ -19,9 +19,9 @@
#include "filesystemstats.h"
-#include <qglobal.h>
-#include <qfile.h>
-#include <qstringlist.h>
+#include <tqglobal.h>
+#include <tqfile.h>
+#include <tqstringlist.h>
#include <kdebug.h>
@@ -184,16 +184,16 @@ FilesystemStats::List FilesystemStats::readEntries()
#endif
#ifdef USE_FAILSAFE
- QFile file( QString::fromLatin1( _PATH_MOUNTED ) );
+ TQFile file( TQString::fromLatin1( _PATH_MOUNTED ) );
if ( !file.open( IO_ReadOnly ) )
return list;
- QTextStream stream( &file );
+ TQTextStream stream( &file );
while ( !stream.atEnd() )
{
- QStringList line = QStringList::split( " ", stream.readLine() );
+ TQStringList line = TQStringList::split( " ", stream.readLine() );
Entry entry;
entry.dir = line[1].stripWhiteSpace();
@@ -206,10 +206,10 @@ FilesystemStats::List FilesystemStats::readEntries()
return list;
}
-bool FilesystemStats::readStats( const QString & mntPoint, int & totalBlocks, int & freeBlocks )
+bool FilesystemStats::readStats( const TQString & mntPoint, int & totalBlocks, int & freeBlocks )
{
ksim_statfs sysStats;
- if ( fsystemStats( QFile::encodeName( mntPoint ).data(), sysStats ) < 0 )
+ if ( fsystemStats( TQFile::encodeName( mntPoint ).data(), sysStats ) < 0 )
{
kdError() << "While reading filesystem information for " << mntPoint << endl;
totalBlocks = 0;
diff --git a/ksim/monitors/filesystem/filesystemstats.h b/ksim/monitors/filesystem/filesystemstats.h
index 3ea8f74..51f2f7b 100644
--- a/ksim/monitors/filesystem/filesystemstats.h
+++ b/ksim/monitors/filesystem/filesystemstats.h
@@ -20,21 +20,21 @@
#ifndef FILESYSTEMSTATS_H
#define FILESYSTEMSTATS_H
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
namespace FilesystemStats
{
struct Entry
{
- QString dir;
- QString fsname;
- QString type;
+ TQString dir;
+ TQString fsname;
+ TQString type;
};
- typedef QValueList<Entry> List;
+ typedef TQValueList<Entry> List;
List readEntries();
- bool readStats( const QString &, int &, int & );
+ bool readStats( const TQString &, int &, int & );
}
#endif
diff --git a/ksim/monitors/filesystem/filesystemwidget.cpp b/ksim/monitors/filesystem/filesystemwidget.cpp
index 0428ee3..aca7694 100644
--- a/ksim/monitors/filesystem/filesystemwidget.cpp
+++ b/ksim/monitors/filesystem/filesystemwidget.cpp
@@ -21,10 +21,10 @@
#include <pluginmodule.h>
-#include <qlayout.h>
-#include <qpopupmenu.h>
-#include <qregexp.h>
-#include <qcursor.h>
+#include <tqlayout.h>
+#include <tqpopupmenu.h>
+#include <tqregexp.h>
+#include <tqcursor.h>
#include <kprocess.h>
#include <kmessagebox.h>
@@ -38,7 +38,7 @@ FilesystemWidget::Filesystem::Filesystem()
}
FilesystemWidget::Filesystem::Filesystem(KSim::Progress *display,
- const QString &point)
+ const TQString &point)
{
m_display = display;
m_mountPoint = point;
@@ -54,12 +54,12 @@ KSim::Progress *FilesystemWidget::Filesystem::display() const
return m_display;
}
-const QString &FilesystemWidget::Filesystem::mountPoint() const
+const TQString &FilesystemWidget::Filesystem::mountPoint() const
{
return m_mountPoint;
}
-const QString &FilesystemWidget::Filesystem::text() const
+const TQString &FilesystemWidget::Filesystem::text() const
{
return m_display->text();
}
@@ -69,7 +69,7 @@ int FilesystemWidget::Filesystem::value() const
return m_display->value();
}
-void FilesystemWidget::Filesystem::setText(const QString &text)
+void FilesystemWidget::Filesystem::setText(const TQString &text)
{
if (!m_display)
return;
@@ -85,11 +85,11 @@ void FilesystemWidget::Filesystem::setValue(int value)
m_display->setValue(value);
}
-FilesystemWidget::FilesystemWidget(QWidget *parent, const char *name)
- : QWidget(parent, name)
+FilesystemWidget::FilesystemWidget(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
m_list.setAutoDelete(true);
- m_layout = new QVBoxLayout(this);
+ m_layout = new TQVBoxLayout(this);
m_process = 0;
}
@@ -98,7 +98,7 @@ FilesystemWidget::~FilesystemWidget()
delete m_process;
}
-void FilesystemWidget::append(int max, const QString &mountPoint)
+void FilesystemWidget::append(int max, const TQString &mountPoint)
{
KSim::Progress *progress = new KSim::Progress(max, this);
progress->installEventFilter(this);
@@ -108,7 +108,7 @@ void FilesystemWidget::append(int max, const QString &mountPoint)
m_list.append(new Filesystem(progress, mountPoint));
}
-void FilesystemWidget::setText(uint id, const QString &text)
+void FilesystemWidget::setText(uint id, const TQString &text)
{
if (id > m_list.count())
return;
@@ -129,14 +129,14 @@ void FilesystemWidget::clear()
m_list.clear();
}
-bool FilesystemWidget::eventFilter(QObject *o, QEvent *e)
+bool FilesystemWidget::eventFilter(TQObject *o, TQEvent *e)
{
if (!o->isA("KSim::Progress"))
- return QWidget::eventFilter(o, e);
+ return TQWidget::eventFilter(o, e);
KSim::Progress *progressBar = 0;
int i = 0;
- QPtrListIterator<Filesystem> it(m_list);
+ TQPtrListIterator<Filesystem> it(m_list);
Filesystem *filesystem;
while ((filesystem = it.current()) != 0) {
++it;
@@ -149,15 +149,15 @@ bool FilesystemWidget::eventFilter(QObject *o, QEvent *e)
++i;
}
- if (o == progressBar && e->type() == QEvent::MouseButtonPress)
+ if (o == progressBar && e->type() == TQEvent::MouseButtonPress)
{
- switch(static_cast<QMouseEvent *>(e)->button()) {
- case QMouseEvent::RightButton:
+ switch(static_cast<TQMouseEvent *>(e)->button()) {
+ case TQMouseEvent::RightButton:
showMenu(i);
break;
default:
break;
- case QMouseEvent::LeftButton:
+ case TQMouseEvent::LeftButton:
if (parentWidget()->inherits("KSim::PluginView"))
static_cast<KSim::PluginView *>(parentWidget())->doCommand();
break;
@@ -166,7 +166,7 @@ bool FilesystemWidget::eventFilter(QObject *o, QEvent *e)
return true;
}
- return QWidget::eventFilter(o, e);
+ return TQWidget::eventFilter(o, e);
}
void FilesystemWidget::receivedStderr(KProcess *, char *buffer, int length)
@@ -183,28 +183,28 @@ void FilesystemWidget::processExited(KProcess *)
if (m_stderrString.isEmpty())
return;
- QStringList errorList = QStringList::split("\n", m_stderrString);
- QString message = i18n("<qt>The following errors occurred:<ul>");
+ TQStringList errorList = TQStringList::split("\n", m_stderrString);
+ TQString message = i18n("<qt>The following errors occurred:<ul>");
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for (it = errorList.begin(); it != errorList.end(); ++it) {
- message += QString::fromLatin1("<li>%1</li>")
- .arg((*it).replace(QRegExp("[u]?mount: "), QString::null));
+ message += TQString::fromLatin1("<li>%1</li>")
+ .arg((*it).replace(TQRegExp("[u]?mount: "), TQString::null));
}
- message += QString::fromLatin1("</ul></qt>");
+ message += TQString::fromLatin1("</ul></qt>");
KMessageBox::sorry(0, message);
}
-void FilesystemWidget::createProcess(const QString &command, const QString &point)
+void FilesystemWidget::createProcess(const TQString &command, const TQString &point)
{
m_process = new KProcess();
connect(m_process,
- SIGNAL(receivedStderr(KProcess *, char *, int)),
- SLOT(receivedStderr(KProcess *, char *, int)));
+ TQT_SIGNAL(receivedStderr(KProcess *, char *, int)),
+ TQT_SLOT(receivedStderr(KProcess *, char *, int)));
connect(m_process,
- SIGNAL(processExited(KProcess *)),
- SLOT(processExited(KProcess *)));
+ TQT_SIGNAL(processExited(KProcess *)),
+ TQT_SLOT(processExited(KProcess *)));
(*m_process) << command << point;
void(m_process->start(KProcess::NotifyOnExit, KProcess::Stderr));
@@ -215,11 +215,11 @@ void FilesystemWidget::showMenu(uint id)
if (id > m_list.count())
return;
- QPopupMenu menu;
+ TQPopupMenu menu;
menu.insertItem(SmallIcon("hdd_mount"), i18n("&Mount Device"), 1);
menu.insertItem(SmallIcon("hdd_unmount"), i18n("&Unmount Device"), 2);
- switch (menu.exec(QCursor::pos())) {
+ switch (menu.exec(TQCursor::pos())) {
case 1:
createProcess("mount", m_list.at(id)->mountPoint());
break;
diff --git a/ksim/monitors/filesystem/filesystemwidget.h b/ksim/monitors/filesystem/filesystemwidget.h
index d169b9a..143010a 100644
--- a/ksim/monitors/filesystem/filesystemwidget.h
+++ b/ksim/monitors/filesystem/filesystemwidget.h
@@ -22,7 +22,7 @@
#include <progress.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
class KProcess;
class QVBoxLayout;
@@ -31,16 +31,16 @@ class FilesystemWidget : public QWidget
{
Q_OBJECT
public:
- FilesystemWidget(QWidget *parent, const char *name);
+ FilesystemWidget(TQWidget *parent, const char *name);
~FilesystemWidget();
- void append(int, const QString &);
- void setText(uint, const QString &);
+ void append(int, const TQString &);
+ void setText(uint, const TQString &);
void setValue(uint, int);
void clear();
protected:
- bool eventFilter(QObject *, QEvent *);
+ bool eventFilter(TQObject *, TQEvent *);
private slots:
void receivedStderr(KProcess *, char *, int);
@@ -51,28 +51,28 @@ class FilesystemWidget : public QWidget
{
public:
Filesystem();
- Filesystem(KSim::Progress *, const QString &);
+ Filesystem(KSim::Progress *, const TQString &);
~Filesystem();
KSim::Progress *display() const;
- const QString &mountPoint() const;
- const QString &text() const;
+ const TQString &mountPoint() const;
+ const TQString &text() const;
int value() const;
- void setText(const QString &);
+ void setText(const TQString &);
void setValue(int);
- QString m_mountPoint;
+ TQString m_mountPoint;
KSim::Progress *m_display;
};
- void createProcess(const QString &, const QString &);
+ void createProcess(const TQString &, const TQString &);
void showMenu(uint);
- typedef QPtrList<Filesystem> ProgressList;
+ typedef TQPtrList<Filesystem> ProgressList;
ProgressList m_list;
- QVBoxLayout *m_layout;
+ TQVBoxLayout *m_layout;
KProcess *m_process;
- QString m_stderrString;
+ TQString m_stderrString;
};
#endif
diff --git a/ksim/monitors/filesystem/fsystemconfig.cpp b/ksim/monitors/filesystem/fsystemconfig.cpp
index 9b07ee4..67026d1 100644
--- a/ksim/monitors/filesystem/fsystemconfig.cpp
+++ b/ksim/monitors/filesystem/fsystemconfig.cpp
@@ -28,18 +28,18 @@
#include <knuminput.h>
#include <kdebug.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qlabel.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqlabel.h>
+#include <tqwhatsthis.h>
class FSysViewItem : public QCheckListItem
{
public:
- FSysViewItem(QListView *parent, const QString &text1,
- const QString &text2, const QString &text3)
- : QCheckListItem(parent, text1, CheckBox)
+ FSysViewItem(TQListView *parent, const TQString &text1,
+ const TQString &text2, const TQString &text3)
+ : TQCheckListItem(parent, text1, CheckBox)
{
setText(1, text2);
setText(2, text3);
@@ -49,7 +49,7 @@ class FSysViewItem : public QCheckListItem
FsystemConfig::FsystemConfig(KSim::PluginObject *parent, const char *name)
: KSim::PluginPage(parent, name)
{
- m_mainLayout = new QGridLayout(this);
+ m_mainLayout = new TQGridLayout(this);
m_mainLayout->setSpacing(6);
m_availableMounts = new KListView(this);
@@ -58,32 +58,32 @@ FsystemConfig::FsystemConfig(KSim::PluginObject *parent, const char *name)
m_availableMounts->addColumn(i18n("Type"));
m_mainLayout->addMultiCellWidget(m_availableMounts, 0, 0, 0, 3);
- m_showPercentage = new QCheckBox(this);
+ m_showPercentage = new TQCheckBox(this);
m_showPercentage->setText(i18n("Show percentage"));
m_mainLayout->addMultiCellWidget(m_showPercentage, 1, 1, 0, 3);
- m_splitNames = new QCheckBox(this);
+ m_splitNames = new TQCheckBox(this);
m_splitNames->setText(i18n("Display short mount point names"));
- QWhatsThis::add(m_splitNames, i18n("This option shortens the text"
+ TQWhatsThis::add(m_splitNames, i18n("This option shortens the text"
" to shrink down a mount point. E.G: a mount point /home/myuser"
" would become myuser."));
m_mainLayout->addMultiCellWidget(m_splitNames, 2, 2, 0, 3);
- m_intervalLabel = new QLabel(this);
+ m_intervalLabel = new TQLabel(this);
m_intervalLabel->setText( i18n("Update interval:"));
- m_intervalLabel->setSizePolicy(QSizePolicy(QSizePolicy::Fixed,
- QSizePolicy::Fixed));
+ m_intervalLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed,
+ TQSizePolicy::Fixed));
m_mainLayout->addMultiCellWidget(m_intervalLabel, 3, 3, 0, 0);
m_updateTimer = new KIntSpinBox(this);
m_updateTimer->setValue(60);
- QToolTip::add(m_updateTimer, i18n("0 means no update"));
+ TQToolTip::add(m_updateTimer, i18n("0 means no update"));
m_mainLayout->addMultiCellWidget(m_updateTimer, 3, 3, 1, 1);
- QLabel *intervalLabel = new QLabel(this);
+ TQLabel *intervalLabel = new TQLabel(this);
intervalLabel->setText(i18n("seconds"));
- intervalLabel->setSizePolicy(QSizePolicy(QSizePolicy::Fixed,
- QSizePolicy::Fixed));
+ intervalLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed,
+ TQSizePolicy::Fixed));
m_mainLayout->addMultiCellWidget(intervalLabel, 3, 3, 2, 2);
m_entries = FilesystemStats::readEntries();
@@ -104,10 +104,10 @@ void FsystemConfig::readConfig()
if (!m_availableMounts->childCount())
return;
- QStringList list = config()->readListEntry("mountEntries");
- for (QListViewItemIterator it(m_availableMounts); it.current(); ++it) {
- QString string = it.current()->text(0) + ":" + splitString(it.current()->text(0));
- static_cast<QCheckListItem *>(it.current())->setOn(list.contains(string) > 0);
+ 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);
}
}
@@ -118,16 +118,16 @@ void FsystemConfig::saveConfig()
config()->writeEntry("updateValue", m_updateTimer->value());
config()->writeEntry("ShortenEntries", m_splitNames->isChecked());
- QStringList list;
- for (QListViewItemIterator it(m_availableMounts); it.current(); ++it) {
- if (static_cast<QCheckListItem *>(it.current())->isOn())
+ TQStringList list;
+ for (TQListViewItemIterator it(m_availableMounts); it.current(); ++it) {
+ if (static_cast<TQCheckListItem *>(it.current())->isOn())
list.append(it.current()->text(0) + ":" + splitString(it.current()->text(0)));
}
config()->writeEntry("mountEntries", list);
}
-void FsystemConfig::showEvent(QShowEvent *)
+void FsystemConfig::showEvent(TQShowEvent *)
{
// FIXME: Maybe this is the slow method of doing this?
// Eitherway, i need to find a way to only update the list
@@ -166,19 +166,19 @@ void FsystemConfig::getStats()
return;
config()->setGroup("Fsystem");
- QStringList list = config()->readListEntry("mountEntries");
- for (QListViewItemIterator it(m_availableMounts); it.current(); ++it) {
- QString string = it.current()->text(0) + ":" + splitString(it.current()->text(0));
- static_cast<QCheckListItem *>(it.current())->setOn(list.contains(string) > 0);
+ 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);
}
}
-QString FsystemConfig::splitString(const QString &string) const
+TQString FsystemConfig::splitString(const TQString &string) const
{
if (string == "/" || !m_splitNames->isChecked())
return string;
int location = string.findRev("/");
- QString newString(string);
+ TQString newString(string);
return newString.remove(0, location + 1);
}
diff --git a/ksim/monitors/filesystem/fsystemconfig.h b/ksim/monitors/filesystem/fsystemconfig.h
index 353dcf8..7e17e79 100644
--- a/ksim/monitors/filesystem/fsystemconfig.h
+++ b/ksim/monitors/filesystem/fsystemconfig.h
@@ -41,18 +41,18 @@ class FsystemConfig : public KSim::PluginPage
virtual void readConfig();
protected:
- void showEvent(QShowEvent *);
+ void showEvent(TQShowEvent *);
private:
void getStats();
- QString splitString(const QString &string) const;
+ TQString splitString(const TQString &string) const;
- QCheckBox *m_showPercentage;
- QCheckBox *m_splitNames;
- QLabel *m_intervalLabel;
+ TQCheckBox *m_showPercentage;
+ TQCheckBox *m_splitNames;
+ TQLabel *m_intervalLabel;
KIntSpinBox *m_updateTimer;
KListView *m_availableMounts;
- QGridLayout *m_mainLayout;
+ TQGridLayout *m_mainLayout;
FilesystemStats::List m_entries;
};
#endif // FILESYSTEM_H
diff --git a/ksim/monitors/filesystem/ksimfsystem.cpp b/ksim/monitors/filesystem/ksimfsystem.cpp
index 3303f6d..039447a 100644
--- a/ksim/monitors/filesystem/ksimfsystem.cpp
+++ b/ksim/monitors/filesystem/ksimfsystem.cpp
@@ -21,11 +21,11 @@
#include <config.h>
-#include <qlayout.h>
-#include <qvaluelist.h>
-#include <qtimer.h>
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqlayout.h>
+#include <tqvaluelist.h>
+#include <tqtimer.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <klocale.h>
@@ -64,7 +64,7 @@ KSim::PluginPage *PluginModule::createConfigPage(const char *className)
void PluginModule::showAbout()
{
- QString version = kapp->aboutData()->version();
+ TQString version = kapp->aboutData()->version();
KAboutData aboutData(instanceName(),
I18N_NOOP("KSim FileSystem Plugin"), version.latin1(),
@@ -86,10 +86,10 @@ Fsystem::Fsystem(KSim::PluginObject *parent, const char *name)
KSim::PluginView(parent, name)
{
config()->setGroup("Fsystem");
- QVBoxLayout *vbLayout = new QVBoxLayout(this);
+ TQVBoxLayout *vbLayout = new TQVBoxLayout(this);
vbLayout->setAutoAdd(true);
- QSpacerItem *item = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Expanding);
+ TQSpacerItem *item = new TQSpacerItem(0, 0, TQSizePolicy::Expanding, TQSizePolicy::Expanding);
vbLayout->addItem(item);
m_mountEntries = makeList(config()->readListEntry("mountEntries"));
@@ -99,8 +99,8 @@ Fsystem::Fsystem(KSim::PluginObject *parent, const char *name)
createFreeInfo();
- m_updateTimer = new QTimer(this);
- connect(m_updateTimer, SIGNAL(timeout()), SLOT(updateFS()));
+ m_updateTimer = new TQTimer(this);
+ connect(m_updateTimer, TQT_SIGNAL(timeout()), TQT_SLOT(updateFS()));
m_updateTimer->start(config()->readNumEntry("updateValue", 60) * 1000);
}
@@ -155,7 +155,7 @@ void Fsystem::createFreeInfo()
m_widget->setValue(i, total - free);
if (m_showPercentage)
m_widget->setText(i, ((*it).second.isEmpty() ? (*it).first : (*it).second)
- + " - " + QString::number(percent) + "%");
+ + " - " + TQString::number(percent) + "%");
else
m_widget->setText(i, ((*it).second.isEmpty() ? (*it).first : (*it).second));
i++;
@@ -179,20 +179,20 @@ void Fsystem::updateFS()
m_widget->setValue(i, total - free);
if (m_showPercentage)
m_widget->setText(i, ((*it).second.isEmpty() ? (*it).first : (*it).second)
- + " - " + QString::number(percent) + "%");
+ + " - " + TQString::number(percent) + "%");
else
m_widget->setText(i, ((*it).second.isEmpty() ? (*it).first : (*it).second));
i++;
}
}
-Fsystem::MountEntryList Fsystem::makeList(const QStringList &list) const
+Fsystem::MountEntryList Fsystem::makeList(const TQStringList &list) const
{
MountEntryList newList;
- QStringList splitList;
- QStringList::ConstIterator it;
+ TQStringList splitList;
+ TQStringList::ConstIterator it;
for (it = list.begin(); it != list.end(); ++it) {
- splitList = QStringList::split(":", (*it));
+ splitList = TQStringList::split(":", (*it));
newList.append(qMakePair(splitList[0], splitList[1]));
}
diff --git a/ksim/monitors/filesystem/ksimfsystem.h b/ksim/monitors/filesystem/ksimfsystem.h
index c3d403f..8c95fde 100644
--- a/ksim/monitors/filesystem/ksimfsystem.h
+++ b/ksim/monitors/filesystem/ksimfsystem.h
@@ -65,11 +65,11 @@ class Fsystem : public KSim::PluginView, public FsystemIface
void updateFS();
private:
- typedef QValueList<QPair<QString, QString> > MountEntryList;
- MountEntryList makeList(const QStringList &list) const;
+ typedef TQValueList<QPair<TQString, TQString> > MountEntryList;
+ MountEntryList makeList(const TQStringList &list) const;
FilesystemWidget *m_widget;
- QTimer *m_updateTimer;
+ TQTimer *m_updateTimer;
MountEntryList m_mountEntries;
bool m_showPercentage;
};
diff --git a/ksim/monitors/i8k/ksimi8k.cpp b/ksim/monitors/i8k/ksimi8k.cpp
index ff995b0..46a96e0 100644
--- a/ksim/monitors/i8k/ksimi8k.cpp
+++ b/ksim/monitors/i8k/ksimi8k.cpp
@@ -19,13 +19,13 @@
#include "ksimi8k.h"
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
#include <label.h>
#include <klocale.h>
@@ -59,7 +59,7 @@ KSim::PluginPage *I8KPlugin::createConfigPage(const char *className)
void I8KPlugin::showAbout()
{
- QString version = kapp->aboutData()->version();
+ TQString version = kapp->aboutData()->version();
KAboutData aboutData(instanceName(),
I18N_NOOP("KSim I8K Plugin"), version.latin1(),
@@ -78,9 +78,9 @@ I8KView::I8KView(KSim::PluginObject *parent, const char *name)
{
initGUI();
- m_timer = new QTimer( this );
+ m_timer = new TQTimer( this );
- m_reData = new QRegExp( "\\S+\\s+\\S+\\s+\\S+\\s+(\\d+)\\s+\\S+"
+ m_reData = new TQRegExp( "\\S+\\s+\\S+\\s+\\S+\\s+(\\d+)\\s+\\S+"
"\\s+\\S+\\s+(\\d+)\\s+(\\d+)\\s+\\S+\\s+\\S+" );
openStream();
@@ -119,9 +119,9 @@ void I8KView::openStream()
if ( ( m_procFile = fopen( "/proc/i8k", "r" ) ) )
{
- m_procStream = new QTextIStream( m_procFile );
+ m_procStream = new TQTextIStream( m_procFile );
disconnect( m_timer, 0, 0, 0 );
- connect( m_timer, SIGNAL( timeout() ), SLOT( updateView() ) );
+ connect( m_timer, TQT_SIGNAL( timeout() ), TQT_SLOT( updateView() ) );
m_timer->start( m_interval*1000 );
kdDebug( 2003 ) << "i8k: Success" << endl;
@@ -130,7 +130,7 @@ void I8KView::openStream()
{
// i8k module is not loaded. Try again after 30 secs.
disconnect( m_timer, 0, 0, 0 );
- connect( m_timer, SIGNAL( timeout() ), SLOT( openStream() ) );
+ connect( m_timer, TQT_SIGNAL( timeout() ), TQT_SLOT( openStream() ) );
m_timer->start( 30*1000 );
kdDebug( 2003 ) << "i8k: Failed...retry after 30 secs" << endl;
}
@@ -151,7 +151,7 @@ void I8KView::closeStream()
void I8KView::initGUI()
{
- QVBoxLayout *layout = new QVBoxLayout( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( this );
m_fan1Label = new KSim::Label( this );
m_fan2Label = new KSim::Label( this );
@@ -171,7 +171,7 @@ void I8KView::updateView()
{
fseek( m_procFile, 0L, SEEK_SET );
- QString line = m_procStream->read();
+ TQString line = m_procStream->read();
if ( line.isEmpty() )
{
@@ -183,7 +183,7 @@ void I8KView::updateView()
if ( m_reData->search( line ) > -1 )
{
- QStringList matches = m_reData->capturedTexts();
+ TQStringList matches = m_reData->capturedTexts();
cputemp = matches[ 1 ].toInt();
leftspeed = matches[ 2 ].toInt();
@@ -211,14 +211,14 @@ void I8KView::updateView()
I8KConfig::I8KConfig(KSim::PluginObject *parent, const char *name)
: KSim::PluginPage(parent, name)
{
- m_unit = new QCheckBox( i18n( "Show temperature in Fahrenheit" ),
+ m_unit = new TQCheckBox( i18n( "Show temperature in Fahrenheit" ),
this );
- QLabel *label = new QLabel( i18n( "Update interval:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Update interval:" ), this );
m_interval = new KIntNumInput( this );
m_interval->setRange( 2, 60, 1, true );
m_interval->setSuffix( i18n( " sec" ) );
- QGridLayout *layout = new QGridLayout( this, 3, 2, 0,
+ TQGridLayout *layout = new TQGridLayout( this, 3, 2, 0,
KDialog::spacingHint() );
layout->addMultiCellWidget( m_unit, 0, 0, 0, 1 );
@@ -236,7 +236,7 @@ void I8KConfig::readConfig()
{
config()->setGroup("I8KPlugin");
- QString unit = config()->readEntry( "Unit", "C" );
+ TQString unit = config()->readEntry( "Unit", "C" );
int interval = config()->readNumEntry( "Interval", 5 );
m_unit->setChecked( unit == "F" );
diff --git a/ksim/monitors/i8k/ksimi8k.h b/ksim/monitors/i8k/ksimi8k.h
index 4357508..40058da 100644
--- a/ksim/monitors/i8k/ksimi8k.h
+++ b/ksim/monitors/i8k/ksimi8k.h
@@ -68,14 +68,14 @@ class I8KView : public KSim::PluginView
private:
- QString m_unit;
+ TQString m_unit;
int m_interval;
KSim::Label *m_fan1Label, *m_fan2Label, *m_tempLabel;
- QTimer *m_timer;
+ TQTimer *m_timer;
FILE *m_procFile;
- QTextIStream *m_procStream;
- QRegExp *m_reData;
+ TQTextIStream *m_procStream;
+ TQRegExp *m_reData;
};
class I8KConfig : public KSim::PluginPage
@@ -92,7 +92,7 @@ class I8KConfig : public KSim::PluginPage
private:
- QCheckBox *m_unit;
+ TQCheckBox *m_unit;
KIntNumInput *m_interval;
};
diff --git a/ksim/monitors/lm_sensors/ksimsensors.cpp b/ksim/monitors/lm_sensors/ksimsensors.cpp
index e63f5cf..eb2614f 100644
--- a/ksim/monitors/lm_sensors/ksimsensors.cpp
+++ b/ksim/monitors/lm_sensors/ksimsensors.cpp
@@ -27,7 +27,7 @@
#include <kaboutdata.h>
#include <kconfig.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <label.h>
#include <themetypes.h>
@@ -58,7 +58,7 @@ KSim::PluginPage *PluginModule::createConfigPage(const char *className)
void PluginModule::showAbout()
{
- QString version = kapp->aboutData()->version();
+ TQString version = kapp->aboutData()->version();
KAboutData aboutData(instanceName(),
I18N_NOOP("KSim Sensors Plugin"), version.latin1(),
@@ -75,10 +75,10 @@ SensorsView::SensorsView(KSim::PluginObject *parent, const char *name)
: DCOPObject("sensors"), KSim::PluginView(parent, name)
{
config()->setGroup("Sensors");
- (new QVBoxLayout(this))->setAutoAdd(true);
+ (new TQVBoxLayout(this))->setAutoAdd(true);
- connect(SensorBase::self(), SIGNAL(updateSensors(const SensorList &)),
- this, SLOT(updateSensors(const SensorList &)));
+ connect(SensorBase::self(), TQT_SIGNAL(updateSensors(const SensorList &)),
+ this, TQT_SLOT(updateSensors(const SensorList &)));
insertSensors();
}
@@ -95,8 +95,8 @@ void SensorsView::reparseConfig()
SensorBase::self()->setDisplayFahrenheit(displayFahrenheit);
SensorBase::self()->setUpdateSpeed(updateVal * 1000);
- QString label;
- QStringList names;
+ TQString label;
+ TQStringList names;
SensorItemList sensorItemList;
const SensorList &list = SensorBase::self()->sensorsList();
@@ -104,7 +104,7 @@ void SensorsView::reparseConfig()
for (it = list.begin(); it != list.end(); ++it) {
config()->setGroup("Sensors");
label = (*it).sensorType() + "/" + (*it).sensorName();
- names = QStringList::split(':', config()->readEntry(label));
+ names = TQStringList::split(':', config()->readEntry(label));
if (names[0] == "1")
sensorItemList.append(SensorItem((*it).sensorId(), names[1]));
}
@@ -122,8 +122,8 @@ void SensorsView::insertSensors(bool createList)
const SensorList &list = SensorBase::self()->sensorsList();
if (createList) {
- QString label;
- QStringList names;
+ TQString label;
+ TQStringList names;
config()->setGroup("Sensors");
bool displayFahrenheit = config()->readBoolEntry("displayFahrenheit", false);
@@ -134,7 +134,7 @@ void SensorsView::insertSensors(bool createList)
SensorList::ConstIterator it;
for (it = list.begin(); it != list.end(); ++it) {
label = (*it).sensorType() + "/" + (*it).sensorName();
- names = QStringList::split(':', config()->readEntry(label));
+ names = TQStringList::split(':', config()->readEntry(label));
if (names[0] == "1")
m_sensorItemList.append(SensorItem((*it).sensorId(), names[1]));
}
@@ -167,12 +167,12 @@ void SensorsView::updateSensors(const SensorList &sensorList)
}
}
-QString SensorsView::sensorValue(const QString &sensor,
- const QString &label1)
+TQString SensorsView::sensorValue(const TQString &sensor,
+ const TQString &label1)
{
const SensorList &list = SensorBase::self()->sensorsList();
config()->setGroup("Sensors");
- QStringList names = QStringList::split(':',
+ TQStringList names = TQStringList::split(':',
config()->readEntry(sensor + "/" + label1));
if (names[0] == "0" || list.isEmpty())
@@ -181,7 +181,7 @@ QString SensorsView::sensorValue(const QString &sensor,
SensorList::ConstIterator it;
for (it = list.begin(); it != list.end(); ++it) {
if (sensor == (*it).sensorType() && label1 == (*it).sensorName()) {
- return names[1] + QString(": ") + (*it).sensorValue() + (*it).sensorUnit();
+ return names[1] + TQString(": ") + (*it).sensorValue() + (*it).sensorUnit();
}
}
diff --git a/ksim/monitors/lm_sensors/ksimsensors.h b/ksim/monitors/lm_sensors/ksimsensors.h
index 8446931..a8a0482 100644
--- a/ksim/monitors/lm_sensors/ksimsensors.h
+++ b/ksim/monitors/lm_sensors/ksimsensors.h
@@ -53,7 +53,7 @@ class SensorsView : public KSim::PluginView, public KSimSensorsIface
~SensorsView();
virtual void reparseConfig();
- virtual QString sensorValue(const QString &, const QString &);
+ virtual TQString sensorValue(const TQString &, const TQString &);
private slots:
void updateSensors(const SensorList &);
@@ -65,7 +65,7 @@ class SensorsView : public KSim::PluginView, public KSimSensorsIface
{
public:
SensorItem() : id(-1), label(0) {}
- SensorItem(int i, const QString &na)
+ SensorItem(int i, const TQString &na)
: id(i), name(na), label(0) {}
~SensorItem() { delete label; }
@@ -81,11 +81,11 @@ class SensorsView : public KSim::PluginView, public KSimSensorsIface
}
int id;
- QString name;
+ TQString name;
KSim::Label *label;
};
- typedef QValueList<SensorItem> SensorItemList;
+ typedef TQValueList<SensorItem> SensorItemList;
SensorItemList m_sensorItemList;
};
#endif
diff --git a/ksim/monitors/lm_sensors/ksimsensorsiface.h b/ksim/monitors/lm_sensors/ksimsensorsiface.h
index 4bd50ce..4ee0d13 100644
--- a/ksim/monitors/lm_sensors/ksimsensorsiface.h
+++ b/ksim/monitors/lm_sensors/ksimsensorsiface.h
@@ -26,8 +26,8 @@ class KSimSensorsIface : virtual public DCOPObject
{
K_DCOP
k_dcop:
- virtual QString sensorValue(const QString &sensorType,
- const QString &sensorName) = 0;
+ virtual TQString sensorValue(const TQString &sensorType,
+ const TQString &sensorName) = 0;
};
#endif // KSIMSENSORSIFACE_H
diff --git a/ksim/monitors/lm_sensors/sensorbase.cpp b/ksim/monitors/lm_sensors/sensorbase.cpp
index 9ccb247..a0b82c5 100644
--- a/ksim/monitors/lm_sensors/sensorbase.cpp
+++ b/ksim/monitors/lm_sensors/sensorbase.cpp
@@ -23,14 +23,14 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qglobal.h>
+#include <tqglobal.h>
#include <klibloader.h>
#include <kstandarddirs.h>
#include <kconfig.h>
-#include <qtimer.h>
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqtimer.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <stdio.h>
@@ -50,16 +50,16 @@ SensorBase *SensorBase::self()
return m_self;
}
-SensorBase::SensorBase() : QObject()
+SensorBase::SensorBase() : TQObject()
{
KSim::Config::config()->setGroup("Sensors");
- QCString sensorsName("libsensors.so");
+ TQCString sensorsName("libsensors.so");
- QStringList sensorLocations = KSim::Config::config()->readListEntry("sensorLocations");
+ TQStringList sensorLocations = KSim::Config::config()->readListEntry("sensorLocations");
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = sensorLocations.begin(); it != sensorLocations.end(); ++it) {
- if (QFile::exists((*it).local8Bit() + sensorsName)) {
+ if (TQFile::exists((*it).local8Bit() + sensorsName)) {
m_libLocation = (*it).local8Bit() + sensorsName;
break;
}
@@ -75,8 +75,8 @@ SensorBase::SensorBase() : QObject()
m_hasNVControl = XNVCTRLQueryExtension(qt_xdisplay(), &eventBase, &errorBase) == True;
}
- m_updateTimer = new QTimer(this);
- connect(m_updateTimer, SIGNAL(timeout()), SLOT(update()));
+ m_updateTimer = new TQTimer(this);
+ connect(m_updateTimer, TQT_SIGNAL(timeout()), TQT_SLOT(update()));
}
SensorBase::~SensorBase()
@@ -120,13 +120,13 @@ void SensorBase::update()
m_label(*chip, sFeature->number, &name);
m_feature(*chip, sFeature->number, &value);
- float returnValue = formatValue(QString::fromUtf8(name), float(value));
- QString label = formatString(QString::fromUtf8(name), returnValue);
- QString chipset = chipsetString(chip);
+ float returnValue = formatValue(TQString::fromUtf8(name), float(value));
+ TQString label = formatString(TQString::fromUtf8(name), returnValue);
+ TQString chipset = chipsetString(chip);
m_sensorList.append(SensorInfo(currentSensor++, label,
- QString::fromUtf8(name), QString::fromUtf8(chip->prefix),
- chipset, sensorType(QString::fromLatin1(name))));
+ TQString::fromUtf8(name), TQString::fromUtf8(chip->prefix),
+ chipset, sensorType(TQString::fromLatin1(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)) {
- QString name = QString::fromLatin1("GPU Temp");
- m_sensorList.append(SensorInfo(currentSensor++, QString::number(temp),
- name, QString::null, QString::null, sensorType(name)));
+ TQString name = TQString::fromLatin1("GPU Temp");
+ m_sensorList.append(SensorInfo(currentSensor++, TQString::number(temp),
+ name, TQString::null, TQString::null, sensorType(name)));
}
if (XNVCTRLQueryAttribute(qt_xdisplay(), qt_xscreen(), 0 /* not used? */, NV_CTRL_AMBIENT_TEMPERATURE, &temp)) {
- QString name = QString::fromLatin1("GPU Ambient Temp");
- m_sensorList.append(SensorInfo(currentSensor++, QString::number(temp),
- name, QString::null, QString::null, sensorType(name)));
+ TQString name = TQString::fromLatin1("GPU Ambient Temp");
+ m_sensorList.append(SensorInfo(currentSensor++, TQString::number(temp),
+ name, TQString::null, TQString::null, sensorType(name)));
}
}
@@ -210,34 +210,34 @@ bool SensorBase::init()
return true;
}
-QString SensorBase::sensorType(const QString &name)
+TQString SensorBase::sensorType(const TQString &name)
{
if (name.findRev("fan", -1, false) != -1)
return i18n("Rounds per minute", " RPM");
if (name.findRev("temp", -1, false) != -1)
if (SensorBase::fahrenheit())
- return QString::fromLatin1("°F");
+ return TQString::fromLatin1("°F");
else
- return QString::fromLatin1("°C");
+ return TQString::fromLatin1("°C");
- if (name.findRev(QRegExp("[^\\+]?[^\\-]?V$")) != -1)
+ if (name.findRev(TQRegExp("[^\\+]?[^\\-]?V$")) != -1)
return i18n("Volt", "V");
- return QString::null;
+ return TQString::null;
}
-QString SensorBase::chipsetString(const ChipName *c)
+TQString SensorBase::chipsetString(const ChipName *c)
{
- QString data = QString::fromUtf8(c->prefix);
+ TQString data = TQString::fromUtf8(c->prefix);
if (c->bus == BusISA)
- return QString().sprintf("%s-isa-%04x", data.utf8().data(), c->addr);
+ return TQString().sprintf("%s-isa-%04x", data.utf8().data(), c->addr);
- return QString().sprintf("%s-i2c-%d-%02x", data.utf8().data(), c->bus, c->addr);
+ return TQString().sprintf("%s-i2c-%d-%02x", data.utf8().data(), c->bus, c->addr);
}
-float SensorBase::formatValue(const QString &label, float value)
+float SensorBase::formatValue(const TQString &label, float value)
{
if (label.findRev("temp", -1, false) != -1)
return toFahrenheit(value);
@@ -245,10 +245,10 @@ float SensorBase::formatValue(const QString &label, float value)
return value;
}
-QString SensorBase::formatString(const QString &label, float value)
+TQString SensorBase::formatString(const TQString &label, float value)
{
if (label.findRev("fan", -1, false) != -1)
- return QString::number(value);
+ return TQString::number(value);
- return QString::number(value,'f',2);
+ return TQString::number(value,'f',2);
}
diff --git a/ksim/monitors/lm_sensors/sensorbase.h b/ksim/monitors/lm_sensors/sensorbase.h
index c819d48..083cfd8 100644
--- a/ksim/monitors/lm_sensors/sensorbase.h
+++ b/ksim/monitors/lm_sensors/sensorbase.h
@@ -20,9 +20,9 @@
#ifndef SENSORBASE_H
#define SENSORBASE_H
-#include <qobject.h>
-#include <qvaluelist.h>
-#include <qcstring.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
+#include <tqcstring.h>
class QTimer;
class KLibrary;
@@ -32,11 +32,11 @@ class SensorInfo
public:
SensorInfo() {}
SensorInfo(int id,
- const QString &sensorValue,
- const QString &sensorName,
- const QString &sensorType,
- const QString &chipsetName,
- const QString &sensorUnit)
+ const TQString &sensorValue,
+ const TQString &sensorName,
+ const TQString &sensorType,
+ const TQString &chipsetName,
+ const TQString &sensorUnit)
: m_id(id), m_sensor(sensorValue),
m_sensorName(sensorName),
m_sensorType(sensorType),
@@ -50,41 +50,41 @@ class SensorInfo
/**
* @return the current value, eg: 5000
*/
- const QString &sensorValue() const { return m_sensor; }
+ const TQString &sensorValue() const { return m_sensor; }
/**
* @return the sensor name, eg: temp1, fan2
*/
- const QString &sensorName() const { return m_sensorName; }
+ const TQString &sensorName() const { return m_sensorName; }
/**
* @return the sensor type name, eg: w83782d
*/
- const QString &sensorType() const { return m_sensorType; }
+ const TQString &sensorType() const { return m_sensorType; }
/**
* @return the chipset name, eg: w83782d-i2c-0-2d
*/
- const QString &chipsetName() const { return m_chipsetName; }
+ const TQString &chipsetName() const { return m_chipsetName; }
/**
* @return the unit name, eg: RPM, °C or °F if display fahrenheit is enabled
*/
- const QString &sensorUnit() const { return m_sensorUnit; }
+ const TQString &sensorUnit() const { return m_sensorUnit; }
private:
int m_id;
- QString m_sensor;
- QString m_sensorName;
- QString m_sensorType;
- QString m_chipsetName;
- QString m_sensorUnit;
+ TQString m_sensor;
+ TQString m_sensorName;
+ TQString m_sensorType;
+ TQString m_chipsetName;
+ TQString m_sensorUnit;
};
-class SensorList : public QValueList<SensorInfo>
+class SensorList : public TQValueList<SensorInfo>
{
public:
SensorList() {}
SensorList(const SensorList &sensorList)
- : QValueList<SensorInfo>(sensorList) {}
- SensorList(const QValueList<SensorInfo> &sensorList)
- : QValueList<SensorInfo>(sensorList) {}
+ : TQValueList<SensorInfo>(sensorList) {}
+ SensorList(const TQValueList<SensorInfo> &sensorList)
+ : TQValueList<SensorInfo>(sensorList) {}
SensorList(const SensorInfo &sensor) { append(sensor); }
};
@@ -144,15 +144,15 @@ class SensorBase : public QObject
bool init();
float toFahrenheit(float value);
- QString sensorType(const QString &name);
- QString chipsetString(const ChipName *c);
- float formatValue(const QString &label, float value);
- QString formatString(const QString &label, float value);
+ TQString sensorType(const TQString &name);
+ TQString chipsetString(const ChipName *c);
+ float formatValue(const TQString &label, float value);
+ TQString formatString(const TQString &label, float value);
SensorList m_sensorList;
- QTimer *m_updateTimer;
+ TQTimer *m_updateTimer;
KLibrary *m_library;
- QCString m_libLocation;
+ TQCString m_libLocation;
bool m_loaded;
bool m_fahrenheit;
diff --git a/ksim/monitors/lm_sensors/sensorsconfig.cpp b/ksim/monitors/lm_sensors/sensorsconfig.cpp
index 6e2b4b3..2ab1235 100644
--- a/ksim/monitors/lm_sensors/sensorsconfig.cpp
+++ b/ksim/monitors/lm_sensors/sensorsconfig.cpp
@@ -29,21 +29,21 @@
#include <kdebug.h>
#include <kinputdialog.h>
-#include <qtimer.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qcursor.h>
-#include <qpopupmenu.h>
-#include <qpushbutton.h>
+#include <tqtimer.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqcursor.h>
+#include <tqpopupmenu.h>
+#include <tqpushbutton.h>
class SensorViewItem : public QCheckListItem
{
public:
- SensorViewItem(QListView *parent, const QString &text1,
- const QString &text2, const QString &text3,
- const QString &text4)
- : QCheckListItem(parent, text1, CheckBox)
+ SensorViewItem(TQListView *parent, const TQString &text1,
+ const TQString &text2, const TQString &text3,
+ const TQString &text4)
+ : TQCheckListItem(parent, text1, CheckBox)
{
setText(1, text2);
setText(2, text3);
@@ -54,7 +54,7 @@ class SensorViewItem : public QCheckListItem
SensorsConfig::SensorsConfig(KSim::PluginObject *parent, const char *name)
: KSim::PluginPage(parent, name)
{
- m_layout = new QGridLayout(this);
+ m_layout = new TQGridLayout(this);
m_layout->setSpacing(6);
m_neverShown = true;
@@ -67,36 +67,36 @@ SensorsConfig::SensorsConfig(KSim::PluginObject *parent, const char *name)
m_sensorView->setColumnWidth(1, 60);
m_sensorView->setColumnWidth(2, 80);
m_sensorView->setAllColumnsShowFocus(true);
- connect(m_sensorView, SIGNAL(contextMenu(KListView *,
- QListViewItem *, const QPoint &)), this, SLOT(menu(KListView *,
- QListViewItem *, const QPoint &)));
+ connect(m_sensorView, TQT_SIGNAL(contextMenu(KListView *,
+ TQListViewItem *, const TQPoint &)), this, TQT_SLOT(menu(KListView *,
+ TQListViewItem *, const TQPoint &)));
- connect( m_sensorView, SIGNAL( doubleClicked( QListViewItem * ) ),
- SLOT( modify( QListViewItem * ) ) );
+ connect( m_sensorView, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ),
+ TQT_SLOT( modify( TQListViewItem * ) ) );
m_layout->addMultiCellWidget(m_sensorView, 1, 1, 0, 3);
- m_modify = new QPushButton( this );
+ m_modify = new TQPushButton( this );
m_modify->setText( i18n( "Modify..." ) );
- connect( m_modify, SIGNAL( clicked() ), SLOT( modify() ) );
+ connect( m_modify, TQT_SIGNAL( clicked() ), TQT_SLOT( modify() ) );
m_layout->addMultiCellWidget( m_modify, 2, 2, 3, 3 );
- m_fahrenBox = new QCheckBox(i18n("Display Fahrenheit"), this);
+ m_fahrenBox = new TQCheckBox(i18n("Display Fahrenheit"), this);
m_layout->addMultiCellWidget(m_fahrenBox, 3, 3, 0, 3);
- m_updateLabel = new QLabel(this);
+ m_updateLabel = new TQLabel(this);
m_updateLabel->setText(i18n("Update interval:"));
- m_updateLabel->setSizePolicy(QSizePolicy(QSizePolicy::Fixed,
- QSizePolicy::Fixed));
+ m_updateLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed,
+ TQSizePolicy::Fixed));
m_layout->addMultiCellWidget(m_updateLabel, 4, 4, 0, 0);
m_sensorSlider = new KIntSpinBox(this);
m_layout->addMultiCellWidget(m_sensorSlider, 4, 4, 1, 1);
- QLabel *intervalLabel = new QLabel(this);
+ TQLabel *intervalLabel = new TQLabel(this);
intervalLabel->setText(i18n("seconds"));
- intervalLabel->setSizePolicy(QSizePolicy(QSizePolicy::Fixed,
- QSizePolicy::Fixed));
+ intervalLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed,
+ TQSizePolicy::Fixed));
m_layout->addMultiCellWidget(intervalLabel, 4, 4, 2, 2);
}
@@ -110,10 +110,10 @@ void SensorsConfig::saveConfig()
config()->writeEntry("sensorUpdateValue", m_sensorSlider->value());
config()->writeEntry("displayFahrenheit", m_fahrenBox->isChecked());
- for (QListViewItemIterator it(m_sensorView); it.current(); ++it) {
+ for (TQListViewItemIterator it(m_sensorView); it.current(); ++it) {
config()->setGroup("Sensors");
config()->writeEntry(it.current()->text(2),
- QString::number(static_cast<QCheckListItem *>(it.current())->isOn())
+ TQString::number(static_cast<TQCheckListItem *>(it.current())->isOn())
+ ":" + it.current()->text(1));
}
}
@@ -124,25 +124,25 @@ void SensorsConfig::readConfig()
m_fahrenBox->setChecked(config()->readBoolEntry("displayFahrenheit", false));
m_sensorSlider->setValue(config()->readNumEntry("sensorUpdateValue", 15));
- QStringList names;
- for (QListViewItemIterator it(m_sensorView); it.current(); ++it) {
+ TQStringList names;
+ for (TQListViewItemIterator it(m_sensorView); it.current(); ++it) {
config()->setGroup("Sensors");
- names = QStringList::split(":", config()->readEntry(it.current()->text(2), "0:"));
+ names = TQStringList::split(":", config()->readEntry(it.current()->text(2), "0:"));
if (!names[1].isNull())
it.current()->setText(1, names[1]);
- static_cast<QCheckListItem *>(it.current())->setOn(names[0].toInt());
+ static_cast<TQCheckListItem *>(it.current())->setOn(names[0].toInt());
}
}
-void SensorsConfig::menu(KListView *, QListViewItem *, const QPoint &)
+void SensorsConfig::menu(KListView *, TQListViewItem *, const TQPoint &)
{
- m_popupMenu = new QPopupMenu(this);
+ m_popupMenu = new TQPopupMenu(this);
m_popupMenu->insertItem(i18n("Select All"), 1);
m_popupMenu->insertItem(i18n("Unselect All"), 2);
m_popupMenu->insertItem(i18n("Invert Selection"), 3);
- switch (m_popupMenu->exec(QCursor::pos())) {
+ switch (m_popupMenu->exec(TQCursor::pos())) {
case 1:
selectAll();
break;
@@ -159,20 +159,20 @@ void SensorsConfig::menu(KListView *, QListViewItem *, const QPoint &)
void SensorsConfig::selectAll()
{
- for (QListViewItemIterator it(m_sensorView); it.current(); ++it)
- static_cast<QCheckListItem *>(it.current())->setOn(true);
+ for (TQListViewItemIterator it(m_sensorView); it.current(); ++it)
+ static_cast<TQCheckListItem *>(it.current())->setOn(true);
}
void SensorsConfig::unSelectAll()
{
- for (QListViewItemIterator it(m_sensorView); it.current(); ++it)
- static_cast<QCheckListItem *>(it.current())->setOn(false);
+ for (TQListViewItemIterator it(m_sensorView); it.current(); ++it)
+ static_cast<TQCheckListItem *>(it.current())->setOn(false);
}
void SensorsConfig::invertSelect()
{
- for (QListViewItemIterator it(m_sensorView); it.current(); ++it) {
- QCheckListItem *item = static_cast<QCheckListItem *>(it.current());
+ for (TQListViewItemIterator it(m_sensorView); it.current(); ++it) {
+ TQCheckListItem *item = static_cast<TQCheckListItem *>(it.current());
if (item->isOn())
item->setOn(false);
else
@@ -185,8 +185,8 @@ void SensorsConfig::initSensors()
const SensorList &sensorList = SensorBase::self()->sensorsList();
int i = 0;
- QString label;
- QStringList sensorInfo;
+ TQString label;
+ TQStringList sensorInfo;
SensorList::ConstIterator it;
for (it = sensorList.begin(); it != sensorList.end(); ++it) {
label.sprintf("%02i", ++i);
@@ -195,23 +195,23 @@ void SensorsConfig::initSensors()
(*it).sensorValue() + (*it).sensorUnit());
}
- QStringList names;
- for (QListViewItemIterator it(m_sensorView); it.current(); ++it) {
+ TQStringList names;
+ for (TQListViewItemIterator it(m_sensorView); it.current(); ++it) {
config()->setGroup("Sensors");
- names = QStringList::split(":", config()->readEntry(it.current()->text(2), "0:"));
+ names = TQStringList::split(":", config()->readEntry(it.current()->text(2), "0:"));
if (!names[1].isNull())
it.current()->setText(1, names[1]);
- static_cast<QCheckListItem *>(it.current())->setOn(names[0].toInt());
+ static_cast<TQCheckListItem *>(it.current())->setOn(names[0].toInt());
}
}
-void SensorsConfig::modify( QListViewItem * item )
+void SensorsConfig::modify( TQListViewItem * item )
{
if ( !item )
return;
bool ok = false;
- QString text = KInputDialog::getText( i18n( "Modify Sensor Label" ), i18n( "Sensor label:" ),
+ TQString text = KInputDialog::getText( i18n( "Modify Sensor Label" ), i18n( "Sensor label:" ),
item->text( 1 ), &ok, this );
if ( ok )
@@ -223,7 +223,7 @@ void SensorsConfig::modify()
modify( m_sensorView->selectedItem() );
}
-void SensorsConfig::showEvent(QShowEvent *)
+void SensorsConfig::showEvent(TQShowEvent *)
{
if (m_neverShown) {
initSensors();
@@ -233,7 +233,7 @@ void SensorsConfig::showEvent(QShowEvent *)
const SensorList &list = SensorBase::self()->sensorsList();
SensorList::ConstIterator it;
for (it = list.begin(); it != list.end(); ++it) {
- QListViewItem *item = m_sensorView->findItem((*it).sensorName(), 1);
+ TQListViewItem *item = m_sensorView->findItem((*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 28d656e..60410f4 100644
--- a/ksim/monitors/lm_sensors/sensorsconfig.h
+++ b/ksim/monitors/lm_sensors/sensorsconfig.h
@@ -44,26 +44,26 @@ class SensorsConfig : public KSim::PluginPage
void readConfig();
private slots:
- void menu(KListView *, QListViewItem *, const QPoint &);
+ void menu(KListView *, TQListViewItem *, const TQPoint &);
void initSensors();
void selectAll();
void unSelectAll();
void invertSelect();
- void modify( QListViewItem * );
+ void modify( TQListViewItem * );
void modify();
protected:
- void showEvent(QShowEvent *);
+ void showEvent(TQShowEvent *);
private:
bool m_neverShown;
- QLabel *m_updateLabel;
+ TQLabel *m_updateLabel;
KIntSpinBox *m_sensorSlider;
KListView *m_sensorView;
- QCheckBox *m_fahrenBox;
- QGridLayout *m_layout;
- QPopupMenu *m_popupMenu;
- QPushButton * m_modify;
+ TQCheckBox *m_fahrenBox;
+ TQGridLayout *m_layout;
+ TQPopupMenu *m_popupMenu;
+ TQPushButton * m_modify;
};
#endif
diff --git a/ksim/monitors/mail/ksimmail.cpp b/ksim/monitors/mail/ksimmail.cpp
index 6ca1142..fdda6bd 100644
--- a/ksim/monitors/mail/ksimmail.cpp
+++ b/ksim/monitors/mail/ksimmail.cpp
@@ -19,9 +19,9 @@
// $Id$
-#include <qbitmap.h>
-#include <qlayout.h>
-#include <qtimer.h>
+#include <tqbitmap.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
#include <kaboutapplication.h>
#include <kdebug.h>
@@ -69,7 +69,7 @@ void MailPlugin::showAbout()
MailView::MailView( KSim::PluginObject* parent, const char* name )
: KSim::PluginView( parent, name )
{
- QVBoxLayout* layout = new QVBoxLayout( this );
+ TQVBoxLayout* layout = new TQVBoxLayout( this );
MailLabel* label = new MailLabel( this );
layout->addWidget( label, 0, AlignHCenter );
@@ -87,13 +87,13 @@ void MailView::updateDisplay()
{
}
-MailLabel::MailLabel( QWidget* parent )
+MailLabel::MailLabel( TQWidget* parent )
: KSim::Label( KSim::Types::Mail, parent )
{
// label->setPixmap( KSim::ThemeLoader::self().current().krellMail() );
configureObject( false );
- QTimer* timer = new QTimer( this );
- connect( timer, SIGNAL( timeout() ), SLOT( animation() ) );
+ TQTimer* timer = new TQTimer( this );
+ connect( timer, TQT_SIGNAL( timeout() ), TQT_SLOT( animation() ) );
timer->start( 100 );
}
@@ -115,7 +115,7 @@ void MailLabel::configureObject( bool repaint )
KSim::Label::configureObject( repaint );
}
-void MailLabel::paintEvent( QPaintEvent* e )
+void MailLabel::paintEvent( TQPaintEvent* e )
{
KSim::Label::paintEvent( e );
}
@@ -127,13 +127,13 @@ void MailLabel::animation()
if ( f++ >= m_frames ) f = 1;
}
-QPixmap MailLabel::frame( const QPixmap& source, int number ) const
+TQPixmap MailLabel::frame( const TQPixmap& source, int number ) const
{
- QPixmap result( source.width(), source.height() / m_frames );
+ TQPixmap result( source.width(), source.height() / m_frames );
bitBlt( &result, 0, 0, &source, 0, number * source.height() / m_frames );
if ( source.mask() )
{
- QBitmap mask( result.size() );
+ TQBitmap mask( result.size() );
bitBlt( &mask, 0, 0, source.mask(), 0, number * source.height() / m_frames );
result.setMask( mask );
}
diff --git a/ksim/monitors/mail/ksimmail.h b/ksim/monitors/mail/ksimmail.h
index fd8790a..f5a42d7 100644
--- a/ksim/monitors/mail/ksimmail.h
+++ b/ksim/monitors/mail/ksimmail.h
@@ -53,23 +53,23 @@ class MailLabel : public KSim::Label
{
Q_OBJECT
public:
- MailLabel( QWidget* parent );
+ MailLabel( TQWidget* parent );
virtual ~MailLabel();
virtual void configureObject( bool );
protected:
- virtual void paintEvent( QPaintEvent* );
+ virtual void paintEvent( TQPaintEvent* );
private slots:
void animation();
private:
- QPixmap frame( const QPixmap& source, int number ) const;
+ TQPixmap frame( const TQPixmap& source, int number ) const;
private:
- QPixmap m_envelope;
- QPixmap m_penguin;
+ TQPixmap m_envelope;
+ TQPixmap m_penguin;
int m_frames;
int m_delay;
};
diff --git a/ksim/monitors/net/ksimnet.cpp b/ksim/monitors/net/ksimnet.cpp
index 45f86c2..1bbfeb2 100644
--- a/ksim/monitors/net/ksimnet.cpp
+++ b/ksim/monitors/net/ksimnet.cpp
@@ -33,15 +33,15 @@
static int mib[] = { CTL_NET, PF_ROUTE, 0, 0, NET_RT_IFLIST, 0 };
#endif
-#include <qpushbutton.h>
-#include <qtextstream.h>
-#include <qfile.h>
-#include <qdatetime.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qregexp.h>
-#include <qcursor.h>
-#include <qpopupmenu.h>
+#include <tqpushbutton.h>
+#include <tqtextstream.h>
+#include <tqfile.h>
+#include <tqdatetime.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqregexp.h>
+#include <tqcursor.h>
+#include <tqpopupmenu.h>
#include <kdebug.h>
#include <klocale.h>
@@ -84,7 +84,7 @@ KSim::PluginPage *NetPlugin::createConfigPage(const char *className)
void NetPlugin::showAbout()
{
- QString version = kapp->aboutData()->version();
+ TQString version = kapp->aboutData()->version();
KAboutData aboutData(instanceName(),
I18N_NOOP("KSim Net Plugin"), version.latin1(),
@@ -105,7 +105,7 @@ NetView::NetView(KSim::PluginObject *parent, const char *name)
#ifdef __linux__
m_procStream = 0L;
if ((m_procFile = fopen("/proc/net/dev", "r")))
- m_procStream = new QTextStream(m_procFile, IO_ReadOnly);
+ m_procStream = new TQTextStream(m_procFile, IO_ReadOnly);
#endif
#ifdef __FreeBSD__
m_buf = 0;
@@ -113,17 +113,17 @@ NetView::NetView(KSim::PluginObject *parent, const char *name)
#endif
m_firstTime = true;
- m_netLayout = new QVBoxLayout(this);
+ m_netLayout = new TQVBoxLayout(this);
m_networkList = createList();
addDisplay();
- m_netTimer = new QTimer(this);
- connect(m_netTimer, SIGNAL(timeout()), SLOT(updateGraph()));
+ m_netTimer = new TQTimer(this);
+ connect(m_netTimer, TQT_SIGNAL(timeout()), TQT_SLOT(updateGraph()));
m_netTimer->start(NET_UPDATE);
- m_lightTimer = new QTimer(this);
- connect(m_lightTimer, SIGNAL(timeout()), SLOT(updateLights()));
+ m_lightTimer = new TQTimer(this);
+ connect(m_lightTimer, TQT_SIGNAL(timeout()), TQT_SLOT(updateLights()));
m_lightTimer->start(LED_UPDATE);
updateGraph();
@@ -180,12 +180,12 @@ void NetView::addDisplay()
{
KSim::LedLabel *led = addLedLabel( ( *it ).name() );
KSim::Label *label = ( ( *it ).showTimer() ? addLabel() : 0L );
- QPopupMenu * popup = ( ( *it ).commandsEnabled() ?
+ TQPopupMenu * popup = ( ( *it ).commandsEnabled() ?
addPopupMenu( ( *it ).name(), i ) : 0L );
KSim::Chart *chart = addChart();
//KSim::LedLabel *led = addLedLabel( ( *it ).name() );
//KSim::Label *label = ( ( *it ).showTimer() ? addLabel() : 0L );
- //QPopupMenu * popup = ( ( *it ).commandsEnabled() ?
+ //TQPopupMenu * popup = ( ( *it ).commandsEnabled() ?
//addPopupMenu( ( *it ).name(), i ) : 0L );
if ( ( *it ).commandsEnabled() )
@@ -262,12 +262,12 @@ Network::List NetView::createList() const
Network::List list;
for ( int i = 0; i < amount; ++i )
{
- if ( !config()->hasGroup( "device-" + QString::number( i ) ) )
+ if ( !config()->hasGroup( "device-" + TQString::number( i ) ) )
{
continue;
}
- config()->setGroup( "device-" + QString::number( i ) );
+ config()->setGroup( "device-" + TQString::number( i ) );
list.append( Network( config()->readEntry( "deviceName" ),
config()->readEntry( "deviceFormat" ),
@@ -341,10 +341,10 @@ void NetView::updateGraph()
time_t start = 0;
struct stat st;
- QTime netTime;
- QString timeDisplay;
- QString pid( "/var/run/%1.pid" );
- QString newPid;
+ TQTime netTime;
+ TQString timeDisplay;
+ TQString pid( "/var/run/%1.pid" );
+ TQString newPid;
Network::List::Iterator it;
for ( it = m_networkList.begin(); it != m_networkList.end(); ++it )
@@ -358,7 +358,7 @@ void NetView::updateGraph()
timeDisplay = ( *it ).format();
newPid = pid.arg( ( *it ).name() );
- if ( QFile::exists( newPid ) && stat( QFile::encodeName( newPid ).data(), &st ) == 0 )
+ if ( TQFile::exists( newPid ) && stat( TQFile::encodeName( newPid ).data(), &st ) == 0 )
{
start = st.st_mtime;
@@ -391,8 +391,8 @@ void NetView::updateGraph()
( *it ).chart()->setValue( receiveDiff, sendDiff );
( *it ).setMaxValue( ( *it ).chart()->maxValue() );
- QString receiveString = KGlobal::locale()->formatNumber( ( float ) receiveDiff / 1024.0, 1 );
- QString sendString = KGlobal::locale()->formatNumber( ( float ) sendDiff / 1024.0, 1 );
+ 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 ) );
@@ -422,7 +422,7 @@ KSim::Chart *NetView::addChart()
return chart;
}
-KSim::LedLabel *NetView::addLedLabel(const QString &device)
+KSim::LedLabel *NetView::addLedLabel(const TQString &device)
{
KSim::LedLabel *ledLabel = new KSim::LedLabel(0, KSim::Types::Net,
device, this);
@@ -440,20 +440,20 @@ KSim::Label *NetView::addLabel()
return label;
}
-QPopupMenu *NetView::addPopupMenu(const QString &device, int value)
+TQPopupMenu *NetView::addPopupMenu(const TQString &device, int value)
{
- QPopupMenu *popup = new QPopupMenu(this);
+ TQPopupMenu *popup = new TQPopupMenu(this);
popup->insertItem(SmallIcon("network"), i18n("Connect"), this,
- SLOT(runConnectCommand(int)), 0, 1);
+ TQT_SLOT(runConnectCommand(int)), 0, 1);
popup->setItemParameter(1, value);
popup->insertItem(SmallIcon("network"), i18n("Disconnect"), this,
- SLOT(runDisconnectCommand(int)), 0, 2);
+ TQT_SLOT(runDisconnectCommand(int)), 0, 2);
popup->setItemParameter(2, value);
menu()->insertItem(device, popup, 100 + value);
return popup;
}
-void NetView::netStatistics(const QString &device, NetData &data)
+void NetView::netStatistics(const TQString &device, NetData &data)
{
#ifdef __linux__
if (m_procFile == 0) {
@@ -462,8 +462,8 @@ void NetView::netStatistics(const QString &device, NetData &data)
return;
}
- QString output;
- QString parser;
+ TQString output;
+ TQString parser;
// Parse the proc file
while (!m_procStream->atEnd()) {
parser = m_procStream->readLine();
@@ -480,8 +480,8 @@ void NetView::netStatistics(const QString &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(QRegExp(":"), " ");
- QStringList netList = QStringList::split(' ', output);
+ output.replace(TQRegExp(":"), " ");
+ TQStringList netList = TQStringList::split(' ', output);
data.in = netList[1].toULong();
data.out = netList[9].toULong();
@@ -552,14 +552,14 @@ void NetView::netStatistics(const QString &device, NetData &data)
#endif
}
-bool NetView::isOnline(const QString &device)
+bool NetView::isOnline(const TQString &device)
{
#ifdef __linux__
- QFile file("/proc/net/route");
+ TQFile file("/proc/net/route");
if (!file.open(IO_ReadOnly))
return -1;
- return (QTextStream(&file).read().find(device) != -1 ? true : false);
+ return (TQTextStream(&file).read().find(device) != -1 ? true : false);
#endif
#ifdef __FreeBSD__
@@ -625,7 +625,7 @@ bool NetView::isOnline(const QString &device)
}
// EventFilter
-bool NetView::eventFilter( QObject * o, QEvent * e )
+bool NetView::eventFilter( TQObject * o, TQEvent * e )
{
// find out which interface we are
int i = 0;
@@ -640,9 +640,9 @@ bool NetView::eventFilter( QObject * o, QEvent * e )
++i;
}
- if ( e->type() == QEvent::MouseButtonPress )
+ if ( e->type() == TQEvent::MouseButtonPress )
{
- if ( static_cast<QMouseEvent *>( e )->button() == QMouseEvent::RightButton )
+ if ( static_cast<TQMouseEvent *>( e )->button() == TQMouseEvent::RightButton )
{
showMenu(i);
}
@@ -655,10 +655,10 @@ bool NetView::eventFilter( QObject * o, QEvent * e )
void NetView::showMenu(int i) {
- QPopupMenu menu;
+ TQPopupMenu menu;
menu.insertItem( SmallIcon("network"), i18n("Connect"), 1);
menu.insertItem( SmallIcon("network"), i18n("Disconnect"), 2);
- switch (menu.exec(QCursor::pos())) {
+ switch (menu.exec(TQCursor::pos())) {
case 1:
runConnectCommand(i);
break;
diff --git a/ksim/monitors/net/ksimnet.h b/ksim/monitors/net/ksimnet.h
index bdb76e6..007a1a8 100644
--- a/ksim/monitors/net/ksimnet.h
+++ b/ksim/monitors/net/ksimnet.h
@@ -58,29 +58,29 @@ class NetView : public KSim::PluginView
void runDisconnectCommand(int);
protected:
- bool eventFilter(QObject *, QEvent *);
+ bool eventFilter(TQObject *, TQEvent *);
private:
Network::List createList() const;
KSim::Chart *addChart();
- KSim::LedLabel *addLedLabel(const QString &device);
+ KSim::LedLabel *addLedLabel(const TQString &device);
KSim::Label *addLabel();
- QPopupMenu *addPopupMenu(const QString &device, int value);
+ TQPopupMenu *addPopupMenu(const TQString &device, int value);
- void netStatistics(const QString &device, NetData &data);
- bool isOnline(const QString &device);
+ void netStatistics(const TQString &device, NetData &data);
+ bool isOnline(const TQString &device);
void showMenu(int i);
bool m_firstTime;
Network::List m_networkList;
- QTimer *m_netTimer;
- QTimer *m_lightTimer;
- QVBoxLayout *m_netLayout;
+ TQTimer *m_netTimer;
+ TQTimer *m_lightTimer;
+ TQVBoxLayout *m_netLayout;
#ifdef __linux__
FILE *m_procFile;
- QTextStream *m_procStream;
+ TQTextStream *m_procStream;
#endif
#ifdef __FreeBSD__
char *m_buf;
diff --git a/ksim/monitors/net/netconfig.cpp b/ksim/monitors/net/netconfig.cpp
index ca424b3..178ac90 100644
--- a/ksim/monitors/net/netconfig.cpp
+++ b/ksim/monitors/net/netconfig.cpp
@@ -17,9 +17,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qcursor.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqcursor.h>
#include <klistview.h>
#include <ksimpleconfig.h>
@@ -40,7 +40,7 @@ NetConfig::NetConfig(KSim::PluginObject *parent, const char *name)
m_yes = i18n("yes");
m_no = i18n("no");
- QVBoxLayout *mainLayout = new QVBoxLayout(this);
+ TQVBoxLayout *mainLayout = new TQVBoxLayout(this);
mainLayout->setSpacing(6);
usingBox = new KListView(this);
@@ -49,33 +49,33 @@ NetConfig::NetConfig(KSim::PluginObject *parent, const char *name)
usingBox ->addColumn(i18n("Commands"));
usingBox->setAllColumnsShowFocus(true);
- connect(usingBox, SIGNAL(contextMenu(KListView *,
- QListViewItem *, const QPoint &)),
- SLOT(menu(KListView *, QListViewItem *, const QPoint &)));
- connect(usingBox, SIGNAL(doubleClicked(QListViewItem *)),
- SLOT(modifyItem(QListViewItem *)));
+ connect(usingBox, TQT_SIGNAL(contextMenu(KListView *,
+ TQListViewItem *, const TQPoint &)),
+ TQT_SLOT(menu(KListView *, TQListViewItem *, const TQPoint &)));
+ connect(usingBox, TQT_SIGNAL(doubleClicked(TQListViewItem *)),
+ TQT_SLOT(modifyItem(TQListViewItem *)));
mainLayout->addWidget(usingBox);
layout = new QHBoxLayout;
layout->setSpacing(6);
- QSpacerItem *spacer = new QSpacerItem(20, 20,
- QSizePolicy::Expanding, QSizePolicy::Minimum);
+ TQSpacerItem *spacer = new TQSpacerItem(20, 20,
+ TQSizePolicy::Expanding, TQSizePolicy::Minimum);
layout->addItem(spacer);
- insertButton = new QPushButton(this);
+ insertButton = new TQPushButton(this);
insertButton->setText(i18n("Add..."));
- connect(insertButton, SIGNAL(clicked()), SLOT(showNetDialog()));
+ connect(insertButton, TQT_SIGNAL(clicked()), TQT_SLOT(showNetDialog()));
layout->addWidget(insertButton);
- modifyButton = new QPushButton(this);
+ modifyButton = new TQPushButton(this);
modifyButton->setText(i18n("Modify..."));
- connect(modifyButton, SIGNAL(clicked()), SLOT(modifyCurrent()));
+ connect(modifyButton, TQT_SIGNAL(clicked()), TQT_SLOT(modifyCurrent()));
layout->addWidget(modifyButton);
- removeButton = new QPushButton(this);
+ removeButton = new TQPushButton(this);
removeButton->setText(i18n("Remove"));
- connect(removeButton, SIGNAL(clicked()), SLOT(removeCurrent()));
+ connect(removeButton, TQT_SIGNAL(clicked()), TQT_SLOT(removeCurrent()));
layout->addWidget(removeButton);
mainLayout->addLayout(layout);
@@ -93,7 +93,7 @@ void NetConfig::saveConfig()
Network::List::Iterator it;
for( it = m_networkList.begin(); it != m_networkList.end(); ++it )
{
- config()->setGroup( "device-" + QString::number( i ) );
+ config()->setGroup( "device-" + TQString::number( i ) );
config()->writeEntry( "deviceName", ( *it ).name() );
config()->writeEntry( "showTimer", ( *it ).showTimer() );
config()->writeEntry( "deviceFormat", ( *it ).format() );
@@ -117,12 +117,12 @@ void NetConfig::readConfig()
for ( int i = 0; i < deviceAmount; ++i )
{
- if ( !config()->hasGroup( "device-" + QString::number( i ) ) )
+ if ( !config()->hasGroup( "device-" + TQString::number( i ) ) )
{
continue;
}
- config()->setGroup("device-" + QString::number(i));
+ config()->setGroup("device-" + TQString::number(i));
m_networkList.append( Network( config()->readEntry( "deviceName" ),
config()->readEntry( "deviceFormat" ),
@@ -131,16 +131,16 @@ void NetConfig::readConfig()
config()->readEntry( "cCommand" ),
config()->readEntry( "dCommand" ) ) );
- (void) new QListViewItem( usingBox,
+ (void) new TQListViewItem( usingBox,
config()->readEntry( "deviceName" ),
boolToString( config()->readBoolEntry( "showTimer" ) ),
boolToString( config()->readBoolEntry( "commands" ) ) );
}
}
-void NetConfig::menu(KListView *, QListViewItem *item, const QPoint &)
+void NetConfig::menu(KListView *, TQListViewItem *item, const TQPoint &)
{
- aboutMenu = new QPopupMenu(this);
+ aboutMenu = new TQPopupMenu(this);
if (item) {
aboutMenu->insertItem(i18n("&Add Net Device"), 3);
@@ -155,7 +155,7 @@ void NetConfig::menu(KListView *, QListViewItem *item, const QPoint &)
aboutMenu->setItemEnabled(2, false);
}
- switch (aboutMenu->exec(QCursor::pos())) {
+ switch (aboutMenu->exec(TQCursor::pos())) {
case 1:
removeItem(item);
break;
@@ -170,7 +170,7 @@ void NetConfig::menu(KListView *, QListViewItem *item, const QPoint &)
delete aboutMenu;
}
-void NetConfig::modifyItem(QListViewItem *item)
+void NetConfig::modifyItem(TQListViewItem *item)
{
if (!item)
return;
@@ -211,13 +211,13 @@ void NetConfig::modifyItem(QListViewItem *item)
delete netDialog;
}
-void NetConfig::removeItem(QListViewItem *item)
+void NetConfig::removeItem(TQListViewItem *item)
{
if (!item)
return;
int result = KMessageBox::warningContinueCancel(0, i18n("Are you sure you "
- "want to remove the net interface '%1'?").arg(item->text(0)), QString::null, KStdGuiItem::del());
+ "want to remove the net interface '%1'?").arg(item->text(0)), TQString::null, KStdGuiItem::del());
if (result == KMessageBox::Cancel)
return;
@@ -229,7 +229,7 @@ void NetConfig::removeItem(QListViewItem *item)
if ( item->text( 0 ) == ( *it ).name() )
{
m_networkList.remove( it );
- if ( config()->deleteGroup( "device-" + QString::number( i ) ) )
+ if ( config()->deleteGroup( "device-" + TQString::number( i ) ) )
kdDebug(2003) << "device-" << i << " was deleted" << endl;
break;
@@ -281,13 +281,13 @@ void NetConfig::getStats()
netDialog->cCommand(),
netDialog->dCommand() ) );
- (void) new QListViewItem( usingBox,
+ (void) new TQListViewItem( usingBox,
netDialog->deviceName(),
boolToString( netDialog->timer() ),
boolToString( netDialog->commands() ) );
}
-const QString &NetConfig::boolToString(bool value) const
+const TQString &NetConfig::boolToString(bool value) const
{
if (value)
return m_yes;
diff --git a/ksim/monitors/net/netconfig.h b/ksim/monitors/net/netconfig.h
index 9ec5c8d..d8c7889 100644
--- a/ksim/monitors/net/netconfig.h
+++ b/ksim/monitors/net/netconfig.h
@@ -41,9 +41,9 @@ class NetConfig : public KSim::PluginPage
virtual void readConfig();
private slots:
- void menu(KListView *, QListViewItem *, const QPoint &);
- void modifyItem(QListViewItem *);
- void removeItem(QListViewItem *);
+ void menu(KListView *, TQListViewItem *, const TQPoint &);
+ void modifyItem(TQListViewItem *);
+ void removeItem(TQListViewItem *);
void removeCurrent();
void modifyCurrent();
void showNetDialog();
@@ -51,17 +51,17 @@ class NetConfig : public KSim::PluginPage
private:
// Couldnt think of a better name for this :)
- const QString &boolToString(bool) const;
+ const TQString &boolToString(bool) const;
- QHBoxLayout *layout;
- QPushButton *insertButton;
- QPushButton *removeButton;
- QPushButton *modifyButton;
+ TQHBoxLayout *layout;
+ TQPushButton *insertButton;
+ TQPushButton *removeButton;
+ TQPushButton *modifyButton;
KListView *usingBox;
NetDialog *netDialog;
Network::List m_networkList;
- QString m_yes;
- QString m_no;
- QPopupMenu *aboutMenu;
+ TQString m_yes;
+ TQString m_no;
+ TQPopupMenu *aboutMenu;
};
#endif
diff --git a/ksim/monitors/net/netdevices.h b/ksim/monitors/net/netdevices.h
index 2a5a680..b82b77d 100644
--- a/ksim/monitors/net/netdevices.h
+++ b/ksim/monitors/net/netdevices.h
@@ -42,7 +42,7 @@ class NetData
class Network
{
public:
- typedef QValueList<Network> List;
+ typedef TQValueList<Network> List;
Network()
{
@@ -54,12 +54,12 @@ class Network
m_max = 0;
}
- Network( const QString & name,
- const QString & format,
+ Network( const TQString & name,
+ const TQString & format,
bool timer,
bool commands,
- const QString & cCommand,
- const QString & dCommand )
+ const TQString & cCommand,
+ const TQString & dCommand )
: m_name( name ),
m_format( format ),
m_timer( timer ),
@@ -144,7 +144,7 @@ class Network
return m_max;
}
- const QString & name() const
+ const TQString & name() const
{
return m_name;
}
@@ -154,7 +154,7 @@ class Network
return m_timer;
}
- const QString & format() const
+ const TQString & format() const
{
return m_format;
}
@@ -164,18 +164,18 @@ class Network
return m_commands;
}
- const QString & connectCommand() const
+ const TQString & connectCommand() const
{
return m_cCommand;
}
- const QString & disconnectCommand() const
+ const TQString & disconnectCommand() const
{
return m_dCommand;
}
void setDisplay( KSim::Chart * chart, KSim::LedLabel * led,
- KSim::Label * label, QPopupMenu * popup )
+ KSim::Label * label, TQPopupMenu * popup )
{
m_chart = chart;
m_led = led;
@@ -201,17 +201,17 @@ class Network
private:
NetData m_data;
NetData m_old;
- QString m_name;
- QString m_format;
+ TQString m_name;
+ TQString m_format;
bool m_timer;
bool m_commands;
- QString m_cCommand;
- QString m_dCommand;
+ TQString m_cCommand;
+ TQString m_dCommand;
KSim::Chart * m_chart;
KSim::LedLabel * m_led;
KSim::Label * m_label;
- QPopupMenu * m_popup;
+ TQPopupMenu * m_popup;
int m_max;
};
diff --git a/ksim/monitors/net/netdialog.cpp b/ksim/monitors/net/netdialog.cpp
index fe655d4..60a5d20 100644
--- a/ksim/monitors/net/netdialog.cpp
+++ b/ksim/monitors/net/netdialog.cpp
@@ -20,15 +20,15 @@
#include "netdialog.h"
#include "netdialog.moc"
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qtabwidget.h>
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqtabwidget.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kcombobox.h>
@@ -49,29 +49,29 @@
#include <string.h>
-NetDialog::NetDialog(QWidget *parent, const char *name)
- : QTabDialog(parent, name, true)
+NetDialog::NetDialog(TQWidget *parent, const char *name)
+ : TQTabDialog(parent, name, true)
{
m_clicked = false;
setCaption(kapp->makeStdCaption(i18n("Network Interface")));
- m_generalTab = new QWidget(this);
- m_generalLayout = new QGridLayout(m_generalTab);
+ m_generalTab = new TQWidget(this);
+ m_generalLayout = new TQGridLayout(m_generalTab);
m_generalLayout->setSpacing(6);
m_generalLayout->setMargin(11);
- m_deviceLabel = new QLabel(m_generalTab);
+ m_deviceLabel = new TQLabel(m_generalTab);
m_deviceLabel->setText(i18n("Interface:"));
m_generalLayout->addMultiCellWidget(m_deviceLabel, 0, 0, 0, 0);
m_deviceCombo = new KComboBox(true, m_generalTab);
- m_deviceCombo->setSizePolicy(QSizePolicy(QSizePolicy::Preferred,
- QSizePolicy::Fixed));
+ m_deviceCombo->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred,
+ TQSizePolicy::Fixed));
m_deviceCombo->setFocus();
m_deviceCombo->setDuplicatesEnabled(false);
m_generalLayout->addMultiCellWidget(m_deviceCombo, 0, 0, 1, 1);
- QStringList output(createList());
+ TQStringList output(createList());
if (output.isEmpty()) {
m_deviceCombo->insertItem("ppp0");
m_deviceCombo->insertItem("eth0");
@@ -79,16 +79,16 @@ NetDialog::NetDialog(QWidget *parent, const char *name)
else
m_deviceCombo->insertStringList(output);
- QSpacerItem *deviceSpacer = new QSpacerItem(20, 20,
- QSizePolicy::Expanding, QSizePolicy::Fixed);
+ TQSpacerItem *deviceSpacer = new TQSpacerItem(20, 20,
+ TQSizePolicy::Expanding, TQSizePolicy::Fixed);
m_generalLayout->addMultiCell(deviceSpacer, 0, 0, 2, 2);
- m_timerBox = new QGroupBox(m_generalTab);
+ 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 QVBoxLayout(m_timerBox->layout());
+ m_timerBoxLayout = new TQVBoxLayout(m_timerBox->layout());
m_timerBoxLayout->setAlignment(Qt::AlignTop);
m_timerBoxLayout->setSpacing(6);
m_timerBoxLayout->setMargin(11);
@@ -97,77 +97,77 @@ NetDialog::NetDialog(QWidget *parent, const char *name)
m_timerEdit->setText("hh:mm:ss");
m_timerEdit->setEnabled(false);
- m_showTimer = new QCheckBox(m_timerBox);
+ m_showTimer = new TQCheckBox(m_timerBox);
m_showTimer->setText(i18n("Show timer"));
- connect(m_showTimer, SIGNAL(toggled(bool)),
- m_timerEdit, SLOT(setEnabled(bool)));
+ connect(m_showTimer, TQT_SIGNAL(toggled(bool)),
+ m_timerEdit, TQT_SLOT(setEnabled(bool)));
m_timerBoxLayout->addWidget(m_showTimer);
m_timerBoxLayout->addWidget(m_timerEdit);
- m_hFormat = new QLabel(m_timerBox);
+ m_hFormat = new TQLabel(m_timerBox);
m_hFormat->setText(i18n("hh - Total hours online"));
m_timerBoxLayout->addWidget(m_hFormat);
- m_mFormat = new QLabel(m_timerBox);
+ m_mFormat = new TQLabel(m_timerBox);
m_mFormat->setText(i18n("mm - Total minutes online"));
m_timerBoxLayout->addWidget(m_mFormat);
- m_sFormat = new QLabel(m_timerBox);
+ m_sFormat = new TQLabel(m_timerBox);
m_sFormat->setText(i18n("ss - Total seconds online"));
m_timerBoxLayout->addWidget(m_sFormat);
m_generalLayout->addMultiCellWidget(m_timerBox, 1, 1, 0, 2);
- QSpacerItem *spacer = new QSpacerItem(20, 20,
- QSizePolicy::Minimum, QSizePolicy::Expanding);
+ TQSpacerItem *spacer = new TQSpacerItem(20, 20,
+ TQSizePolicy::Minimum, TQSizePolicy::Expanding);
m_generalLayout->addMultiCell(spacer, 2, 2, 0, 0);
addTab(m_generalTab, i18n("General"));
- m_commandTab = new QWidget(this);
- m_commandLayout = new QGridLayout(m_commandTab);
+ m_commandTab = new TQWidget(this);
+ m_commandLayout = new TQGridLayout(m_commandTab);
m_commandLayout->setSpacing(6);
m_commandLayout->setMargin(11);
- m_enableCommands = new QCheckBox(m_commandTab);
+ m_enableCommands = new TQCheckBox(m_commandTab);
m_enableCommands->setText(i18n("Enable connect/disconnect"));
m_commandLayout->addMultiCellWidget(m_enableCommands, 0, 0, 0, 2);
- m_cCommand = new QLabel(m_commandTab);
+ m_cCommand = new TQLabel(m_commandTab);
m_cCommand->setText(i18n("Connect command:"));
m_commandLayout->addMultiCellWidget(m_cCommand, 1, 1, 0, 0);
m_connectRequester = new KURLRequester(m_commandTab);
m_connectRequester->setMinimumSize(145, 0);
m_connectRequester->setEnabled(false);
- connect(m_enableCommands, SIGNAL(toggled(bool)),
- m_connectRequester, SLOT(setEnabled(bool)));
+ connect(m_enableCommands, TQT_SIGNAL(toggled(bool)),
+ m_connectRequester, TQT_SLOT(setEnabled(bool)));
m_commandLayout->addMultiCellWidget(m_connectRequester, 1, 1, 1, 2);
- m_dCommand = new QLabel(m_commandTab);
+ m_dCommand = new TQLabel(m_commandTab);
m_dCommand->setText(i18n("Disconnect command:"));
m_commandLayout->addMultiCellWidget(m_dCommand, 2, 2, 0, 0);
m_disconnectRequester = new KURLRequester(m_commandTab);
m_disconnectRequester->setMinimumSize(145, 0);
m_disconnectRequester->setEnabled(false);
- connect(m_enableCommands, SIGNAL(toggled(bool)),
- m_disconnectRequester, SLOT(setEnabled(bool)));
+ connect(m_enableCommands, TQT_SIGNAL(toggled(bool)),
+ m_disconnectRequester, TQT_SLOT(setEnabled(bool)));
m_commandLayout->addMultiCellWidget(m_disconnectRequester, 2, 2, 1, 2);
- QSpacerItem *commandSpacer = new QSpacerItem(20, 20,
- QSizePolicy::Minimum, QSizePolicy::Expanding);
+ TQSpacerItem *commandSpacer = new TQSpacerItem(20, 20,
+ TQSizePolicy::Minimum, TQSizePolicy::Expanding);
m_commandLayout->addItem(commandSpacer);
addTab(m_commandTab, i18n("Commands"));
setOkButton(KStdGuiItem::ok().text());
setCancelButton(KStdGuiItem::cancel().text());
- connect(this, SIGNAL(applyButtonPressed()), SLOT(sendClicked()));
+ connect(this, TQT_SIGNAL(applyButtonPressed()), TQT_SLOT(sendClicked()));
}
NetDialog::~NetDialog()
{
}
-const QString NetDialog::deviceName() const
+const TQString NetDialog::deviceName() const
{
return m_deviceCombo->currentText();
}
@@ -177,7 +177,7 @@ bool NetDialog::timer()
return m_showTimer->isChecked();
}
-const QString NetDialog::format() const
+const TQString NetDialog::format() const
{
return m_timerEdit->text();
}
@@ -187,17 +187,17 @@ bool NetDialog::commands()
return m_enableCommands->isChecked();
}
-const QString NetDialog::cCommand() const
+const TQString NetDialog::cCommand() const
{
return m_connectRequester->url();
}
-const QString NetDialog::dCommand() const
+const TQString NetDialog::dCommand() const
{
return m_disconnectRequester->url();
}
-void NetDialog::setDeviceName(const QString &text)
+void NetDialog::setDeviceName(const TQString &text)
{
m_deviceCombo->setCurrentItem(text, true);
}
@@ -207,7 +207,7 @@ void NetDialog::setShowTimer(bool value)
m_showTimer->setChecked(value);
}
-void NetDialog::setFormat(const QString &format)
+void NetDialog::setFormat(const TQString &format)
{
m_timerEdit->setText(format);
}
@@ -217,12 +217,12 @@ void NetDialog::setShowCommands(bool value)
m_enableCommands->setChecked(value);
}
-void NetDialog::setCCommand(const QString &text)
+void NetDialog::setCCommand(const TQString &text)
{
m_connectRequester->setURL(text);
}
-void NetDialog::setDCommand(const QString &text)
+void NetDialog::setDCommand(const TQString &text)
{
m_disconnectRequester->setURL(text);
}
@@ -233,28 +233,28 @@ void NetDialog::sendClicked()
kdDebug(2003) << "ok was clicked" << endl;
}
-QStringList NetDialog::createList() const
+TQStringList NetDialog::createList() const
{
#ifdef __linux__
- QFile file("/proc/net/dev");
+ TQFile file("/proc/net/dev");
if (!file.open(IO_ReadOnly))
- return QStringList();
+ return TQStringList();
- QStringList output;
- QTextStream textStream(&file);
+ TQStringList output;
+ TQTextStream textStream(&file);
while (!textStream.atEnd())
output.append(textStream.readLine());
if (output.isEmpty())
- return QStringList();
+ return TQStringList();
output.pop_front();
output.pop_front();
- QStringList::Iterator it;
- QStringList list;
+ TQStringList::Iterator it;
+ TQStringList list;
for (it = output.begin(); it != output.end(); ++it) {
- list = QStringList::split(' ', (*it));
+ list = TQStringList::split(' ', (*it));
(*it) = list[0].stripWhiteSpace();
(*it).truncate((*it).find(':'));
}
@@ -263,7 +263,7 @@ QStringList NetDialog::createList() const
#endif
#ifdef __FreeBSD__
- QStringList output;
+ TQStringList output;
int mib[] = { CTL_NET, PF_ROUTE, 0, 0, NET_RT_IFLIST, 0 };
char *buf = 0;
int alloc = 0;
@@ -274,19 +274,19 @@ QStringList NetDialog::createList() const
char s[32];
if (sysctl(mib, 6, NULL, &needed, NULL, 0) < 0)
- return QStringList();
+ return TQStringList();
if (alloc < needed) {
buf = new char[needed];
if (buf == NULL)
- return QStringList();
+ return TQStringList();
alloc = needed;
}
if (sysctl(mib, 6, buf, &needed, NULL, 0) < 0)
- return QStringList();
+ return TQStringList();
lim = buf + needed;
@@ -294,7 +294,7 @@ QStringList NetDialog::createList() const
while (next < lim) {
ifm = (struct if_msghdr *)next;
if (ifm->ifm_type != RTM_IFINFO)
- return QStringList();
+ return TQStringList();
next += ifm->ifm_msglen;
diff --git a/ksim/monitors/net/netdialog.h b/ksim/monitors/net/netdialog.h
index b6d7801..662e727 100644
--- a/ksim/monitors/net/netdialog.h
+++ b/ksim/monitors/net/netdialog.h
@@ -20,7 +20,7 @@
#ifndef NETDIALOG_H
#define NETDIALOG_H
-#include <qtabdialog.h>
+#include <tqtabdialog.h>
class QVBoxLayout;
class QGridLayout;
@@ -36,50 +36,50 @@ class NetDialog : public QTabDialog
{
Q_OBJECT
public:
- NetDialog(QWidget *parent, const char *name = 0);
+ NetDialog(TQWidget *parent, const char *name = 0);
~NetDialog();
- const QString deviceName() const;
+ const TQString deviceName() const;
bool timer();
- const QString format() const;
+ const TQString format() const;
bool commands();
- const QString cCommand() const;
- const QString dCommand() const;
+ const TQString cCommand() const;
+ const TQString dCommand() const;
bool okClicked() { return m_clicked; }
public slots:
- void setDeviceName(const QString &);
+ void setDeviceName(const TQString &);
void setShowTimer(bool);
- void setFormat(const QString &);
+ void setFormat(const TQString &);
void setShowCommands(bool);
- void setCCommand(const QString &);
- void setDCommand(const QString &);
+ void setCCommand(const TQString &);
+ void setDCommand(const TQString &);
private slots:
void sendClicked();
private:
- QStringList createList() const;
+ TQStringList createList() const;
bool m_clicked;
- QWidget *m_generalTab;
- QLabel *m_deviceLabel;
+ TQWidget *m_generalTab;
+ TQLabel *m_deviceLabel;
KComboBox *m_deviceCombo;
- QGroupBox *m_timerBox;
- QCheckBox *m_showTimer;
+ TQGroupBox *m_timerBox;
+ TQCheckBox *m_showTimer;
KLineEdit *m_timerEdit;
- QLabel *m_hFormat;
- QLabel *m_mFormat;
- QLabel *m_sFormat;
- QWidget *m_commandTab;
- QCheckBox *m_enableCommands;
- QLabel *m_cCommand;
+ TQLabel *m_hFormat;
+ TQLabel *m_mFormat;
+ TQLabel *m_sFormat;
+ TQWidget *m_commandTab;
+ TQCheckBox *m_enableCommands;
+ TQLabel *m_cCommand;
KURLRequester *m_connectRequester;
- QLabel *m_dCommand;
+ TQLabel *m_dCommand;
KURLRequester *m_disconnectRequester;
- QGridLayout *m_generalLayout;
- QVBoxLayout *m_timerBoxLayout;
- QGridLayout *m_commandLayout;
+ TQGridLayout *m_generalLayout;
+ TQVBoxLayout *m_timerBoxLayout;
+ TQGridLayout *m_commandLayout;
};
#endif // NETDIALOG_H
diff --git a/ksim/monitors/snmp/browsedialog.cpp b/ksim/monitors/snmp/browsedialog.cpp
index d196ec8..3085eca 100644
--- a/ksim/monitors/snmp/browsedialog.cpp
+++ b/ksim/monitors/snmp/browsedialog.cpp
@@ -19,7 +19,7 @@
#include "browsedialog.h"
-#include <qlabel.h>
+#include <tqlabel.h>
#include <klistview.h>
#include <kguiitem.h>
@@ -29,7 +29,7 @@
using namespace KSim::Snmp;
-BrowseDialog::BrowseDialog( const HostConfig &hostConfig, const QString &currentOid, QWidget *parent, const char *name )
+BrowseDialog::BrowseDialog( const HostConfig &hostConfig, const TQString &currentOid, TQWidget *parent, const char *name )
: BrowseDialogBase( parent, name ), m_host( hostConfig )
{
stop->setGuiItem( KGuiItem( i18n( "&Stop" ), "stop" ) );
@@ -44,7 +44,7 @@ BrowseDialog::BrowseDialog( const HostConfig &hostConfig, const QString &current
nextWalk();
}
-QString BrowseDialog::selectedObjectIdentifier() const
+TQString BrowseDialog::selectedObjectIdentifier() const
{
return selectedObject->text();
}
@@ -66,13 +66,13 @@ void BrowseDialog::insertBrowseItem( const Walker::Result &result )
return;
}
- QListViewItem *i = new QListViewItem( browserContents, browserContents->lastItem(), result.identifierString, result.dataString );
+ TQListViewItem *i = new TQListViewItem( browserContents, browserContents->lastItem(), result.identifierString, result.dataString );
applyFilter( i );
}
void BrowseDialog::applyFilter()
{
- for ( QListViewItem *i = browserContents->firstChild();
+ for ( TQListViewItem *i = browserContents->firstChild();
i; i = i->nextSibling() )
applyFilter( i );
}
@@ -84,7 +84,7 @@ void BrowseDialog::nextWalk()
if ( baseOids.isEmpty() )
return;
- QString baseOidString = baseOids.pop();
+ TQString baseOidString = baseOids.pop();
Identifier id = Identifier::fromString( baseOidString );
if ( id.isNull() )
return;
@@ -96,10 +96,10 @@ void BrowseDialog::startWalk( const Identifier &startOid )
stopWalker();
m_walker = new Walker( m_host, startOid, this );
- connect( m_walker, SIGNAL( resultReady( const Walker::Result & ) ),
- this, SLOT( insertBrowseItem( const Walker::Result & ) ) );
- connect( m_walker, SIGNAL( finished() ),
- this, SLOT( nextWalk() ) );
+ connect( m_walker, TQT_SIGNAL( resultReady( const Walker::Result & ) ),
+ this, TQT_SLOT( insertBrowseItem( const Walker::Result & ) ) );
+ connect( m_walker, TQT_SIGNAL( finished() ),
+ this, TQT_SLOT( nextWalk() ) );
stop->setEnabled( true );
}
@@ -109,10 +109,10 @@ void BrowseDialog::stopWalker()
if ( !m_walker )
return;
- disconnect( m_walker, SIGNAL( resultReady( const Walker::Result & ) ),
- this, SLOT( insertBrowseItem( const Walker::Result & ) ) );
- disconnect( m_walker, SIGNAL( finished() ),
- this, SLOT( nextWalk() ) );
+ disconnect( m_walker, TQT_SIGNAL( resultReady( const Walker::Result & ) ),
+ this, TQT_SLOT( insertBrowseItem( const Walker::Result & ) ) );
+ disconnect( m_walker, TQT_SIGNAL( finished() ),
+ this, TQT_SLOT( nextWalk() ) );
m_walker->deleteLater();
m_walker = 0;
@@ -120,14 +120,14 @@ void BrowseDialog::stopWalker()
stop->setEnabled( false );
}
-void BrowseDialog::objectSelected( QListViewItem *item )
+void BrowseDialog::objectSelected( TQListViewItem *item )
{
selectedObject->setText( item->text( 0 ) );
}
-void BrowseDialog::applyFilter( QListViewItem *item )
+void BrowseDialog::applyFilter( TQListViewItem *item )
{
- QString filterText = filter->text();
+ TQString filterText = filter->text();
if ( filterText.isEmpty() ) {
item->setVisible( true );
diff --git a/ksim/monitors/snmp/browsedialog.h b/ksim/monitors/snmp/browsedialog.h
index cb6466a..a694881 100644
--- a/ksim/monitors/snmp/browsedialog.h
+++ b/ksim/monitors/snmp/browsedialog.h
@@ -28,7 +28,7 @@
#include "snmp.h"
#include "walker.h"
-#include <qvaluestack.h>
+#include <tqvaluestack.h>
namespace KSim
{
@@ -40,27 +40,27 @@ class BrowseDialog : public BrowseDialogBase
{
Q_OBJECT
public:
- BrowseDialog( const HostConfig &hostConfig, const QString &currentOid, QWidget *parent, const char *name = 0 );
+ BrowseDialog( const HostConfig &hostConfig, const TQString &currentOid, TQWidget *parent, const char *name = 0 );
- QString selectedObjectIdentifier() const;
+ TQString selectedObjectIdentifier() const;
protected:
virtual void stopAllWalks();
virtual void applyFilter();
- virtual void objectSelected( QListViewItem *item );
+ virtual void objectSelected( TQListViewItem *item );
private slots:
void insertBrowseItem( const Walker::Result &browseResult );
void nextWalk();
private:
- void applyFilter( QListViewItem *item );
+ void applyFilter( TQListViewItem *item );
void startWalk( const Identifier &startOid );
void stopWalker();
HostConfig m_host;
Walker *m_walker;
- QValueStack<QString> baseOids;
+ TQValueStack<TQString> baseOids;
};
}
diff --git a/ksim/monitors/snmp/chartmonitor.cpp b/ksim/monitors/snmp/chartmonitor.cpp
index 1a32086..a5cfc6e 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, QWidget *parent, const char *name )
- : KSim::Chart( true /* displayMeter */, 0, QString::null, parent, name ),
+ChartMonitor::ChartMonitor( const MonitorConfig &config, TQWidget *parent, const char *name )
+ : KSim::Chart( true /* displayMeter */, 0, TQString::null, parent, name ),
m_lastValue( 0 ), m_config( config ), m_firstSampleReceived( false )
{
setTitle( m_config.name );
diff --git a/ksim/monitors/snmp/chartmonitor.h b/ksim/monitors/snmp/chartmonitor.h
index 30a58ad..3b064f8 100644
--- a/ksim/monitors/snmp/chartmonitor.h
+++ b/ksim/monitors/snmp/chartmonitor.h
@@ -32,7 +32,7 @@ class ChartMonitor : public KSim::Chart
{
Q_OBJECT
public:
- ChartMonitor( const MonitorConfig &config, QWidget *parent, const char *name = 0 );
+ ChartMonitor( const MonitorConfig &config, TQWidget *parent, const char *name = 0 );
public slots:
void setData( const Value &data );
diff --git a/ksim/monitors/snmp/configpage.cpp b/ksim/monitors/snmp/configpage.cpp
index d15d606..ee50054 100644
--- a/ksim/monitors/snmp/configpage.cpp
+++ b/ksim/monitors/snmp/configpage.cpp
@@ -24,9 +24,9 @@
#include "hostdialog.h"
#include "monitordialog.h"
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqpushbutton.h>
#include <kconfig.h>
#include <klistview.h>
@@ -35,9 +35,9 @@
using namespace KSim::Snmp;
-static bool listViewHasSelection( QListView *lv )
+static bool listViewHasSelection( TQListView *lv )
{
- for ( QListViewItem *i = lv->firstChild(); i; i = i->itemBelow() )
+ for ( TQListViewItem *i = lv->firstChild(); i; i = i->itemBelow() )
if ( i->isSelected() )
return true;
return false;
@@ -46,28 +46,28 @@ static bool listViewHasSelection( QListView *lv )
ConfigPage::ConfigPage( Plugin *parent, const char *name )
: KSim::PluginPage( parent, name )
{
- ( new QVBoxLayout( this ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( this ) )->setAutoAdd( true );
m_page = new ConfigWidget( this );
- connect( m_page->addHost, SIGNAL( clicked() ),
- this, SLOT( addNewHost() ) );
- connect( m_page->modifyHost, SIGNAL( clicked() ),
- this, SLOT( modifyHost() ) );
- connect( m_page->removeHost, SIGNAL( clicked() ),
- this, SLOT( removeHost() ) );
-
- connect( m_page->addMonitor, SIGNAL( clicked() ),
- this, SLOT( addNewMonitor() ) );
- connect( m_page->modifyMonitor, SIGNAL( clicked() ),
- this, SLOT( modifyMonitor() ) );
- connect( m_page->removeMonitor, SIGNAL( clicked() ),
- this, SLOT( removeMonitor() ) );
-
- connect( m_page->hosts, SIGNAL( selectionChanged() ),
- this, SLOT( disableOrEnableSomeWidgets() ) );
- connect( m_page->monitors, SIGNAL( selectionChanged() ),
- this, SLOT( disableOrEnableSomeWidgets() ) );
+ connect( m_page->addHost, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( addNewHost() ) );
+ connect( m_page->modifyHost, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( modifyHost() ) );
+ connect( m_page->removeHost, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( removeHost() ) );
+
+ connect( m_page->addMonitor, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( addNewMonitor() ) );
+ connect( m_page->modifyMonitor, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( modifyMonitor() ) );
+ connect( m_page->removeMonitor, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( removeMonitor() ) );
+
+ connect( m_page->hosts, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( disableOrEnableSomeWidgets() ) );
+ connect( m_page->monitors, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( disableOrEnableSomeWidgets() ) );
}
ConfigPage::~ConfigPage()
@@ -82,8 +82,8 @@ void ConfigPage::saveConfig()
removeAllHostGroups();
removeAllMonitorGroups();
- QStringList hosts = m_hosts.save( cfg );
- QStringList monitors = m_monitors.save( cfg );
+ TQStringList hosts = m_hosts.save( cfg );
+ TQStringList monitors = m_monitors.save( cfg );
cfg.setGroup( "General" );
cfg.writeEntry( "Hosts", hosts );
@@ -95,8 +95,8 @@ void ConfigPage::readConfig()
KConfig &cfg = *config();
cfg.setGroup( "General" );
- QStringList hosts = cfg.readListEntry( "Hosts" );
- QStringList monitors = cfg.readListEntry( "Monitors" );
+ TQStringList hosts = cfg.readListEntry( "Hosts" );
+ TQStringList monitors = cfg.readListEntry( "Monitors" );
m_hosts.load( cfg, hosts );
m_monitors.load( cfg, monitors, m_hosts );
@@ -151,7 +151,7 @@ void ConfigPage::removeHost()
if ( hostIt == m_hosts.end() )
return;
- QStringList monitors = monitorsForHost( *hostIt );
+ TQStringList monitors = monitorsForHost( *hostIt );
if ( !monitors.isEmpty() ) {
int answer = KMessageBox::warningContinueCancelList(
this,
@@ -237,17 +237,17 @@ void ConfigPage::disableOrEnableSomeWidgets()
m_page->monitorGroup->setEnabled( !m_hosts.isEmpty() );
}
-void ConfigPage::removeMonitors( QStringList monitors )
+void ConfigPage::removeMonitors( TQStringList monitors )
{
- for ( QStringList::ConstIterator it = monitors.begin();
+ for ( TQStringList::ConstIterator it = monitors.begin();
it != monitors.end(); ++it )
m_monitors.remove( *it );
- QListViewItem *item = m_page->monitors->firstChild();
+ TQListViewItem *item = m_page->monitors->firstChild();
while ( item ) {
- QListViewItem *nextItem = item->itemBelow();
+ TQListViewItem *nextItem = item->itemBelow();
- for ( QStringList::Iterator it = monitors.begin();
+ for ( TQStringList::Iterator it = monitors.begin();
it != monitors.end(); ++it )
if ( item->text( 0 ) == *it ) {
@@ -272,12 +272,12 @@ void ConfigPage::removeAllMonitorGroups()
removeConfigGroups( "Monitor " );
}
-void ConfigPage::removeConfigGroups( const QString &prefix )
+void ConfigPage::removeConfigGroups( const TQString &prefix )
{
KConfig &cfg = *config();
- QStringList groups = cfg.groupList();
- for ( QStringList::ConstIterator it = groups.begin(); it != groups.end(); ++it )
+ TQStringList groups = cfg.groupList();
+ for ( TQStringList::ConstIterator it = groups.begin(); it != groups.end(); ++it )
if ( ( *it ).startsWith( prefix ) )
cfg.deleteGroup( *it, true /* deep */ );
}
@@ -296,9 +296,9 @@ void ConfigPage::fillGui()
disableOrEnableSomeWidgets();
}
-QStringList ConfigPage::monitorsForHost( const HostConfig &host ) const
+TQStringList ConfigPage::monitorsForHost( const HostConfig &host ) const
{
- QStringList monitors;
+ TQStringList monitors;
for ( MonitorConfigMap::ConstIterator it = m_monitors.begin();
it != m_monitors.end(); ++it )
diff --git a/ksim/monitors/snmp/configpage.h b/ksim/monitors/snmp/configpage.h
index 42c7579..66c941c 100644
--- a/ksim/monitors/snmp/configpage.h
+++ b/ksim/monitors/snmp/configpage.h
@@ -35,20 +35,20 @@ namespace Snmp
class HostItem : public QListViewItem
{
public:
- HostItem( QListView *parent, const KSim::Snmp::HostConfig &src )
- : QListViewItem( parent, QString::null, QString::null, QString::null )
+ HostItem( TQListView *parent, const KSim::Snmp::HostConfig &src )
+ : TQListViewItem( parent, TQString::null, TQString::null, TQString::null )
{
setFromHostConfig( src );
}
- HostItem( QListView *parent )
- : QListViewItem( parent, QString::null, QString::null, QString::null )
+ HostItem( TQListView *parent )
+ : TQListViewItem( parent, TQString::null, TQString::null, TQString::null )
{}
void setFromHostConfig( const KSim::Snmp::HostConfig &src )
{
setText( 0, src.name );
- setText( 1, QString::number( src.port ) );
+ setText( 1, TQString::number( src.port ) );
setText( 2, snmpVersionToString( src.version ) );
}
};
@@ -56,14 +56,14 @@ public:
class MonitorItem : public QListViewItem
{
public:
- MonitorItem( QListView *parent, const KSim::Snmp::MonitorConfig &monitor )
- : QListViewItem( parent, QString::null, QString::null, QString::null )
+ MonitorItem( TQListView *parent, const KSim::Snmp::MonitorConfig &monitor )
+ : TQListViewItem( parent, TQString::null, TQString::null, TQString::null )
{
setFromMonitor( monitor );
}
- MonitorItem( QListView *parent )
- : QListViewItem( parent, QString::null, QString::null, QString::null )
+ MonitorItem( TQListView *parent )
+ : TQListViewItem( parent, TQString::null, TQString::null, TQString::null )
{}
void setFromMonitor( const KSim::Snmp::MonitorConfig &monitor )
@@ -97,14 +97,14 @@ private slots:
void disableOrEnableSomeWidgets();
private:
- void removeMonitors( QStringList monitors );
+ void removeMonitors( TQStringList monitors );
void removeAllHostGroups();
void removeAllMonitorGroups();
- void removeConfigGroups( const QString &prefix );
+ void removeConfigGroups( const TQString &prefix );
void fillGui();
- QStringList monitorsForHost( const HostConfig &host ) const;
+ TQStringList monitorsForHost( const HostConfig &host ) const;
ConfigWidget *m_page;
KSim::Snmp::HostConfigMap m_hosts;
diff --git a/ksim/monitors/snmp/hostconfig.cpp b/ksim/monitors/snmp/hostconfig.cpp
index 1b96541..1188c12 100644
--- a/ksim/monitors/snmp/hostconfig.cpp
+++ b/ksim/monitors/snmp/hostconfig.cpp
@@ -109,7 +109,7 @@ void HostConfig::save( KConfigBase &config ) const
writeIfNotEmpty( config, "PrivPassphrase", KStringHandler::obscure( privacy.key ) );
}
-void HostConfig::writeIfNotEmpty( KConfigBase &config, const QString &name, const QString &value )
+void HostConfig::writeIfNotEmpty( KConfigBase &config, const TQString &name, const TQString &value )
{
if ( value.isEmpty() )
return;
@@ -117,11 +117,11 @@ void HostConfig::writeIfNotEmpty( KConfigBase &config, const QString &name, cons
config.writeEntry( name, value );
}
-void HostConfigMap::load( KConfigBase &config, const QStringList &hosts )
+void HostConfigMap::load( KConfigBase &config, const TQStringList &hosts )
{
clear();
- for ( QStringList::ConstIterator it = hosts.begin(); it != hosts.end(); ++it ) {
+ for ( TQStringList::ConstIterator it = hosts.begin(); it != hosts.end(); ++it ) {
config.setGroup( "Host " + *it );
HostConfig src;
@@ -132,12 +132,12 @@ void HostConfigMap::load( KConfigBase &config, const QStringList &hosts )
}
}
-QStringList HostConfigMap::save( KConfigBase &config ) const
+TQStringList HostConfigMap::save( KConfigBase &config ) const
{
- QStringList hostList;
+ TQStringList hostList;
for ( ConstIterator it = begin(); it != end(); ++it ) {
- QString host = it.key();
+ TQString host = it.key();
hostList << host;
diff --git a/ksim/monitors/snmp/hostconfig.h b/ksim/monitors/snmp/hostconfig.h
index d19de9b..af8a0fd 100644
--- a/ksim/monitors/snmp/hostconfig.h
+++ b/ksim/monitors/snmp/hostconfig.h
@@ -34,26 +34,26 @@ struct HostConfig
HostConfig( KConfigBase &config )
{ load( config ); }
- QString name; // hostname
+ TQString name; // hostname
ushort port;
SnmpVersion version;
- QString community;
+ TQString community;
- QString securityName;
+ TQString securityName;
SecurityLevel securityLevel;
struct
{
AuthenticationProtocol protocol;
- QString key;
+ TQString key;
} authentication;
struct
{
PrivacyProtocol protocol;
- QString key;
+ TQString key;
} privacy;
bool load( KConfigBase &config );
@@ -65,17 +65,17 @@ struct HostConfig
{ return name == rhs.name; }
private:
- static void writeIfNotEmpty( KConfigBase &config, const QString &name, const QString &value );
+ static void writeIfNotEmpty( KConfigBase &config, const TQString &name, const TQString &value );
};
-struct HostConfigMap : public QMap< QString, HostConfig >
+struct HostConfigMap : public TQMap< TQString, HostConfig >
{
HostConfigMap() {}
- HostConfigMap( const QMap< QString, HostConfig > &rhs )
- : QMap< QString, HostConfig >( rhs ) {}
+ HostConfigMap( const TQMap< TQString, HostConfig > &rhs )
+ : TQMap< TQString, HostConfig >( rhs ) {}
- void load( KConfigBase &config, const QStringList &hosts );
- QStringList save( KConfigBase &config ) const;
+ void load( KConfigBase &config, const TQStringList &hosts );
+ TQStringList save( KConfigBase &config ) const;
};
}
diff --git a/ksim/monitors/snmp/hostdialog.cpp b/ksim/monitors/snmp/hostdialog.cpp
index a1ccdc3..7d66a75 100644
--- a/ksim/monitors/snmp/hostdialog.cpp
+++ b/ksim/monitors/snmp/hostdialog.cpp
@@ -21,12 +21,12 @@
#include "probedialog.h"
#include "proberesultdialog.h"
-#include <qcombobox.h>
-#include <qwidgetstack.h>
+#include <tqcombobox.h>
+#include <tqwidgetstack.h>
#include <klineedit.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqspinbox.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -35,14 +35,14 @@
using namespace KSim::Snmp;
-HostDialog::HostDialog( QWidget *parent, const char *name )
+HostDialog::HostDialog( TQWidget *parent, const char *name )
: HostDialogBase( parent, name )
{
init();
port->setValue( 161 );
}
-HostDialog::HostDialog( const HostConfig &src, QWidget *parent, const char *name )
+HostDialog::HostDialog( const HostConfig &src, TQWidget *parent, const char *name )
: HostDialogBase( parent, name )
{
init( src );
@@ -79,7 +79,7 @@ HostConfig HostDialog::settings() const
return result;
}
-void HostDialog::showSnmpAuthenticationDetailsForVersion( const QString &versionStr )
+void HostDialog::showSnmpAuthenticationDetailsForVersion( const TQString &versionStr )
{
bool ok = false;
SnmpVersion version = stringToSnmpVersion( versionStr, &ok );
@@ -88,7 +88,7 @@ void HostDialog::showSnmpAuthenticationDetailsForVersion( const QString &version
authenticationDetails->raiseWidget( version == SnmpVersion3 ? snmpV3Page : snmpV1Page );
}
-void HostDialog::enableDisabledAuthenticationAndPrivacyElementsForSecurityLevel( const QString &levelStr )
+void HostDialog::enableDisabledAuthenticationAndPrivacyElementsForSecurityLevel( const TQString &levelStr )
{
bool ok = false;
SecurityLevel level = stringToSecurityLevel( levelStr, &ok );
diff --git a/ksim/monitors/snmp/hostdialog.h b/ksim/monitors/snmp/hostdialog.h
index e296b7b..68ddfe1 100644
--- a/ksim/monitors/snmp/hostdialog.h
+++ b/ksim/monitors/snmp/hostdialog.h
@@ -34,14 +34,14 @@ class HostDialog : public HostDialogBase
{
Q_OBJECT
public:
- HostDialog( QWidget *parent, const char *name = 0 );
- HostDialog( const HostConfig &src, QWidget *parent, const char *name = 0 );
+ HostDialog( TQWidget *parent, const char *name = 0 );
+ HostDialog( const HostConfig &src, TQWidget *parent, const char *name = 0 );
HostConfig settings() const;
private slots:
- void showSnmpAuthenticationDetailsForVersion( const QString &versionStr );
- void enableDisabledAuthenticationAndPrivacyElementsForSecurityLevel( const QString &levelStr );
+ void showSnmpAuthenticationDetailsForVersion( const TQString &versionStr );
+ void enableDisabledAuthenticationAndPrivacyElementsForSecurityLevel( const TQString &levelStr );
void checkValidity();
void testHost();
diff --git a/ksim/monitors/snmp/identifier.cpp b/ksim/monitors/snmp/identifier.cpp
index 25c188e..32d6d8b 100644
--- a/ksim/monitors/snmp/identifier.cpp
+++ b/ksim/monitors/snmp/identifier.cpp
@@ -62,7 +62,7 @@ Identifier::~Identifier()
delete d;
}
-Identifier Identifier::fromString( const QString &name, bool *ok )
+Identifier Identifier::fromString( const TQString &name, bool *ok )
{
Identifier res;
res.d->length = MAX_OID_LEN;
@@ -79,7 +79,7 @@ Identifier Identifier::fromString( const QString &name, bool *ok )
return res;
}
-QString Identifier::toString( PrintFlags flags ) const
+TQString Identifier::toString( PrintFlags flags ) const
{
size_t buflen = 256;
size_t outlen = 0;
@@ -87,7 +87,7 @@ QString Identifier::toString( PrintFlags flags ) const
u_char *buf = ( u_char* )calloc( buflen, 1 );
if ( !buf )
- return QString::null;
+ return TQString::null;
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,10 +100,10 @@ QString Identifier::toString( PrintFlags flags ) const
if ( overflow ) {
free( buf );
- return QString::null;
+ return TQString::null;
}
- QString result = QString::fromAscii( ( char* )buf );
+ TQString result = TQString::fromAscii( ( char* )buf );
free( buf );
diff --git a/ksim/monitors/snmp/identifier.h b/ksim/monitors/snmp/identifier.h
index 7da54dd..e14e58a 100644
--- a/ksim/monitors/snmp/identifier.h
+++ b/ksim/monitors/snmp/identifier.h
@@ -20,9 +20,9 @@
#ifndef IDENTIFIER_H
#define IDENTIFIER_H
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
#include "value.h"
@@ -46,9 +46,9 @@ public:
Identifier &operator=( const Identifier &rhs );
~Identifier();
- static Identifier fromString( const QString &name, bool *ok = 0 );
+ static Identifier fromString( const TQString &name, bool *ok = 0 );
- QString toString( PrintFlags flags = PrintAscii ) const;
+ TQString toString( PrintFlags flags = PrintAscii ) const;
bool isNull() const;
@@ -61,8 +61,8 @@ private:
Data *d;
};
-typedef QValueList<Identifier> IdentifierList;
-typedef QMap<Identifier, Value> ValueMap;
+typedef TQValueList<Identifier> IdentifierList;
+typedef TQMap<Identifier, Value> ValueMap;
}
}
diff --git a/ksim/monitors/snmp/labelmonitor.cpp b/ksim/monitors/snmp/labelmonitor.cpp
index 24e48c7..2245a09 100644
--- a/ksim/monitors/snmp/labelmonitor.cpp
+++ b/ksim/monitors/snmp/labelmonitor.cpp
@@ -21,17 +21,17 @@
using namespace KSim::Snmp;
-LabelMonitor::LabelMonitor( const MonitorConfig &config, QWidget *parent, const char *name )
+LabelMonitor::LabelMonitor( const MonitorConfig &config, TQWidget *parent, const char *name )
: KSim::Label( parent, name ), m_config( config )
{
}
void LabelMonitor::setData( const Value &data )
{
- QString dataString = data.toString( m_config.refreshInterval.minutes == 0 ? Value::TimeTicksWithSeconds : 0 );
+ TQString dataString = data.toString( m_config.refreshInterval.minutes == 0 ? Value::TimeTicksWithSeconds : 0 );
if ( m_config.useCustomFormatString ) {
- QString text = m_config.customFormatString;
+ TQString text = m_config.customFormatString;
text.replace( "%n", m_config.name );
text.replace( "%s", dataString );
setText( text );
diff --git a/ksim/monitors/snmp/labelmonitor.h b/ksim/monitors/snmp/labelmonitor.h
index 3e92c69..606165b 100644
--- a/ksim/monitors/snmp/labelmonitor.h
+++ b/ksim/monitors/snmp/labelmonitor.h
@@ -34,7 +34,7 @@ class LabelMonitor : public KSim::Label
{
Q_OBJECT
public:
- LabelMonitor( const MonitorConfig &config, QWidget *parent, const char *name = 0 );
+ LabelMonitor( const MonitorConfig &config, TQWidget *parent, 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 7a97825..052d2c0 100644
--- a/ksim/monitors/snmp/monitor.cpp
+++ b/ksim/monitors/snmp/monitor.cpp
@@ -19,26 +19,26 @@
#include "monitor.h"
-#include <qtimer.h>
-#include <qapplication.h>
+#include <tqtimer.h>
+#include <tqapplication.h>
using namespace KSim::Snmp;
-Monitor::Monitor( const HostConfig &host, const Identifier &oid, int refresh, QObject *parent, const char *name )
- : QObject( parent, name ), m_oid( oid ), m_session( host )
+Monitor::Monitor( const HostConfig &host, const Identifier &oid, int refresh, TQObject *parent, const char *name )
+ : TQObject( parent, name ), m_oid( oid ), m_session( host )
{
if ( refresh > 0 )
m_timerId = startTimer( refresh );
else
m_timerId = -1;
- QTimer::singleShot( 0, this, SLOT( performSnmpRequest() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( performSnmpRequest() ) );
}
Monitor::~Monitor()
{
- if ( QThread::running() )
- QThread::wait();
+ if ( TQThread::running() )
+ TQThread::wait();
}
void Monitor::run()
@@ -48,13 +48,13 @@ void Monitor::run()
result->oid = m_oid;
result->success = performSyncSnmpRequest( result->data, &result->error );
- QCustomEvent *ev = new QCustomEvent( QEvent::User, result );
- QApplication::postEvent( this, ev );
+ TQCustomEvent *ev = new TQCustomEvent( TQEvent::User, result );
+ TQApplication::postEvent( this, ev );
}
-void Monitor::customEvent( QCustomEvent *ev )
+void Monitor::customEvent( TQCustomEvent *ev )
{
- if ( ev->type() != QEvent::User )
+ if ( ev->type() != TQEvent::User )
return;
AsyncSnmpQueryResult *result = reinterpret_cast<AsyncSnmpQueryResult *>( ev->data() );
@@ -69,7 +69,7 @@ void Monitor::customEvent( QCustomEvent *ev )
delete result;
}
-void Monitor::timerEvent( QTimerEvent *ev )
+void Monitor::timerEvent( TQTimerEvent *ev )
{
if ( ev->timerId() != m_timerId )
return;
@@ -79,7 +79,7 @@ void Monitor::timerEvent( QTimerEvent *ev )
void Monitor::performSnmpRequest()
{
- if ( QThread::running() )
+ if ( TQThread::running() )
return;
start();
diff --git a/ksim/monitors/snmp/monitor.h b/ksim/monitors/snmp/monitor.h
index cd3dedc..083e97f 100644
--- a/ksim/monitors/snmp/monitor.h
+++ b/ksim/monitors/snmp/monitor.h
@@ -23,7 +23,7 @@
#include "monitorconfig.h"
#include "session.h"
-#include <qthread.h>
+#include <tqthread.h>
namespace KSim
{
@@ -31,11 +31,11 @@ namespace KSim
namespace Snmp
{
-class Monitor : public QObject, public QThread
+class Monitor : public TQObject, public QThread
{
Q_OBJECT
public:
- Monitor( const HostConfig &host, const Identifier &oid, int refresh, QObject *parent = 0, const char *name = 0 );
+ Monitor( const HostConfig &host, const Identifier &oid, int refresh, TQObject *parent = 0, const char *name = 0 );
virtual ~Monitor();
signals:
@@ -46,8 +46,8 @@ signals:
protected:
virtual void run();
- virtual void customEvent( QCustomEvent *ev );
- virtual void timerEvent( QTimerEvent *ev );
+ virtual void customEvent( TQCustomEvent *ev );
+ virtual void timerEvent( TQTimerEvent *ev );
private slots:
void performSnmpRequest();
diff --git a/ksim/monitors/snmp/monitorconfig.cpp b/ksim/monitors/snmp/monitorconfig.cpp
index 6b3b27e..4b4b024 100644
--- a/ksim/monitors/snmp/monitorconfig.cpp
+++ b/ksim/monitors/snmp/monitorconfig.cpp
@@ -35,7 +35,7 @@ MonitorConfig::MonitorConfig()
bool MonitorConfig::load( KConfigBase &config, const HostConfigMap &hosts )
{
- QString hostName = config.readEntry( "Host" );
+ TQString hostName = config.readEntry( "Host" );
if ( hostName.isEmpty() )
return false;
@@ -93,9 +93,9 @@ void MonitorConfig::save( KConfigBase &config ) const
config.writeEntry( "DisplayCurrentValueInline", displayCurrentValueInline );
}
-QWidget *MonitorConfig::createMonitorWidget( QWidget *parent, const char *name )
+TQWidget *MonitorConfig::createMonitorWidget( TQWidget *parent, const char *name )
{
- QWidget *w;
+ TQWidget *w;
int refresh = refreshInterval.seconds * 1000 + refreshInterval.minutes * 60 * 1000;
Identifier id = Identifier::fromString( oid );
@@ -108,23 +108,23 @@ QWidget *MonitorConfig::createMonitorWidget( QWidget *parent, const char *name )
w = new ChartMonitor( *this, parent, name );
Monitor *monitor = new Monitor( host, id, refresh, w );
- QObject::connect( monitor, SIGNAL( newData( const Value & ) ),
- w, SLOT( setData( const Value & ) ) );
+ TQObject::connect( monitor, TQT_SIGNAL( newData( const Value & ) ),
+ w, TQT_SLOT( setData( const Value & ) ) );
return w;
}
-QString KSim::Snmp::monitorDisplayTypeToString( MonitorConfig::DisplayType type )
+TQString KSim::Snmp::monitorDisplayTypeToString( MonitorConfig::DisplayType type )
{
switch ( type )
{
- case MonitorConfig::Label: return QString::fromLatin1( "Label" );
- case MonitorConfig::Chart: return QString::fromLatin1( "Chart" );
+ case MonitorConfig::Label: return TQString::fromLatin1( "Label" );
+ case MonitorConfig::Chart: return TQString::fromLatin1( "Chart" );
default: assert( false );
};
- return QString::null;
+ return TQString::null;
}
-MonitorConfig::DisplayType KSim::Snmp::stringToMonitorDisplayType( QString string, bool *ok )
+MonitorConfig::DisplayType KSim::Snmp::stringToMonitorDisplayType( TQString string, bool *ok )
{
string = string.lower();
if ( string == "chart" ) {
@@ -142,17 +142,17 @@ MonitorConfig::DisplayType KSim::Snmp::stringToMonitorDisplayType( QString strin
return MonitorConfig::Chart;
}
-QStringList KSim::Snmp::allDisplayTypes()
+TQStringList KSim::Snmp::allDisplayTypes()
{
// !!! keep order with enum
- return QStringList() << "Label" << "Chart";
+ return TQStringList() << "Label" << "Chart";
}
-void MonitorConfigMap::load( KConfigBase &config, const QStringList &names, const HostConfigMap &hosts )
+void MonitorConfigMap::load( KConfigBase &config, const TQStringList &names, const HostConfigMap &hosts )
{
clear();
- for ( QStringList::ConstIterator it = names.begin(); it != names.end(); ++it ) {
+ for ( TQStringList::ConstIterator it = names.begin(); it != names.end(); ++it ) {
config.setGroup( "Monitor " + *it );
MonitorConfig monitor;
@@ -163,12 +163,12 @@ void MonitorConfigMap::load( KConfigBase &config, const QStringList &names, cons
}
}
-QStringList MonitorConfigMap::save( KConfigBase &config ) const
+TQStringList MonitorConfigMap::save( KConfigBase &config ) const
{
- QStringList names;
+ TQStringList names;
for ( ConstIterator it = begin(); it != end(); ++it ) {
- QString name = it.key();
+ TQString name = it.key();
names << name;
diff --git a/ksim/monitors/snmp/monitorconfig.h b/ksim/monitors/snmp/monitorconfig.h
index bbc8674..cf2d525 100644
--- a/ksim/monitors/snmp/monitorconfig.h
+++ b/ksim/monitors/snmp/monitorconfig.h
@@ -41,11 +41,11 @@ struct MonitorConfig
bool isNull() const { return name.isEmpty() || host.isNull(); }
- QWidget *createMonitorWidget( QWidget *parent, const char *name = 0 );
+ TQWidget *createMonitorWidget( TQWidget *parent, const char *name = 0 );
HostConfig host;
- QString name;
- QString oid;
+ TQString name;
+ TQString oid;
struct
{
uint minutes;
@@ -54,26 +54,26 @@ struct MonitorConfig
DisplayType display;
bool useCustomFormatString;
- QString customFormatString;
+ TQString customFormatString;
bool displayCurrentValueInline;
};
-struct MonitorConfigMap : public QMap< QString, MonitorConfig >
+struct MonitorConfigMap : public TQMap< TQString, MonitorConfig >
{
MonitorConfigMap() {}
- MonitorConfigMap( const QMap< QString, MonitorConfig > &rhs )
- : QMap< QString, MonitorConfig >( rhs ) {}
+ MonitorConfigMap( const TQMap< TQString, MonitorConfig > &rhs )
+ : TQMap< TQString, MonitorConfig >( rhs ) {}
- void load( KConfigBase &config, const QStringList &names, const HostConfigMap &hosts );
- QStringList save( KConfigBase &config ) const;
+ void load( KConfigBase &config, const TQStringList &names, const HostConfigMap &hosts );
+ TQStringList save( KConfigBase &config ) const;
};
-typedef QValueList<MonitorConfig> MonitorConfigList;
+typedef TQValueList<MonitorConfig> MonitorConfigList;
-QString monitorDisplayTypeToString( MonitorConfig::DisplayType type );
-MonitorConfig::DisplayType stringToMonitorDisplayType( QString string, bool *ok = 0 );
-QStringList allDisplayTypes();
+TQString monitorDisplayTypeToString( MonitorConfig::DisplayType type );
+MonitorConfig::DisplayType stringToMonitorDisplayType( TQString string, bool *ok = 0 );
+TQStringList allDisplayTypes();
}
diff --git a/ksim/monitors/snmp/monitordialog.cpp b/ksim/monitors/snmp/monitordialog.cpp
index 615a1aa..1bda0aa 100644
--- a/ksim/monitors/snmp/monitordialog.cpp
+++ b/ksim/monitors/snmp/monitordialog.cpp
@@ -21,14 +21,14 @@
#include "identifier.h"
#include "browsedialog.h"
-#include <qcombobox.h>
-#include <qlineedit.h>
-#include <qspinbox.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
+#include <tqspinbox.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <kpushbutton.h>
@@ -37,13 +37,13 @@
using namespace KSim::Snmp;
-MonitorDialog::MonitorDialog( const HostConfigMap &hosts, QWidget *parent, const char *name )
+MonitorDialog::MonitorDialog( const HostConfigMap &hosts, TQWidget *parent, const char *name )
: MonitorDialogBase( parent, name ), m_hosts( hosts )
{
init();
}
-MonitorDialog::MonitorDialog( const MonitorConfig &monitor, const HostConfigMap &hosts, QWidget *parent, const char *name )
+MonitorDialog::MonitorDialog( const MonitorConfig &monitor, const HostConfigMap &hosts, TQWidget *parent, const char *name )
: MonitorDialogBase( parent, name ), m_hosts( hosts )
{
init( monitor );
@@ -86,7 +86,7 @@ void MonitorDialog::checkValues()
labelOptions->setEnabled( currentDisplayTypeIsLabel );
chartOptions->setEnabled( !currentDisplayTypeIsLabel );
- QString statusText;
+ TQString statusText;
if ( monitorName->text().isEmpty() )
statusText = i18n( "Please enter a name for this monitor" );
@@ -126,7 +126,7 @@ void MonitorDialog::init( const MonitorConfig &monitor )
host->clear();
- QStringList allHosts;
+ TQStringList allHosts;
for ( HostConfigMap::ConstIterator it = m_hosts.begin(); it != m_hosts.end(); ++it )
allHosts << it.key();
diff --git a/ksim/monitors/snmp/monitordialog.h b/ksim/monitors/snmp/monitordialog.h
index 0f22d33..b6d0b40 100644
--- a/ksim/monitors/snmp/monitordialog.h
+++ b/ksim/monitors/snmp/monitordialog.h
@@ -33,8 +33,8 @@ class MonitorDialog : public MonitorDialogBase
{
Q_OBJECT
public:
- MonitorDialog( const HostConfigMap &hosts, QWidget *parent, const char *name = 0 );
- MonitorDialog( const MonitorConfig &monitor, const HostConfigMap &hosts, QWidget *parent, const char *name = 0 );
+ MonitorDialog( const HostConfigMap &hosts, TQWidget *parent, const char *name = 0 );
+ MonitorDialog( const MonitorConfig &monitor, const HostConfigMap &hosts, TQWidget *parent, const char *name = 0 );
MonitorConfig monitorConfig() const;
diff --git a/ksim/monitors/snmp/probedialog.cpp b/ksim/monitors/snmp/probedialog.cpp
index d45db6b..4667fc3 100644
--- a/ksim/monitors/snmp/probedialog.cpp
+++ b/ksim/monitors/snmp/probedialog.cpp
@@ -20,7 +20,7 @@
#include "probedialog.h"
#include "monitor.h"
-#include <qtimer.h>
+#include <tqtimer.h>
#include <klocale.h>
#include <kdebug.h>
@@ -38,8 +38,8 @@ static const char * const probeIdentifiers[] =
0
};
-ProbeDialog::ProbeDialog( const HostConfig &hostConfig, QWidget *parent, const char *name )
- : KProgressDialog( parent, name, i18n( "SNMP Host Probe" ), QString::null, true /* modal */ ),
+ProbeDialog::ProbeDialog( const HostConfig &hostConfig, TQWidget *parent, const char *name )
+ : KProgressDialog( parent, name, i18n( "SNMP Host Probe" ), TQString::null, true /* modal */ ),
m_host( hostConfig ), m_currentMonitor( 0 ), m_canceled( false )
{
setLabel( i18n( "Probing for common object identifiers..." ) );
@@ -59,7 +59,7 @@ ProbeDialog::ProbeDialog( const HostConfig &hostConfig, QWidget *parent, const c
void ProbeDialog::done( int code )
{
- if ( code == QDialog::Rejected && m_currentMonitor ) {
+ if ( code == TQDialog::Rejected && m_currentMonitor ) {
setLabel( "Probe aborted. Waiting for job to finish..." );
m_canceled = true;
return;
@@ -79,10 +79,10 @@ void ProbeDialog::probeOne()
delete m_currentMonitor;
m_currentMonitor = new Monitor( m_host, oid, 0 /* no refresh */, this );
- connect( m_currentMonitor, SIGNAL( newData( const Identifier &, const Value & ) ),
- this, SLOT( probeResult( const Identifier &, const Value & ) ) );
- connect( m_currentMonitor, SIGNAL( error( const Identifier &, const ErrorInfo & ) ),
- this, SLOT( probeError( const Identifier &, const ErrorInfo & ) ) );
+ connect( m_currentMonitor, TQT_SIGNAL( newData( const Identifier &, const Value & ) ),
+ this, TQT_SLOT( probeResult( const Identifier &, const Value & ) ) );
+ connect( m_currentMonitor, TQT_SIGNAL( error( const Identifier &, const ErrorInfo & ) ),
+ this, TQT_SLOT( probeError( const Identifier &, const ErrorInfo & ) ) );
}
void ProbeDialog::probeResult( const Identifier &oid, const Value &value )
@@ -106,9 +106,9 @@ void ProbeDialog::nextProbe()
progressBar()->setProgress( progressBar()->totalSteps() - m_probeOIDs.count() );
if ( m_canceled )
- KProgressDialog::done( QDialog::Rejected );
+ KProgressDialog::done( TQDialog::Rejected );
else
- QTimer::singleShot( 0, this, SLOT( probeOne() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( probeOne() ) );
}
#include "probedialog.moc"
diff --git a/ksim/monitors/snmp/probedialog.h b/ksim/monitors/snmp/probedialog.h
index 47a5fb0..9e88eda 100644
--- a/ksim/monitors/snmp/probedialog.h
+++ b/ksim/monitors/snmp/probedialog.h
@@ -20,7 +20,7 @@
#ifndef PROBEDIALOG_H
#define PROBEDIALOG_H
-#include <qvaluestack.h>
+#include <tqvaluestack.h>
#include <kprogress.h>
@@ -39,7 +39,7 @@ class ProbeDialog : public KProgressDialog
{
Q_OBJECT
public:
- ProbeDialog( const HostConfig &hostConfig, QWidget *parent, const char *name = 0 );
+ ProbeDialog( const HostConfig &hostConfig, TQWidget *parent, const char *name = 0 );
struct ProbeResult
{
@@ -56,7 +56,7 @@ public:
bool success;
ErrorInfo errorInfo;
};
- typedef QValueList<ProbeResult> ProbeResultList;
+ typedef TQValueList<ProbeResult> ProbeResultList;
ProbeResultList probeResults() const { return m_results; }
@@ -72,7 +72,7 @@ private:
void nextProbe();
HostConfig m_host;
- QValueStack<Identifier> m_probeOIDs;
+ TQValueStack<Identifier> m_probeOIDs;
Monitor *m_currentMonitor;
ProbeResultList m_results;
diff --git a/ksim/monitors/snmp/proberesultdialog.cpp b/ksim/monitors/snmp/proberesultdialog.cpp
index 641f12e..bed1e21 100644
--- a/ksim/monitors/snmp/proberesultdialog.cpp
+++ b/ksim/monitors/snmp/proberesultdialog.cpp
@@ -19,7 +19,7 @@
#include "proberesultdialog.h"
-#include <qlabel.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <klistview.h>
@@ -27,7 +27,7 @@
using namespace KSim::Snmp;
ProbeResultDialog::ProbeResultDialog( const HostConfig &hostConfig, const ProbeDialog::ProbeResultList &probeResults,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: ProbeResultDialogBase( parent, name )
{
info->setText( i18n( "Results of scanning host %1:" ).arg( hostConfig.name ) );
@@ -39,14 +39,14 @@ ProbeResultDialog::ProbeResultDialog( const HostConfig &hostConfig, const ProbeD
void ProbeResultDialog::addResultItem( const ProbeDialog::ProbeResult &result )
{
- QListViewItem *item = new QListViewItem( probeResultView );
+ TQListViewItem *item = new TQListViewItem( probeResultView );
item->setText( 0, result.oid.toString() );
if ( result.success )
item->setText( 1, result.value.toString( Value::TimeTicksWithSeconds ) );
else
- item->setText( 1, QString( "ERROR: " ) + result.errorInfo.errorMessage() );
+ item->setText( 1, TQString( "ERROR: " ) + result.errorInfo.errorMessage() );
}
#include "proberesultdialog.moc"
diff --git a/ksim/monitors/snmp/proberesultdialog.h b/ksim/monitors/snmp/proberesultdialog.h
index 9ba3523..2166a69 100644
--- a/ksim/monitors/snmp/proberesultdialog.h
+++ b/ksim/monitors/snmp/proberesultdialog.h
@@ -35,7 +35,7 @@ class ProbeResultDialog : public ProbeResultDialogBase
Q_OBJECT
public:
ProbeResultDialog( const HostConfig &hostConfig, const ProbeDialog::ProbeResultList &probeResults,
- QWidget *parent, const char *name = 0 );
+ TQWidget *parent, const char *name = 0 );
private:
void addResultItem( const ProbeDialog::ProbeResult &result );
diff --git a/ksim/monitors/snmp/session.cpp b/ksim/monitors/snmp/session.cpp
index d7de283..6d63fab 100644
--- a/ksim/monitors/snmp/session.cpp
+++ b/ksim/monitors/snmp/session.cpp
@@ -40,11 +40,11 @@ struct Session::Data
HostConfig source;
- QCString host;
- QCString community;
- QCString securityName;
- QCString authPassPhrase;
- QCString privPassPhrase;
+ TQCString host;
+ TQCString community;
+ TQCString securityName;
+ TQCString authPassPhrase;
+ TQCString privPassPhrase;
};
Session::Session( const HostConfig &source )
@@ -212,7 +212,7 @@ bool Session::initialize( ErrorInfo *error )
return true;
}
-bool Session::snmpGet( const QString &identifier, Value &value, ErrorInfo *error )
+bool Session::snmpGet( const TQString &identifier, Value &value, ErrorInfo *error )
{
bool ok = false;
Identifier oid = Identifier::fromString( identifier, &ok );
diff --git a/ksim/monitors/snmp/session.h b/ksim/monitors/snmp/session.h
index 0d5cda3..b34bc68 100644
--- a/ksim/monitors/snmp/session.h
+++ b/ksim/monitors/snmp/session.h
@@ -38,7 +38,7 @@ public:
Session( const HostConfig &snmpHostConfig );
~Session();
- bool snmpGet( const QString &identifier, Value &value, ErrorInfo *error = 0 );
+ bool snmpGet( const TQString &identifier, Value &value, ErrorInfo *error = 0 );
bool snmpGet( const Identifier &identifier, Value &value, ErrorInfo *error = 0 );
bool snmpGet( const IdentifierList &identifiers, ValueMap &variables, ErrorInfo *error = 0 );
diff --git a/ksim/monitors/snmp/snmp.cpp b/ksim/monitors/snmp/snmp.cpp
index 80fb073..a050acb 100644
--- a/ksim/monitors/snmp/snmp.cpp
+++ b/ksim/monitors/snmp/snmp.cpp
@@ -23,7 +23,7 @@
#include "snmplib.h"
#include "value_p.h"
-#include <qmutex.h>
+#include <tqmutex.h>
#include <assert.h>
@@ -53,30 +53,30 @@ static const struct EnumStringMapInfo
{ 0, 0, 0 }
};
-static QStringList allStrings( const EnumStringMapInfo *array )
+static TQStringList allStrings( const EnumStringMapInfo *array )
{
- QStringList result;
+ TQStringList result;
for ( uint i = 0; array[ i ].stringValue; ++i )
- result << QString::fromLatin1( array[ i ].stringValue );
+ result << TQString::fromLatin1( array[ i ].stringValue );
return result;
}
-static QString enumToString( const EnumStringMapInfo *array, int value )
+static TQString enumToString( const EnumStringMapInfo *array, int value )
{
for ( uint i = 0; array[ i ].stringValue; ++i )
if ( array[ i ].enumValue == value )
- return QString::fromLatin1( array[ i ].stringValue );
+ return TQString::fromLatin1( array[ i ].stringValue );
assert( false );
- return QString::null;
+ return TQString::null;
}
-static int stringToEnum( const EnumStringMapInfo *array, QString string, bool *ok )
+static int stringToEnum( const EnumStringMapInfo *array, TQString string, bool *ok )
{
string = string.lower();
uint i;
for ( i = 0; array[ i ].stringValue; ++i )
- if ( QString::fromLatin1( array[ i ].stringValue ).lower() == string ) {
+ if ( TQString::fromLatin1( array[ i ].stringValue ).lower() == string ) {
if ( ok ) *ok = true;
return array[ i ].enumValue;
}
@@ -108,62 +108,62 @@ int KSim::Snmp::snmpSecurityLevelToSnmpLibConstant( SecurityLevel secLevel )
return extractSnmpLibConstant( securityLevelStrings, secLevel );
}
-QStringList KSim::Snmp::allSnmpVersions()
+TQStringList KSim::Snmp::allSnmpVersions()
{
return allStrings( snmpVersionStrings );
}
-QString KSim::Snmp::snmpVersionToString( SnmpVersion version )
+TQString KSim::Snmp::snmpVersionToString( SnmpVersion version )
{
return enumToString( snmpVersionStrings, version );
}
-SnmpVersion KSim::Snmp::stringToSnmpVersion( QString string, bool *ok )
+SnmpVersion KSim::Snmp::stringToSnmpVersion( TQString string, bool *ok )
{
return static_cast<SnmpVersion>( stringToEnum( snmpVersionStrings, string, ok ) );
}
-QStringList KSim::Snmp::allSecurityLevels()
+TQStringList KSim::Snmp::allSecurityLevels()
{
return allStrings( securityLevelStrings );
}
-QString KSim::Snmp::securityLevelToString( SecurityLevel level )
+TQString KSim::Snmp::securityLevelToString( SecurityLevel level )
{
return enumToString( securityLevelStrings, level );
}
-SecurityLevel KSim::Snmp::stringToSecurityLevel( QString string, bool *ok )
+SecurityLevel KSim::Snmp::stringToSecurityLevel( TQString string, bool *ok )
{
return static_cast<SecurityLevel>( stringToEnum( securityLevelStrings, string, ok ) );
}
-QStringList KSim::Snmp::allAuthenticationProtocols()
+TQStringList KSim::Snmp::allAuthenticationProtocols()
{
return allStrings( authenticationProtocolStrings );
}
-QString KSim::Snmp::authenticationProtocolToString( AuthenticationProtocol proto )
+TQString KSim::Snmp::authenticationProtocolToString( AuthenticationProtocol proto )
{
return enumToString( authenticationProtocolStrings, proto );
}
-AuthenticationProtocol KSim::Snmp::stringToAuthenticationProtocol( QString string, bool *ok )
+AuthenticationProtocol KSim::Snmp::stringToAuthenticationProtocol( TQString string, bool *ok )
{
return static_cast<AuthenticationProtocol>( stringToEnum( authenticationProtocolStrings, string, ok ) );
}
-QStringList KSim::Snmp::allPrivacyProtocols()
+TQStringList KSim::Snmp::allPrivacyProtocols()
{
return allStrings( privacyProtocolStrings );
}
-QString KSim::Snmp::privacyProtocolToString( PrivacyProtocol proto )
+TQString KSim::Snmp::privacyProtocolToString( PrivacyProtocol proto )
{
return enumToString( privacyProtocolStrings, proto );
}
-PrivacyProtocol KSim::Snmp::stringToPrivacyProtocol( QString string, bool *ok )
+PrivacyProtocol KSim::Snmp::stringToPrivacyProtocol( TQString string, bool *ok )
{
return static_cast<PrivacyProtocol>( stringToEnum( privacyProtocolStrings, string, ok ) );
}
@@ -288,14 +288,14 @@ int KSim::Snmp::sessionErrorCode( netsnmp_session &session )
return errorCode;
}
-static QString messageForErrorCode( int errorCode )
+static TQString messageForErrorCode( int errorCode )
{
if ( errorCode >= SNMPERR_MAX && errorCode <= SNMPERR_GENERR )
- return QString::fromLatin1( SnmpLib::self()->snmp_api_errstring( errorCode ) );
+ return TQString::fromLatin1( SnmpLib::self()->snmp_api_errstring( errorCode ) );
if ( errorCode >= SNMP_ERR_NOERROR && errorCode <= MAX_SNMP_ERR )
- return QString::fromLatin1( SnmpLib::self()->snmp_errstring( errorCode ) );
+ return TQString::fromLatin1( SnmpLib::self()->snmp_errstring( errorCode ) );
- return QString::null;
+ return TQString::null;
}
ErrorInfo::ErrorInfo()
diff --git a/ksim/monitors/snmp/snmp.h b/ksim/monitors/snmp/snmp.h
index 4710c2d..f7fa92c 100644
--- a/ksim/monitors/snmp/snmp.h
+++ b/ksim/monitors/snmp/snmp.h
@@ -22,7 +22,7 @@
#include <kconfigbase.h>
-#include <qmap.h>
+#include <tqmap.h>
namespace KSim
@@ -32,24 +32,24 @@ namespace Snmp
{
enum SnmpVersion { SnmpVersion1, SnmpVersion2c, SnmpVersion3, SnmpLastVersion };
-QStringList allSnmpVersions();
-QString snmpVersionToString( SnmpVersion version );
-SnmpVersion stringToSnmpVersion( QString string, bool *ok = 0 );
+TQStringList allSnmpVersions();
+TQString snmpVersionToString( SnmpVersion version );
+SnmpVersion stringToSnmpVersion( TQString string, bool *ok = 0 );
enum SecurityLevel { NoAuthPriv, AuthNoPriv, AuthPriv, LastSecurityLevel };
-QStringList allSecurityLevels();
-QString securityLevelToString( SecurityLevel level );
-SecurityLevel stringToSecurityLevel( QString string, bool *ok = 0 );
+TQStringList allSecurityLevels();
+TQString securityLevelToString( SecurityLevel level );
+SecurityLevel stringToSecurityLevel( TQString string, bool *ok = 0 );
enum AuthenticationProtocol { MD5Auth, SHA1Auth, LastAuthenticationProtocol };
-QStringList allAuthenticationProtocols();
-QString authenticationProtocolToString( AuthenticationProtocol proto );
-AuthenticationProtocol stringToAuthenticationProtocol( QString string, bool *ok = 0 );
+TQStringList allAuthenticationProtocols();
+TQString authenticationProtocolToString( AuthenticationProtocol proto );
+AuthenticationProtocol stringToAuthenticationProtocol( TQString string, bool *ok = 0 );
enum PrivacyProtocol { DESPrivacy };
-QStringList allPrivacyProtocols();
-QString privacyProtocolToString( PrivacyProtocol proto );
-PrivacyProtocol stringToPrivacyProtocol( QString string, bool *ok = 0 );
+TQStringList allPrivacyProtocols();
+TQString privacyProtocolToString( PrivacyProtocol proto );
+PrivacyProtocol stringToPrivacyProtocol( TQString string, bool *ok = 0 );
class ErrorInfo
{
@@ -149,11 +149,11 @@ public:
ErrorInfo( ErrorType error );
ErrorType errorCode() const { return m_errorCode; }
- QString errorMessage() const { return m_errorMessage; }
+ TQString errorMessage() const { return m_errorMessage; }
private:
ErrorType m_errorCode;
- QString m_errorMessage;
+ TQString m_errorMessage;
};
}
diff --git a/ksim/monitors/snmp/snmplib.cpp b/ksim/monitors/snmp/snmplib.cpp
index a063203..b042c7f 100644
--- a/ksim/monitors/snmp/snmplib.cpp
+++ b/ksim/monitors/snmp/snmplib.cpp
@@ -44,9 +44,9 @@ SnmpLib::~SnmpLib()
ClassLocker<SnmpLib> &SnmpLib::self()
{
if ( !s_self ) {
- static QMutex singletonGuard;
+ static TQMutex singletonGuard;
- QMutexLocker locker( &singletonGuard );
+ TQMutexLocker locker( &singletonGuard );
if ( !s_self )
sd.setObject( s_self, new SnmpLib );
}
diff --git a/ksim/monitors/snmp/snmplib.h b/ksim/monitors/snmp/snmplib.h
index e8b14a4..388c918 100644
--- a/ksim/monitors/snmp/snmplib.h
+++ b/ksim/monitors/snmp/snmplib.h
@@ -25,7 +25,7 @@
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
-#include <qmutex.h>
+#include <tqmutex.h>
template <class> class KStaticDeleter;
@@ -39,13 +39,13 @@ template <class T>
class ClassLocker
{
public:
- ClassLocker( QMutex *guard, T *obj )
+ ClassLocker( TQMutex *guard, T *obj )
: m_guard( guard ), m_obj( obj )
{}
struct ClassLockerHelper
{
- ClassLockerHelper( QMutex *guard, T *obj )
+ ClassLockerHelper( TQMutex *guard, T *obj )
: m_guard( guard ), m_obj( obj ), m_locked( false )
{}
@@ -63,7 +63,7 @@ public:
}
private:
- QMutex *m_guard;
+ TQMutex *m_guard;
T *m_obj;
bool m_locked;
};
@@ -77,7 +77,7 @@ private:
ClassLocker( const ClassLocker & );
ClassLocker &operator=( const ClassLocker & );
- QMutex *m_guard;
+ TQMutex *m_guard;
T *m_obj;
};
@@ -127,7 +127,7 @@ private:
SnmpLib();
~SnmpLib();
- QMutex m_guard;
+ TQMutex m_guard;
ClassLocker<SnmpLib> *m_lockHelper;
static SnmpLib *s_self;
diff --git a/ksim/monitors/snmp/value.cpp b/ksim/monitors/snmp/value.cpp
index fe42a08..a244c59 100644
--- a/ksim/monitors/snmp/value.cpp
+++ b/ksim/monitors/snmp/value.cpp
@@ -22,7 +22,7 @@
#include "value_p.h"
#include "snmp_p.h"
-#include <qvariant.h>
+#include <tqvariant.h>
#include <klocale.h>
@@ -35,22 +35,22 @@ ValueImpl::ValueImpl( variable_list *var )
switch ( var->type ) {
case ASN_INTEGER: {
type = Value::Int;
- data = QVariant( static_cast<int>( *var->val.integer ) );
+ data = TQVariant( static_cast<int>( *var->val.integer ) );
break;
}
case ASN_UINTEGER: {
type = Value::UInt;
- data = QVariant( static_cast<uint>( *var->val.integer ) );
+ data = TQVariant( static_cast<uint>( *var->val.integer ) );
break;
}
case ASN_OCTET_STR: {
type = Value::ByteArray;
- QByteArray d;
+ TQByteArray d;
d.setRawData( reinterpret_cast<char *>( var->val.string ), var->val_len );
- QByteArray copy = d;
+ TQByteArray copy = d;
copy.detach();
d.resetRawData( reinterpret_cast<char *>( var->val.string ), var->val_len );
- data = QVariant( copy );
+ data = TQVariant( copy );
break;
}
case ASN_NULL: {
@@ -64,17 +64,17 @@ ValueImpl::ValueImpl( variable_list *var )
}
case ASN_IPADDRESS: {
type = Value::IpAddress;
- addr = QHostAddress( static_cast<uint>( *var->val.integer ) );
+ addr = TQHostAddress( static_cast<uint>( *var->val.integer ) );
break;
}
case ASN_COUNTER: {
type = Value::Counter;
- data = QVariant( static_cast<uint>( *var->val.integer ) );
+ data = TQVariant( static_cast<uint>( *var->val.integer ) );
break;
}
case ASN_GAUGE: {
type = Value::Gauge;
- data = QVariant( static_cast<uint>( *var->val.integer ) );
+ data = TQVariant( static_cast<uint>( *var->val.integer ) );
break;
}
case ASN_COUNTER64: {
@@ -84,7 +84,7 @@ ValueImpl::ValueImpl( variable_list *var )
}
case ASN_TIMETICKS: {
type = Value::TimeTicks;
- data = QVariant( static_cast<int>( *var->val.integer ) );
+ data = TQVariant( static_cast<int>( *var->val.integer ) );
break;
}
case SNMP_NOSUCHOBJECT: {
@@ -102,12 +102,12 @@ ValueImpl::ValueImpl( variable_list *var )
#if defined( OPAQUE_SPECIAL_TYPES )
case ASN_OPAQUE_FLOAT: {
type = Value::Double;
- data = QVariant( static_cast<float>( *var->val.floatVal ) );
+ data = TQVariant( static_cast<float>( *var->val.floatVal ) );
break;
}
case ASN_OPAQUE_DOUBLE: {
type = Value::Double;
- data = QVariant( static_cast<float>( *var->val.doubleVal ) );
+ data = TQVariant( static_cast<float>( *var->val.doubleVal ) );
break;
}
#endif
@@ -135,7 +135,7 @@ Value::Value( int val, Type type )
assert( type == Int || type == TimeTicks );
d->type = type;
- d->data = QVariant( val );
+ d->data = TQVariant( val );
}
Value::Value( uint val, Type type )
@@ -145,21 +145,21 @@ Value::Value( uint val, Type type )
assert( type == UInt || type == Counter || type == Gauge );
d->type = type;
- d->data = QVariant( val );
+ d->data = TQVariant( val );
}
Value::Value( double val )
{
d = new ValueImpl;
d->type = Double;
- d->data = QVariant( val );
+ d->data = TQVariant( val );
}
-Value::Value( const QByteArray &data )
+Value::Value( const TQByteArray &data )
{
d = new ValueImpl;
d->type = ByteArray;
- d->data = QVariant( data );
+ d->data = TQVariant( data );
}
Value::Value( const KSim::Snmp::Identifier &oid )
@@ -169,7 +169,7 @@ Value::Value( const KSim::Snmp::Identifier &oid )
d->oid = oid;
}
-Value::Value( const QHostAddress &address )
+Value::Value( const TQHostAddress &address )
{
d = new ValueImpl;
d->type = IpAddress;
@@ -240,7 +240,7 @@ double Value::toDouble() const
return d->data.toDouble();
}
-const QByteArray Value::toByteArray() const
+const TQByteArray Value::toByteArray() const
{
assert( d->type == ByteArray );
return d->data.toByteArray();
@@ -252,7 +252,7 @@ const Identifier Value::toOID() const
return d->oid;
}
-const QHostAddress Value::toIpAddress() const
+const TQHostAddress Value::toIpAddress() const
{
assert( d->type == IpAddress );
return d->addr;
@@ -279,31 +279,31 @@ Q_UINT64 Value::toCounter64() const
return d->ctr64;
}
-QString Value::toString( int conversionFlags ) const
+TQString Value::toString( int conversionFlags ) const
{
switch ( type() ) {
- case Value::Int: return QString::number( toInt() );
+ case Value::Int: return TQString::number( toInt() );
case Value::Gauge:
case Value::Counter:
- case Value::UInt: return QString::number( toUInt() );
- case Value::Double: return QString::number( toDouble() );
- case Value::Counter64: return QString::number( toCounter64() );
- case Value::ByteArray: return QString::fromAscii( toByteArray().data(), toByteArray().size() );
+ case Value::UInt: return TQString::number( toUInt() );
+ case Value::Double: return TQString::number( toDouble() );
+ case Value::Counter64: return TQString::number( toCounter64() );
+ case Value::ByteArray: return TQString::fromAscii( toByteArray().data(), toByteArray().size() );
case Value::IpAddress: return toIpAddress().toString();
case Value::Oid: return toOID().toString();
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 QString::fromLatin1( "No Such Object" );
- case Value::NoSuchInstance: return QString::fromLatin1( "No Such Instance" );
- case Value::EndOfMIBView: return QString::fromLatin1( "End Of MIB View" );
+ 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::Invalid:
- case Value::Null: return QString::null;
+ case Value::Null: return TQString::null;
}
- return QString::null;
+ return TQString::null;
}
-QString Value::formatTimeTicks( int ticks, int conversionFlags )
+TQString Value::formatTimeTicks( int ticks, int conversionFlags )
{
ticks /= 100;
@@ -316,15 +316,15 @@ QString Value::formatTimeTicks( int ticks, int conversionFlags )
int minutes = ticks / 60;
int seconds = ticks % 60;
- QString result;
+ TQString result;
if ( days > 0 )
- result += QString::number( days ) + "d:";
+ result += TQString::number( days ) + "d:";
- result += QString::fromAscii( "%1h:%2m" ).arg( hours ).arg( minutes );
+ result += TQString::fromAscii( "%1h:%2m" ).arg( hours ).arg( minutes );
if ( conversionFlags & TimeTicksWithSeconds )
- result += ":" + QString::number( seconds ) + "s";
+ result += ":" + TQString::number( seconds ) + "s";
return result;
}
diff --git a/ksim/monitors/snmp/value.h b/ksim/monitors/snmp/value.h
index 4ffdcbb..5b2d6cd 100644
--- a/ksim/monitors/snmp/value.h
+++ b/ksim/monitors/snmp/value.h
@@ -20,7 +20,7 @@
#ifndef VALUE_H
#define VALUE_H
-#include <qhostaddress.h>
+#include <tqhostaddress.h>
namespace KSim
{
@@ -65,9 +65,9 @@ public:
Value( uint val, Type type );
Value( float val );
Value( double val );
- Value( const QByteArray &data );
+ Value( const TQByteArray &data );
Value( const Identifier &oid );
- Value( const QHostAddress &address );
+ Value( const TQHostAddress &address );
Value( Q_UINT64 counter );
Value( const Value &rhs );
@@ -81,18 +81,18 @@ public:
int toInt() const;
uint toUInt() const;
double toDouble() const;
- const QByteArray toByteArray() const;
+ const TQByteArray toByteArray() const;
const Identifier toOID() const;
- const QHostAddress toIpAddress() const;
+ const TQHostAddress toIpAddress() const;
uint toCounter() const;
uint toGauge() const;
int toTimeTicks() const;
Q_UINT64 toCounter64() const;
- QString toString( int conversionFlags = 0 ) const;
+ TQString toString( int conversionFlags = 0 ) const;
private:
- static QString formatTimeTicks( int ticks, int conversionFlags );
+ static TQString formatTimeTicks( int ticks, int conversionFlags );
ValueImpl *d;
};
diff --git a/ksim/monitors/snmp/value_p.h b/ksim/monitors/snmp/value_p.h
index 8d61f59..000c32d 100644
--- a/ksim/monitors/snmp/value_p.h
+++ b/ksim/monitors/snmp/value_p.h
@@ -24,7 +24,7 @@
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
-#include <qvariant.h>
+#include <tqvariant.h>
#include "identifier.h"
@@ -48,9 +48,9 @@ struct ValueImpl
ValueImpl( variable_list *var );
Value::Type type;
- QVariant data;
+ TQVariant data;
Identifier oid;
- QHostAddress addr;
+ TQHostAddress addr;
Q_UINT64 ctr64;
};
diff --git a/ksim/monitors/snmp/view.cpp b/ksim/monitors/snmp/view.cpp
index 0a4b276..9515645 100644
--- a/ksim/monitors/snmp/view.cpp
+++ b/ksim/monitors/snmp/view.cpp
@@ -23,7 +23,7 @@
#include <label.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kconfig.h>
@@ -32,7 +32,7 @@ using namespace KSim::Snmp;
View::View( Plugin *parent, const char *name )
: KSim::PluginView( parent, name )
{
- m_layout = new QVBoxLayout( this );
+ m_layout = new TQVBoxLayout( this );
reparseConfig();
}
@@ -49,8 +49,8 @@ void View::reparseConfig()
KConfig &cfg = *config();
cfg.setGroup( "General" );
- QStringList allHosts = cfg.readListEntry( "Hosts" );
- QStringList monitors = cfg.readListEntry( "Monitors" );
+ TQStringList allHosts = cfg.readListEntry( "Hosts" );
+ TQStringList monitors = cfg.readListEntry( "Monitors" );
HostConfigMap hosts;
hosts.load( cfg, allHosts );
@@ -63,7 +63,7 @@ void View::reparseConfig()
MonitorConfig monitorConfig = *it;
- QWidget *w = monitorConfig.createMonitorWidget( this );
+ TQWidget *w = monitorConfig.createMonitorWidget( this );
if ( !w )
continue;
diff --git a/ksim/monitors/snmp/view.h b/ksim/monitors/snmp/view.h
index f03a59c..3793d30 100644
--- a/ksim/monitors/snmp/view.h
+++ b/ksim/monitors/snmp/view.h
@@ -42,8 +42,8 @@ public:
virtual void reparseConfig();
private:
- QPtrList<QWidget> m_widgets;
- QBoxLayout *m_layout;
+ TQPtrList<TQWidget> m_widgets;
+ TQBoxLayout *m_layout;
};
}
diff --git a/ksim/monitors/snmp/walker.cpp b/ksim/monitors/snmp/walker.cpp
index 593cd04..0aa6c0a 100644
--- a/ksim/monitors/snmp/walker.cpp
+++ b/ksim/monitors/snmp/walker.cpp
@@ -19,7 +19,7 @@
#include "walker.h"
-#include <qapplication.h>
+#include <tqapplication.h>
#include <functional>
#include <algorithm>
@@ -38,8 +38,8 @@ namespace
static const uint walkerRefresh = 0;
-Walker::Walker( const HostConfig &host, const Identifier &startOid, QObject *parent, const char *name )
- : QObject( parent, name ), m_stop( false ), m_oid( startOid ), m_session( host )
+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 )
{
m_timerId = startTimer( walkerRefresh );
start();
@@ -51,8 +51,8 @@ Walker::~Walker()
m_stop = true;
m_stopGuard.unlock();
- if ( QThread::running() )
- QThread::wait();
+ if ( TQThread::running() )
+ TQThread::wait();
std::for_each( m_results.begin(), m_results.end(), Deleter<Result *>() );
}
@@ -82,10 +82,10 @@ void Walker::run()
}
// cause finished signal to be emitted
- QApplication::postEvent( this, new QCustomEvent( QEvent::User ) );
+ TQApplication::postEvent( this, new TQCustomEvent( TQEvent::User ) );
}
-void Walker::timerEvent( QTimerEvent *ev )
+void Walker::timerEvent( TQTimerEvent *ev )
{
if ( ev->timerId() != m_timerId )
return;
@@ -105,13 +105,13 @@ void Walker::timerEvent( QTimerEvent *ev )
delete result;
}
- if ( !QThread::running() && !result ) {
+ if ( !TQThread::running() && !result ) {
killTimer( m_timerId );
m_timerId = 0;
}
}
-void Walker::customEvent( QCustomEvent * )
+void Walker::customEvent( TQCustomEvent * )
{
emit finished();
}
diff --git a/ksim/monitors/snmp/walker.h b/ksim/monitors/snmp/walker.h
index e1b1ace..3ff38b7 100644
--- a/ksim/monitors/snmp/walker.h
+++ b/ksim/monitors/snmp/walker.h
@@ -20,10 +20,10 @@
#ifndef WALKER_H
#define WALKER_H
-#include <qthread.h>
-#include <qobject.h>
-#include <qmutex.h>
-#include <qvaluelist.h>
+#include <tqthread.h>
+#include <tqobject.h>
+#include <tqmutex.h>
+#include <tqvaluelist.h>
#include "session.h"
@@ -33,11 +33,11 @@ namespace KSim
namespace Snmp
{
-class Walker : public QObject, public QThread
+class Walker : public TQObject, public QThread
{
Q_OBJECT
public:
- Walker( const HostConfig &host, const Identifier &startOid, QObject *parent, const char *name = 0 );
+ Walker( const HostConfig &host, const Identifier &startOid, TQObject *parent, const char *name = 0 );
virtual ~Walker();
struct Result
@@ -45,9 +45,9 @@ public:
Result() : success( false ) {}
bool success;
Identifier oid;
- QString identifierString;
+ TQString identifierString;
Value data;
- QString dataString;
+ TQString dataString;
ErrorInfo error;
};
@@ -57,17 +57,17 @@ signals:
protected:
virtual void run();
- virtual void timerEvent( QTimerEvent *ev );
- virtual void customEvent( QCustomEvent *ev );
+ virtual void timerEvent( TQTimerEvent *ev );
+ virtual void customEvent( TQCustomEvent *ev );
private:
- typedef QValueList<Result *> ResultList;
+ typedef TQValueList<Result *> ResultList;
ResultList m_results;
- QMutex m_resultGuard;
+ TQMutex m_resultGuard;
bool m_stop;
- QMutex m_stopGuard;
+ TQMutex m_stopGuard;
Identifier m_oid;
int m_timerId;