summaryrefslogtreecommitdiffstats
path: root/ksim
diff options
context:
space:
mode:
Diffstat (limited to 'ksim')
-rw-r--r--ksim/baselist.h12
-rw-r--r--ksim/generalprefs.cpp274
-rw-r--r--ksim/generalprefs.h124
-rw-r--r--ksim/ksim.cpp12
-rw-r--r--ksim/ksim.h10
-rw-r--r--ksim/ksimframe.cpp10
-rw-r--r--ksim/ksimframe.h24
-rw-r--r--ksim/ksimpref.cpp66
-rw-r--r--ksim/ksimpref.h30
-rw-r--r--ksim/ksimsysinfo.cpp94
-rw-r--r--ksim/ksimsysinfo.h18
-rw-r--r--ksim/ksimview.cpp106
-rw-r--r--ksim/ksimview.h26
-rw-r--r--ksim/library/chart.cpp120
-rw-r--r--ksim/library/chart.h38
-rw-r--r--ksim/library/common.cpp6
-rw-r--r--ksim/library/common.h12
-rw-r--r--ksim/library/ksimconfig.cpp50
-rw-r--r--ksim/library/ksimconfig.h54
-rw-r--r--ksim/library/label.cpp114
-rw-r--r--ksim/library/label.h58
-rw-r--r--ksim/library/led.cpp68
-rw-r--r--ksim/library/led.h22
-rw-r--r--ksim/library/pluginglobal.cpp26
-rw-r--r--ksim/library/pluginglobal.h24
-rw-r--r--ksim/library/pluginloader.cpp48
-rw-r--r--ksim/library/pluginloader.h24
-rw-r--r--ksim/library/pluginmodule.cpp32
-rw-r--r--ksim/library/pluginmodule.h16
-rw-r--r--ksim/library/progress.cpp38
-rw-r--r--ksim/library/progress.h26
-rw-r--r--ksim/library/themeloader.cpp474
-rw-r--r--ksim/library/themeloader.h154
-rw-r--r--ksim/library/themetypes.h8
-rw-r--r--ksim/monitorprefs.cpp22
-rw-r--r--ksim/monitorprefs.h6
-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
-rw-r--r--ksim/themeprefs.cpp88
-rw-r--r--ksim/themeprefs.h28
105 files changed, 2175 insertions, 2175 deletions
diff --git a/ksim/baselist.h b/ksim/baselist.h
index b55ab3b..6ee7bcc 100644
--- a/ksim/baselist.h
+++ b/ksim/baselist.h
@@ -20,9 +20,9 @@
#ifndef BASELIST_H
#define BASELIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <common.h>
-#include <qapplication.h>
+#include <tqapplication.h>
namespace KSim
{
@@ -32,7 +32,7 @@ namespace KSim
static void add(KSim::Base *object)
{
if (!m_baseList) {
- m_baseList = new QPtrList<KSim::Base>;
+ m_baseList = new TQPtrList<KSim::Base>;
m_baseList->setAutoDelete(false);
// Make sure our m_baseList instance gets
@@ -63,7 +63,7 @@ namespace KSim
if (!m_baseList)
return;
- QPtrListIterator<KSim::Base> object(*m_baseList);
+ TQPtrListIterator<KSim::Base> object(*m_baseList);
for (; object.current(); ++object) {
// Call processEvents() so our ui doesn't block
if (!object.current()->isThemeConfigOnly() || themeChanged) {
@@ -89,9 +89,9 @@ namespace KSim
m_baseList = 0L;
}
- static QPtrList<KSim::Base> *m_baseList;
+ static TQPtrList<KSim::Base> *m_baseList;
};
- QPtrList<KSim::Base> *BaseList::m_baseList = 0L;
+ TQPtrList<KSim::Base> *BaseList::m_baseList = 0L;
}
#endif // BASELIST_H
diff --git a/ksim/generalprefs.cpp b/ksim/generalprefs.cpp
index 1f3baf7..8b308a6 100644
--- a/ksim/generalprefs.cpp
+++ b/ksim/generalprefs.cpp
@@ -20,16 +20,16 @@
#include "generalprefs.h"
#include "generalprefs.moc"
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qtabwidget.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qpopupmenu.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqtabwidget.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqpopupmenu.h>
#include <klocale.h>
#include <kapplication.h>
@@ -40,20 +40,20 @@
#include <ksimconfig.h>
-KSim::GeneralPrefs::GeneralPrefs(QWidget *parent, const char *name)
- : QWidget(parent, name)
+KSim::GeneralPrefs::GeneralPrefs(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
- m_mainLayout = new QGridLayout(this);
+ m_mainLayout = new TQGridLayout(this);
m_mainLayout->setSpacing(6);
- m_sizeBox = new QGroupBox(this);
+ m_sizeBox = new TQGroupBox(this);
m_sizeBox->setTitle(i18n("Graph Size"));
m_sizeBox->setColumnLayout(0, Qt::Horizontal);
- QGridLayout *sizeBoxLayout = new QGridLayout(m_sizeBox->layout());
+ TQGridLayout *sizeBoxLayout = new TQGridLayout(m_sizeBox->layout());
sizeBoxLayout->setSpacing(6);
- m_sizeHLabel = new QLabel(m_sizeBox);
+ m_sizeHLabel = new TQLabel(m_sizeBox);
m_sizeHLabel->setText(i18n("Graph height:"));
sizeBoxLayout->addWidget(m_sizeHLabel, 0, 0);
@@ -61,15 +61,15 @@ KSim::GeneralPrefs::GeneralPrefs(QWidget *parent, const char *name)
m_sizeHSpin->setValue(40);
m_sizeHSpin->setMinValue(40);
m_sizeHSpin->setMaxValue(200);
- m_sizeHSpin->setSizePolicy(QSizePolicy(QSizePolicy::Preferred,
- QSizePolicy::Fixed));
+ m_sizeHSpin->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred,
+ TQSizePolicy::Fixed));
sizeBoxLayout->addWidget(m_sizeHSpin, 0, 1);
- QSpacerItem *sizeHSpacer = new QSpacerItem(20, 20,
- QSizePolicy::Expanding, QSizePolicy::Minimum);
+ TQSpacerItem *sizeHSpacer = new TQSpacerItem(20, 20,
+ TQSizePolicy::Expanding, TQSizePolicy::Minimum);
sizeBoxLayout->addItem(sizeHSpacer, 0, 2);
- m_sizeWLabel = new QLabel(m_sizeBox);
+ m_sizeWLabel = new TQLabel(m_sizeBox);
m_sizeWLabel->setText(i18n("Graph width:"));
sizeBoxLayout->addWidget(m_sizeWLabel, 1, 0);
@@ -77,28 +77,28 @@ KSim::GeneralPrefs::GeneralPrefs(QWidget *parent, const char *name)
m_sizeWSpin->setValue(58);
m_sizeWSpin->setMinValue(58);
m_sizeWSpin->setMaxValue(200);
- m_sizeWSpin->setSizePolicy(QSizePolicy(QSizePolicy::Preferred,
- QSizePolicy::Fixed));
+ m_sizeWSpin->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred,
+ TQSizePolicy::Fixed));
sizeBoxLayout->addWidget(m_sizeWSpin, 1, 1);
- QSpacerItem *sizeWSpacer = new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
+ TQSpacerItem *sizeWSpacer = new TQSpacerItem(20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum);
sizeBoxLayout->addItem(sizeWSpacer, 1, 2);
m_mainLayout->addWidget(m_sizeBox, 0, 0);
- QSpacerItem *boxSpacer = new QSpacerItem(20, 20,
- QSizePolicy::Expanding, QSizePolicy::Minimum);
+ TQSpacerItem *boxSpacer = new TQSpacerItem(20, 20,
+ TQSizePolicy::Expanding, TQSizePolicy::Minimum);
m_mainLayout->addItem(boxSpacer, 0, 1);
- m_displayFqdn = new QCheckBox(this);
+ m_displayFqdn = new TQCheckBox(this);
m_displayFqdn->setText(i18n("Display fully qualified domain name"));
m_mainLayout->addMultiCellWidget(m_displayFqdn, 1, 1, 0, 1);
- m_recolourThemes = new QCheckBox(this);
+ m_recolourThemes = new TQCheckBox(this);
m_recolourThemes->setText(i18n("Recolor themes to the current color scheme"));
m_mainLayout->addMultiCellWidget(m_recolourThemes, 2, 2, 0, 1);
- QSpacerItem *spacer = new QSpacerItem(20, 20,
- QSizePolicy::Minimum, QSizePolicy::Expanding);
+ TQSpacerItem *spacer = new TQSpacerItem(20, 20,
+ TQSizePolicy::Minimum, TQSizePolicy::Expanding);
m_mainLayout->addItem(spacer, 3, 0);
}
@@ -108,36 +108,36 @@ KSim::GeneralPrefs::~GeneralPrefs()
void KSim::GeneralPrefs::saveConfig(KSim::Config *config)
{
- config->setGraphSize(QSize(m_sizeWSpin->value(), m_sizeHSpin->value()));
+ config->setGraphSize(TQSize(m_sizeWSpin->value(), m_sizeHSpin->value()));
config->setDisplayFqdn(m_displayFqdn->isChecked());
config->setReColourThemes(m_recolourThemes->isChecked());
}
void KSim::GeneralPrefs::readConfig(KSim::Config *config)
{
- QSize size = config->graphSize();
+ TQSize size = config->graphSize();
m_sizeHSpin->setValue(size.height());
m_sizeWSpin->setValue(size.width());
m_displayFqdn->setChecked(config->displayFqdn());
m_recolourThemes->setChecked(config->reColourThemes());
}
-KSim::ClockPrefs::ClockPrefs(QWidget *parent, const char *name)
- : QWidget(parent, name)
+KSim::ClockPrefs::ClockPrefs(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
- m_mainLayout = new QVBoxLayout(this);
+ m_mainLayout = new TQVBoxLayout(this);
m_mainLayout->setSpacing(6);
- m_timeCheck = new QCheckBox(i18n("Show time"),this);
+ m_timeCheck = new TQCheckBox(i18n("Show time"),this);
m_mainLayout->addWidget(m_timeCheck);
m_timeCheck->setChecked(true);
- m_dateCheck = new QCheckBox(i18n("Show date"),this);
+ m_dateCheck = new TQCheckBox(i18n("Show date"),this);
m_mainLayout->addWidget(m_dateCheck);
m_dateCheck->setChecked(true);
- QSpacerItem *spacer = new QSpacerItem(20, 20,
- QSizePolicy::Minimum, QSizePolicy::Expanding);
+ TQSpacerItem *spacer = new TQSpacerItem(20, 20,
+ TQSizePolicy::Minimum, TQSizePolicy::Expanding);
m_mainLayout->addItem(spacer);
}
@@ -157,44 +157,44 @@ void KSim::ClockPrefs::readConfig(KSim::Config *config)
m_dateCheck->setChecked(config->showDate());
}
-KSim::UptimePrefs::UptimePrefs(QWidget *parent, const char *name)
- : QWidget(parent, name)
+KSim::UptimePrefs::UptimePrefs(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
m_addIcon = SmallIconSet("filenew");
m_removeIcon = SmallIconSet("editdelete");
- m_mainLayout = new QVBoxLayout(this);
+ m_mainLayout = new TQVBoxLayout(this);
m_mainLayout->setSpacing(6);
m_uptimeCombo = new KComboBox(true, this);
m_uptimeCombo->setDuplicatesEnabled(false);
- m_uptimeCombo->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,
- QSizePolicy::Fixed));
+ m_uptimeCombo->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding,
+ TQSizePolicy::Fixed));
m_uptimeCombo->insertItem(i18n("%hh:%mm:%ss"));
m_uptimeCombo->insertItem(i18n("%dd %h:%m"));
m_uptimeCombo->insertItem(i18n("Uptime: %h:%m:%s"));
connect(m_uptimeCombo,
- SIGNAL(aboutToShowContextMenu(QPopupMenu *)),
- SLOT(uptimeContextMenu(QPopupMenu *)));
+ TQT_SIGNAL(aboutToShowContextMenu(TQPopupMenu *)),
+ TQT_SLOT(uptimeContextMenu(TQPopupMenu *)));
- m_uptimeAdd = new QPushButton(this);
+ m_uptimeAdd = new TQPushButton(this);
m_uptimeAdd->setPixmap(SmallIcon("down"));
- connect(m_uptimeAdd, SIGNAL(clicked()), SLOT(insertUptimeItem()));
- QToolTip::add(m_uptimeAdd, i18n("Insert item"));
+ connect(m_uptimeAdd, TQT_SIGNAL(clicked()), TQT_SLOT(insertUptimeItem()));
+ TQToolTip::add(m_uptimeAdd, i18n("Insert item"));
- m_uptimeCheck = new QCheckBox(this);
+ m_uptimeCheck = new TQCheckBox(this);
m_uptimeCheck->setText(i18n("Show uptime"));
m_uptimeCheck->setChecked(true);
- connect(m_uptimeCheck, SIGNAL(toggled(bool)),
- m_uptimeCombo, SLOT(setEnabled(bool)));
- connect(m_uptimeCheck, SIGNAL(toggled(bool)),
- m_uptimeAdd, SLOT(setEnabled(bool)));
+ connect(m_uptimeCheck, TQT_SIGNAL(toggled(bool)),
+ m_uptimeCombo, TQT_SLOT(setEnabled(bool)));
+ connect(m_uptimeCheck, TQT_SIGNAL(toggled(bool)),
+ m_uptimeAdd, TQT_SLOT(setEnabled(bool)));
m_mainLayout->addWidget(m_uptimeCheck);
m_subLayout = new QHBoxLayout;
m_subLayout->setSpacing(6);
- m_formatLabel = new QLabel(this);
+ m_formatLabel = new TQLabel(this);
m_formatLabel->setText(i18n("Uptime format:"));
m_subLayout->addWidget(m_formatLabel);
@@ -202,41 +202,41 @@ KSim::UptimePrefs::UptimePrefs(QWidget *parent, const char *name)
m_subLayout->addWidget(m_uptimeAdd);
m_mainLayout->addLayout(m_subLayout);
- m_uptimeInfo = new QLabel(this);
+ m_uptimeInfo = new TQLabel(this);
m_uptimeInfo->setText(i18n("The text in the edit box will be "
"what is displayed as \nthe uptime except the % items "
"will be replaced with \nthe legend"));
m_mainLayout->addWidget(m_uptimeInfo);
- m_uptimeBox = new QGroupBox(this);
+ m_uptimeBox = new TQGroupBox(this);
m_uptimeBox->setTitle(i18n("Uptime Legend"));
m_uptimeBox->setColumnLayout(0, Qt::Vertical);
m_uptimeBox->layout()->setSpacing(0);
m_uptimeBox->layout()->setMargin(0);
- m_boxLayout = new QVBoxLayout(m_uptimeBox->layout());
+ m_boxLayout = new TQVBoxLayout(m_uptimeBox->layout());
m_boxLayout->setAlignment(Qt::AlignTop);
m_boxLayout->setSpacing(6);
m_boxLayout->setMargin(11);
- m_udLabel = new QLabel(m_uptimeBox);
+ m_udLabel = new TQLabel(m_uptimeBox);
m_udLabel->setText(i18n("%d - Total days uptime"));
m_boxLayout->addWidget(m_udLabel);
- m_uhLabel = new QLabel(m_uptimeBox);
+ m_uhLabel = new TQLabel(m_uptimeBox);
m_uhLabel->setText(i18n("%h - Total hours uptime"));
m_boxLayout->addWidget(m_uhLabel);
- m_umLabel = new QLabel(m_uptimeBox);
+ m_umLabel = new TQLabel(m_uptimeBox);
m_umLabel->setText(i18n("%m - Total minutes uptime"));
m_boxLayout->addWidget(m_umLabel);
- m_usLabel = new QLabel(m_uptimeBox);
+ m_usLabel = new TQLabel(m_uptimeBox);
m_usLabel->setText(i18n("%s - Total seconds uptime"));
m_boxLayout->addWidget(m_usLabel);
m_mainLayout->addWidget(m_uptimeBox);
- QSpacerItem *spacer = new QSpacerItem(20, 20,
- QSizePolicy::Minimum, QSizePolicy::Expanding);
+ TQSpacerItem *spacer = new TQSpacerItem(20, 20,
+ TQSizePolicy::Minimum, TQSizePolicy::Expanding);
m_mainLayout->addItem(spacer);
}
@@ -249,7 +249,7 @@ void KSim::UptimePrefs::saveConfig(KSim::Config *config)
config->setUptimeItem(m_uptimeCombo->currentItem());
config->setShowUptime(m_uptimeCheck->isChecked());
- QStringList comboItems;
+ TQStringList comboItems;
for (int i = 0; i < m_uptimeCombo->count(); i++)
comboItems.append(m_uptimeCombo->text(i));
@@ -260,8 +260,8 @@ void KSim::UptimePrefs::readConfig(KSim::Config *config)
{
m_uptimeCheck->setChecked(config->showUptime());
- QStringList::ConstIterator it;
- QStringList items = config->uptimeFormatList();
+ TQStringList::ConstIterator it;
+ TQStringList items = config->uptimeFormatList();
for (it = items.begin(); it != items.end(); ++it)
if (!m_uptimeCombo->contains(*it))
m_uptimeCombo->insertItem(*it);
@@ -269,18 +269,18 @@ void KSim::UptimePrefs::readConfig(KSim::Config *config)
m_uptimeCombo->setCurrentItem(config->uptimeItem());
}
-void KSim::UptimePrefs::uptimeContextMenu(QPopupMenu *menu)
+void KSim::UptimePrefs::uptimeContextMenu(TQPopupMenu *menu)
{
menu->insertSeparator();
menu->insertItem(m_addIcon, i18n("Insert Item"),
- this, SLOT(insertUptimeItem()));
+ this, TQT_SLOT(insertUptimeItem()));
menu->insertItem(m_removeIcon, i18n("Remove Item"),
- this, SLOT(removeUptimeItem()));
+ this, TQT_SLOT(removeUptimeItem()));
}
void KSim::UptimePrefs::insertUptimeItem()
{
- QString text = m_uptimeCombo->lineEdit()->text();
+ TQString text = m_uptimeCombo->lineEdit()->text();
if (!m_uptimeCombo->contains(text)) {
m_uptimeCombo->insertItem(text);
m_uptimeCombo->setCurrentItem(m_uptimeCombo->count() - 1);
@@ -294,43 +294,43 @@ void KSim::UptimePrefs::removeUptimeItem()
m_uptimeCombo->setCurrentItem(currentItem - 1);
}
-KSim::MemoryPrefs::MemoryPrefs(QWidget *parent, const char *name)
- : QWidget(parent, name)
+KSim::MemoryPrefs::MemoryPrefs(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
m_addIcon = SmallIconSet("filenew");
m_removeIcon = SmallIconSet("editdelete");
- m_mainLayout = new QVBoxLayout(this);
+ m_mainLayout = new TQVBoxLayout(this);
m_mainLayout->setSpacing(6);
m_memCombo = new KComboBox(true, this);
m_memCombo->setDuplicatesEnabled(false);
- m_memCombo->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,
- QSizePolicy::Fixed));
+ m_memCombo->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding,
+ TQSizePolicy::Fixed));
//m_memCombo->insertItem(i18n("%tM - %fM free"));
//m_memCombo->insertItem(i18n("%tM - %uM used"));
connect(m_memCombo,
- SIGNAL(aboutToShowContextMenu(QPopupMenu *)),
- SLOT(memoryContextMenu(QPopupMenu *)));
+ TQT_SIGNAL(aboutToShowContextMenu(TQPopupMenu *)),
+ TQT_SLOT(memoryContextMenu(TQPopupMenu *)));
- m_memoryAdd = new QPushButton(this);
+ m_memoryAdd = new TQPushButton(this);
m_memoryAdd->setPixmap(SmallIcon("down"));
- connect(m_memoryAdd, SIGNAL(clicked()), SLOT(insertMemoryItem()));
- QToolTip::add(m_memoryAdd, i18n("Insert item"));
+ connect(m_memoryAdd, TQT_SIGNAL(clicked()), TQT_SLOT(insertMemoryItem()));
+ TQToolTip::add(m_memoryAdd, i18n("Insert item"));
- m_memCheck = new QCheckBox(this);
+ m_memCheck = new TQCheckBox(this);
m_memCheck->setText(i18n("Show memory and free memory"));
m_memCheck->setChecked(false);
- connect(m_memCheck, SIGNAL(toggled(bool)),
- m_memCombo, SLOT(setEnabled(bool)));
- connect(m_memCheck, SIGNAL(toggled(bool)),
- m_memoryAdd, SLOT(setEnabled(bool)));
+ connect(m_memCheck, TQT_SIGNAL(toggled(bool)),
+ m_memCombo, TQT_SLOT(setEnabled(bool)));
+ connect(m_memCheck, TQT_SIGNAL(toggled(bool)),
+ m_memoryAdd, TQT_SLOT(setEnabled(bool)));
m_mainLayout->addWidget(m_memCheck);
m_subLayout = new QHBoxLayout;
m_subLayout->setSpacing(6);
- m_memFormat = new QLabel(this);
+ m_memFormat = new TQLabel(this);
m_memFormat->setText(i18n("Mem format:"));
m_subLayout->addWidget(m_memFormat);
@@ -338,53 +338,53 @@ KSim::MemoryPrefs::MemoryPrefs(QWidget *parent, const char *name)
m_subLayout->addWidget(m_memoryAdd);
m_mainLayout->addLayout(m_subLayout);
- m_memInfo = new QLabel(this);
+ m_memInfo = new TQLabel(this);
m_memInfo->setText(i18n("The text in the edit box will be what "
"is displayed as \nthe memory & free memory except the "
"% items will be \nreplaced with the legend"));
m_mainLayout->addWidget(m_memInfo);
- m_memBox = new QGroupBox(this);
+ m_memBox = new TQGroupBox(this);
m_memBox->setTitle(i18n("Memory Legend"));
m_memBox->setColumnLayout(0, Qt::Vertical);
m_memBox->layout()->setSpacing(0);
m_memBox->layout()->setMargin(0);
- m_boxLayout = new QVBoxLayout(m_memBox->layout());
+ m_boxLayout = new TQVBoxLayout(m_memBox->layout());
m_boxLayout->setAlignment(Qt::AlignTop);
m_boxLayout->setSpacing(6);
m_boxLayout->setMargin(11);
- m_mtLabel = new QLabel(m_memBox);
+ m_mtLabel = new TQLabel(m_memBox);
m_mtLabel->setText(i18n("%t - Total memory"));
m_boxLayout->addWidget(m_mtLabel);
- m_mfLabel = new QLabel(m_memBox);
+ m_mfLabel = new TQLabel(m_memBox);
m_mfLabel->setText(i18n("%F - Total free memory including cached and buffered"));
m_boxLayout->addWidget(m_mfLabel);
- m_mfLabel = new QLabel(m_memBox);
+ m_mfLabel = new TQLabel(m_memBox);
m_mfLabel->setText(i18n("%f - Total free memory"));
m_boxLayout->addWidget(m_mfLabel);
- m_muLabel = new QLabel(m_memBox);
+ m_muLabel = new TQLabel(m_memBox);
m_muLabel->setText(i18n("%u - Total used memory"));
m_boxLayout->addWidget(m_muLabel);
- m_mcLabel = new QLabel(m_memBox);
+ m_mcLabel = new TQLabel(m_memBox);
m_mcLabel->setText(i18n("%c - Total cached memory"));
m_boxLayout->addWidget(m_mcLabel);
- m_mbLabel = new QLabel(m_memBox);
+ m_mbLabel = new TQLabel(m_memBox);
m_mbLabel->setText(i18n("%b - Total buffered memory"));
m_boxLayout->addWidget(m_mbLabel);
- m_msLabel = new QLabel(m_memBox);
+ m_msLabel = new TQLabel(m_memBox);
m_msLabel->setText(i18n("%s - Total shared memory"));
m_boxLayout->addWidget(m_msLabel);
m_mainLayout->addWidget(m_memBox);
- QSpacerItem *spacer = new QSpacerItem(20, 20,
- QSizePolicy::Minimum, QSizePolicy::Expanding);
+ TQSpacerItem *spacer = new TQSpacerItem(20, 20,
+ TQSizePolicy::Minimum, TQSizePolicy::Expanding);
m_mainLayout->addItem(spacer);
}
@@ -397,7 +397,7 @@ void KSim::MemoryPrefs::saveConfig(KSim::Config *config)
config->setMemoryItem(m_memCombo->currentItem());
config->setShowMemory(m_memCheck->isChecked());
- QStringList comboItems;
+ TQStringList comboItems;
for (int i = 0; i < m_memCombo->count(); i++)
comboItems.append(m_memCombo->text(i));
@@ -408,8 +408,8 @@ void KSim::MemoryPrefs::readConfig(KSim::Config *config)
{
m_memCheck->setChecked(config->showMemory());
- QStringList::ConstIterator it;
- QStringList items = config->memoryFormatList();
+ TQStringList::ConstIterator it;
+ TQStringList items = config->memoryFormatList();
for (it = items.begin(); it != items.end(); ++it)
if (!m_memCombo->contains(*it))
m_memCombo->insertItem(*it);
@@ -417,18 +417,18 @@ void KSim::MemoryPrefs::readConfig(KSim::Config *config)
m_memCombo->setCurrentItem(config->memoryItem());
}
-void KSim::MemoryPrefs::memoryContextMenu(QPopupMenu *menu)
+void KSim::MemoryPrefs::memoryContextMenu(TQPopupMenu *menu)
{
menu->insertSeparator();
menu->insertItem(m_addIcon, i18n("Insert Item"),
- this, SLOT(insertMemoryItem()));
+ this, TQT_SLOT(insertMemoryItem()));
menu->insertItem(m_removeIcon, i18n("Remove Item"),
- this, SLOT(removeMemoryItem()));
+ this, TQT_SLOT(removeMemoryItem()));
}
void KSim::MemoryPrefs::insertMemoryItem()
{
- QString text = m_memCombo->lineEdit()->text();
+ TQString text = m_memCombo->lineEdit()->text();
if (!m_memCombo->contains(text)) {
m_memCombo->insertItem(text);
m_memCombo->setCurrentItem(m_memCombo->count() - 1);
@@ -442,44 +442,44 @@ void KSim::MemoryPrefs::removeMemoryItem()
m_memCombo->setCurrentItem(currentItem - 1);
}
-KSim::SwapPrefs::SwapPrefs(QWidget *parent, const char *name)
- : QWidget(parent, name)
+KSim::SwapPrefs::SwapPrefs(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
m_addIcon = SmallIconSet("filenew");
m_removeIcon = SmallIconSet("editdelete");
- m_mainLayout = new QVBoxLayout(this);
+ m_mainLayout = new TQVBoxLayout(this);
m_mainLayout->setSpacing(6);
- m_swapCheck = new QCheckBox(this);
+ m_swapCheck = new TQCheckBox(this);
m_swapCheck->setText(i18n("Show swap and free swap"));
m_swapCheck->setChecked(true);
m_mainLayout->addWidget(m_swapCheck);
m_swapCombo = new KComboBox(true, this);
m_swapCombo->setDuplicatesEnabled(false);
- m_swapCombo->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,
- QSizePolicy::Fixed));
+ m_swapCombo->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding,
+ TQSizePolicy::Fixed));
//m_swapCombo->insertItem(i18n("%tM - %fM free"));
//m_swapCombo->insertItem(i18n("%tM - %uM used"));
connect(m_swapCombo,
- SIGNAL(aboutToShowContextMenu(QPopupMenu *)),
- SLOT(swapContextMenu(QPopupMenu *)));
+ TQT_SIGNAL(aboutToShowContextMenu(TQPopupMenu *)),
+ TQT_SLOT(swapContextMenu(TQPopupMenu *)));
- m_swapAdd = new QPushButton(this);
+ m_swapAdd = new TQPushButton(this);
m_swapAdd->setPixmap(SmallIcon("down"));
- connect(m_swapAdd, SIGNAL(clicked()), SLOT(insertSwapItem()));
- QToolTip::add(m_swapAdd, i18n("Insert item"));
+ connect(m_swapAdd, TQT_SIGNAL(clicked()), TQT_SLOT(insertSwapItem()));
+ TQToolTip::add(m_swapAdd, i18n("Insert item"));
m_subLayout = new QHBoxLayout;
m_subLayout->setSpacing(6);
- connect(m_swapCheck, SIGNAL(toggled(bool)),
- m_swapCombo, SLOT(setEnabled(bool)));
- connect(m_swapCheck, SIGNAL(toggled(bool)),
- m_swapAdd, SLOT(setEnabled(bool)));
+ connect(m_swapCheck, TQT_SIGNAL(toggled(bool)),
+ m_swapCombo, TQT_SLOT(setEnabled(bool)));
+ connect(m_swapCheck, TQT_SIGNAL(toggled(bool)),
+ m_swapAdd, TQT_SLOT(setEnabled(bool)));
- m_swapFormat = new QLabel(this);
+ m_swapFormat = new TQLabel(this);
m_swapFormat->setText(i18n("Swap format:"));
m_subLayout->addWidget(m_swapFormat);
@@ -487,37 +487,37 @@ KSim::SwapPrefs::SwapPrefs(QWidget *parent, const char *name)
m_subLayout->addWidget(m_swapAdd);
m_mainLayout->addLayout(m_subLayout);
- m_swapInfo = new QLabel(this);
+ m_swapInfo = new TQLabel(this);
m_swapInfo->setText(i18n("The text in the edit box will be what is "
"displayed as \nthe swap & free swap except the % items "
"will be \nreplaced with the legend"));
m_mainLayout->addWidget(m_swapInfo);
- m_swapBox = new QGroupBox(this);
+ m_swapBox = new TQGroupBox(this);
m_swapBox->setTitle(i18n("Swap Legend"));
m_swapBox->setColumnLayout(0, Qt::Vertical);
m_swapBox->layout()->setSpacing(0);
m_swapBox->layout()->setMargin(0);
- m_boxLayout = new QVBoxLayout(m_swapBox->layout());
+ m_boxLayout = new TQVBoxLayout(m_swapBox->layout());
m_boxLayout->setAlignment(Qt::AlignTop);
m_boxLayout->setSpacing(6);
m_boxLayout->setMargin(11);
- m_stLabel = new QLabel(m_swapBox);
+ m_stLabel = new TQLabel(m_swapBox);
m_stLabel->setText(i18n("%t - Total swap"));
m_boxLayout->addWidget(m_stLabel);
- m_sfLabel = new QLabel(m_swapBox);
+ m_sfLabel = new TQLabel(m_swapBox);
m_sfLabel->setText(i18n("%f - Total free swap"));
m_boxLayout->addWidget(m_sfLabel);
- m_suLabel = new QLabel(m_swapBox);
+ m_suLabel = new TQLabel(m_swapBox);
m_suLabel->setText(i18n("%u - Total used swap"));
m_boxLayout->addWidget(m_suLabel);
m_mainLayout->addWidget(m_swapBox);
- QSpacerItem *spacer = new QSpacerItem(20, 20,
- QSizePolicy::Minimum, QSizePolicy::Expanding);
+ TQSpacerItem *spacer = new TQSpacerItem(20, 20,
+ TQSizePolicy::Minimum, TQSizePolicy::Expanding);
m_mainLayout->addItem(spacer);
}
@@ -529,7 +529,7 @@ void KSim::SwapPrefs::saveConfig(KSim::Config *config)
{
config->setSwapItem(m_swapCombo->currentItem());
- QStringList comboItems;
+ TQStringList comboItems;
for (int i = 0; i < m_swapCombo->count(); i++)
comboItems.append(m_swapCombo->text(i));
@@ -541,8 +541,8 @@ void KSim::SwapPrefs::readConfig(KSim::Config *config)
{
m_swapCheck->setChecked(config->showSwap());
- QStringList::ConstIterator it;
- QStringList items = config->swapFormatList();
+ TQStringList::ConstIterator it;
+ TQStringList items = config->swapFormatList();
for (it = items.begin(); it != items.end(); ++it)
if (!m_swapCombo->contains(*it))
m_swapCombo->insertItem(*it);
@@ -550,16 +550,16 @@ void KSim::SwapPrefs::readConfig(KSim::Config *config)
m_swapCombo->setCurrentItem(config->swapItem());
}
-void KSim::SwapPrefs::swapContextMenu(QPopupMenu *menu)
+void KSim::SwapPrefs::swapContextMenu(TQPopupMenu *menu)
{
menu->insertSeparator();
- menu->insertItem(m_addIcon, i18n("Insert Item"), this, SLOT(insertSwapItem()));
- menu->insertItem(m_removeIcon, i18n("Remove Item"), this, SLOT(removeSwapItem()));
+ menu->insertItem(m_addIcon, i18n("Insert Item"), this, TQT_SLOT(insertSwapItem()));
+ menu->insertItem(m_removeIcon, i18n("Remove Item"), this, TQT_SLOT(removeSwapItem()));
}
void KSim::SwapPrefs::insertSwapItem()
{
- QString text = m_swapCombo->lineEdit()->text();
+ TQString text = m_swapCombo->lineEdit()->text();
if (!m_swapCombo->contains(text)) {
m_swapCombo->insertItem(text);
m_swapCombo->setCurrentItem(m_swapCombo->count() - 1);
diff --git a/ksim/generalprefs.h b/ksim/generalprefs.h
index b163dac..3b861a8 100644
--- a/ksim/generalprefs.h
+++ b/ksim/generalprefs.h
@@ -20,8 +20,8 @@
#ifndef GENERAL_H
#define GENERAL_H
-#include <qwidget.h>
-#include <qiconset.h>
+#include <tqwidget.h>
+#include <tqiconset.h>
class QVBoxLayout;
class QHBoxLayout;
@@ -44,7 +44,7 @@ namespace KSim
{
Q_OBJECT
public:
- GeneralPrefs(QWidget *parent, const char *name=0);
+ GeneralPrefs(TQWidget *parent, const char *name=0);
~GeneralPrefs();
public slots:
@@ -52,21 +52,21 @@ namespace KSim
void readConfig(KSim::Config *);
private:
- QGridLayout *m_mainLayout;
- QGroupBox *m_sizeBox;
- QLabel *m_sizeHLabel;
+ TQGridLayout *m_mainLayout;
+ TQGroupBox *m_sizeBox;
+ TQLabel *m_sizeHLabel;
KIntSpinBox *m_sizeHSpin;
- QLabel *m_sizeWLabel;
+ TQLabel *m_sizeWLabel;
KIntSpinBox *m_sizeWSpin;
- QCheckBox *m_displayFqdn;
- QCheckBox *m_recolourThemes;
+ TQCheckBox *m_displayFqdn;
+ TQCheckBox *m_recolourThemes;
};
class ClockPrefs : public QWidget
{
Q_OBJECT
public:
- ClockPrefs(QWidget *parent, const char *name=0);
+ ClockPrefs(TQWidget *parent, const char *name=0);
~ClockPrefs();
public slots:
@@ -74,16 +74,16 @@ namespace KSim
void readConfig(KSim::Config *);
private:
- QVBoxLayout *m_mainLayout;
- QCheckBox *m_timeCheck;
- QCheckBox *m_dateCheck;
+ TQVBoxLayout *m_mainLayout;
+ TQCheckBox *m_timeCheck;
+ TQCheckBox *m_dateCheck;
};
class UptimePrefs : public QWidget
{
Q_OBJECT
public:
- UptimePrefs(QWidget *parent, const char *name=0);
+ UptimePrefs(TQWidget *parent, const char *name=0);
~UptimePrefs();
public slots:
@@ -91,33 +91,33 @@ namespace KSim
void readConfig(KSim::Config *);
private slots:
- void uptimeContextMenu(QPopupMenu *);
+ void uptimeContextMenu(TQPopupMenu *);
void insertUptimeItem();
void removeUptimeItem();
private:
- QVBoxLayout *m_mainLayout;
- QHBoxLayout *m_subLayout;
- QVBoxLayout *m_boxLayout;
+ TQVBoxLayout *m_mainLayout;
+ TQHBoxLayout *m_subLayout;
+ TQVBoxLayout *m_boxLayout;
KComboBox *m_uptimeCombo;
- QPushButton *m_uptimeAdd;
- QCheckBox *m_uptimeCheck;
- QLabel *m_formatLabel;
- QLabel *m_uptimeInfo;
- QGroupBox *m_uptimeBox;
- QLabel *m_udLabel;
- QLabel *m_uhLabel;
- QLabel *m_umLabel;
- QLabel *m_usLabel;
- QIconSet m_addIcon;
- QIconSet m_removeIcon;
+ TQPushButton *m_uptimeAdd;
+ TQCheckBox *m_uptimeCheck;
+ TQLabel *m_formatLabel;
+ TQLabel *m_uptimeInfo;
+ TQGroupBox *m_uptimeBox;
+ TQLabel *m_udLabel;
+ TQLabel *m_uhLabel;
+ TQLabel *m_umLabel;
+ TQLabel *m_usLabel;
+ TQIconSet m_addIcon;
+ TQIconSet m_removeIcon;
};
class MemoryPrefs : public QWidget
{
Q_OBJECT
public:
- MemoryPrefs(QWidget *parent, const char *name=0);
+ MemoryPrefs(TQWidget *parent, const char *name=0);
~MemoryPrefs();
public slots:
@@ -125,35 +125,35 @@ namespace KSim
void readConfig(KSim::Config *);
private slots:
- void memoryContextMenu(QPopupMenu *);
+ void memoryContextMenu(TQPopupMenu *);
void insertMemoryItem();
void removeMemoryItem();
private:
- QVBoxLayout *m_mainLayout;
- QHBoxLayout *m_subLayout;
- QVBoxLayout *m_boxLayout;
- QCheckBox *m_memCheck;
- QLabel *m_memFormat;
+ TQVBoxLayout *m_mainLayout;
+ TQHBoxLayout *m_subLayout;
+ TQVBoxLayout *m_boxLayout;
+ TQCheckBox *m_memCheck;
+ TQLabel *m_memFormat;
KComboBox *m_memCombo;
- QLabel *m_memInfo;
- QGroupBox *m_memBox;
- QLabel *m_mtLabel;
- QLabel *m_mfLabel;
- QLabel *m_muLabel;
- QLabel *m_mcLabel;
- QLabel *m_mbLabel;
- QLabel *m_msLabel;
- QPushButton *m_memoryAdd;
- QIconSet m_addIcon;
- QIconSet m_removeIcon;
+ TQLabel *m_memInfo;
+ TQGroupBox *m_memBox;
+ TQLabel *m_mtLabel;
+ TQLabel *m_mfLabel;
+ TQLabel *m_muLabel;
+ TQLabel *m_mcLabel;
+ TQLabel *m_mbLabel;
+ TQLabel *m_msLabel;
+ TQPushButton *m_memoryAdd;
+ TQIconSet m_addIcon;
+ TQIconSet m_removeIcon;
};
class SwapPrefs : public QWidget
{
Q_OBJECT
public:
- SwapPrefs(QWidget *parent, const char *name=0);
+ SwapPrefs(TQWidget *parent, const char *name=0);
~SwapPrefs();
public slots:
@@ -161,25 +161,25 @@ namespace KSim
void readConfig(KSim::Config *);
private slots:
- void swapContextMenu(QPopupMenu *);
+ void swapContextMenu(TQPopupMenu *);
void insertSwapItem();
void removeSwapItem();
private:
- QVBoxLayout *m_mainLayout;
- QHBoxLayout *m_subLayout;
- QVBoxLayout *m_boxLayout;
- QCheckBox *m_swapCheck;
- QLabel *m_swapFormat;
+ TQVBoxLayout *m_mainLayout;
+ TQHBoxLayout *m_subLayout;
+ TQVBoxLayout *m_boxLayout;
+ TQCheckBox *m_swapCheck;
+ TQLabel *m_swapFormat;
KComboBox *m_swapCombo;
- QLabel *m_swapInfo;
- QGroupBox *m_swapBox;
- QLabel *m_stLabel;
- QLabel *m_sfLabel;
- QLabel *m_suLabel;
- QPushButton *m_swapAdd;
- QIconSet m_addIcon;
- QIconSet m_removeIcon;
+ TQLabel *m_swapInfo;
+ TQGroupBox *m_swapBox;
+ TQLabel *m_stLabel;
+ TQLabel *m_sfLabel;
+ TQLabel *m_suLabel;
+ TQPushButton *m_swapAdd;
+ TQIconSet m_addIcon;
+ TQIconSet m_removeIcon;
};
}
#endif
diff --git a/ksim/ksim.cpp b/ksim/ksim.cpp
index 86ea980..8a2b643 100644
--- a/ksim/ksim.cpp
+++ b/ksim/ksim.cpp
@@ -23,7 +23,7 @@
#include <ksimconfig.h>
#include <common.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kaboutapplication.h>
#include <kbugreport.h>
@@ -35,7 +35,7 @@
extern "C"
{
- KDE_EXPORT KPanelExtension *init(QWidget *parent, const QString &configFile)
+ KDE_EXPORT KPanelExtension *init(TQWidget *parent, const TQString &configFile)
{
KGlobal::locale()->insertCatalogue("ksim");
return new KSim::PanelExtension(configFile, KPanelExtension::Normal,
@@ -45,8 +45,8 @@ extern "C"
}
}
-KSim::PanelExtension::PanelExtension(const QString &configFile,
- Type type, int actions, QWidget *parent, const char *name)
+KSim::PanelExtension::PanelExtension(const TQString &configFile,
+ Type type, int actions, TQWidget *parent, const char *name)
: KPanelExtension(configFile, type, actions, parent, name)
{
m_dcopClient = new DCOPClient;
@@ -75,12 +75,12 @@ KSim::PanelExtension::~PanelExtension()
delete m_dcopClient;
}
-QSize KSim::PanelExtension::sizeHint(Position p, QSize maxSize) const
+TQSize KSim::PanelExtension::sizeHint(Position p, TQSize maxSize) const
{
return m_view->sizeHint(p, maxSize);
}
-void KSim::PanelExtension::resizeEvent(QResizeEvent *)
+void KSim::PanelExtension::resizeEvent(TQResizeEvent *)
{
m_view->resize(size());
}
diff --git a/ksim/ksim.h b/ksim/ksim.h
index 8a43a06..3bdc341 100644
--- a/ksim/ksim.h
+++ b/ksim/ksim.h
@@ -36,13 +36,13 @@ namespace KSim
{
Q_OBJECT
public:
- PanelExtension( const QString & configFile, Type type,
- int actions, QWidget * parent, const char * name);
+ PanelExtension( const TQString & configFile, Type type,
+ int actions, TQWidget * parent, const char * name);
~PanelExtension();
- QSize sizeHint( Position, QSize maxSize ) const;
- void resizeEvent(QResizeEvent *);
+ TQSize sizeHint( Position, TQSize maxSize ) const;
+ void resizeEvent(TQResizeEvent *);
Position preferedPosition() const;
void reparse();
@@ -59,7 +59,7 @@ namespace KSim
private:
KSim::MainView * m_view;
- QBoxLayout * m_layout;
+ TQBoxLayout * m_layout;
KAboutData * m_aboutData;
DCOPClient * m_dcopClient;
};
diff --git a/ksim/ksimframe.cpp b/ksim/ksimframe.cpp
index e69a6c6..a76eddf 100644
--- a/ksim/ksimframe.cpp
+++ b/ksim/ksimframe.cpp
@@ -23,8 +23,8 @@
#include "ksim.h"
#include "themetypes.h"
-KSim::Frame::Frame(int type, QWidget *parent, const char *name)
- : QWidget (parent, name)
+KSim::Frame::Frame(int type, TQWidget *parent, const char *name)
+ : TQWidget (parent, name)
{
setType(type);
@@ -62,15 +62,15 @@ void KSim::Frame::configureObject(bool repaintWidget)
update();
}
-void KSim::Frame::paintEvent(QPaintEvent *)
+void KSim::Frame::paintEvent(TQPaintEvent *)
{
bitBlt(this, 0, 0, &m_background);
}
-void KSim::Frame::resizeEvent(QResizeEvent *ev)
+void KSim::Frame::resizeEvent(TQResizeEvent *ev)
{
m_background.convertFromImage(m_image.smoothScale(ev->size()));
- QWidget::resizeEvent(ev);
+ TQWidget::resizeEvent(ev);
}
void KSim::Frame::setFrameHeight(int height)
diff --git a/ksim/ksimframe.h b/ksim/ksimframe.h
index b7b397f..5b8db0e 100644
--- a/ksim/ksimframe.h
+++ b/ksim/ksimframe.h
@@ -20,8 +20,8 @@
#ifndef KSIMFRAME_H
#define KSIMFRAME_H
-#include <qwidget.h>
-#include <qimage.h>
+#include <tqwidget.h>
+#include <tqimage.h>
#include <common.h>
namespace KSim
@@ -31,19 +31,19 @@ namespace KSim
/**
* @internal
*/
- class Frame : public QWidget, public KSim::Base
+ class Frame : public TQWidget, public KSim::Base
{
Q_OBJECT
public:
- Frame(int type, QWidget *parent, const char *name = 0);
+ Frame(int type, TQWidget *parent, const char *name = 0);
~Frame();
- const QPixmap *const background() const { return &m_background; }
+ const TQPixmap *const background() const { return &m_background; }
virtual void configureObject(bool repaintWidget=true);
protected:
- virtual void paintEvent(QPaintEvent *);
- virtual void resizeEvent(QResizeEvent *);
+ virtual void paintEvent(TQPaintEvent *);
+ virtual void resizeEvent(TQResizeEvent *);
private:
// helper functions to make
@@ -53,11 +53,11 @@ namespace KSim
int m_origWidth;
int m_origHeight;
- QPoint m_globalBottomRight;
- QPoint m_globalTopLeft;
- QPoint m_origPos;
- QImage m_image;
- QPixmap m_background;
+ TQPoint m_globalBottomRight;
+ TQPoint m_globalTopLeft;
+ TQPoint m_origPos;
+ TQImage m_image;
+ TQPixmap m_background;
};
}
#endif
diff --git a/ksim/ksimpref.cpp b/ksim/ksimpref.cpp
index d8aa12d..c4ff4dc 100644
--- a/ksim/ksimpref.cpp
+++ b/ksim/ksimpref.cpp
@@ -33,11 +33,11 @@
#include <kstandarddirs.h>
#include <kmessagebox.h>
-#include <qhbox.h>
-#include <qframe.h>
+#include <tqhbox.h>
+#include <tqframe.h>
KSim::ConfigDialog::ConfigDialog(KSim::Config *config,
- QWidget *parent, const char *name)
+ TQWidget *parent, const char *name)
: KDialogBase(TreeList, i18n("Configure"),
Help | Ok | Apply | Close, Ok, parent, name, true, true)
{
@@ -47,53 +47,53 @@ KSim::ConfigDialog::ConfigDialog(KSim::Config *config,
m_config = config;
- setFolderIcon(QStringList(' ' + i18n("Plugins")),
+ setFolderIcon(TQStringList(' ' + i18n("Plugins")),
BarIcon("folder", KIcon::SizeSmall));
- setFolderIcon(QStringList(' ' + i18n("Miscellaneous")),
+ setFolderIcon(TQStringList(' ' + i18n("Miscellaneous")),
BarIcon("misc", KIcon::SizeSmall));
- QFrame *monitors = addHBoxPage(' ' + i18n("Monitors"),
+ TQFrame *monitors = addHBoxPage(' ' + i18n("Monitors"),
i18n("Monitors Installed"), BarIcon("ksim", KIcon::SizeSmall));
m_monPage = new KSim::MonitorPrefs(monitors);
- QStringList list;
+ TQStringList list;
list << ' ' + i18n("Miscellaneous") << ' ' + i18n("General");
- QFrame *general = addHBoxPage(list, i18n("General Options"),
+ TQFrame *general = addHBoxPage(list, i18n("General Options"),
SmallIcon("misc"));
m_generalPage = new KSim::GeneralPrefs(general);
list.clear();
list << ' ' + i18n("Miscellaneous") << ' ' + i18n("Clock");
- QFrame *clock = addHBoxPage(list, i18n("Clock Options"),
- QPixmap(locate("data", "ksim/pics/clock.png")));
+ TQFrame *clock = addHBoxPage(list, i18n("Clock Options"),
+ TQPixmap(locate("data", "ksim/pics/clock.png")));
m_clockPage = new KSim::ClockPrefs(clock);
list.clear();
list << ' ' + i18n("Miscellaneous") << ' ' + i18n("Uptime");
- QFrame *uptime = addHBoxPage(list, i18n("Uptime Options"),
- QPixmap(locate("data", "ksim/pics/uptime.png")));
+ TQFrame *uptime = addHBoxPage(list, i18n("Uptime Options"),
+ TQPixmap(locate("data", "ksim/pics/uptime.png")));
m_uptimePage = new KSim::UptimePrefs(uptime);
list.clear();
list << ' ' + i18n("Miscellaneous") << ' ' + i18n("Memory");
- QFrame *memory = addHBoxPage(list, i18n("Memory Options"),
+ TQFrame *memory = addHBoxPage(list, i18n("Memory Options"),
SmallIcon("memory"));
m_memoryPage = new KSim::MemoryPrefs(memory);
list.clear();
list << ' ' + i18n("Miscellaneous") << ' ' + i18n("Swap");
- QFrame *swap = addHBoxPage(list, i18n("Swap Options"),
+ TQFrame *swap = addHBoxPage(list, i18n("Swap Options"),
SmallIcon("hdd_unmount"));
m_swapPage = new KSim::SwapPrefs(swap);
- QFrame *theme = addHBoxPage(' ' + i18n("Themes"),
+ TQFrame *theme = addHBoxPage(' ' + i18n("Themes"),
i18n("Theme Selector"), BarIcon("folder_image", KIcon::SizeSmall));
m_themePage = new KSim::ThemePrefs(theme);
- connect(this, SIGNAL(applyClicked()), SLOT(savePrefs()));
- connect(this, SIGNAL(okClicked()), SLOT(closePrefs()));
- connect(this, SIGNAL(closeClicked()), SLOT(loadPluginConfig()));
- connect(parent, SIGNAL(reload()), SLOT(reload()));
+ connect(this, TQT_SIGNAL(applyClicked()), TQT_SLOT(savePrefs()));
+ connect(this, TQT_SIGNAL(okClicked()), TQT_SLOT(closePrefs()));
+ connect(this, TQT_SIGNAL(closeClicked()), TQT_SLOT(loadPluginConfig()));
+ connect(parent, TQT_SIGNAL(reload()), TQT_SLOT(reload()));
KSim::PluginList::ConstIterator it;
const KSim::PluginList &pluginList = KSim::PluginLoader::self().pluginList();
@@ -117,7 +117,7 @@ void KSim::ConfigDialog::reload()
enableButtons();
}
-void KSim::ConfigDialog::removePage(const QCString &name)
+void KSim::ConfigDialog::removePage(const TQCString &name)
{
const KSim::Plugin &plugin = KSim::PluginLoader::self().find(name);
if (plugin.isNull() || !plugin.configPage()) {
@@ -126,18 +126,18 @@ void KSim::ConfigDialog::removePage(const QCString &name)
return;
}
- QWidget *frame = plugin.configPage()->parentWidget();
+ TQWidget *frame = plugin.configPage()->parentWidget();
// reparent the widget if the parent is not null
if (frame) {
plugin.configPage()->hide();
- plugin.configPage()->reparent(0, QPoint(0, 0), false);
+ plugin.configPage()->reparent(0, TQPoint(0, 0), false);
// delete the frame so it removes the page from the config dialog
delete frame;
kdDebug(2003) << "removing " << name << " from KSimPref" << endl;
}
}
-void KSim::ConfigDialog::createPage(const QCString &name)
+void KSim::ConfigDialog::createPage(const TQCString &name)
{
const KSim::Plugin &plugin = KSim::PluginLoader::self().find(name);
createPage(plugin);
@@ -154,17 +154,17 @@ void KSim::ConfigDialog::createPage(const KSim::Plugin &plugin)
kdDebug(2003) << "adding " << plugin.libName() << " to KSimPref" << endl;
- QStringList list;
+ TQStringList list;
list << ' ' + i18n("Plugins") << ' ' + plugin.name();
- QFrame *pluginFrame = addHBoxPage(list, i18n("%1 Options").arg(plugin.name()),
+ TQFrame *pluginFrame = addHBoxPage(list, i18n("%1 Options").arg(plugin.name()),
plugin.icon());
- plugin.configPage()->reparent(pluginFrame, QPoint(0, 0), true);
+ plugin.configPage()->reparent(pluginFrame, TQPoint(0, 0), true);
plugin.configPage()->readConfig();
// TODO: implement this correctly one day
-// connect (info.configPage(), SIGNAL(pageChanged()),
-// this, SLOT(enableButtons()));
+// connect (info.configPage(), TQT_SIGNAL(pageChanged()),
+// this, TQT_SLOT(enableButtons()));
}
void KSim::ConfigDialog::savePrefs()
@@ -185,8 +185,8 @@ void KSim::ConfigDialog::saveConfig(bool reload)
m_themePage->saveConfig(m_config);
ChangedPluginList changedPlugins;
- for (QListViewItemIterator it(m_monPage); it.current(); ++it) {
- QCheckListItem *item = static_cast<QCheckListItem *>(it.current());
+ for (TQListViewItemIterator it(m_monPage); it.current(); ++it) {
+ TQCheckListItem *item = static_cast<TQCheckListItem *>(it.current());
KSim::PluginInfo info = KSim::PluginLoader::self().findPluginInfo(item->text(0),
KSim::PluginLoader::Name);
changedPlugins.append(ChangedPlugin(item->isOn(),
@@ -211,8 +211,8 @@ void KSim::ConfigDialog::readConfig()
m_themePage->readConfig(m_config);
m_currentPlugins.clear();
- for (QListViewItemIterator it(m_monPage); it.current(); ++it) {
- QCheckListItem *item = static_cast<QCheckListItem *>(it.current());
+ for (TQListViewItemIterator it(m_monPage); it.current(); ++it) {
+ TQCheckListItem *item = static_cast<TQCheckListItem *>(it.current());
KSim::PluginInfo info = KSim::PluginLoader::self().findPluginInfo(item->text(0),
KSim::PluginLoader::Name);
m_currentPlugins.append(ChangedPlugin(item->isOn(),
@@ -248,7 +248,7 @@ void KSim::ConfigDialog::disableButtons()
enableButtonOK(false);
}
-const KSim::ChangedPlugin &KSim::ConfigDialog::findPlugin(const QString &name) const
+const KSim::ChangedPlugin &KSim::ConfigDialog::findPlugin(const TQString &name) const
{
ChangedPluginList::ConstIterator it;
for (it = m_currentPlugins.begin(); it != m_currentPlugins.end(); ++it) {
diff --git a/ksim/ksimpref.h b/ksim/ksimpref.h
index 8e560a8..e7afc13 100644
--- a/ksim/ksimpref.h
+++ b/ksim/ksimpref.h
@@ -41,29 +41,29 @@ namespace KSim
{
public:
ChangedPlugin() : m_name(0) {}
- ChangedPlugin(bool enabled, const QCString &libname,
- const QString &name, const QString &file) : m_enabled(enabled),
+ ChangedPlugin(bool enabled, const TQCString &libname,
+ const TQString &name, const TQString &file) : m_enabled(enabled),
m_libname(libname), m_name(name), m_file(file) {}
- ChangedPlugin(bool enabled, const QCString &libname,
- const QString &name, const QString &file, bool oldState)
+ ChangedPlugin(bool enabled, const TQCString &libname,
+ const TQString &name, const TQString &file, bool oldState)
: m_enabled(enabled), m_libname(libname), m_name(name),
m_file(file), m_oldState(oldState) {}
bool isEnabled() const { return m_enabled; }
bool isDifferent() const { return m_enabled != m_oldState; }
- const QCString &libName() const { return m_libname; }
- const QString &name() const { return m_name; }
- const QString &filename() const { return m_file; }
+ const TQCString &libName() const { return m_libname; }
+ const TQString &name() const { return m_name; }
+ const TQString &filename() const { return m_file; }
private:
bool m_enabled;
- QCString m_libname;
- QString m_name;
- QString m_file;
+ TQCString m_libname;
+ TQString m_name;
+ TQString m_file;
bool m_oldState;
};
- class ChangedPluginList : public QValueList<ChangedPlugin>
+ class ChangedPluginList : public TQValueList<ChangedPlugin>
{
public:
ChangedPluginList() {}
@@ -74,12 +74,12 @@ namespace KSim
{
Q_OBJECT
public:
- ConfigDialog(KSim::Config *config, QWidget *parent, const char *name = 0);
+ ConfigDialog(KSim::Config *config, TQWidget *parent, const char *name = 0);
~ConfigDialog();
public slots:
- void removePage(const QCString &name);
- void createPage(const QCString &name); // overload
+ void removePage(const TQCString &name);
+ void createPage(const TQCString &name); // overload
void createPage(const KSim::Plugin &plugin);
signals:
@@ -96,7 +96,7 @@ namespace KSim
void disableButtons();
private:
- const KSim::ChangedPlugin &findPlugin(const QString &name) const;
+ const KSim::ChangedPlugin &findPlugin(const TQString &name) const;
ChangedPluginList m_currentPlugins;
KSim::MonitorPrefs *m_monPage;
diff --git a/ksim/ksimsysinfo.cpp b/ksim/ksimsysinfo.cpp
index 724adb6..7140e3a 100644
--- a/ksim/ksimsysinfo.cpp
+++ b/ksim/ksimsysinfo.cpp
@@ -17,12 +17,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qtooltip.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qregexp.h>
-#include <qtextstream.h>
-#include <qdatetime.h>
+#include <tqtooltip.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
+#include <tqdatetime.h>
#include <kdebug.h>
#include <klocale.h>
@@ -41,11 +41,11 @@
#include <string.h>
KSim::Sysinfo::Sysinfo(KSim::Config *config,
- QWidget *parent, const char *name, WFlags fl)
- : DCOPObject("sysinfo"), QWidget(parent, name, fl)
+ TQWidget *parent, const char *name, WFlags fl)
+ : DCOPObject("sysinfo"), TQWidget(parent, name, fl)
{
m_config = config;
- m_layout = new QVBoxLayout(this);
+ m_layout = new TQVBoxLayout(this);
m_timeLabel = 0L;
m_dateLabel = 0L;
@@ -54,11 +54,11 @@ KSim::Sysinfo::Sysinfo(KSim::Config *config,
m_swapLabel = 0L;
//m_procsLabel = 0L;
- m_timer = new QTimer(this);
- connect(m_timer, SIGNAL(timeout()), SLOT(clockUptimeUpdate()));
+ m_timer = new TQTimer(this);
+ connect(m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(clockUptimeUpdate()));
- m_sysTimer = new QTimer(this);
- connect(m_sysTimer, SIGNAL(timeout()), SLOT(sysUpdate()));
+ m_sysTimer = new TQTimer(this);
+ connect(m_sysTimer, TQT_SIGNAL(timeout()), TQT_SLOT(sysUpdate()));
createView();
}
@@ -71,13 +71,13 @@ KSim::Sysinfo::~Sysinfo()
void KSim::Sysinfo::clockUptimeUpdate()
{
- QString time;
+ TQString time;
static bool updateDate = true;
if (m_timeLabel) {
- QTime now = QTime::currentTime();
+ TQTime now = TQTime::currentTime();
time = KGlobal::locale()->formatTime(now, true);
- if ( now == QTime(0, 0) )
+ if ( now == TQTime(0, 0) )
updateDate = true;
m_timeLabel->setText(time);
@@ -86,7 +86,7 @@ void KSim::Sysinfo::clockUptimeUpdate()
// only update the date when necessary
if (m_dateLabel) {
if (updateDate) {
- m_dateLabel->setText(KGlobal::locale()->formatDate(QDate::currentDate()));
+ m_dateLabel->setText(KGlobal::locale()->formatDate(TQDate::currentDate()));
updateDate = false;
}
}
@@ -95,7 +95,7 @@ void KSim::Sysinfo::clockUptimeUpdate()
}
if (m_uptimeLabel) {
- QString uptime = m_config->uptimeFormat();
+ TQString uptime = m_config->uptimeFormat();
++m_totalUptime;
long uptimeDays, uptimeHours, uptimeMins, uptimeSecs;
@@ -104,13 +104,13 @@ void KSim::Sysinfo::clockUptimeUpdate()
uptimeMins = (m_totalUptime - uptimeHours * 3600) / 60;
uptimeSecs = m_totalUptime % 60;
- QString days;
- QString hours;
- QString minutes;
- QString seconds;
+ TQString days;
+ TQString hours;
+ TQString minutes;
+ TQString seconds;
// found days so we have to modify hours
- if (uptime.find(QRegExp("%d" ), 0) >= 0)
+ if (uptime.find(TQRegExp("%d" ), 0) >= 0)
uptimeHours -= (uptimeDays * 24);
days.sprintf("%02li", uptimeDays);
@@ -118,10 +118,10 @@ void KSim::Sysinfo::clockUptimeUpdate()
minutes.sprintf("%02li", uptimeMins);
seconds.sprintf("%02li", uptimeSecs);
- uptime.replace(QRegExp("%d"), days);
- uptime.replace(QRegExp("%h"), hours);
- uptime.replace(QRegExp("%m"), minutes);
- uptime.replace(QRegExp("%s"), seconds);
+ uptime.replace(TQRegExp("%d"), days);
+ uptime.replace(TQRegExp("%h"), hours);
+ uptime.replace(TQRegExp("%m"), minutes);
+ uptime.replace(TQRegExp("%s"), seconds);
m_uptimeLabel->setText(uptime);
}
}
@@ -132,7 +132,7 @@ void KSim::Sysinfo::sysUpdate()
m_totalUptime = system.uptime();
if (m_memLabel) {
- QString memory = m_config->memoryFormat();
+ TQString memory = m_config->memoryFormat();
unsigned long total = system.totalRam();
unsigned long free = system.freeRam();
unsigned long shared = system.sharedRam();
@@ -142,16 +142,16 @@ void KSim::Sysinfo::sysUpdate()
unsigned long allFree = free + buffer + cache;
bool all = memory.find( "%F" ) != -1;
- memory.replace(QRegExp("%s"), QString::number(System::bytesToMegs(shared)));
- memory.replace(QRegExp("%b"), QString::number(System::bytesToMegs(buffer)));
- memory.replace(QRegExp("%c"), QString::number(System::bytesToMegs(cache)));
- memory.replace(QRegExp("%u"), QString::number(System::bytesToMegs(used)));
- memory.replace(QRegExp("%t"), QString::number(System::bytesToMegs(total)));
- memory.replace(QRegExp("%f"), QString::number(System::bytesToMegs(free)));
- memory.replace(QRegExp("%F"), QString::number(System::bytesToMegs(allFree)));
+ memory.replace(TQRegExp("%s"), TQString::number(System::bytesToMegs(shared)));
+ memory.replace(TQRegExp("%b"), TQString::number(System::bytesToMegs(buffer)));
+ memory.replace(TQRegExp("%c"), TQString::number(System::bytesToMegs(cache)));
+ memory.replace(TQRegExp("%u"), TQString::number(System::bytesToMegs(used)));
+ memory.replace(TQRegExp("%t"), TQString::number(System::bytesToMegs(total)));
+ memory.replace(TQRegExp("%f"), TQString::number(System::bytesToMegs(free)));
+ memory.replace(TQRegExp("%F"), TQString::number(System::bytesToMegs(allFree)));
kdDebug(2003) << memory << endl;
m_memLabel->setText("Memory");
- QToolTip::add(m_memLabel, memory );
+ TQToolTip::add(m_memLabel, memory );
if ( !all )
m_memLabel->setValue( System::bytesToMegs( total ) - System::bytesToMegs( free ) );
@@ -160,15 +160,15 @@ void KSim::Sysinfo::sysUpdate()
}
if (m_swapLabel) {
- QString swap = m_config->swapFormat();
+ TQString swap = m_config->swapFormat();
unsigned long total = system.totalSwap();
unsigned long free = system.freeSwap();
unsigned long swapUsed = system.usedSwap();
- swap.replace(QRegExp("%u"), QString::number(System::bytesToMegs(swapUsed)));
- swap.replace(QRegExp("%t"), QString::number(System::bytesToMegs(total)));
- swap.replace(QRegExp("%f"), QString::number(System::bytesToMegs(free)));
+ swap.replace(TQRegExp("%u"), TQString::number(System::bytesToMegs(swapUsed)));
+ swap.replace(TQRegExp("%t"), TQString::number(System::bytesToMegs(total)));
+ swap.replace(TQRegExp("%f"), TQString::number(System::bytesToMegs(free)));
m_swapLabel->setText("Swap");
- QToolTip::add(m_swapLabel, swap);
+ TQToolTip::add(m_swapLabel, swap);
m_swapLabel->setValue(System::bytesToMegs(total) - System::bytesToMegs(free));
}
@@ -194,7 +194,7 @@ void KSim::Sysinfo::createView()
m_timeLabel = new KSim::Label(this);
m_layout->insertWidget(timeLocation - offset, m_timeLabel);
}
- QToolTip::add(m_timeLabel, i18n("Current system time"));
+ TQToolTip::add(m_timeLabel, i18n("Current system time"));
m_timeLabel->show();
}
else {
@@ -208,7 +208,7 @@ void KSim::Sysinfo::createView()
m_dateLabel = new KSim::Label(this);
m_layout->insertWidget(dateLocation - offset, m_dateLabel);
}
- QToolTip::add(m_dateLabel, i18n("Current system date"));
+ TQToolTip::add(m_dateLabel, i18n("Current system date"));
m_dateLabel->show();
}
else {
@@ -224,7 +224,7 @@ void KSim::Sysinfo::createView()
m_uptimeLabel = new KSim::Label(KSim::Types::Uptime, this);
m_layout->insertWidget(uptimeLocation - offset, m_uptimeLabel);
}
- QToolTip::add(m_uptimeLabel, i18n("System uptime"));
+ TQToolTip::add(m_uptimeLabel, i18n("System uptime"));
m_uptimeLabel->show();
}
else {
@@ -300,7 +300,7 @@ void KSim::Sysinfo::startTimers()
}
}
-QString KSim::Sysinfo::uptime() const
+TQString KSim::Sysinfo::uptime() const
{
if (m_uptimeLabel)
return m_uptimeLabel->text();
@@ -308,7 +308,7 @@ QString KSim::Sysinfo::uptime() const
return i18n("Uptime display disabled");
}
-QString KSim::Sysinfo::memInfo() const
+TQString KSim::Sysinfo::memInfo() const
{
if (m_memLabel)
return m_memLabel->text();
@@ -316,7 +316,7 @@ QString KSim::Sysinfo::memInfo() const
return i18n("Memory display disabled");
}
-QString KSim::Sysinfo::swapInfo() const
+TQString KSim::Sysinfo::swapInfo() const
{
if (m_swapLabel)
return m_swapLabel->text();
diff --git a/ksim/ksimsysinfo.h b/ksim/ksimsysinfo.h
index 5c80d37..1bf245f 100644
--- a/ksim/ksimsysinfo.h
+++ b/ksim/ksimsysinfo.h
@@ -20,7 +20,7 @@
#ifndef SYSINFO_H
#define SYSINFO_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <dcopobject.h>
class QTimer;
@@ -31,19 +31,19 @@ namespace KSim
class Label;
class Progress;
- class Sysinfo : public QWidget, virtual public DCOPObject
+ class Sysinfo : public TQWidget, virtual public DCOPObject
{
Q_OBJECT
K_DCOP
public:
- Sysinfo(KSim::Config *config, QWidget *parent=0,
+ Sysinfo(KSim::Config *config, TQWidget *parent=0,
const char *name=0, WFlags fl=0);
~Sysinfo();
k_dcop:
- QString uptime() const;
- QString memInfo() const;
- QString swapInfo() const;
+ TQString uptime() const;
+ TQString memInfo() const;
+ TQString swapInfo() const;
public slots:
void clockUptimeUpdate();
@@ -60,9 +60,9 @@ namespace KSim
KSim::Progress *m_memLabel;
KSim::Progress *m_swapLabel;
//KSimLabel *m_procsLabel;
- QVBoxLayout *m_layout;
- QTimer *m_timer;
- QTimer *m_sysTimer;
+ TQVBoxLayout *m_layout;
+ TQTimer *m_timer;
+ TQTimer *m_sysTimer;
KSim::Config *m_config;
long m_totalUptime;
};
diff --git a/ksim/ksimview.cpp b/ksim/ksimview.cpp
index 6f71b66..18f29e9 100644
--- a/ksim/ksimview.cpp
+++ b/ksim/ksimview.cpp
@@ -46,15 +46,15 @@
#include <kwin.h>
#include <krun.h>
-#include <qfile.h>
-#include <qbitmap.h>
-#include <qtimer.h>
-#include <qlayout.h>
-#include <qobjectlist.h>
-#include <qpainter.h>
-#include <qcursor.h>
-#include <qpopupmenu.h>
-#include <qvbox.h>
+#include <tqfile.h>
+#include <tqbitmap.h>
+#include <tqtimer.h>
+#include <tqlayout.h>
+#include <tqobjectlist.h>
+#include <tqpainter.h>
+#include <tqcursor.h>
+#include <tqpopupmenu.h>
+#include <tqvbox.h>
#include <unistd.h>
#include <sys/param.h>
@@ -66,7 +66,7 @@
KSim::MainView::MainView(KConfig *config,
bool loadPlugins, KSim::PanelExtension *topLevel,
const char *name) : DCOPObject("KSim"),
- QWidget(topLevel, name)
+ TQWidget(topLevel, name)
{
// create the local "themes" and "monitors" dirs
makeDirs();
@@ -90,7 +90,7 @@ KSim::MainView::MainView(KConfig *config,
kdDebug(2003) << "loadPlugins: " << loadPlugins << endl;
- m_subLayout = new QVBoxLayout(this);
+ m_subLayout = new TQVBoxLayout(this);
m_topFrame = new KSim::Frame(KSim::Types::TopFrame, this);
m_subLayout->addWidget(m_topFrame);
@@ -101,11 +101,11 @@ KSim::MainView::MainView(KConfig *config,
m_leftFrame = new KSim::Frame(KSim::Types::LeftFrame, this);
m_sizeLayout->addWidget(m_leftFrame);
- m_pluginLayout = new QBoxLayout(QBoxLayout::TopToBottom);
+ m_pluginLayout = new TQBoxLayout(TQBoxLayout::TopToBottom);
m_sizeLayout->addLayout(m_pluginLayout);
- QVBoxLayout *vb = new QVBoxLayout;
- QSpacerItem *item = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Expanding);
+ TQVBoxLayout *vb = new QVBoxLayout;
+ TQSpacerItem *item = new TQSpacerItem(0, 0, TQSizePolicy::Expanding, TQSizePolicy::Expanding);
vb->addItem(item);
m_hostLabel = new KSim::Label(KSim::Types::Host, this);
@@ -118,7 +118,7 @@ KSim::MainView::MainView(KConfig *config,
if (gethostname(hostName, sizeof(hostName)))
m_hostLabel->setText(i18n("Unknown"));
else {
- QCString host(hostName);
+ TQCString host(hostName);
int dotLocation = host.find(".");
if (!m_config->displayFqdn() && dotLocation != -1)
host.truncate(dotLocation);
@@ -127,7 +127,7 @@ KSim::MainView::MainView(KConfig *config,
}
vb = new QVBoxLayout;
- item = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Expanding);
+ item = new TQSpacerItem(0, 0, TQSizePolicy::Expanding, TQSizePolicy::Expanding);
vb->addItem(item);
m_sysinfo = new KSim::Sysinfo(m_config, this);
vb->addWidget(m_sysinfo);
@@ -140,8 +140,8 @@ KSim::MainView::MainView(KConfig *config,
m_sizeLayout->addWidget(m_rightFrame);
connect(&KSim::PluginLoader::self(),
- SIGNAL(pluginLoaded(const KSim::Plugin &)),
- this, SLOT(addMonitor(const KSim::Plugin &)));
+ TQT_SIGNAL(pluginLoaded(const KSim::Plugin &)),
+ this, TQT_SLOT(addMonitor(const KSim::Plugin &)));
KSim::ThemeLoader::self().themeColours(this);
@@ -150,7 +150,7 @@ KSim::MainView::MainView(KConfig *config,
addPlugins();
}
- connect(&m_maskTimer, SIGNAL(timeout()), SLOT(slotMaskMainView()));
+ connect(&m_maskTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotMaskMainView()));
}
KSim::MainView::~MainView()
@@ -161,7 +161,7 @@ KSim::MainView::~MainView()
void KSim::MainView::show()
{
maskMainView();
- QWidget::show();
+ TQWidget::show();
}
void KSim::MainView::cleanup()
@@ -182,12 +182,12 @@ KSim::Config *KSim::MainView::config() const
void KSim::MainView::makeDirs()
{
- QString homeDir = locateLocal("data", "ksim");
- QString themeDir = homeDir + QString::fromLatin1("/themes");
- QString monitorDir = homeDir + QString::fromLatin1("/monitors");
+ TQString homeDir = locateLocal("data", "ksim");
+ TQString themeDir = homeDir + TQString::fromLatin1("/themes");
+ TQString monitorDir = homeDir + TQString::fromLatin1("/monitors");
// return true if the dirs already exist
- if (QFile::exists(themeDir) && QFile::exists(monitorDir))
+ if (TQFile::exists(themeDir) && TQFile::exists(monitorDir))
return;
bool themeCreated = KStandardDirs::makeDir(themeDir);
@@ -200,7 +200,7 @@ void KSim::MainView::makeDirs()
}
}
-const QString &KSim::MainView::hostname() const
+const TQString &KSim::MainView::hostname() const
{
return m_hostLabel->text();
}
@@ -221,29 +221,29 @@ void KSim::MainView::maskMainView()
return;
}
- QBitmap topPixmap(*m_topFrame->background()->mask());
- QBitmap leftPixmap(*m_leftFrame->background()->mask());
- QBitmap rightPixmap(*m_rightFrame->background()->mask());
- QBitmap bottomPixmap(*m_bottomFrame->background()->mask());
+ TQBitmap topPixmap(*m_topFrame->background()->mask());
+ TQBitmap leftPixmap(*m_leftFrame->background()->mask());
+ TQBitmap rightPixmap(*m_rightFrame->background()->mask());
+ TQBitmap bottomPixmap(*m_bottomFrame->background()->mask());
- QSize insideSize(m_pluginLayout->geometry().size());
+ TQSize insideSize(m_pluginLayout->geometry().size());
// make a cleared bigrect where we can put our pixmap masks on
- QBitmap bigBitmap(topLevelWidget()->size(), true);
+ TQBitmap bigBitmap(topLevelWidget()->size(), true);
// better return if our bitmap is null so we can avoid crashes
if (bigBitmap.isNull())
return;
- QPoint ofs = mapTo(topLevelWidget(), QPoint(0,0));
+ TQPoint ofs = mapTo(topLevelWidget(), TQPoint(0,0));
int ofsX = ofs.x();
int ofsY = ofs.y();
- QPainter painter;
+ TQPainter painter;
painter.begin(&bigBitmap);
painter.setBrush(color1);
painter.setPen(color1);
- QRect rect = m_pluginLayout->geometry();
+ TQRect rect = m_pluginLayout->geometry();
rect.moveBy(ofsX, ofsY);
painter.drawRect(rect);
painter.drawPixmap(ofsX, ofsY, topPixmap);
@@ -330,8 +330,8 @@ void KSim::MainView::reparseConfig(bool emitReload,
void KSim::MainView::addPlugins()
{
- QStringList locatedFiles = KGlobal::dirs()->findAllResources("data", "ksim/monitors/*.desktop");
- QStringList::ConstIterator it;
+ TQStringList locatedFiles = KGlobal::dirs()->findAllResources("data", "ksim/monitors/*.desktop");
+ TQStringList::ConstIterator it;
for (it = locatedFiles.begin(); it != locatedFiles.end(); ++it)
{
const KDesktopFile kdf(*it, true);
@@ -356,7 +356,7 @@ void KSim::MainView::addMonitor(const KSim::Plugin &plugin)
if (!plugin.view())
return;
- plugin.view()->reparent(this, 0, QPoint(0, 0), true);
+ plugin.view()->reparent(this, 0, TQPoint(0, 0), true);
KSim::ThemeLoader::self().themeColours(plugin.view());
// int location = m_config->monitorLocation(plugin.libName());
@@ -371,20 +371,20 @@ void KSim::MainView::addMonitor(const KSim::Plugin &plugin)
// kdDebug(2003) << "m_oldLocation: " << m_oldLocation << endl;
// kdDebug(2003) << "location: " << location << endl;
m_pluginLayout->addWidget(plugin.view());
- connect(plugin.view(), SIGNAL(runCommand(const QCString &)),
- SLOT(runCommand(const QCString &)));
+ connect(plugin.view(), TQT_SIGNAL(runCommand(const TQCString &)),
+ TQT_SLOT(runCommand(const TQCString &)));
// if (location > m_oldLocation)
// m_oldLocation = location;
}
-void KSim::MainView::runCommand(const QCString &name)
+void KSim::MainView::runCommand(const TQCString &name)
{
if (name.isNull())
return;
kdDebug(2003) << "runCommand(" << name.mid(5) << ")" << endl;
- QString exec = m_config->monitorCommand(name.mid(5));
+ TQString exec = m_config->monitorCommand(name.mid(5));
kdDebug(2003) << "exec is " << exec << endl;
KRun::runCommand(exec);
}
@@ -393,21 +393,21 @@ void KSim::MainView::preferences()
{
if (m_prefDialog == 0L) {
m_prefDialog = new KSim::ConfigDialog(m_config, this, "m_prefDialog");
- connect(m_prefDialog, SIGNAL(reparse(bool, const KSim::ChangedPluginList &)),
- this, SLOT(reparseConfig(bool, const KSim::ChangedPluginList &)));
+ connect(m_prefDialog, TQT_SIGNAL(reparse(bool, const KSim::ChangedPluginList &)),
+ this, TQT_SLOT(reparseConfig(bool, const KSim::ChangedPluginList &)));
}
m_prefDialog->exec();
destroyPref();
}
-void KSim::MainView::resizeEvent(QResizeEvent *re)
+void KSim::MainView::resizeEvent(TQResizeEvent *re)
{
- QWidget::resizeEvent(re);
+ TQWidget::resizeEvent(re);
m_maskTimer.start(0, true);
}
-void KSim::MainView::paletteChange(const QPalette &)
+void KSim::MainView::paletteChange(const TQPalette &)
{
// Call true here to fool the KSim::Base pointers to
// think our theme changed, we can afford todo this
@@ -430,16 +430,16 @@ void KSim::MainView::destroyPref()
}
}
-QSize KSim::MainView::sizeHint(KPanelExtension::Position p, QSize) const
+TQSize KSim::MainView::sizeHint(KPanelExtension::Position p, TQSize) const
{
int width = 0;
int height = 0;
- QLayoutItem *child;
- for( QLayoutIterator it = m_pluginLayout->iterator();
+ TQLayoutItem *child;
+ for( TQLayoutIterator it = m_pluginLayout->iterator();
(child = it.current()) != 0; ++it)
{
- QSize sz = child->minimumSize();
+ TQSize sz = child->minimumSize();
if ((p == KPanelExtension::Right) || (p == KPanelExtension::Left))
{
width = QMAX(width, sz.width());
@@ -455,13 +455,13 @@ QSize KSim::MainView::sizeHint(KPanelExtension::Position p, QSize) const
width += m_leftFrame->minimumWidth() + m_rightFrame->minimumWidth();
height += m_topFrame->minimumHeight() + m_bottomFrame->minimumHeight();
- return QSize(width, height);
+ return TQSize(width, height);
}
void KSim::MainView::positionChange(KPanelExtension::Orientation o)
{
if (o == KPanelExtension::Vertical)
- m_pluginLayout->setDirection(QBoxLayout::TopToBottom);
+ m_pluginLayout->setDirection(TQBoxLayout::TopToBottom);
else
- m_pluginLayout->setDirection(QBoxLayout::LeftToRight);
+ m_pluginLayout->setDirection(TQBoxLayout::LeftToRight);
}
diff --git a/ksim/ksimview.h b/ksim/ksimview.h
index 4bf7f1f..22f0e09 100644
--- a/ksim/ksimview.h
+++ b/ksim/ksimview.h
@@ -20,8 +20,8 @@
#ifndef KSIMVIEW_H
#define KSIMVIEW_H
-#include <qwidget.h>
-#include <qtimer.h>
+#include <tqwidget.h>
+#include <tqtimer.h>
#include <dcopobject.h>
@@ -46,7 +46,7 @@ namespace KSim
class ConfigDialog;
class ChangedPluginList;
- class KDE_EXPORT MainView : public QWidget, virtual public DCOPObject
+ class KDE_EXPORT MainView : public TQWidget, virtual public DCOPObject
{
Q_OBJECT
K_DCOP
@@ -62,11 +62,11 @@ namespace KSim
KSim::Config *config() const;
void makeDirs();
- QSize sizeHint(KPanelExtension::Position, QSize maxSize) const;
+ TQSize sizeHint(KPanelExtension::Position, TQSize maxSize) const;
void positionChange(KPanelExtension::Orientation);
k_dcop:
- const QString &hostname() const;
+ const TQString &hostname() const;
virtual void maskMainView();
signals:
@@ -78,13 +78,13 @@ namespace KSim
void addPlugin(const KDesktopFile &, bool force = false);
void removePlugin(const KDesktopFile &);
void addMonitor(const KSim::Plugin &);
- void runCommand(const QCString &);
+ void runCommand(const TQCString &);
void preferences();
void slotMaskMainView();
protected:
- virtual void resizeEvent(QResizeEvent *);
- virtual void paletteChange(const QPalette &);
+ virtual void resizeEvent(TQResizeEvent *);
+ virtual void paletteChange(const TQPalette &);
private slots:
void destroyPref();
@@ -101,12 +101,12 @@ namespace KSim
KSim::PanelExtension *m_topLevel;
KSim::Config *m_config;
KSim::ConfigDialog *m_prefDialog;
- QHBoxLayout *m_sizeLayout;
- QVBoxLayout *m_subLayout;
- QBoxLayout *m_pluginLayout;
- QPoint m_mousePoint;
+ TQHBoxLayout *m_sizeLayout;
+ TQVBoxLayout *m_subLayout;
+ TQBoxLayout *m_pluginLayout;
+ TQPoint m_mousePoint;
int m_oldLocation;
- QTimer m_maskTimer;
+ TQTimer m_maskTimer;
};
}
#endif // KSIMVIEW_H
diff --git a/ksim/library/chart.cpp b/ksim/library/chart.cpp
index 38f0f17..5128cdb 100644
--- a/ksim/library/chart.cpp
+++ b/ksim/library/chart.cpp
@@ -20,13 +20,13 @@
#include "chart.h"
#include "chart.moc"
-#include <qrect.h>
-#include <qpainter.h>
-#include <qimage.h>
-#include <qcolor.h>
-#include <qtimer.h>
-#include <qvaluelist.h>
-#include <qbitmap.h>
+#include <tqrect.h>
+#include <tqpainter.h>
+#include <tqimage.h>
+#include <tqcolor.h>
+#include <tqtimer.h>
+#include <tqvaluelist.h>
+#include <tqbitmap.h>
#include <kdebug.h>
#include <klocale.h>
@@ -49,8 +49,8 @@ class KSim::Chart::Timer
qAddPostRoutine(cleanup);
}
- QObject::connect(m_timer, SIGNAL(timeout()),
- chart, SLOT(updateDisplay()));
+ TQObject::connect(m_timer, TQT_SIGNAL(timeout()),
+ chart, TQT_SLOT(updateDisplay()));
}
static void disconnect(KSim::Chart *chart)
@@ -58,8 +58,8 @@ class KSim::Chart::Timer
if (!m_timer)
return;
- QObject::disconnect(m_timer, SIGNAL(timeout()),
- chart, SLOT(updateDisplay()));
+ TQObject::disconnect(m_timer, TQT_SIGNAL(timeout()),
+ chart, TQT_SLOT(updateDisplay()));
}
private:
@@ -72,50 +72,50 @@ class KSim::Chart::Timer
m_timer = 0;
}
- static QTimer *m_timer;
+ static TQTimer *m_timer;
};
-QTimer *KSim::Chart::Timer::m_timer = 0;
+TQTimer *KSim::Chart::Timer::m_timer = 0;
class KSim::Chart::Private
{
public:
typedef QPair<int, int> ValuePair;
- QSize size;
+ TQSize size;
int type;
bool showShadow;
bool showKrell;
- QString inText;
- QString outText;
- QString title;
- QPixmap chartPixmap;
- QPixmap gridPixmap;
- QPixmap graphData;
- QColor mColour;
- QColor sColour;
- QColor dataInColour;
- QColor dataOutColour;
+ TQString inText;
+ TQString outText;
+ TQString title;
+ TQPixmap chartPixmap;
+ TQPixmap gridPixmap;
+ TQPixmap graphData;
+ TQColor mColour;
+ TQColor sColour;
+ TQColor dataInColour;
+ TQColor dataOutColour;
Chart::LabelType labelType;
KSim::Label *krell;
// first will be data In and second will be data out
- QValueList<ValuePair> values;
- QValueList<int> maxValues;
+ TQValueList<ValuePair> values;
+ TQValueList<int> maxValues;
int minValue;
int maxValue;
bool variableGraphs;
};
KSim::Chart::Chart(bool showKrell, int maxValue,
- const QString &title, QWidget *parent, const char *name,
- WFlags fl) : QWidget(parent, name, fl)
+ const TQString &title, TQWidget *parent, const char *name,
+ WFlags fl) : TQWidget(parent, name, fl)
{
init(showKrell, maxValue, title);
}
KSim::Chart::Chart(bool showKrell, int maxValue,
- QWidget *parent, const char *name, WFlags fl)
- : QWidget(parent, name, fl)
+ TQWidget *parent, const char *name, WFlags fl)
+ : TQWidget(parent, name, fl)
{
init(showKrell, maxValue, i18n("None"));
}
@@ -126,7 +126,7 @@ KSim::Chart::~Chart()
delete d;
}
-const QString &KSim::Chart::text(DataType type) const
+const TQString &KSim::Chart::text(DataType type) const
{
if (type == DataIn)
return d->inText;
@@ -134,7 +134,7 @@ const QString &KSim::Chart::text(DataType type) const
return d->outText;
}
-const QString &KSim::Chart::title() const
+const TQString &KSim::Chart::title() const
{
return d->title;
}
@@ -206,7 +206,7 @@ KSim::Chart::LabelType KSim::Chart::labelType() const
void KSim::Chart::buildPixmaps()
{
- QImage image(themeLoader().current().chartPixmap());
+ TQImage image(themeLoader().current().chartPixmap());
KSim::ThemeLoader::self().reColourImage(image);
d->chartPixmap.convertFromImage(image.smoothScale(chartSize()));
@@ -251,7 +251,7 @@ void KSim::Chart::buildPixmaps()
void KSim::Chart::configureObject(bool repaintWidget)
{
- QSize oldSize = sizeHint();
+ TQSize oldSize = sizeHint();
KSim::Config::config()->setGroup("Misc");
d->size = KSim::Config::config()->readSizeEntry("GraphSize");
@@ -279,21 +279,21 @@ void KSim::Chart::configureObject(bool repaintWidget)
update();
}
-QSize KSim::Chart::sizeHint() const
+TQSize KSim::Chart::sizeHint() const
{
return d->size;
}
-QSize KSim::Chart::minimumSizeHint() const
+TQSize KSim::Chart::minimumSizeHint() const
{
return sizeHint();
}
-void KSim::Chart::resizeEvent(QResizeEvent *re)
+void KSim::Chart::resizeEvent(TQResizeEvent *re)
{
if (d->chartPixmap.size() != chartSize())
buildPixmaps();
- QWidget::resizeEvent(re);
+ TQWidget::resizeEvent(re);
}
void KSim::Chart::disableAutomaticUpdates()
@@ -308,7 +308,7 @@ void KSim::Chart::clear()
updateDisplay();
}
-void KSim::Chart::setTitle(const QString &name)
+void KSim::Chart::setTitle(const TQString &name)
{
if (d->krell) {
d->title = name;
@@ -331,7 +331,7 @@ void KSim::Chart::setDisplayMeter(bool value)
}
}
-void KSim::Chart::setText(const QString &in, const QString &out)
+void KSim::Chart::setText(const TQString &in, const TQString &out)
{
bool repaint = false;
@@ -406,7 +406,7 @@ void KSim::Chart::setValue(int valueIn, int valueOut)
void KSim::Chart::setConfigValues()
{
- QFont newFont = font();
+ TQFont newFont = font();
bool repaint = themeLoader().current().fontColours(this,
newFont, d->mColour, d->sColour, d->showShadow);
@@ -422,7 +422,7 @@ void KSim::Chart::extraTypeCall()
setConfigValues();
}
-QColor KSim::Chart::chartColour(const DataType &dataType, int, int) const
+TQColor KSim::Chart::chartColour(const DataType &dataType, int, int) const
{
switch (dataType) {
case DataIn:
@@ -433,19 +433,19 @@ QColor KSim::Chart::chartColour(const DataType &dataType, int, int) const
break;
}
- return QColor(); // avoid a g++ warning
+ return TQColor(); // avoid a g++ warning
}
-void KSim::Chart::paintEvent(QPaintEvent *)
+void KSim::Chart::paintEvent(TQPaintEvent *)
{
if (d->krell && labelType() == Led) {
static_cast<KSim::LedLabel *>(d->krell)->setOff(KSim::Led::First);
static_cast<KSim::LedLabel *>(d->krell)->setOff(KSim::Led::Second);
}
- const QSize &size = chartSize();
- QPixmap pixmap(size);
- QPainter painter;
+ const TQSize &size = chartSize();
+ TQPixmap pixmap(size);
+ TQPainter painter;
painter.begin(&pixmap, this);
int location = size.height() / 5;
@@ -476,7 +476,7 @@ void KSim::Chart::paintEvent(QPaintEvent *)
bitBlt(this, 0, 0, &pixmap);
}
-void KSim::Chart::fontChange(const QFont &)
+void KSim::Chart::fontChange(const TQFont &)
{
if (d->krell)
d->krell->setFont(font());
@@ -510,7 +510,7 @@ void KSim::Chart::drawChart()
if (d->variableGraphs) {
int maxValue = 0;
- QValueList<int>::ConstIterator max;
+ TQValueList<int>::ConstIterator max;
for (max = d->maxValues.begin(); max != d->maxValues.end(); ++max) {
if ((*max) > maxValue)
maxValue = (*max);
@@ -519,12 +519,12 @@ void KSim::Chart::drawChart()
setMaxValue(maxValue);
}
- QPainter painter;
+ TQPainter painter;
d->graphData.setMask(drawMask(&painter));
painter.begin(&d->graphData, this);
int position = width() - 1;
- QValueList<Private::ValuePair>::ConstIterator it;
+ TQValueList<Private::ValuePair>::ConstIterator it;
for (it = d->values.begin(); it != d->values.end(); ++it) {
// Draw the data In lines first if its higher than the data out lines
if ((*it).first >= (*it).second) {
@@ -541,23 +541,23 @@ void KSim::Chart::drawChart()
painter.end();
}
-QSize KSim::Chart::chartSize() const
+TQSize KSim::Chart::chartSize() const
{
- QSize sz(size());
+ TQSize sz(size());
if (d->krell && d->showKrell)
sz.setHeight(sz.height() - d->krell->height());
return sz;
}
-QBitmap KSim::Chart::drawMask(QPainter *painter)
+TQBitmap KSim::Chart::drawMask(TQPainter *painter)
{
- QBitmap bitmap(chartSize(), true);
+ TQBitmap bitmap(chartSize(), true);
painter->begin(&bitmap, this);
painter->setPen(color1);
int position = width() - 1;
- QValueList<Private::ValuePair>::ConstIterator it;
+ TQValueList<Private::ValuePair>::ConstIterator it;
for (it = d->values.begin(); it != d->values.end(); ++it) {
drawIn(painter, (*it).first, position, true);
drawOut(painter, (*it).second, position, true);
@@ -569,7 +569,7 @@ QBitmap KSim::Chart::drawMask(QPainter *painter)
return bitmap;
}
-void KSim::Chart::drawIn(QPainter *painter, int value, int pos, bool dontSet)
+void KSim::Chart::drawIn(TQPainter *painter, int value, int pos, bool dontSet)
{
if (!dontSet) {
painter->setPen(chartColour(DataIn));
@@ -581,7 +581,7 @@ void KSim::Chart::drawIn(QPainter *painter, int value, int pos, bool dontSet)
pos, d->graphData.size().height() - location);
}
-void KSim::Chart::drawOut(QPainter *painter, int value, int pos, bool dontSet)
+void KSim::Chart::drawOut(TQPainter *painter, int value, int pos, bool dontSet)
{
if (!dontSet) {
painter->setPen(chartColour(DataOut));
@@ -604,11 +604,11 @@ int KSim::Chart::range(int value) const
return value;
}
-void KSim::Chart::init(bool krell, int maxValue, const QString &title)
+void KSim::Chart::init(bool krell, int maxValue, const TQString &title)
{
setConfigString("StyleChart");
setThemeConfigOnly(false);
- setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed));
+ setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed));
d = new Private;
KSim::Config::config()->setGroup("Misc");
diff --git a/ksim/library/chart.h b/ksim/library/chart.h
index 55f4426..0053ae3 100644
--- a/ksim/library/chart.h
+++ b/ksim/library/chart.h
@@ -20,7 +20,7 @@
#ifndef KSIM__CHART_H
#define KSIM__CHART_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "common.h"
#include <kdemacros.h>
@@ -33,7 +33,7 @@ namespace KSim
* provides a graph displaying data onscreen using gkrellm themes
* @author Robbie Ward <linuxphreak@gmx.co.uk>
*/
- class KDE_EXPORT Chart : public QWidget, public KSim::Base
+ class KDE_EXPORT Chart : public TQWidget, public KSim::Base
{
Q_OBJECT
public:
@@ -49,7 +49,7 @@ namespace KSim
* @param parent is the parent widget
*/
Chart(bool displayMeter, int maxValue,
- const QString &title, QWidget *parent,
+ const TQString &title, TQWidget *parent,
const char *name = 0, WFlags fl = 0);
/**
* Constructs a KSim::Chart.
@@ -60,7 +60,7 @@ namespace KSim
* @param parent is the parent widget
*/
Chart(bool displayMeter, int maxValue,
- QWidget *parent, const char *name = 0,
+ TQWidget *parent, const char *name = 0,
WFlags fl = 0);
/**
* destructs KSim::Chart
@@ -70,11 +70,11 @@ namespace KSim
/**
* returns the current text of the chart
*/
- const QString &text(DataType type) const;
+ const TQString &text(DataType type) const;
/**
* @return the title of the chart
*/
- const QString &title() const;
+ const TQString &title() const;
/**
* @return true if the meter is enabled
*/
@@ -108,11 +108,11 @@ namespace KSim
/**
* reimplemented for internal reasons
*/
- QSize sizeHint() const;
+ TQSize sizeHint() const;
/**
* reimplemented for internal reasons
*/
- QSize minimumSizeHint() const;
+ TQSize minimumSizeHint() const;
void disableAutomaticUpdates();
@@ -125,7 +125,7 @@ namespace KSim
* sets the title of the chart, this function returns if
* the optional krell widget is disabled
*/
- void setTitle(const QString &);
+ void setTitle(const TQString &);
/**
* turns the meter on and off
*/
@@ -133,7 +133,7 @@ namespace KSim
/**
* sets the current text that apears in the top left hand corner
*/
- void setText(const QString &in, const QString &out = QString::null);
+ void setText(const TQString &in, const TQString &out = TQString::null);
/**
* Sets the minimum value the graph will display
*/
@@ -157,10 +157,10 @@ namespace KSim
*/
virtual void extraTypeCall();
- QColor chartColour(const DataType &dataType, int x = 1, int y = 1) const;
- virtual void paintEvent(QPaintEvent *);
- virtual void fontChange(const QFont &);
- virtual void resizeEvent(QResizeEvent *re);
+ TQColor chartColour(const DataType &dataType, int x = 1, int y = 1) const;
+ virtual void paintEvent(TQPaintEvent *);
+ virtual void fontChange(const TQFont &);
+ virtual void resizeEvent(TQResizeEvent *re);
protected slots:
void updateDisplay();
@@ -169,12 +169,12 @@ namespace KSim
void buildPixmaps();
int yLocation(int) const;
void drawChart();
- QSize chartSize() const;
- QBitmap drawMask(QPainter *);
- void drawIn(QPainter *, int, int, bool = false);
- void drawOut(QPainter *, int, int, bool = false);
+ TQSize chartSize() const;
+ TQBitmap drawMask(TQPainter *);
+ void drawIn(TQPainter *, int, int, bool = false);
+ void drawOut(TQPainter *, int, int, bool = false);
int range(int) const;
- void init(bool, int, const QString &);
+ void init(bool, int, const TQString &);
class Timer;
class Private;
diff --git a/ksim/library/common.cpp b/ksim/library/common.cpp
index 3e714c6..d2cf572 100644
--- a/ksim/library/common.cpp
+++ b/ksim/library/common.cpp
@@ -29,7 +29,7 @@ class KSim::Base::Private
public:
int type;
bool theme;
- QString string;
+ TQString string;
};
KSim::Base::Base()
@@ -76,12 +76,12 @@ int KSim::Base::type() const
return d->type;
}
-void KSim::Base::setConfigString(const QString &string)
+void KSim::Base::setConfigString(const TQString &string)
{
d->string = string;
}
-const QString &KSim::Base::configString() const
+const TQString &KSim::Base::configString() const
{
return d->string;
}
diff --git a/ksim/library/common.h b/ksim/library/common.h
index 3f53f7a..9fc01c0 100644
--- a/ksim/library/common.h
+++ b/ksim/library/common.h
@@ -23,7 +23,7 @@
#define KSIM_VERSION 110
#define KSIM_VERSION_STRING "1.1.0"
-#include <qstring.h>
+#include <tqstring.h>
#include <kdemacros.h>
/**
@@ -52,13 +52,13 @@ namespace KSim
*
* example:
* <pre>
- * #include &lt;qwidget.h&gt;
+ * #include &lt;tqwidget.h&gt;
* #include &lt;ksim/common.h&gt;
*
- * class Test : public QWidget, virtual public KSim::Base
+ * class Test : public TQWidget, virtual public KSim::Base
* {
* public:
- * Test(QWidget *parent, const char *name) : QWidget(parent, name)
+ * Test(TQWidget *parent, const char *name) : TQWidget(parent, name)
* {
* }
* ~Test() {}
@@ -100,11 +100,11 @@ namespace KSim
/**
* Set the config entry key to look for when reading gkrellmrc
*/
- void setConfigString(const QString &string);
+ void setConfigString(const TQString &string);
/**
* @return the config entry to look for when reading theme files
*/
- const QString &configString() const;
+ const TQString &configString() const;
protected:
/**
diff --git a/ksim/library/ksimconfig.cpp b/ksim/library/ksimconfig.cpp
index 9f70890..2fd136e 100644
--- a/ksim/library/ksimconfig.cpp
+++ b/ksim/library/ksimconfig.cpp
@@ -57,40 +57,40 @@ void KSim::Config::setWidth(int width)
mainConfig->sync();
}
-bool KSim::Config::enabledMonitor(const QString &entry) const
+bool KSim::Config::enabledMonitor(const TQString &entry) const
{
mainConfig->setGroup("Monitors");
return mainConfig->readBoolEntry(entry, false);
}
-void KSim::Config::setEnabledMonitor(const QString &entry, bool enabled)
+void KSim::Config::setEnabledMonitor(const TQString &entry, bool enabled)
{
mainConfig->setGroup("Monitors");
mainConfig->writeEntry(entry, enabled);
mainConfig->sync();
}
-QString KSim::Config::monitorCommand(const QString &entry) const
+TQString KSim::Config::monitorCommand(const TQString &entry) const
{
mainConfig->setGroup("Monitors");
return mainConfig->readPathEntry(entry + "_command");
}
-void KSim::Config::setMonitorCommand(const QString &entry,
- const QString &command)
+void KSim::Config::setMonitorCommand(const TQString &entry,
+ const TQString &command)
{
mainConfig->setGroup("Monitors");
mainConfig->writePathEntry(entry + "_command", command);
mainConfig->sync();
}
-int KSim::Config::monitorLocation(const QString &entry)
+int KSim::Config::monitorLocation(const TQString &entry)
{
mainConfig->setGroup("Monitors");
return mainConfig->readNumEntry(entry + "_location", -1);
}
-void KSim::Config::setMonitorLocation(const QString &entry, int location)
+void KSim::Config::setMonitorLocation(const TQString &entry, int location)
{
mainConfig->setGroup("Monitors");
mainConfig->writeEntry(entry + "_location", location);
@@ -149,33 +149,33 @@ void KSim::Config::setStayOnTop(bool stayOnTop)
mainConfig->sync();
}
-QPoint KSim::Config::position(const QPoint &defaultPos) const
+TQPoint KSim::Config::position(const TQPoint &defaultPos) const
{
mainConfig->setGroup("Misc");
return mainConfig->readPointEntry("ksimPosition", &defaultPos);
}
-void KSim::Config::setPosition(const QPoint &pos)
+void KSim::Config::setPosition(const TQPoint &pos)
{
mainConfig->setGroup("Misc");
mainConfig->writeEntry("ksimPosition", pos);
mainConfig->sync();
}
-QSize KSim::Config::graphSize() const
+TQSize KSim::Config::graphSize() const
{
mainConfig->setGroup("Misc");
return mainConfig->readSizeEntry("GraphSize");
}
-void KSim::Config::setGraphSize(const QSize &size)
+void KSim::Config::setGraphSize(const TQSize &size)
{
mainConfig->setGroup("Misc");
mainConfig->writeEntry("GraphSize", size);
mainConfig->sync();
}
-QString KSim::Config::uptimeFormat() const
+TQString KSim::Config::uptimeFormat() const
{
return uptimeFormatList()[uptimeItem()];
}
@@ -186,13 +186,13 @@ int KSim::Config::uptimeItem() const
return mainConfig->readNumEntry("UptimeItem", 0);
}
-QStringList KSim::Config::uptimeFormatList() const
+TQStringList KSim::Config::uptimeFormatList() const
{
mainConfig->setGroup("Misc");
return mainConfig->readListEntry("UptimeFormat");
}
-void KSim::Config::setUptimeFormat(const QStringList &uptimeFormat)
+void KSim::Config::setUptimeFormat(const TQStringList &uptimeFormat)
{
mainConfig->setGroup("Misc");
mainConfig->writeEntry("UptimeFormat", uptimeFormat);
@@ -206,7 +206,7 @@ void KSim::Config::setUptimeItem(int item)
mainConfig->sync();
}
-QString KSim::Config::memoryFormat() const
+TQString KSim::Config::memoryFormat() const
{
return memoryFormatList()[memoryItem()];
}
@@ -217,13 +217,13 @@ int KSim::Config::memoryItem() const
return mainConfig->readNumEntry("MemoryItem", 0);
}
-QStringList KSim::Config::memoryFormatList() const
+TQStringList KSim::Config::memoryFormatList() const
{
mainConfig->setGroup("Misc");
return mainConfig->readListEntry("MemoryFormat");
}
-void KSim::Config::setMemoryFormat(const QStringList &memoryFormat)
+void KSim::Config::setMemoryFormat(const TQStringList &memoryFormat)
{
mainConfig->setGroup("Misc");
mainConfig->writeEntry("MemoryFormat", memoryFormat);
@@ -237,7 +237,7 @@ void KSim::Config::setMemoryItem(int item)
mainConfig->sync();
}
-QString KSim::Config::swapFormat() const
+TQString KSim::Config::swapFormat() const
{
mainConfig->setGroup("Misc");
return swapFormatList()[swapItem()];
@@ -249,13 +249,13 @@ int KSim::Config::swapItem() const
return mainConfig->readNumEntry("SwapItem", 0);
}
-QStringList KSim::Config::swapFormatList() const
+TQStringList KSim::Config::swapFormatList() const
{
mainConfig->setGroup("Misc");
return mainConfig->readListEntry("SwapFormat");
}
-void KSim::Config::setSwapFormat(const QStringList &swapFormat)
+void KSim::Config::setSwapFormat(const TQStringList &swapFormat)
{
mainConfig->setGroup("Misc");
mainConfig->writeEntry("SwapFormat", swapFormat);
@@ -360,17 +360,17 @@ void KSim::Config::setShowProcs(bool procs)
mainConfig->sync();
}
-QString KSim::Config::themeUrl() const
+TQString KSim::Config::themeUrl() const
{
return KSim::ThemeLoader::currentUrl();
}
-QString KSim::Config::themeName() const
+TQString KSim::Config::themeName() const
{
return KSim::ThemeLoader::currentName();
}
-void KSim::Config::setThemeName(const QString &name)
+void KSim::Config::setThemeName(const TQString &name)
{
mainConfig->setGroup("Theme");
mainConfig->writeEntry("Name", name);
@@ -389,12 +389,12 @@ void KSim::Config::setThemeAlt(int alt)
mainConfig->sync();
}
-QFont KSim::Config::themeFont() const
+TQFont KSim::Config::themeFont() const
{
return KSim::ThemeLoader::currentFont();
}
-void KSim::Config::setThemeFont(const QFont &font)
+void KSim::Config::setThemeFont(const TQFont &font)
{
mainConfig->setGroup("Theme");
mainConfig->writeEntry("Font", font);
diff --git a/ksim/library/ksimconfig.h b/ksim/library/ksimconfig.h
index 0208b18..c831f35 100644
--- a/ksim/library/ksimconfig.h
+++ b/ksim/library/ksimconfig.h
@@ -20,9 +20,9 @@
#ifndef KSIMCONFIG_H
#define KSIMCONFIG_H
-#include <qstringlist.h>
-#include <qpoint.h>
-#include <qfont.h>
+#include <tqstringlist.h>
+#include <tqpoint.h>
+#include <tqfont.h>
#include <kdemacros.h>
@@ -43,12 +43,12 @@ namespace KSim
int width(int defaultWidth) const;
void setWidth(int width);
- bool enabledMonitor(const QString &) const;
- void setEnabledMonitor(const QString &, bool);
- QString monitorCommand(const QString &) const;
- void setMonitorCommand(const QString &, const QString &);
- int monitorLocation(const QString &);
- void setMonitorLocation(const QString &, int);
+ bool enabledMonitor(const TQString &) const;
+ void setEnabledMonitor(const TQString &, bool);
+ TQString monitorCommand(const TQString &) const;
+ void setMonitorCommand(const TQString &, const TQString &);
+ int monitorLocation(const TQString &);
+ void setMonitorLocation(const TQString &, int);
bool displayFqdn() const;
void setDisplayFqdn(bool);
bool showDock() const;
@@ -57,25 +57,25 @@ namespace KSim
void setSavePos(bool);
bool stayOnTop() const;
void setStayOnTop(bool);
- QPoint position(const QPoint &) const;
- void setPosition(const QPoint &);
- QSize graphSize() const;
- void setGraphSize(const QSize &);
- QString uptimeFormat() const;
- void setUptimeFormat(const QStringList &);
+ TQPoint position(const TQPoint &) const;
+ void setPosition(const TQPoint &);
+ TQSize graphSize() const;
+ void setGraphSize(const TQSize &);
+ TQString uptimeFormat() const;
+ void setUptimeFormat(const TQStringList &);
int uptimeItem() const;
void setUptimeItem(int);
- QStringList uptimeFormatList() const;
- QString memoryFormat() const;
- void setMemoryFormat(const QStringList &);
+ TQStringList uptimeFormatList() const;
+ TQString memoryFormat() const;
+ void setMemoryFormat(const TQStringList &);
int memoryItem() const;
void setMemoryItem(int);
- QStringList memoryFormatList() const;
- QString swapFormat() const;
- void setSwapFormat(const QStringList &);
+ TQStringList memoryFormatList() const;
+ TQString swapFormat() const;
+ void setSwapFormat(const TQStringList &);
int swapItem() const;
void setSwapItem(int);
- QStringList swapFormatList() const;
+ TQStringList swapFormatList() const;
bool showTime() const;
void setShowTime(bool);
bool show24hour() const;
@@ -90,13 +90,13 @@ namespace KSim
void setShowSwap(bool);
bool showProcs() const;
void setShowProcs(bool);
- QString themeUrl() const;
- QString themeName() const;
- void setThemeName(const QString &);
+ TQString themeUrl() const;
+ TQString themeName() const;
+ void setThemeName(const TQString &);
int themeAlt() const;
void setThemeAlt(int);
- QFont themeFont() const;
- void setThemeFont(const QFont &);
+ TQFont themeFont() const;
+ void setThemeFont(const TQFont &);
int themeFontItem() const;
void setThemeFontItem(int);
bool reColourThemes() const;
diff --git a/ksim/library/label.cpp b/ksim/library/label.cpp
index 91e7621..400b1c5 100644
--- a/ksim/library/label.cpp
+++ b/ksim/library/label.cpp
@@ -22,13 +22,13 @@
#include <ksimconfig.h>
#include "themetypes.h"
-#include <qpainter.h>
-#include <qstyle.h>
-#include <qstylesheet.h>
-#include <qsimplerichtext.h>
-#include <qcursor.h>
-#include <qpixmap.h>
-#include <qimage.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
+#include <tqstylesheet.h>
+#include <tqsimplerichtext.h>
+#include <tqcursor.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
#include <themeloader.h>
#include <kdebug.h>
@@ -39,31 +39,31 @@
class KSim::Label::Private
{
public:
- QColor mColour;
- QColor sColour;
- QRect loc;
- QRect shad;
- QString text;
- QImage meterImage;
- QPixmap background;
- QPixmap sidePixmap;
+ TQColor mColour;
+ TQColor sColour;
+ TQRect loc;
+ TQRect shad;
+ TQString text;
+ TQImage meterImage;
+ TQPixmap background;
+ TQPixmap sidePixmap;
bool showShadow;
};
-KSim::Label::Label(QWidget *parent, const char *name, WFlags fl)
- : QWidget(parent, name, fl)
+KSim::Label::Label(TQWidget *parent, const char *name, WFlags fl)
+ : TQWidget(parent, name, fl)
{
initWidget(KSim::Types::None);
}
-KSim::Label::Label(int type, QWidget *parent, const char *name,
- WFlags fl) : QWidget(parent, name, fl)
+KSim::Label::Label(int type, TQWidget *parent, const char *name,
+ WFlags fl) : TQWidget(parent, name, fl)
{
initWidget(type);
}
-KSim::Label::Label(int type, const QString &text, QWidget *parent,
- const char *name, WFlags fl) : QWidget(parent, name, fl)
+KSim::Label::Label(int type, const TQString &text, TQWidget *parent,
+ const char *name, WFlags fl) : TQWidget(parent, name, fl)
{
initWidget(type);
setText(text);
@@ -74,43 +74,43 @@ KSim::Label::~Label()
delete d;
}
-const QString &KSim::Label::text() const
+const TQString &KSim::Label::text() const
{
return d->text;
}
void KSim::Label::configureObject(bool repaintWidget)
{
- QString image = themeLoader().current().meterPixmap(type(), false);
+ TQString image = themeLoader().current().meterPixmap(type(), false);
if (image.isEmpty())
image = themeLoader().current().panelPixmap(type());
d->meterImage.load(image);
KSim::ThemeLoader::self().reColourImage(d->meterImage);
d->background = d->meterImage.smoothScale(size());
- QSize oldSize = sizeHint();
+ TQSize oldSize = sizeHint();
setConfigValues();
relayoutLabel(oldSize, repaintWidget);
}
-void KSim::Label::setPixmap(const QPixmap &pixmap)
+void KSim::Label::setPixmap(const TQPixmap &pixmap)
{
if (pixmap.serialNumber() == d->sidePixmap.serialNumber())
return;
- QSize oldSize = sizeHint();
+ TQSize oldSize = sizeHint();
d->sidePixmap = pixmap;
relayoutLabel(oldSize);
}
-const QPixmap &KSim::Label::pixmap() const
+const TQPixmap &KSim::Label::pixmap() const
{
return d->sidePixmap;
}
-QSize KSim::Label::sizeHint() const
+TQSize KSim::Label::sizeHint() const
{
int width = fontMetrics().size(SingleLine, text()).width();
if (!pixmap().isNull())
@@ -120,25 +120,25 @@ QSize KSim::Label::sizeHint() const
if (!pixmap().isNull() && pixmap().height() > height)
height = pixmap().height();
- return QSize(width, height);
+ return TQSize(width, height);
}
-QSize KSim::Label::minimumSizeHint() const
+TQSize KSim::Label::minimumSizeHint() const
{
return sizeHint();
}
void KSim::Label::clear()
{
- setText(QString::null);
+ setText(TQString::null);
}
-void KSim::Label::setText(const QString &text)
+void KSim::Label::setText(const TQString &text)
{
if (text == d->text)
return; // If the text is the same, no need to repaint etc
- QSize oldSize = sizeHint();
+ TQSize oldSize = sizeHint();
// set the text of our widget and repaint
d->text = text;
relayoutLabel(oldSize);
@@ -160,29 +160,29 @@ bool KSim::Label::showShadow() const
return d->showShadow;
}
-void KSim::Label::setTextColour(const QColor &color)
+void KSim::Label::setTextColour(const TQColor &color)
{
d->mColour = color;
}
-const QColor &KSim::Label::textColour() const
+const TQColor &KSim::Label::textColour() const
{
return d->mColour;
}
-void KSim::Label::setShadowColour(const QColor &color)
+void KSim::Label::setShadowColour(const TQColor &color)
{
d->sColour = color;
}
-const QColor &KSim::Label::shadowColour() const
+const TQColor &KSim::Label::shadowColour() const
{
return d->sColour;
}
void KSim::Label::setConfigValues()
{
- QFont newFont = font();
+ TQFont newFont = font();
bool repaint = themeLoader().current().fontColours(this,
newFont, d->mColour, d->sColour, d->showShadow);
@@ -193,9 +193,9 @@ void KSim::Label::setConfigValues()
update();
}
-void KSim::Label::paintEvent(QPaintEvent *)
+void KSim::Label::paintEvent(TQPaintEvent *)
{
- QPainter painter;
+ TQPainter painter;
painter.begin(this);
// paint our background pixmap onto the widget
@@ -212,7 +212,7 @@ void KSim::Label::paintEvent(QPaintEvent *)
painter.end();
}
-void KSim::Label::resizeEvent(QResizeEvent *ev)
+void KSim::Label::resizeEvent(TQResizeEvent *ev)
{
// set the location of where the shadow'ed text will be drawn
d->shad.setWidth(ev->size().width() + 3);
@@ -225,10 +225,10 @@ void KSim::Label::resizeEvent(QResizeEvent *ev)
d->background = d->meterImage.smoothScale(ev->size());
}
-void KSim::Label::drawText(QPainter *painter, const QRect &rect,
- const QColor &color, const QString &text)
+void KSim::Label::drawText(TQPainter *painter, const TQRect &rect,
+ const TQColor &color, const TQString &text)
{
- QRect location(rect);
+ TQRect location(rect);
if (!pixmap().isNull())
location.setX(pixmap().width() + 5);
@@ -236,39 +236,39 @@ void KSim::Label::drawText(QPainter *painter, const QRect &rect,
0, text, -1, &color);
}
-void KSim::Label::drawPixmap(QPainter *painter, const QRect &rect,
- const QPixmap &pixmap)
+void KSim::Label::drawPixmap(TQPainter *painter, const TQRect &rect,
+ const TQPixmap &pixmap)
{
- QRect location(rect);
+ TQRect location(rect);
location.setWidth(pixmap.width());
style().drawItem(painter, location, AlignCenter, colorGroup(), true,
- pixmap.isNull() ? 0 : &pixmap, QString::null);
+ pixmap.isNull() ? 0 : &pixmap, TQString::null);
}
-void KSim::Label::setTextLocation(const QRect &rect)
+void KSim::Label::setTextLocation(const TQRect &rect)
{
d->loc = rect;
}
-const QRect &KSim::Label::textLocation() const
+const TQRect &KSim::Label::textLocation() const
{
return d->loc;
}
-void KSim::Label::setShadowLocation(const QRect &rect)
+void KSim::Label::setShadowLocation(const TQRect &rect)
{
d->shad = rect;
}
-const QRect &KSim::Label::shadowLocation() const
+const TQRect &KSim::Label::shadowLocation() const
{
return d->shad;
}
-void KSim::Label::setThemePixmap(const QString &image)
+void KSim::Label::setThemePixmap(const TQString &image)
{
- QSize oldSize = sizeHint();
+ TQSize oldSize = sizeHint();
d->meterImage.reset();
d->meterImage.load(image);
KSim::ThemeLoader::self().reColourImage(d->meterImage);
@@ -276,7 +276,7 @@ void KSim::Label::setThemePixmap(const QString &image)
relayoutLabel(oldSize);
}
-void KSim::Label::relayoutLabel(const QSize &old, bool repaint)
+void KSim::Label::relayoutLabel(const TQSize &old, bool repaint)
{
if (sizeHint() != old) {
updateGeometry();
@@ -294,8 +294,8 @@ void KSim::Label::initWidget(int type)
// try to reduce flicker as much as possible
setBackgroundMode(NoBackground);
- setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,
- QSizePolicy::Fixed));
+ setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding,
+ TQSizePolicy::Fixed));
configureObject();
}
diff --git a/ksim/library/label.h b/ksim/library/label.h
index 1c750f2..7d77aa6 100644
--- a/ksim/library/label.h
+++ b/ksim/library/label.h
@@ -20,7 +20,7 @@
#ifndef KSIM__LABEL_H
#define KSIM__LABEL_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "common.h"
#include <kdemacros.h>
@@ -34,7 +34,7 @@ namespace KSim
* @short Label widget
* @author Robbie Ward <linuxphreak@gmx.co.uk>
*/
- class KDE_EXPORT Label : public QWidget, public KSim::Base
+ class KDE_EXPORT Label : public TQWidget, public KSim::Base
{
Q_OBJECT
public:
@@ -50,7 +50,7 @@ namespace KSim
* To create a KSim::Label with the normal theme look
* @see KSim::ThemeLoader
*/
- Label(QWidget *parent, const char *name = 0, WFlags fl = 0);
+ Label(TQWidget *parent, const char *name = 0, WFlags fl = 0);
/**
* Constructs a KSimLabel.
*
@@ -62,10 +62,10 @@ namespace KSim
* KSim::Label *label = new KSim::Label(KSim::Types::None, this);
* </pre>
* To create a KSim::Label with the normal theme look,
- * NOTE: this is the same as the KSim::Label(QWidget *, const char *, WFlags) ctor
+ * NOTE: this is the same as the KSim::Label(TQWidget *, const char *, WFlags) ctor
* @see KSim::ThemeLoader
*/
- Label(int type, QWidget *parent, const char *name = 0, WFlags fl = 0);
+ Label(int type, TQWidget *parent, const char *name = 0, WFlags fl = 0);
/**
* Constructs a KSim::Label.
*
@@ -80,8 +80,8 @@ namespace KSim
* To create a KSim::Label with the theme look of host
* @see KSim::ThemeLoader
*/
- Label(int type, const QString &text,
- QWidget *parent, const char *name = 0, WFlags fl = 0);
+ Label(int type, const TQString &text,
+ TQWidget *parent, const char *name = 0, WFlags fl = 0);
/**
* destructs KSim::Label.
*/
@@ -91,7 +91,7 @@ namespace KSim
* returns the current text of the label
* @see #setText
*/
- const QString &text() const;
+ const TQString &text() const;
/**
* recreates the labels look & feel
*/
@@ -99,19 +99,19 @@ namespace KSim
/**
* sets a pixmap for the label
*/
- void setPixmap(const QPixmap &pixmap);
+ void setPixmap(const TQPixmap &pixmap);
/**
* @return the side pixmap
*/
- const QPixmap &pixmap() const;
+ const TQPixmap &pixmap() const;
/**
* reimplemented for internal reasons
*/
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
/**
* reimplemented for internal reasons
*/
- virtual QSize minimumSizeHint() const;
+ virtual TQSize minimumSizeHint() const;
public slots:
/**
@@ -122,7 +122,7 @@ namespace KSim
* sets the current label of the widget to @ref text
* @see text()
*/
- void setText(const QString &text);
+ void setText(const TQString &text);
protected:
/**
@@ -140,19 +140,19 @@ namespace KSim
/**
* Set the text color
*/
- void setTextColour(const QColor &color);
+ void setTextColour(const TQColor &color);
/**
* @return the text color
*/
- const QColor &textColour() const;
+ const TQColor &textColour() const;
/**
* Set the shadow color
*/
- void setShadowColour(const QColor &color);
+ void setShadowColour(const TQColor &color);
/**
* @return the shadow color
*/
- const QColor &shadowColour() const;
+ const TQColor &shadowColour() const;
/**
* Set the config values depending on the chart type
*/
@@ -160,42 +160,42 @@ namespace KSim
/**
* reimplemented for internal reasons
*/
- virtual void paintEvent(QPaintEvent *);
+ virtual void paintEvent(TQPaintEvent *);
/**
* reimplemented for internal reasons
*/
- virtual void resizeEvent(QResizeEvent *);
+ virtual void resizeEvent(TQResizeEvent *);
/**
* draw the text onto the label
*/
- void drawText(QPainter *painter, const QRect &rect,
- const QColor &color, const QString &text);
+ void drawText(TQPainter *painter, const TQRect &rect,
+ const TQColor &color, const TQString &text);
/**
* draw the pixmap onto the label
*/
- void drawPixmap(QPainter *painter,
- const QRect &rect, const QPixmap &pixmap);
+ void drawPixmap(TQPainter *painter,
+ const TQRect &rect, const TQPixmap &pixmap);
/**
* sets the location of the text
*/
- void setTextLocation(const QRect &rect);
+ void setTextLocation(const TQRect &rect);
/**
* @return the location of the text
*/
- const QRect &textLocation() const;
+ const TQRect &textLocation() const;
/**
* sets the location of the shadow text
*/
- void setShadowLocation(const QRect &rect);
+ void setShadowLocation(const TQRect &rect);
/**
* @return the location of the shadow text
*/
- const QRect &shadowLocation() const;
+ const TQRect &shadowLocation() const;
/**
* sets the background image to be painted
*/
- void setThemePixmap(const QString &image);
- void relayoutLabel(const QSize &old, bool repaint = true);
+ void setThemePixmap(const TQString &image);
+ void relayoutLabel(const TQSize &old, bool repaint = true);
private:
/**
diff --git a/ksim/library/led.cpp b/ksim/library/led.cpp
index 8d0c88d..a3d9e1c 100644
--- a/ksim/library/led.cpp
+++ b/ksim/library/led.cpp
@@ -20,10 +20,10 @@
#include "led.h"
#include "led.moc"
-#include <qimage.h>
-#include <qpainter.h>
-#include <qfile.h>
-#include <qbitmap.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqfile.h>
+#include <tqbitmap.h>
#include <kdebug.h>
#include <kpixmapsplitter.h>
@@ -35,13 +35,13 @@ class KSim::Led::Private
{
public:
KPixmapSplitter splitter;
- QPixmap pixmap;
- QString imageName;
+ TQPixmap pixmap;
+ TQString imageName;
KSim::Led::Type type;
bool toggled;
};
-KSim::Led::Led() : QPixmap()
+KSim::Led::Led() : TQPixmap()
{
d = new Private;
@@ -52,7 +52,7 @@ KSim::Led::Led() : QPixmap()
setOff();
}
-KSim::Led::Led(Type type, const QString &imageName) : QPixmap()
+KSim::Led::Led(Type type, const TQString &imageName) : TQPixmap()
{
d = new Private;
@@ -74,7 +74,7 @@ void KSim::Led::setOn(bool force)
return;
// Return if our pixmap is null
- QRect rect = d->splitter.coordinates(d->type == First ? 1 : 3);
+ TQRect rect = d->splitter.coordinates(d->type == First ? 1 : 3);
if (d->pixmap.isNull() || rect.isEmpty()) {
resize(12, 8);
fill(Qt::white);
@@ -82,12 +82,12 @@ void KSim::Led::setOn(bool force)
}
if (d->pixmap.mask() && !d->pixmap.mask()->isNull()) {
- QBitmap mask(rect.size());
- bitBlt(&mask, QPoint(0, 0), d->pixmap.mask(), rect, CopyROP);
+ TQBitmap mask(rect.size());
+ bitBlt(&mask, TQPoint(0, 0), d->pixmap.mask(), rect, CopyROP);
setMask(mask);
}
- bitBlt(this, QPoint(0, 0), &d->pixmap, rect, CopyROP);
+ bitBlt(this, TQPoint(0, 0), &d->pixmap, rect, CopyROP);
d->toggled = true;
}
@@ -97,7 +97,7 @@ void KSim::Led::setOff(bool force)
return;
// Return if our pixmap is null
- QRect rect = d->splitter.coordinates(d->type == First ? 0 : 2);
+ TQRect rect = d->splitter.coordinates(d->type == First ? 0 : 2);
if (d->pixmap.isNull() || rect.isEmpty()) {
resize(12, 8);
fill(Qt::white);
@@ -105,12 +105,12 @@ void KSim::Led::setOff(bool force)
}
if (d->pixmap.mask() && !d->pixmap.mask()->isNull()) {
- QBitmap mask(rect.size());
- bitBlt(&mask, QPoint(0, 0), d->pixmap.mask(), rect, CopyROP);
+ TQBitmap mask(rect.size());
+ bitBlt(&mask, TQPoint(0, 0), d->pixmap.mask(), rect, CopyROP);
setMask(mask);
}
- bitBlt(this, QPoint(0, 0), &d->pixmap, rect, CopyROP);
+ bitBlt(this, TQPoint(0, 0), &d->pixmap, rect, CopyROP);
d->toggled = false;
}
@@ -122,28 +122,28 @@ void KSim::Led::toggle()
setOn();
}
-void KSim::Led::setPixmap(const QString &imageName)
+void KSim::Led::setPixmap(const TQString &imageName)
{
if (imageName == d->imageName)
return;
- QImage image(imageName);
+ TQImage image(imageName);
if (image.width() >= 19)
image = image.smoothScale(19, image.height());
KSim::ThemeLoader::self().reColourImage(image);
d->pixmap.convertFromImage(image);
- QSize size(image.width(), image.height() / 4);
+ TQSize size(image.width(), image.height() / 4);
d->splitter.setPixmap(d->pixmap);
d->splitter.setItemSize(size);
resize(size);
- setMask(QBitmap());
+ setMask(TQBitmap());
}
-const QString &KSim::Led::fileName() const
+const TQString &KSim::Led::fileName() const
{
return d->imageName;
}
@@ -179,12 +179,12 @@ class KSim::LedLabel::Private
public:
KSim::Led receiveLed;
KSim::Led sendLed;
- QPoint sendPoint;
- QPoint receivePoint;
+ TQPoint sendPoint;
+ TQPoint receivePoint;
};
-KSim::LedLabel::LedLabel(int max, int type, const QString &label,
- QWidget *parent, const char *name, WFlags fl)
+KSim::LedLabel::LedLabel(int max, int type, const TQString &label,
+ TQWidget *parent, const char *name, WFlags fl)
: KSim::Progress(max, type, Panel, parent, name, fl)
{
init();
@@ -192,14 +192,14 @@ KSim::LedLabel::LedLabel(int max, int type, const QString &label,
}
KSim::LedLabel::LedLabel(int max, int type,
- QWidget *parent, const char *name, WFlags fl)
+ TQWidget *parent, const char *name, WFlags fl)
: KSim::Progress(max, type, Panel, parent, name, fl)
{
init();
}
KSim::LedLabel::LedLabel(int max,
- QWidget *parent, const char *name, WFlags fl)
+ TQWidget *parent, const char *name, WFlags fl)
: KSim::Progress(max, KSim::Types::None,
Panel, parent, name, fl)
{
@@ -215,7 +215,7 @@ void KSim::LedLabel::configureObject(bool reapaintWidget)
{
KSim::Progress::configureObject(false);
- QPixmap pixmap = themeLoader().current().splitPixmap(KSim::Theme::KrellPanel, 0, false);
+ TQPixmap pixmap = themeLoader().current().splitPixmap(KSim::Theme::KrellPanel, 0, false);
if (pixmap.isNull())
pixmap = themeLoader().current().splitPixmap(KSim::Theme::KrellSlider);
@@ -234,9 +234,9 @@ void KSim::LedLabel::configureObject(bool reapaintWidget)
update();
}
-QSize KSim::LedLabel::sizeHint() const
+TQSize KSim::LedLabel::sizeHint() const
{
- QSize hint(Progress::sizeHint());
+ TQSize hint(Progress::sizeHint());
if (d->sendLed.height() > hint.height())
hint.setHeight(d->sendLed.height());
@@ -303,14 +303,14 @@ void KSim::LedLabel::drawLeds()
bitBlt(this, d->receivePoint, &d->receiveLed);
}
-void KSim::LedLabel::paintEvent(QPaintEvent *ev)
+void KSim::LedLabel::paintEvent(TQPaintEvent *ev)
{
KSim::Label::paintEvent(ev);
drawLeds();
KSim::Progress::drawMeter();
}
-void KSim::LedLabel::resizeEvent(QResizeEvent *ev)
+void KSim::LedLabel::resizeEvent(TQResizeEvent *ev)
{
KSim::Progress::resizeEvent(ev);
layoutLeds();
@@ -328,11 +328,11 @@ void KSim::LedLabel::layoutLeds()
d->receivePoint.setX((d->sendPoint.x() - d->receiveLed.width()) - 3);
d->receivePoint.setY(ledHeight - (d->receiveLed.height() / 2));
- QRect location = textLocation();
+ TQRect location = textLocation();
location.setWidth(d->receivePoint.x());
setTextLocation(location);
- QRect shadow = shadowLocation();
+ TQRect shadow = shadowLocation();
shadow.setWidth(d->receivePoint.x() + 3);
setShadowLocation(shadow);
diff --git a/ksim/library/led.h b/ksim/library/led.h
index 2e5d084..a3ef85e 100644
--- a/ksim/library/led.h
+++ b/ksim/library/led.h
@@ -22,7 +22,7 @@
#include "progress.h"
#include <kdemacros.h>
-#include <qpixmap.h>
+#include <tqpixmap.h>
namespace KSim
{
@@ -49,7 +49,7 @@ namespace KSim
* @param parent is the parent widget
* @param name is the object instance name
*/
- Led(Type type, const QString &imageName);
+ Led(Type type, const TQString &imageName);
/**
* destructor for KSim::Led.
*/
@@ -70,11 +70,11 @@ namespace KSim
/**
* sets the image of the led
*/
- void setPixmap(const QString &);
+ void setPixmap(const TQString &);
/**
* @return the location of the filename
*/
- const QString &fileName() const;
+ const TQString &fileName() const;
/**
* @return true if the led is on
*/
@@ -116,8 +116,8 @@ namespace KSim
* @param parent is the parent widget
* @see KSim::ThemeLoader
*/
- LedLabel(int max, int type, const QString &label,
- QWidget *parent, const char *name = 0, WFlags fl = 0);
+ LedLabel(int max, int type, const TQString &label,
+ TQWidget *parent, const char *name = 0, WFlags fl = 0);
/**
* Constructs a KSim::LedLabel.
*
@@ -126,7 +126,7 @@ namespace KSim
* @param parent is the parent widget
* @see KSim::ThemeLoader
*/
- LedLabel(int max, int type, QWidget *parent,
+ LedLabel(int max, int type, TQWidget *parent,
const char *name = 0, WFlags fl = 0);
/**
* Constructs a KSim::LedLabel.
@@ -135,7 +135,7 @@ namespace KSim
* @param parent is the parent widget
* @see KSim::ThemeLoader
*/
- LedLabel(int max, QWidget *parent,
+ LedLabel(int max, TQWidget *parent,
const char *name = 0, WFlags fl = 0);
/**
* destructor for KSim::LedLabel.
@@ -149,7 +149,7 @@ namespace KSim
/**
* reimplemented for internal reasons
*/
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
public slots:
/**
@@ -176,11 +176,11 @@ namespace KSim
/**
* reimplemented for internal reasons
*/
- virtual void paintEvent(QPaintEvent *);
+ virtual void paintEvent(TQPaintEvent *);
/**
* reimplemented for internal reasons
*/
- virtual void resizeEvent(QResizeEvent *);
+ virtual void resizeEvent(TQResizeEvent *);
private:
void layoutLeds();
diff --git a/ksim/library/pluginglobal.cpp b/ksim/library/pluginglobal.cpp
index 02b32ad..3cbae68 100644
--- a/ksim/library/pluginglobal.cpp
+++ b/ksim/library/pluginglobal.cpp
@@ -40,7 +40,7 @@ class KSim::Plugin::Private
~Private()
{
kdDebug(2003) << "Deleting " << (plugin ?
- plugin->name() : QString("Null"))
+ plugin->name() : TQString("Null"))
<< " objects." << endl;
// Remember to delete the objects we own
@@ -57,10 +57,10 @@ class KSim::Plugin::Private
bool deref() { return !--count; }
uint count;
- QString name;
- QPixmap icon;
- QCString libName;
- QString filename;
+ TQString name;
+ TQPixmap icon;
+ TQCString libName;
+ TQString filename;
KSim::PluginObject *plugin;
KSim::PluginView *view;
KSim::PluginPage *page;
@@ -155,24 +155,24 @@ bool KSim::Plugin::isNull() const
return !d;
}
-const QString &KSim::Plugin::name() const
+const TQString &KSim::Plugin::name() const
{
- return d ? d->name : QString::null;
+ return d ? d->name : TQString::null;
}
-QPixmap KSim::Plugin::icon() const
+TQPixmap KSim::Plugin::icon() const
{
- return d ? d->icon : QPixmap();
+ return d ? d->icon : TQPixmap();
}
-QCString KSim::Plugin::libName() const
+TQCString KSim::Plugin::libName() const
{
- return d ? d->libName : QCString();
+ return d ? d->libName : TQCString();
}
-const QString &KSim::Plugin::fileName() const
+const TQString &KSim::Plugin::fileName() const
{
- return d ? d->filename : QString::null;
+ return d ? d->filename : TQString::null;
}
KSim::PluginObject *KSim::Plugin::plugin() const
diff --git a/ksim/library/pluginglobal.h b/ksim/library/pluginglobal.h
index 85df9ce..5dbeef8 100644
--- a/ksim/library/pluginglobal.h
+++ b/ksim/library/pluginglobal.h
@@ -20,9 +20,9 @@
#ifndef PLUGINGLOBAL_H
#define PLUGINGLOBAL_H
-#include <qstring.h>
-#include <qpixmap.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqpixmap.h>
+#include <tqvaluelist.h>
#include <kdemacros.h>
@@ -93,19 +93,19 @@ namespace KSim
* @return the name of the plugin, NOT the library name
* @see #libName
*/
- const QString &name() const;
+ const TQString &name() const;
/**
* @return the icon of the plugin
*/
- QPixmap icon() const;
+ TQPixmap icon() const;
/**
* @return library name of the plugin
*/
- QCString libName() const;
+ TQCString libName() const;
/**
* @return path to the .desktop file
*/
- const QString &fileName() const;
+ const TQString &fileName() const;
/**
* @return the plugin object
*/
@@ -135,22 +135,22 @@ namespace KSim
* use pluginList() from KSim::PluginLoader instead
* @author Robbie Ward <linuxphreak@gmx.co.uk>
*/
- class KDE_EXPORT PluginList : public QValueList<Plugin>
+ class KDE_EXPORT PluginList : public TQValueList<Plugin>
{
public:
/**
* constructs a null list
*/
- PluginList() : QValueList<Plugin>() {}
+ PluginList() : TQValueList<Plugin>() {}
/**
* constructs a copy of @p list
*/
- PluginList(const PluginList &list) : QValueList<Plugin>(list) {}
+ PluginList(const PluginList &list) : TQValueList<Plugin>(list) {}
/**
* constructs a copy of @p list
*/
- PluginList(const QValueList<Plugin> &list)
- : QValueList<Plugin>(list) {}
+ PluginList(const TQValueList<Plugin> &list)
+ : TQValueList<Plugin>(list) {}
/**
* constructs a list with just one item
*/
diff --git a/ksim/library/pluginloader.cpp b/ksim/library/pluginloader.cpp
index be2d2bf..1a8bbd8 100644
--- a/ksim/library/pluginloader.cpp
+++ b/ksim/library/pluginloader.cpp
@@ -28,7 +28,7 @@
#include <kstandarddirs.h>
#include <kmessagebox.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class KSim::PluginInfo::Private
{
@@ -39,17 +39,17 @@ KSim::PluginInfo::~PluginInfo()
{
}
-const QString &KSim::PluginInfo::name() const
+const TQString &KSim::PluginInfo::name() const
{
return m_name;
}
-QCString KSim::PluginInfo::libName(bool includePrefix) const
+TQCString KSim::PluginInfo::libName(bool includePrefix) const
{
return (includePrefix ? "ksim_" + m_libName : m_libName);
}
-const QString &KSim::PluginInfo::location() const
+const TQString &KSim::PluginInfo::location() const
{
return m_location;
}
@@ -63,8 +63,8 @@ class KSim::PluginLoader::Private
public:
typedef KSim::PluginObject *(PluginPtr)(const char *);
KSim::PluginList pluginList;
- QString error;
- QString lib;
+ TQString error;
+ TQString lib;
bool lastLoaded;
static const char *const ksimString;
};
@@ -119,7 +119,7 @@ bool KSim::PluginLoader::loadPlugin(const KDesktopFile &file)
return true;
}
-bool KSim::PluginLoader::unloadPlugin(const QCString &name)
+bool KSim::PluginLoader::unloadPlugin(const TQCString &name)
{
if (name.isEmpty())
return false;
@@ -156,7 +156,7 @@ bool KSim::PluginLoader::isLoaded(const KSim::Plugin &info) const
return isLoaded(info.libName());
}
-bool KSim::PluginLoader::isLoaded(const QCString &library) const
+bool KSim::PluginLoader::isLoaded(const TQCString &library) const
{
if (library.isEmpty())
return false;
@@ -164,15 +164,15 @@ bool KSim::PluginLoader::isLoaded(const QCString &library) const
return !find(library).isNull();
}
-KSim::PluginInfo KSim::PluginLoader::findPluginInfo(const QString &name,
+KSim::PluginInfo KSim::PluginLoader::findPluginInfo(const TQString &name,
SearchType type) const
{
- QString location;
+ TQString location;
switch (type) {
case Name: {
- QStringList files = KGlobal::dirs()->findAllResources("data", "ksim/monitors/*.desktop");
- QStringList::ConstIterator it;
+ TQStringList files = KGlobal::dirs()->findAllResources("data", "ksim/monitors/*.desktop");
+ TQStringList::ConstIterator it;
for (it = files.begin(); it != files.end(); ++it) {
KDesktopFile file((*it));
if (file.readName() == name) {
@@ -183,8 +183,8 @@ KSim::PluginInfo KSim::PluginLoader::findPluginInfo(const QString &name,
break;
}
case LibName: {
- QStringList files = KGlobal::dirs()->findAllResources("data", "ksim/monitors/*.desktop");
- QStringList::ConstIterator it;
+ TQStringList files = KGlobal::dirs()->findAllResources("data", "ksim/monitors/*.desktop");
+ TQStringList::ConstIterator it;
for (it = files.begin(); it != files.end(); ++it) {
KDesktopFile file((*it));
if (file.readEntry("X-KSIM-LIBRARY") == name) {
@@ -211,12 +211,12 @@ KSim::PluginInfo KSim::PluginLoader::findPluginInfo(const QString &name,
return info;
}
-KSim::Plugin &KSim::PluginLoader::find(const QCString &libName)
+KSim::Plugin &KSim::PluginLoader::find(const TQCString &libName)
{
if (libName.isEmpty())
return KSim::Plugin::null;
- QCString library(libName);
+ TQCString library(libName);
if (libName.find(Private::ksimString) == -1)
library.prepend(Private::ksimString);
@@ -229,12 +229,12 @@ KSim::Plugin &KSim::PluginLoader::find(const QCString &libName)
return KSim::Plugin::null;
}
-const KSim::Plugin &KSim::PluginLoader::find(const QCString &libName) const
+const KSim::Plugin &KSim::PluginLoader::find(const TQCString &libName) const
{
if (libName.isEmpty())
return KSim::Plugin::null;
- QCString library(libName);
+ TQCString library(libName);
if (libName.find(Private::ksimString) == -1)
library.prepend(Private::ksimString);
@@ -277,7 +277,7 @@ KSim::Plugin &KSim::PluginLoader::plugin()
return (d->lastLoaded ? d->pluginList.last() : KSim::Plugin::null);
}
-KSim::PluginLoader::PluginLoader() : QObject(0, "PluginLoader")
+KSim::PluginLoader::PluginLoader() : TQObject(0, "PluginLoader")
{
d = new KSim::PluginLoader::Private;
d->lastLoaded = false;
@@ -294,20 +294,20 @@ void KSim::PluginLoader::cleanup()
KSim::PluginLoader::ErrorCode KSim::PluginLoader::createPlugin(const KDesktopFile &file)
{
- d->error = QString::null;
- QCString pluginName(file.readEntry("X-KSIM-LIBRARY").local8Bit());
+ d->error = TQString::null;
+ TQCString pluginName(file.readEntry("X-KSIM-LIBRARY").local8Bit());
if (pluginName.isEmpty())
return EmptyLibName;
- QCString libName(Private::ksimString + pluginName);
+ TQCString libName(Private::ksimString + pluginName);
KLibrary *library = KLibLoader::self()->library(libName);
if (!library)
return LibNotFound;
- QCString symbol("init_plugin");
+ TQCString symbol("init_plugin");
if (Private::PluginPtr *create = (Private::PluginPtr *)(library->symbol(symbol))) {
d->pluginList.append(KSim::Plugin(create(pluginName), file));
- d->lib = QString::null;
+ d->lib = TQString::null;
d->lastLoaded = true;
}
else {
diff --git a/ksim/library/pluginloader.h b/ksim/library/pluginloader.h
index f101973..385df44 100644
--- a/ksim/library/pluginloader.h
+++ b/ksim/library/pluginloader.h
@@ -21,7 +21,7 @@
#define PLUGINLOADER_H
#include "pluginglobal.h"
-#include <qobject.h>
+#include <tqobject.h>
#include <kdemacros.h>
@@ -36,22 +36,22 @@ namespace KSim
/**
* @return the name of the plugin
*/
- const QString &name() const;
+ const TQString &name() const;
/**
* @return the library name of the plugin
*/
- QCString libName(bool includePrefix = false) const;
+ TQCString libName(bool includePrefix = false) const;
/**
* @return the location of the desktop file
*/
- const QString &location() const;
+ const TQString &location() const;
private:
PluginInfo();
- QString m_name;
- QString m_location;
- QCString m_libName;
+ TQString m_name;
+ TQString m_location;
+ TQCString m_libName;
class Private;
Private *d;
@@ -89,7 +89,7 @@ namespace KSim
/**
* unloads a loaded plugin and removes plugin entries from pluginList()
*/
- bool unloadPlugin(const QCString &name);
+ bool unloadPlugin(const TQCString &name);
/**
* unloads all loaded plugins
*/
@@ -103,14 +103,14 @@ namespace KSim
/**
* returns true if library is loaded
*/
- bool isLoaded(const QCString &library) const;
+ bool isLoaded(const TQCString &library) const;
/**
* finds the plugins desktopfile and returns information
* on the plugin
* @return a KSim::PluginInfo object
* @see KSim::PluginInfo
*/
- KSim::PluginInfo findPluginInfo(const QString &name,
+ KSim::PluginInfo findPluginInfo(const TQString &name,
SearchType type = DesktopFile) const;
/**
* looks through the list of loaded plugins and returns
@@ -122,11 +122,11 @@ namespace KSim
* @return a KSim::Plugin object
* @see KSim::Plugin
*/
- KSim::Plugin &find(const QCString &libName);
+ KSim::Plugin &find(const TQCString &libName);
/**
* convenience function, see the above function for details.
*/
- const KSim::Plugin &find(const QCString &libName) const;
+ const KSim::Plugin &find(const TQCString &libName) const;
/**
* equivalent to find(info.libName());
*/
diff --git a/ksim/library/pluginmodule.cpp b/ksim/library/pluginmodule.cpp
index f267197..b5cbd37 100644
--- a/ksim/library/pluginmodule.cpp
+++ b/ksim/library/pluginmodule.cpp
@@ -24,19 +24,19 @@
#include <kapplication.h>
#include <kaboutdata.h>
#include <kdebug.h>
-#include <qregexp.h>
-#include <qpopupmenu.h>
+#include <tqregexp.h>
+#include <tqpopupmenu.h>
#include <kconfig.h>
class KSim::PluginObject::Private
{
public:
- QCString name;
- QString configName;
+ TQCString name;
+ TQString configName;
};
-KSim::PluginObject::PluginObject(const QCString &name)
+KSim::PluginObject::PluginObject(const TQCString &name)
{
d = new PluginObject::Private;
d->name = name;
@@ -53,12 +53,12 @@ const char *KSim::PluginObject::instanceName() const
return kapp->aboutData()->appName();
}
-const QCString &KSim::PluginObject::name() const
+const TQCString &KSim::PluginObject::name() const
{
return d->name;
}
-void KSim::PluginObject::setConfigFileName(const QString &name)
+void KSim::PluginObject::setConfigFileName(const TQString &name)
{
if (d->configName == name)
return;
@@ -68,7 +68,7 @@ void KSim::PluginObject::setConfigFileName(const QString &name)
d->configName.prepend("ksim_");
}
-const QString &KSim::PluginObject::configFileName() const
+const TQString &KSim::PluginObject::configFileName() const
{
return d->configName;
}
@@ -81,7 +81,7 @@ class KSim::PluginPage::Private
};
KSim::PluginPage::PluginPage(KSim::PluginObject *parent, const char *name)
- : QWidget(0, name)
+ : TQWidget(0, name)
{
d = new PluginPage::Private;
d->parent = parent;
@@ -112,18 +112,18 @@ class KSim::PluginView::Private
{
public:
PluginObject *parent;
- QPopupMenu *popupMenu;
+ TQPopupMenu *popupMenu;
KConfig *config;
};
KSim::PluginView::PluginView(KSim::PluginObject *parent, const char *name)
- : QWidget(0, name)
+ : TQWidget(0, name)
{
d = new PluginView::Private;
d->parent = parent;
- d->popupMenu = new QPopupMenu(this);
+ d->popupMenu = new TQPopupMenu(this);
d->popupMenu->insertItem(i18n("About"), this,
- SLOT(showAbout()), 0, -1, 0);
+ TQT_SLOT(showAbout()), 0, -1, 0);
if (parent && !parent->configFileName().isEmpty())
d->config = new KConfig(parent->configFileName() + "rc");
@@ -147,7 +147,7 @@ KConfig *KSim::PluginView::config() const
return d->config;
}
-QPopupMenu *KSim::PluginView::menu() const
+TQPopupMenu *KSim::PluginView::menu() const
{
return d->popupMenu;
}
@@ -157,9 +157,9 @@ void KSim::PluginView::doCommand()
emit runCommand(name());
}
-void KSim::PluginView::mousePressEvent(QMouseEvent *ev)
+void KSim::PluginView::mousePressEvent(TQMouseEvent *ev)
{
- if (ev->button() == QMouseEvent::LeftButton)
+ if (ev->button() == TQMouseEvent::LeftButton)
doCommand();
}
diff --git a/ksim/library/pluginmodule.h b/ksim/library/pluginmodule.h
index 1cc6a1c..753030f 100644
--- a/ksim/library/pluginmodule.h
+++ b/ksim/library/pluginmodule.h
@@ -20,7 +20,7 @@
#ifndef PLUGINMODULE_H
#define PLUGINMODULE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdemacros.h>
@@ -56,7 +56,7 @@ namespace KSim
/**
* constructor for PluginObject
*/
- PluginObject(const QCString &name);
+ PluginObject(const TQCString &name);
/**
* destructor for PluginObject
*/
@@ -83,16 +83,16 @@ namespace KSim
/**
* @return the name of the plugin
*/
- const QCString &name() const;
+ const TQCString &name() const;
/**
* sets the configuration file name to @p name
*/
- void setConfigFileName(const QString &name);
+ void setConfigFileName(const TQString &name);
/**
* @return the config filename the plugin should use
* or name() if the filename hasn't been set
*/
- const QString &configFileName() const;
+ const TQString &configFileName() const;
private:
PluginObject();
@@ -180,7 +180,7 @@ namespace KSim
/**
* the plugins popup menu
*/
- QPopupMenu *menu() const;
+ TQPopupMenu *menu() const;
/**
* reimplement to recreate your view when KSim requests this
*/
@@ -188,10 +188,10 @@ namespace KSim
void doCommand();
signals:
- void runCommand(const QCString &);
+ void runCommand(const TQCString &);
protected:
- virtual void mousePressEvent(QMouseEvent *);
+ virtual void mousePressEvent(TQMouseEvent *);
PluginObject *parentPlugin() const;
private slots:
diff --git a/ksim/library/progress.cpp b/ksim/library/progress.cpp
index fd923d2..82ae16e 100644
--- a/ksim/library/progress.cpp
+++ b/ksim/library/progress.cpp
@@ -21,17 +21,17 @@
#include "progress.moc"
#include <kdebug.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qimage.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
#include <themeloader.h>
class KSim::Progress::Private
{
public:
- QPixmap meterPixmap;
- QRect rectOrigin;
+ TQPixmap meterPixmap;
+ TQRect rectOrigin;
ProgressType type;
int krellDepth;
int value;
@@ -40,7 +40,7 @@ class KSim::Progress::Private
};
KSim::Progress::Progress(int maxValue,
- QWidget *parent, const char *name,
+ TQWidget *parent, const char *name,
WFlags fl) : KSim::Label(parent, name, fl)
{
init(maxValue);
@@ -48,7 +48,7 @@ KSim::Progress::Progress(int maxValue,
}
KSim::Progress::Progress(int maxValue,
- int type, const QString &label, QWidget *parent,
+ int type, const TQString &label, TQWidget *parent,
const char *name, WFlags fl)
: KSim::Label(type, label, parent, name, fl)
{
@@ -57,8 +57,8 @@ KSim::Progress::Progress(int maxValue,
}
KSim::Progress::Progress(int maxValue,
- int type, const QString &label, int value,
- QWidget *parent, const char *name, WFlags fl)
+ int type, const TQString &label, int value,
+ TQWidget *parent, const char *name, WFlags fl)
: KSim::Label(type, label, parent, name, fl)
{
init(maxValue, value);
@@ -66,7 +66,7 @@ KSim::Progress::Progress(int maxValue,
}
KSim::Progress::Progress(int maxValue,
- int type, QWidget *parent,
+ int type, TQWidget *parent,
const char *name, WFlags fl)
: KSim::Label(type, parent, name, fl)
{
@@ -76,7 +76,7 @@ KSim::Progress::Progress(int maxValue,
KSim::Progress::Progress(int maxValue, int type,
ProgressType progressType,
- QWidget *parent, const char *name, WFlags fl)
+ TQWidget *parent, const char *name, WFlags fl)
: KSim::Label(type, parent, name, fl)
{
init(maxValue, 0, progressType);
@@ -103,7 +103,7 @@ int KSim::Progress::maxValue() const
return d->maxValue;
}
-const QRect &KSim::Progress::rectOrigin() const
+const TQRect &KSim::Progress::rectOrigin() const
{
return d->rectOrigin;
}
@@ -124,9 +124,9 @@ void KSim::Progress::configureObject(bool repaintWidget)
update();
}
-QSize KSim::Progress::sizeHint() const
+TQSize KSim::Progress::sizeHint() const
{
- QSize hint(Label::sizeHint());
+ TQSize hint(Label::sizeHint());
if (d->meterPixmap.height() > hint.height())
hint.setHeight(d->meterPixmap.height());
@@ -179,14 +179,14 @@ void KSim::Progress::setMaxValue(int maxValue)
}
}
-void KSim::Progress::setOrigin(const QRect &origin)
+void KSim::Progress::setOrigin(const TQRect &origin)
{
d->rectOrigin = origin;
}
-void KSim::Progress::setMeterPixmap(const QPixmap &pixmap)
+void KSim::Progress::setMeterPixmap(const TQPixmap &pixmap)
{
- QSize oldSize = sizeHint();
+ TQSize oldSize = sizeHint();
d->meterPixmap = pixmap;
relayoutLabel(oldSize);
}
@@ -204,13 +204,13 @@ int KSim::Progress::xLocation() const
return returnValue;
}
-void KSim::Progress::paintEvent(QPaintEvent *ev)
+void KSim::Progress::paintEvent(TQPaintEvent *ev)
{
KSim::Label::paintEvent(ev);
drawMeter();
}
-void KSim::Progress::resizeEvent(QResizeEvent *ev)
+void KSim::Progress::resizeEvent(TQResizeEvent *ev)
{
KSim::Label::resizeEvent(ev);
setOrigin(rect());
diff --git a/ksim/library/progress.h b/ksim/library/progress.h
index 570894a..7f0f68a 100644
--- a/ksim/library/progress.h
+++ b/ksim/library/progress.h
@@ -43,7 +43,7 @@ namespace KSim
* @param label is the text that will be displayed
* @param parent is the parent widget
*/
- Progress(int maxValue, QWidget *parent,
+ Progress(int maxValue, TQWidget *parent,
const char *name = 0, WFlags fl = 0);
/**
* constructs a KSim::Progress
@@ -54,8 +54,8 @@ namespace KSim
* @param label is the text that will be displayed
* @param parent is the parent widget
*/
- Progress(int maxValue, int type, const QString &label,
- QWidget *parent, const char *name = 0, WFlags fl = 0);
+ Progress(int maxValue, int type, const TQString &label,
+ TQWidget *parent, const char *name = 0, WFlags fl = 0);
/**
* constructs a KSim::Progress
*
@@ -66,8 +66,8 @@ namespace KSim
* @param value is the initial value to be displayed
* @param parent is the parent widget
*/
- Progress(int maxValue, int type, const QString &label,
- int value, QWidget *parent, const char *name = 0,
+ Progress(int maxValue, int type, const TQString &label,
+ int value, TQWidget *parent, const char *name = 0,
WFlags fl = 0);
/**
* constructs a KSim::Progress
@@ -77,7 +77,7 @@ namespace KSim
* @param type is the theme type
* @param parent is the parent widget
*/
- Progress(int maxValue, int type, QWidget *parent,
+ Progress(int maxValue, int type, TQWidget *parent,
const char *name = 0, WFlags fl = 0);
/**
* constructs a KSim::Progress
@@ -90,7 +90,7 @@ namespace KSim
*/
Progress(int maxValue, int type,
ProgressType progressType,
- QWidget *parent, const char *name = 0,
+ TQWidget *parent, const char *name = 0,
WFlags fl = 0);
/**
* destructs KSim::Chart
@@ -113,7 +113,7 @@ namespace KSim
/**
* @return the area that the progress meter will be drawn
*/
- const QRect &rectOrigin() const;
+ const TQRect &rectOrigin() const;
/**
* reimplemented for internal reasons
*/
@@ -121,7 +121,7 @@ namespace KSim
/**
* reimplemented for internal reasons
*/
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
public slots:
/**
@@ -146,11 +146,11 @@ namespace KSim
/**
* sets the area that the progess bar will be drawn
*/
- void setOrigin(const QRect &);
+ void setOrigin(const TQRect &);
/**
* sets the progress bar pixmap
*/
- void setMeterPixmap(const QPixmap &);
+ void setMeterPixmap(const TQPixmap &);
/**
* @return the pixel position where the meter should be drawn
*/
@@ -158,11 +158,11 @@ namespace KSim
/**
* reimplemented for internal reasons
*/
- virtual void paintEvent(QPaintEvent *);
+ virtual void paintEvent(TQPaintEvent *);
/**
* reimplemented for internal reasons
*/
- virtual void resizeEvent(QResizeEvent *);
+ virtual void resizeEvent(TQResizeEvent *);
/**
* paints the meter image onto the widget
*/
diff --git a/ksim/library/themeloader.cpp b/ksim/library/themeloader.cpp
index 7c42dcd..f960ef7 100644
--- a/ksim/library/themeloader.cpp
+++ b/ksim/library/themeloader.cpp
@@ -22,15 +22,15 @@
#include "themetypes.h"
#include "common.h"
-#include <qfile.h>
-#include <qstringlist.h>
-#include <qvaluevector.h>
-#include <qregexp.h>
-#include <qapplication.h>
-#include <qfileinfo.h>
-#include <qdir.h>
-#include <qimage.h>
-#include <qbitmap.h>
+#include <tqfile.h>
+#include <tqstringlist.h>
+#include <tqvaluevector.h>
+#include <tqregexp.h>
+#include <tqapplication.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
+#include <tqimage.h>
+#include <tqbitmap.h>
#include <kdebug.h>
#include <ksimpleconfig.h>
@@ -41,40 +41,40 @@
class KSim::Theme::Private
{
public:
- Private(const QValueVector<QString> &names,
- const QStringList &list) : fileNames(names),
+ Private(const TQValueVector<TQString> &names,
+ const TQStringList &list) : fileNames(names),
imageTypes(list) {}
- QStringList file;
- QStringList dFile;
+ TQStringList file;
+ TQStringList dFile;
KConfig *globalReader;
- QString altTheme;
- QString location;
- const QValueVector<QString> &fileNames;
- const QStringList &imageTypes;
+ TQString altTheme;
+ TQString location;
+ const TQValueVector<TQString> &fileNames;
+ const TQStringList &imageTypes;
int alternative;
int font;
bool recolour;
- QString readOption(const QString &entry,
+ TQString readOption(const TQString &entry,
bool useGlobal = true,
- const QString &defValue = QString::null)
+ const TQString &defValue = TQString::null)
{
- QString text;
- QStringList::ConstIterator it;
+ TQString text;
+ TQStringList::ConstIterator it;
for (it = file.begin(); it != file.end(); ++it) {
if ((*it).find(entry) != -1) {
- text = QStringList::split("=", (*it))[1].stripWhiteSpace();
+ text = TQStringList::split("=", (*it))[1].stripWhiteSpace();
}
}
if (!text.isEmpty() || dFile.isEmpty())
return text;
- QStringList::ConstIterator it2;
+ TQStringList::ConstIterator it2;
for (it2 = dFile.begin(); it2 != dFile.end(); ++it) {
if ((*it2).find(entry) != -1) {
- text = QStringList::split("=", (*it2))[1].stripWhiteSpace();
+ text = TQStringList::split("=", (*it2))[1].stripWhiteSpace();
}
}
@@ -92,11 +92,11 @@ class KSim::Theme::Private
class KSim::ThemeLoader::Private
{
public:
- QValueVector<QString> fileNames;
- QStringList imageTypes;
+ TQValueVector<TQString> fileNames;
+ TQStringList imageTypes;
KConfig *globalReader;
bool recolour;
- QColor pixelColour;
+ TQColor pixelColour;
};
bool KSim::Theme::operator==(const KSim::Theme &rhs) const
@@ -124,24 +124,24 @@ KSim::Theme::~Theme()
delete d;
}
-const QString &KSim::Theme::path() const
+const TQString &KSim::Theme::path() const
{
return d->location;
}
-QString KSim::Theme::name() const
+TQString KSim::Theme::name() const
{
- QString name = d->location;
+ TQString name = d->location;
if (name.endsWith("/"))
name.remove(name.length() - 1, 1);
return name.remove(0, name.findRev("/") + 1);
}
-QString KSim::Theme::author() const
+TQString KSim::Theme::author() const
{
- QString author(d->readOption("author", false));
- return author.replace(QRegExp("\""), QString::null);
+ TQString author(d->readOption("author", false));
+ return author.replace(TQRegExp("\""), TQString::null);
}
int KSim::Theme::fontItem() const
@@ -194,48 +194,48 @@ int KSim::Theme::frameRightWidth(int defValue) const
return KMIN(2, internalNumEntry("frame_right_width", defValue));
}
-QRect KSim::Theme::frameTopBorder(const QRect &defValue) const
+TQRect KSim::Theme::frameTopBorder(const TQRect &defValue) const
{
return internalRectEntry("frame_top_border", defValue);
}
-QRect KSim::Theme::frameBottomBorder(const QRect &defValue) const
+TQRect KSim::Theme::frameBottomBorder(const TQRect &defValue) const
{
return internalRectEntry("frame_bottom_border", defValue);
}
-QRect KSim::Theme::frameLeftBorder(const QRect &defValue) const
+TQRect KSim::Theme::frameLeftBorder(const TQRect &defValue) const
{
return internalRectEntry("frame_left_border", defValue);
}
-QRect KSim::Theme::frameRightBorder(const QRect &defValue) const
+TQRect KSim::Theme::frameRightBorder(const TQRect &defValue) const
{
return internalRectEntry("frame_right_border", defValue);
}
-QColor KSim::Theme::chartInColour(const QColor &defValue) const
+TQColor KSim::Theme::chartInColour(const TQColor &defValue) const
{
if (d->recolour)
- return QApplication::palette().active().background();
+ return TQApplication::palette().active().background();
return internalColourEntry("chart_in_color", defValue);
}
-QColor KSim::Theme::chartInColourGrid(const QColor &defValue) const
+TQColor KSim::Theme::chartInColourGrid(const TQColor &defValue) const
{
return internalColourEntry("chart_in_color_grid", defValue);
}
-QColor KSim::Theme::chartOutColour(const QColor &defValue) const
+TQColor KSim::Theme::chartOutColour(const TQColor &defValue) const
{
if (d->recolour)
- return QApplication::palette().active().background();
+ return TQApplication::palette().active().background();
return internalColourEntry("chart_out_color", defValue);
}
-QColor KSim::Theme::chartOutColourGrid(const QColor &defValue) const
+TQColor KSim::Theme::chartOutColourGrid(const TQColor &defValue) const
{
return internalColourEntry("chart_out_color_grid", defValue);
}
@@ -285,68 +285,68 @@ int KSim::Theme::krellSliderXHot(int defValue) const
return internalNumEntry("krell_slider_x_hot", defValue);
}
-QRect KSim::Theme::sliderPanel(const QRect &defValue) const
+TQRect KSim::Theme::sliderPanel(const TQRect &defValue) const
{
return internalRectEntry("bg_slider_panel_border", defValue);
}
-QRect KSim::Theme::sliderMeter(const QRect &defValue) const
+TQRect KSim::Theme::sliderMeter(const TQRect &defValue) const
{
return internalRectEntry("bg_slider_meter_border", defValue);
}
-QRect KSim::Theme::timerBorder(const QRect &defValue) const
+TQRect KSim::Theme::timerBorder(const TQRect &defValue) const
{
return internalRectEntry("bg_timer_border", defValue);
}
-QRect KSim::Theme::buttonPanelBorder(const QRect &defValue) const
+TQRect KSim::Theme::buttonPanelBorder(const TQRect &defValue) const
{
return internalRectEntry("button_panel_border", defValue);
}
-QRect KSim::Theme::buttonMeterBorder(const QRect &defValue) const
+TQRect KSim::Theme::buttonMeterBorder(const TQRect &defValue) const
{
return internalRectEntry("button_meter_border", defValue);
}
-QFont KSim::Theme::largeFont() const
+TQFont KSim::Theme::largeFont() const
{
- QString font(internalStringEntry("large_font", QString::null));
+ TQString font(internalStringEntry("large_font", TQString::null));
if (font.isEmpty())
- return QApplication::font();
+ return TQApplication::font();
- QFont themeFont;
- themeFont.setRawName(font.replace(QRegExp("\""), QString::null));
+ TQFont themeFont;
+ themeFont.setRawName(font.replace(TQRegExp("\""), TQString::null));
return themeFont;
}
-QFont KSim::Theme::normalFont() const
+TQFont KSim::Theme::normalFont() const
{
- QString font(internalStringEntry("normal_font", QString::null));
+ TQString font(internalStringEntry("normal_font", TQString::null));
if (font.isEmpty())
- return QApplication::font();
+ return TQApplication::font();
- QFont themeFont;
- themeFont.setRawName(font.replace(QRegExp("\""), QString::null));
+ TQFont themeFont;
+ themeFont.setRawName(font.replace(TQRegExp("\""), TQString::null));
return themeFont;
}
-QFont KSim::Theme::smallFont() const
+TQFont KSim::Theme::smallFont() const
{
- QString font(internalStringEntry("small_font", QString::null));
+ TQString font(internalStringEntry("small_font", TQString::null));
if (font.isEmpty())
- return QApplication::font();
+ return TQApplication::font();
- QFont themeFont;
- themeFont.setRawName(font.replace(QRegExp("\""), QString::null));
+ TQFont themeFont;
+ themeFont.setRawName(font.replace(TQRegExp("\""), TQString::null));
return themeFont;
}
-QFont KSim::Theme::currentFont() const
+TQFont KSim::Theme::currentFont() const
{
switch (fontItem()) {
case 0:
@@ -366,23 +366,23 @@ QFont KSim::Theme::currentFont() const
break;
}
- return QFont();
+ return TQFont();
}
-QString KSim::Theme::meterPixmap(int type, bool useDefault) const
+TQString KSim::Theme::meterPixmap(int type, bool useDefault) const
{
- QString imageFile = createType(type, d->location);
- QString text;
- QString file = d->fileNames[7];
+ TQString imageFile = createType(type, d->location);
+ TQString text;
+ TQString file = d->fileNames[7];
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = d->imageTypes.begin(); it != d->imageTypes.end(); ++it) {
- if (QFile::exists(imageFile + file + d->altTheme + "." + *it)) {
+ if (TQFile::exists(imageFile + file + d->altTheme + "." + *it)) {
text = imageFile + file + d->altTheme + "." + *it;
break;
}
else
- if (QFile::exists(d->location + file + d->altTheme + "." + *it)) {
+ if (TQFile::exists(d->location + file + d->altTheme + "." + *it)) {
text = d->location + file + d->altTheme + "." + *it;
break;
}
@@ -394,20 +394,20 @@ QString KSim::Theme::meterPixmap(int type, bool useDefault) const
return text;
}
-QString KSim::Theme::panelPixmap(int type, bool useDefault) const
+TQString KSim::Theme::panelPixmap(int type, bool useDefault) const
{
- QString imageFile = createType(type, d->location);
- QString text;
- QString file = d->fileNames[6];
+ TQString imageFile = createType(type, d->location);
+ TQString text;
+ TQString file = d->fileNames[6];
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = d->imageTypes.begin(); it != d->imageTypes.end(); ++it) {
- if (QFile::exists(imageFile + file + d->altTheme + "." + *it)) {
+ if (TQFile::exists(imageFile + file + d->altTheme + "." + *it)) {
text = imageFile + file + d->altTheme + "." + *it;
break;
}
else
- if (QFile::exists(d->location + file + d->altTheme + "." + *it)) {
+ if (TQFile::exists(d->location + file + d->altTheme + "." + *it)) {
text = d->location + file + d->altTheme + "." + *it;
break;
}
@@ -419,20 +419,20 @@ QString KSim::Theme::panelPixmap(int type, bool useDefault) const
return text;
}
-QString KSim::Theme::ledPixmap(int type, bool useDefault) const
+TQString KSim::Theme::ledPixmap(int type, bool useDefault) const
{
- QString imageFile = createType(type, d->location);
- QString text;
- QString file = d->fileNames[30];
+ TQString imageFile = createType(type, d->location);
+ TQString text;
+ TQString file = d->fileNames[30];
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = d->imageTypes.begin(); it != d->imageTypes.end(); ++it) {
- if (QFile::exists(imageFile + file + d->altTheme + "." + *it)) {
+ if (TQFile::exists(imageFile + file + d->altTheme + "." + *it)) {
text = imageFile + file + d->altTheme + "." + *it;
break;
}
else
- if (QFile::exists(d->location + file + d->altTheme + "." + *it)) {
+ if (TQFile::exists(d->location + file + d->altTheme + "." + *it)) {
text = d->location + file + d->altTheme + "." + *it;
break;
}
@@ -444,10 +444,10 @@ QString KSim::Theme::ledPixmap(int type, bool useDefault) const
return text;
}
-QString KSim::Theme::framePixmap(int type, bool useDefault) const
+TQString KSim::Theme::framePixmap(int type, bool useDefault) const
{
- QString text;
- QString file;
+ TQString text;
+ TQString file;
switch (type) {
case Types::TopFrame:
@@ -464,9 +464,9 @@ QString KSim::Theme::framePixmap(int type, bool useDefault) const
break;
}
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = d->imageTypes.begin(); it != d->imageTypes.end(); ++it) {
- if (QFile::exists(d->location + file + d->altTheme + "." + *it)) {
+ if (TQFile::exists(d->location + file + d->altTheme + "." + *it)) {
text = d->location + file + d->altTheme + "." + *it;
break;
}
@@ -492,55 +492,55 @@ QString KSim::Theme::framePixmap(int type, bool useDefault) const
return text;
}
-QString KSim::Theme::chartPixmap(bool useDefault) const
+TQString KSim::Theme::chartPixmap(bool useDefault) const
{
return loader(4, useDefault);
}
-QString KSim::Theme::gridPixmap(bool useDefault) const
+TQString KSim::Theme::gridPixmap(bool useDefault) const
{
return loader(5, useDefault);
}
-QString KSim::Theme::krellPanelPixmap(bool useDefault) const
+TQString KSim::Theme::krellPanelPixmap(bool useDefault) const
{
return loader(14, useDefault);
}
-QString KSim::Theme::krellMeterPixmap(bool useDefault) const
+TQString KSim::Theme::krellMeterPixmap(bool useDefault) const
{
return loader(15, useDefault);
}
-QString KSim::Theme::krellSliderPixmap(bool useDefault) const
+TQString KSim::Theme::krellSliderPixmap(bool useDefault) const
{
return loader(16, useDefault);
}
-QString KSim::Theme::dataInPixmap(bool useDefault) const
+TQString KSim::Theme::dataInPixmap(bool useDefault) const
{
return loader(18, useDefault);
}
-QString KSim::Theme::dataOutPixmap(bool useDefault) const
+TQString KSim::Theme::dataOutPixmap(bool useDefault) const
{
return loader(20, useDefault);
}
-QString KSim::Theme::mailPixmap(bool useDefault) const
+TQString KSim::Theme::mailPixmap(bool useDefault) const
{
- QString imageFile = createType(KSim::Types::Mail, d->location);
- QString text;
- QString file = d->fileNames[25];
+ TQString imageFile = createType(KSim::Types::Mail, d->location);
+ TQString text;
+ TQString file = d->fileNames[25];
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = d->imageTypes.begin(); it != d->imageTypes.end(); ++it) {
- if (QFile::exists(imageFile + file + d->altTheme + "." + *it)) {
+ if (TQFile::exists(imageFile + file + d->altTheme + "." + *it)) {
text = imageFile + file + d->altTheme + "." + *it;
break;
}
else
- if (QFile::exists(d->location + file + d->altTheme + "." + *it)) {
+ if (TQFile::exists(d->location + file + d->altTheme + "." + *it)) {
text = d->location + file + d->altTheme + "." + *it;
break;
}
@@ -548,21 +548,21 @@ QString KSim::Theme::mailPixmap(bool useDefault) const
if (text.isNull() && useDefault)
return KSim::ThemeLoader::defaultUrl()
- + createType(KSim::Types::Mail, QString::null) + file + ".png";
+ + createType(KSim::Types::Mail, TQString::null) + file + ".png";
return text;
}
-QPixmap KSim::Theme::splitPixmap(PixmapType type, uint itemNo,
+TQPixmap KSim::Theme::splitPixmap(PixmapType type, uint itemNo,
bool useDefault) const
{
return pixmapToList(type, itemNo, useDefault)[itemNo];
}
-QValueList<QPixmap> KSim::Theme::pixmapToList(PixmapType type,
+TQValueList<TQPixmap> KSim::Theme::pixmapToList(PixmapType type,
int limitAmount, bool useDefault) const
{
- QImage image;
+ TQImage image;
int xOffset = 0;
int yOffset = 0;
int depth = 0;
@@ -588,27 +588,27 @@ QValueList<QPixmap> KSim::Theme::pixmapToList(PixmapType type,
kdDebug(2003) << "KSim::Theme: type = KrellSlider" << endl;
break;
default:
- return QValueList<QPixmap>();
+ return TQValueList<TQPixmap>();
break;
}
if (image.isNull())
- return QValueList<QPixmap>();
+ return TQValueList<TQPixmap>();
- QValueList<QPixmap> list;
+ TQValueList<TQPixmap> list;
int size = image.height();
if (depth)
size = image.height() / depth;
KSim::ThemeLoader::self().reColourImage(image);
- QPixmap pixmap = image;
- QPixmap newPixmap(image.width() - xOffset, size);
+ TQPixmap pixmap = image;
+ TQPixmap newPixmap(image.width() - xOffset, size);
for (int i = 0; i < (depth + 1); ++i) {
newPixmap.fill();
if (pixmap.mask()) {
- QBitmap mask(newPixmap.size());
+ TQBitmap mask(newPixmap.size());
bitBlt(&mask, 0, 0, pixmap.mask(), xOffset, yOffset,
image.width() - xOffset, size);
newPixmap.setMask(mask);
@@ -631,33 +631,33 @@ QValueList<QPixmap> KSim::Theme::pixmapToList(PixmapType type,
return list;
}
-int KSim::Theme::transparency(const QString &itemType,
- const QString &entry) const
+int KSim::Theme::transparency(const TQString &itemType,
+ const TQString &entry) const
{
return readIntEntry(itemType, entry);
}
-bool KSim::Theme::textShadow(const QString &itemType,
- const QString &entry) const
+bool KSim::Theme::textShadow(const TQString &itemType,
+ const TQString &entry) const
{
if (d->recolour)
return false;
- QString shadow = readEntry(itemType, entry);
+ TQString shadow = readEntry(itemType, entry);
if (shadow.isEmpty() || shadow.findRev("none") != -1)
return false;
return true;
}
-QColor KSim::Theme::shadowColour(const QString &itemType,
- const QString &entry) const
+TQColor KSim::Theme::shadowColour(const TQString &itemType,
+ const TQString &entry) const
{
return readColourEntry(itemType, entry, 1);
}
-QColor KSim::Theme::textColour(const QString &itemType,
- const QString &entry) const
+TQColor KSim::Theme::textColour(const TQString &itemType,
+ const TQString &entry) const
{
if (d->recolour)
return KGlobalSettings::textColor();
@@ -665,41 +665,41 @@ QColor KSim::Theme::textColour(const QString &itemType,
return readColourEntry(itemType, entry, 0);
}
-int KSim::Theme::readIntEntry(const QString &itemType,
- const QString &entry) const
+int KSim::Theme::readIntEntry(const TQString &itemType,
+ const TQString &entry) const
{
- QString entryName = itemType + " " + entry;
+ TQString entryName = itemType + " " + entry;
return internalNumEntry(entryName, 0);
}
-QRect KSim::Theme::readRectEntry(const QString &itemType,
- const QString &entry) const
+TQRect KSim::Theme::readRectEntry(const TQString &itemType,
+ const TQString &entry) const
{
- QString entryName = itemType + " " + entry;
- return internalRectEntry(entryName, QRect());
+ TQString entryName = itemType + " " + entry;
+ return internalRectEntry(entryName, TQRect());
}
-QString KSim::Theme::readEntry(const QString &itemType,
- const QString &entry) const
+TQString KSim::Theme::readEntry(const TQString &itemType,
+ const TQString &entry) const
{
- QString entryName = itemType + " " + entry;
- return internalStringEntry(entryName, QString::null);
+ TQString entryName = itemType + " " + entry;
+ return internalStringEntry(entryName, TQString::null);
}
-QString KSim::Theme::readColourEntry(const QString &itemType,
- const QString &entry, int row) const
+TQString KSim::Theme::readColourEntry(const TQString &itemType,
+ const TQString &entry, int row) const
{
- QString color = readEntry(itemType, entry);
+ TQString color = readEntry(itemType, entry);
if (color.isEmpty())
- color = QString::fromLatin1("#ffffff #ffffff");
+ color = TQString::fromLatin1("#ffffff #ffffff");
- return QStringList::split(' ', color)[row];
+ return TQStringList::split(' ', color)[row];
}
-QFont KSim::Theme::readFontEntry(const QString &itemType,
- const QString &entry) const
+TQFont KSim::Theme::readFontEntry(const TQString &itemType,
+ const TQString &entry) const
{
- const QString &font = readEntry(itemType, entry);
+ const TQString &font = readEntry(itemType, entry);
// If only there was a better way of doing this
if (font == "small_font")
@@ -711,13 +711,13 @@ QFont KSim::Theme::readFontEntry(const QString &itemType,
if (font == "large_font")
return largeFont();
- return QFont();
+ return TQFont();
}
-bool KSim::Theme::fontColours(int type, const QString &string, QFont &font,
- QColor &text, QColor &shadow, bool &showShadow) const
+bool KSim::Theme::fontColours(int type, const TQString &string, TQFont &font,
+ TQColor &text, TQColor &shadow, bool &showShadow) const
{
- QString key = KSim::Types::typeToString(type, false);
+ TQString key = KSim::Types::typeToString(type, false);
bool repaint = false;
// set colours from the string 'key'
@@ -747,8 +747,8 @@ bool KSim::Theme::fontColours(int type, const QString &string, QFont &font,
return repaint;
}
-bool KSim::Theme::fontColours(const KSim::Base *const base, QFont &font,
- QColor &text, QColor &shadow, bool &showShadow) const
+bool KSim::Theme::fontColours(const KSim::Base *const base, TQFont &font,
+ TQColor &text, TQColor &shadow, bool &showShadow) const
{
if (!base)
return false;
@@ -762,8 +762,8 @@ KSim::Theme::Theme()
d = 0;
}
-KSim::Theme::Theme(const QString &url, const QString &fileName, int alt,
- const QValueVector<QString> &vector, const QStringList &list,
+KSim::Theme::Theme(const TQString &url, const TQString &fileName, int alt,
+ const TQValueVector<TQString> &vector, const TQStringList &list,
KConfig *globalReader)
{
create(vector, list, globalReader);
@@ -773,45 +773,45 @@ KSim::Theme::Theme(const QString &url, const QString &fileName, int alt,
d->recolour = KSim::Config::config()->readBoolEntry("ReColourTheme", false);
}
-void KSim::Theme::create(const QValueVector<QString> &vector,
- const QStringList &list, KConfig *globalReader)
+void KSim::Theme::create(const TQValueVector<TQString> &vector,
+ const TQStringList &list, KConfig *globalReader)
{
d = new Private(vector, list);
d->globalReader = globalReader;
}
-void KSim::Theme::init(const QString &url, const QString &fileName, int alt)
+void KSim::Theme::init(const TQString &url, const TQString &fileName, int alt)
{
d->altTheme = KSim::ThemeLoader::alternativeAsString(alt);
d->location = url;
d->alternative = alt;
d->font = KSim::ThemeLoader::currentFontItem();
- d->file = QStringList::split("\n", parseConfig(url, fileName));
+ d->file = TQStringList::split("\n", parseConfig(url, fileName));
if (alt != 0)
- d->dFile = QStringList::split("\n", parseConfig(url, "gkrellmrc"));
+ d->dFile = TQStringList::split("\n", parseConfig(url, "gkrellmrc"));
}
-void KSim::Theme::reparse(const QString &url, const QString &fileName, int alt)
+void KSim::Theme::reparse(const TQString &url, const TQString &fileName, int alt)
{
init(url, fileName, alt);
}
-QString KSim::Theme::parseConfig(const QString &url,
- const QString &fileName)
+TQString KSim::Theme::parseConfig(const TQString &url,
+ const TQString &fileName)
{
return KSim::ThemeLoader::self().parseConfig(url, fileName);
}
-QString KSim::Theme::loader(int value, bool useDefault) const
+TQString KSim::Theme::loader(int value, bool useDefault) const
{
- QString text;
- QString file = d->fileNames[value];
+ TQString text;
+ TQString file = d->fileNames[value];
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = d->imageTypes.begin(); it != d->imageTypes.end(); ++it) {
- if (QFile::exists(d->location + file + d->altTheme + "." + *it)) {
+ if (TQFile::exists(d->location + file + d->altTheme + "." + *it)) {
text = d->location + file + d->altTheme + "." + *it;
break;
}
@@ -823,7 +823,7 @@ QString KSim::Theme::loader(int value, bool useDefault) const
return text;
}
-QString KSim::Theme::createType(int type, const QString &text) const
+TQString KSim::Theme::createType(int type, const TQString &text) const
{
if (type == Types::None)
return text;
@@ -841,37 +841,37 @@ void KSim::Theme::setRecolour(bool value)
// Keep the ugliness here to make the rest
// of the class readable
-int KSim::Theme::internalNumEntry(const QString &entry, int defValue) const
+int KSim::Theme::internalNumEntry(const TQString &entry, int defValue) const
{
- return d->readOption(entry, true, QString::number(defValue)).toInt();
+ return d->readOption(entry, true, TQString::number(defValue)).toInt();
}
-QRect KSim::Theme::internalRectEntry(const QString &entry,
- const QRect &defValue) const
+TQRect KSim::Theme::internalRectEntry(const TQString &entry,
+ const TQRect &defValue) const
{
- QString rect;
- rect += QString::number(defValue.left());
+ TQString rect;
+ rect += TQString::number(defValue.left());
rect += ",";
- rect += QString::number(defValue.top());
+ rect += TQString::number(defValue.top());
rect += ",";
- rect += QString::number(defValue.width());
+ rect += TQString::number(defValue.width());
rect += ",";
- rect += QString::number(defValue.height());
+ rect += TQString::number(defValue.height());
- QStringList list = QStringList::split(",", d->readOption(entry, true, rect));
- QRect rect2(list[0].toInt(), list[1].toInt(), list[2].toInt(), list[3].toInt());
+ TQStringList list = TQStringList::split(",", d->readOption(entry, true, rect));
+ TQRect rect2(list[0].toInt(), list[1].toInt(), list[2].toInt(), list[3].toInt());
return rect2;
}
-QColor KSim::Theme::internalColourEntry(const QString &entry,
- const QColor &defValue) const
+TQColor KSim::Theme::internalColourEntry(const TQString &entry,
+ const TQColor &defValue) const
{
return d->readOption(entry, true, defValue.name());
}
-QString KSim::Theme::internalStringEntry(const QString &entry,
- const QString &defValue) const
+TQString KSim::Theme::internalStringEntry(const TQString &entry,
+ const TQString &defValue) const
{
return d->readOption(entry, true, defValue);
}
@@ -927,7 +927,7 @@ void KSim::ThemeLoader::reload()
if (m_theme.d)
m_theme.d->globalReader = d->globalReader;
- QString fileName = QString::fromLatin1("gkrellmrc") + alternativeAsString();
+ TQString fileName = TQString::fromLatin1("gkrellmrc") + alternativeAsString();
m_theme.reparse(currentUrl(), fileName, currentAlternative());
}
@@ -936,20 +936,20 @@ const KSim::Theme &KSim::ThemeLoader::current() const
return m_theme;
}
-KSim::Theme KSim::ThemeLoader::theme(const QString &url,
- const QString &rcFile, int alt) const
+KSim::Theme KSim::ThemeLoader::theme(const TQString &url,
+ const TQString &rcFile, int alt) const
{
return KSim::Theme(url, rcFile, alt, d->fileNames,
d->imageTypes, d->globalReader);
}
-void KSim::ThemeLoader::reColourImage(QImage &image)
+void KSim::ThemeLoader::reColourImage(TQImage &image)
{
if (!d->recolour || image.isNull())
return;
- QColor color = QApplication::palette().active().background();
- QImage output(image.width(), image.height(), 32);
+ TQColor color = TQApplication::palette().active().background();
+ TQImage output(image.width(), image.height(), 32);
output.setAlphaBuffer(image.hasAlphaBuffer());
Q_UINT32 r = color.red();
@@ -980,22 +980,22 @@ void KSim::ThemeLoader::reColourImage(QImage &image)
image = output;
}
-QString KSim::ThemeLoader::parseConfig(const QString &url,
- const QString &fileName)
+TQString KSim::ThemeLoader::parseConfig(const TQString &url,
+ const TQString &fileName)
{
- QFile origFile(url + fileName);
+ TQFile origFile(url + fileName);
if (!origFile.open(IO_ReadOnly))
- return QString::null;
-
- QTextStream origStream(&origFile);
- QString text;
- QRegExp reg("\\*"); // regexp for '*' chars
- QRegExp number("[0-9]+"); // regexp for all numbers
- QRegExp numbers("[0-9]+,[0-9]+,[0-9]+,[0-9]+"); // regexp for int,int,int,int
- QRegExp minus("[a-zA-Z]+ \\- [a-zA-Z]+"); // regexp for 'someText - someText'
+ return TQString::null;
+
+ TQTextStream origStream(&origFile);
+ TQString text;
+ TQRegExp reg("\\*"); // regexp for '*' chars
+ TQRegExp number("[0-9]+"); // regexp for all numbers
+ TQRegExp numbers("[0-9]+,[0-9]+,[0-9]+,[0-9]+"); // regexp for int,int,int,int
+ TQRegExp minus("[a-zA-Z]+ \\- [a-zA-Z]+"); // regexp for 'someText - someText'
while (!origStream.atEnd()) {
- QString line(origStream.readLine().simplifyWhiteSpace());
+ TQString line(origStream.readLine().simplifyWhiteSpace());
if (line.find(reg) == 0) // find the location of the * comments
// replace all * comments with # comments so KConfig doesn't complain
@@ -1016,7 +1016,7 @@ QString KSim::ThemeLoader::parseConfig(const QString &url,
numLoc = line.findRev(minus);
if (numLoc != -1)
// replace the '-' with an '=' so KConfig doesn't get confused
- line.replace(QRegExp("-"), "=");
+ line.replace(TQRegExp("-"), "=");
}
}
@@ -1030,50 +1030,50 @@ QString KSim::ThemeLoader::parseConfig(const QString &url,
// so the following code changes the dir structure
// of a theme to be more consistant, but the dir structure
// is still compliant with GKrellM.
-void KSim::ThemeLoader::parseDir(const QString &url, int alt)
+void KSim::ThemeLoader::parseDir(const TQString &url, int alt)
{
- if ( !QFileInfo( url ).isWritable() && currentName() != "ksim" )
+ if ( !TQFileInfo( url ).isWritable() && currentName() != "ksim" )
{
- QString homePath = QDir::current().path();
+ TQString homePath = TQDir::current().path();
homePath = locateLocal( "data", "ksim" )
- + QString::fromLatin1( "/themes" )
+ + TQString::fromLatin1( "/themes" )
+ homePath.right( homePath.length()
- - homePath.findRev( QRegExp( "\\/" ),
+ - homePath.findRev( TQRegExp( "\\/" ),
homePath.length() ) );
- if ( !QFile::exists( homePath ) )
+ if ( !TQFile::exists( homePath ) )
KStandardDirs::makeDir( homePath );
kdWarning() << "Cant write to current dir, setting dir to "
<< homePath << endl;
- QDir::setCurrent( homePath );
+ TQDir::setCurrent( homePath );
}
int alternatives = ++alt;
- QStringList formats;
- QStringList panels;
- QStringList meters;
+ TQStringList formats;
+ TQStringList panels;
+ TQStringList meters;
formats << "png" << "jpg" << "jpeg" << "gif" << "xpm";
panels << "inet" << "net" << "proc" << "cpu" << "disk";
meters << "mem" << "fs" << "mail" << "apm" << "uptime"
<< "clock" << "cal" << "timer" << "host" << "swap";
- QDir directory;
+ TQDir directory;
for (int i = 0; i < alternatives; ++i) {
- QString altString = KSim::ThemeLoader::alternativeAsString(i);
+ TQString altString = KSim::ThemeLoader::alternativeAsString(i);
if (alternatives == 1 || i == 0)
- altString = QString::null;
+ altString = TQString::null;
- QStringList::ConstIterator format;
+ TQStringList::ConstIterator format;
for (format = formats.begin(); format != formats.end(); ++format) {
// go through the meters array and move the files to the correct dir/filename
- QStringList::Iterator meter;
+ TQStringList::Iterator meter;
for (meter = meters.begin(); meter != meters.end(); ++meter) {
- QString bgMeter = QString::fromLatin1("bg_meter_");
- if (QFile::exists(bgMeter + (*meter) + altString + "." + (*format))) {
+ TQString bgMeter = TQString::fromLatin1("bg_meter_");
+ if (TQFile::exists(bgMeter + (*meter) + altString + "." + (*format))) {
if (KStandardDirs::makeDir(url + (*meter)))
directory.rename(bgMeter + (*meter) + altString + "." + (*format),
(*meter) + "/bg_meter" + altString + "." + (*format));
@@ -1081,10 +1081,10 @@ void KSim::ThemeLoader::parseDir(const QString &url, int alt)
}
// go through the panels array and move the files to the correct dir/filename
- QStringList::ConstIterator panel;
+ TQStringList::ConstIterator panel;
for (panel = panels.begin(); panel != panels.end(); ++panel) {
- QString bgPanel = QString::fromLatin1("bg_panel_");
- if (QFile::exists(bgPanel + (*panel) + altString + "." + (*format))) {
+ TQString bgPanel = TQString::fromLatin1("bg_panel_");
+ if (TQFile::exists(bgPanel + (*panel) + altString + "." + (*format))) {
if (KStandardDirs::makeDir(url + (*panel)))
directory.rename(bgPanel + (*panel) + altString + "." + (*format),
(*panel) + "/bg_panel" + altString + "." + (*format));
@@ -1092,14 +1092,14 @@ void KSim::ThemeLoader::parseDir(const QString &url, int alt)
}
// fix stupid themes that have a bg_panel image in the host dir
- QString tempFile = QString::fromLatin1("host/bg_panel");
- if (QFile::exists(tempFile + altString + "." + (*format)))
+ TQString tempFile = TQString::fromLatin1("host/bg_panel");
+ if (TQFile::exists(tempFile + altString + "." + (*format)))
directory.rename(tempFile + altString + "." + (*format), "host/bg_meter"
+ altString + "." + (*format));
// move decal_net_leds* to the net folder to be more consistant
- tempFile = QString::fromLatin1("decal_net_leds");
- if (QFile::exists(tempFile + altString + "." + (*format))) {
+ tempFile = TQString::fromLatin1("decal_net_leds");
+ if (TQFile::exists(tempFile + altString + "." + (*format))) {
if (KStandardDirs::makeDir(url + "net"))
directory.rename(tempFile + altString + "." + (*format),
"net/decal_net_leds" + altString + "." + (*format));
@@ -1110,7 +1110,7 @@ void KSim::ThemeLoader::parseDir(const QString &url, int alt)
void KSim::ThemeLoader::validate()
{
- if (!QFile::exists(currentUrl())) {
+ if (!TQFile::exists(currentUrl())) {
KSim::Config::config()->setGroup("Theme");
KSim::Config::config()->writeEntry("Name", "ksim");
KSim::Config::config()->writeEntry("Alternative", 0);
@@ -1118,29 +1118,29 @@ void KSim::ThemeLoader::validate()
}
}
-void KSim::ThemeLoader::themeColours(QWidget *widget)
+void KSim::ThemeLoader::themeColours(TQWidget *widget)
{
widget->setEraseColor(d->pixelColour);
}
-QString KSim::ThemeLoader::currentName()
+TQString KSim::ThemeLoader::currentName()
{
KSim::Config::config()->setGroup("Theme");
return KSim::Config::config()->readEntry("Name", "ksim");
}
-QString KSim::ThemeLoader::currentUrl()
+TQString KSim::ThemeLoader::currentUrl()
{
KSim::Config::config()->setGroup("Theme");
- QString folder(KSim::Config::config()->readEntry("Name"));
+ TQString folder(KSim::Config::config()->readEntry("Name"));
folder.prepend("ksim/themes/").append("/");
- QString dirName(KGlobal::dirs()->findResourceDir("data", folder));
+ TQString dirName(KGlobal::dirs()->findResourceDir("data", folder));
dirName += folder;
return dirName;
}
-QString KSim::ThemeLoader::defaultUrl()
+TQString KSim::ThemeLoader::defaultUrl()
{
return KGlobal::dirs()->findDirs("data", "ksim/themes/ksim").first();
}
@@ -1156,14 +1156,14 @@ int KSim::ThemeLoader::currentAlternative()
return alternative;
}
-QString KSim::ThemeLoader::alternativeAsString(int alt)
+TQString KSim::ThemeLoader::alternativeAsString(int alt)
{
int alternative = (alt == -1 ? currentAlternative() : alt);
- return (alternative == 0 ? QString::null : QString::fromLatin1("_")
- + QString::number(alternative));
+ return (alternative == 0 ? TQString::null : TQString::fromLatin1("_")
+ + TQString::number(alternative));
}
-QFont KSim::ThemeLoader::currentFont()
+TQFont KSim::ThemeLoader::currentFont()
{
if (currentFontItem() != 3)
return self().current().currentFont();
@@ -1225,7 +1225,7 @@ KSim::ThemeLoader::ThemeLoader()
m_theme.create(d->fileNames, d->imageTypes, d->globalReader);
- QString fileName = QString::fromLatin1("gkrellmrc") + alternativeAsString();
+ TQString fileName = TQString::fromLatin1("gkrellmrc") + alternativeAsString();
m_theme.init(currentUrl(), fileName, currentAlternative());
reColourItems();
@@ -1257,10 +1257,10 @@ void KSim::ThemeLoader::reColourItems()
void KSim::ThemeLoader::grabColour()
{
KSim::Config::config()->setGroup("Theme");
- QPoint pos(2, 2);
+ TQPoint pos(2, 2);
pos = KSim::Config::config()->readPointEntry("PixelLocation", &pos);
- QImage image(current().meterPixmap(Types::None));
+ TQImage image(current().meterPixmap(Types::None));
reColourImage(image);
d->pixelColour = image.pixel(pos.x(), pos.y());
}
diff --git a/ksim/library/themeloader.h b/ksim/library/themeloader.h
index c20afe0..28a38e6 100644
--- a/ksim/library/themeloader.h
+++ b/ksim/library/themeloader.h
@@ -20,11 +20,11 @@
#ifndef THEMELOADER_H
#define THEMELOADER_H
-#include <qstring.h>
-#include <qrect.h>
-#include <qcolor.h>
-#include <qfont.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqrect.h>
+#include <tqcolor.h>
+#include <tqfont.h>
+#include <tqvaluelist.h>
#include <kdemacros.h>
@@ -56,15 +56,15 @@ namespace KSim
/**
* @return the theme path
*/
- const QString &path() const;
+ const TQString &path() const;
/**
* @return the name of the theme
*/
- QString name() const;
+ TQString name() const;
/**
* @return the author of the theme
*/
- QString author() const;
+ TQString author() const;
/**
* @return the set font item for the theme
*/
@@ -105,35 +105,35 @@ namespace KSim
/**
* @return a rect of the top frame border
*/
- QRect frameTopBorder(const QRect &defValue = QRect()) const;
+ TQRect frameTopBorder(const TQRect &defValue = TQRect()) const;
/**
* @return a rect of the bottom frame border
*/
- QRect frameBottomBorder(const QRect &defValue = QRect()) const;
+ TQRect frameBottomBorder(const TQRect &defValue = TQRect()) const;
/**
* @return a rect of the left frame border
*/
- QRect frameLeftBorder(const QRect &defValue = QRect()) const;
+ TQRect frameLeftBorder(const TQRect &defValue = TQRect()) const;
/**
* @return a rect of the right frame border
*/
- QRect frameRightBorder(const QRect &defValue = QRect()) const;
+ TQRect frameRightBorder(const TQRect &defValue = TQRect()) const;
/**
* @return the color of the chart in
*/
- QColor chartInColour(const QColor &defValue = QColor()) const;
+ TQColor chartInColour(const TQColor &defValue = TQColor()) const;
/**
* @return the color of the chart in grid
*/
- QColor chartInColourGrid(const QColor &defValue = QColor()) const;
+ TQColor chartInColourGrid(const TQColor &defValue = TQColor()) const;
/**
* @return the color of the chart out
*/
- QColor chartOutColour(const QColor &defValue = QColor()) const;
+ TQColor chartOutColour(const TQColor &defValue = TQColor()) const;
/**
* @return the color of the chart out grid
*/
- QColor chartOutColourGrid(const QColor &defValue = QColor()) const;
+ TQColor chartOutColourGrid(const TQColor &defValue = TQColor()) const;
/**
* if false then the grid lines should be drawn at the
* top and bottom of the graphs
@@ -174,40 +174,40 @@ namespace KSim
/**
* @return the area for the slider panel
*/
- QRect sliderPanel(const QRect &defValue = QRect()) const;
+ TQRect sliderPanel(const TQRect &defValue = TQRect()) const;
/**
* @return the area for the slider meter
*/
- QRect sliderMeter(const QRect &defValue = QRect()) const;
+ TQRect sliderMeter(const TQRect &defValue = TQRect()) const;
/**
* @return the border for the timer label/button
*/
- QRect timerBorder(const QRect &defValue = QRect()) const;
+ TQRect timerBorder(const TQRect &defValue = TQRect()) const;
/**
* @return the border for the panel button
*/
- QRect buttonPanelBorder(const QRect &defValue = QRect()) const;
+ TQRect buttonPanelBorder(const TQRect &defValue = TQRect()) const;
/**
* @return the border for the meter button
*/
- QRect buttonMeterBorder(const QRect &defValue = QRect()) const;
+ TQRect buttonMeterBorder(const TQRect &defValue = TQRect()) const;
/**
* @return the large font that the theme specifies
*/
- QFont largeFont() const;
+ TQFont largeFont() const;
/**
* @return the normal font that the theme specifies
*/
- QFont normalFont() const;
+ TQFont normalFont() const;
/**
* @return the small font that the theme specifies
*/
- QFont smallFont() const;
+ TQFont smallFont() const;
/**
* @return the current font to be used
* according to fontItem()
*/
- QFont currentFont() const;
+ TQFont currentFont() const;
/**
* @return the meter image (bg_meter.[png|jpg|gif])
* of the current theme, if type is specified then it will
@@ -218,14 +218,14 @@ namespace KSim
* @param type is one of: none, apm, cal, clock, fs,
* host, mail, mem, swap, timer, uptime
*/
- QString meterPixmap(int type, bool useDefault = true) const;
+ TQString meterPixmap(int type, bool useDefault = true) const;
/**
* @return the meter image (bg_panel.[png|jpg|gif])
* of the current theme, it will first look in the dir 'type'
* if no image is found it will drop back a dir
* @param type is one of: net, inet
*/
- QString panelPixmap(int type, bool useDefault = true) const;
+ TQString panelPixmap(int type, bool useDefault = true) const;
/**
* @return the decal net leds image
* (usually decal_net_leds.[png|jpg|gif]) of the
@@ -233,57 +233,57 @@ namespace KSim
* if no image is found it will drop back a dir
* @param type is one of: net, inet
*/
- QString ledPixmap(int type, bool useDefault = true) const;
+ TQString ledPixmap(int type, bool useDefault = true) const;
/**
* @return the frame image of the current theme,
* @param type is one of: top, bottom, left, right
*/
- QString framePixmap(int type, bool useDefault = true) const;
+ TQString framePixmap(int type, bool useDefault = true) const;
/**
* @return the krell chart image (bg_chart.[png|jpg|gif])
* of the current theme
*/
- QString chartPixmap(bool useDefault = true) const;
+ TQString chartPixmap(bool useDefault = true) const;
/**
* @return the krell grid image (bg_grid.[png|jpg|gif])
* of the current theme
*/
- QString gridPixmap(bool useDefault = true) const;
+ TQString gridPixmap(bool useDefault = true) const;
/**
* @return the krell panel image (krell_panel.[png|jpg|gif])
* of the current theme
*/
- QString krellPanelPixmap(bool useDefault = true) const;
+ TQString krellPanelPixmap(bool useDefault = true) const;
/**
* @return the krell meter image (krell_meter.[png|jpg|gif])
* of the current theme
*/
- QString krellMeterPixmap(bool useDefault = true) const;
+ TQString krellMeterPixmap(bool useDefault = true) const;
/**
* @return the krell slider image (krell_slider.[png|jpg|gif])
* of the current theme
*/
- QString krellSliderPixmap(bool useDefault = true) const;
+ TQString krellSliderPixmap(bool useDefault = true) const;
/**
* @return the data in image (data_in.[png|jpg|gif])
* of the current theme
*/
- QString dataInPixmap(bool useDefault = true) const;
+ TQString dataInPixmap(bool useDefault = true) const;
/**
* @return the data out image (data_out.[png|jpg|gif])
* of the current theme
*/
- QString dataOutPixmap(bool useDefault = true) const;
+ TQString dataOutPixmap(bool useDefault = true) const;
/**
* @return the mail image (mail/decal_mail.[png|jpg|gif])
* of the current theme
*/
- QString mailPixmap(bool useDefault = true) const;
+ TQString mailPixmap(bool useDefault = true) const;
/**
* @return a segmant of an image, using @p itemNo to
* get the segmant and from the ImageType @p type
*/
- QPixmap splitPixmap(PixmapType type, uint itemNo = 0,
+ TQPixmap splitPixmap(PixmapType type, uint itemNo = 0,
bool useDefault = true) const;
/**
* Same as the above function but returns an array of pixmaps
@@ -291,44 +291,44 @@ namespace KSim
* limitAmount is -1 (default)
* @return an array of pixmaps
*/
- QValueList<QPixmap> pixmapToList(PixmapType type,
+ TQValueList<TQPixmap> pixmapToList(PixmapType type,
int limitAmount = -1, bool useDefault = true) const;
/**
* returns the transparency level from the specified keys
*/
- int transparency(const QString &, const QString &) const;
+ int transparency(const TQString &, const TQString &) const;
/**
* @return true if shadow text is enabled
*/
- bool textShadow(const QString &, const QString &) const;
+ bool textShadow(const TQString &, const TQString &) const;
/**
* @return the shadow color (if any) for the specified keys
*/
- QColor shadowColour(const QString &, const QString &) const;
+ TQColor shadowColour(const TQString &, const TQString &) const;
/**
* @return the text color for the specified keys
*/
- QColor textColour(const QString &, const QString &) const;
+ TQColor textColour(const TQString &, const TQString &) const;
/**
* reads an entry and returns it as an int
*/
- int readIntEntry(const QString &, const QString &) const;
+ int readIntEntry(const TQString &, const TQString &) const;
/**
* @return a rect from the specified keys
*/
- QRect readRectEntry(const QString &, const QString &) const;
+ TQRect readRectEntry(const TQString &, const TQString &) const;
/**
* reads an entry from the specified keys
*/
- QString readEntry(const QString &, const QString &) const;
+ TQString readEntry(const TQString &, const TQString &) const;
/**
* reads a color entry from the specified keys
*/
- QString readColourEntry(const QString &, const QString &, int) const;
+ TQString readColourEntry(const TQString &, const TQString &, int) const;
/**
* reads a font entry from the specified keys
*/
- QFont readFontEntry(const QString &, const QString &) const;
+ TQFont readFontEntry(const TQString &, const TQString &) const;
/**
* sets the font, textColour, shadowColour and showShadow to
* the fonts and colours KSim should use depending on type and
@@ -340,8 +340,8 @@ namespace KSim
*
* example usage:
* <pre>
- * QFont font;
- * QColor textColour, shadowColour;
+ * TQFont font;
+ * TQColor textColour, shadowColour;
* bool showShadow;
* if (KSim::ThemeLoader::self().current().fontColours(type(), configString(), font,
* textColour, shadowColour, showShadow)
@@ -356,35 +356,35 @@ namespace KSim
* from, generally if you're calling this from a KSim::Base (or derived from)
* object then use configString()
*/
- bool fontColours(int type, const QString &string, QFont &font,
- QColor &textColour, QColor &shadowColour, bool &showShadow) const;
+ bool fontColours(int type, const TQString &string, TQFont &font,
+ TQColor &textColour, TQColor &shadowColour, bool &showShadow) const;
/**
* convenience function.
*
* collects the theme type and config key from the base pointer
*/
- bool fontColours(const KSim::Base *const base, QFont &font,
- QColor &textColour, QColor &shadowColour, bool &showShadow) const;
+ bool fontColours(const KSim::Base *const base, TQFont &font,
+ TQColor &textColour, TQColor &shadowColour, bool &showShadow) const;
Theme(const KSim::Theme &);
private:
Theme();
- Theme(const QString &url, const QString &fileName, int alt,
- const QValueVector<QString> &vector, const QStringList &list,
+ Theme(const TQString &url, const TQString &fileName, int alt,
+ const TQValueVector<TQString> &vector, const TQStringList &list,
KConfig *globalReader);
- void create(const QValueVector<QString> &, const QStringList &, KConfig *);
- void init(const QString &url, const QString &fileName, int alt);
- void reparse(const QString &url, const QString &fileName, int alt);
- QString parseConfig(const QString &, const QString &);
- QString loader(int, bool useDefault = true) const;
- QString createType(int, const QString &) const;
+ void create(const TQValueVector<TQString> &, const TQStringList &, KConfig *);
+ void init(const TQString &url, const TQString &fileName, int alt);
+ void reparse(const TQString &url, const TQString &fileName, int alt);
+ TQString parseConfig(const TQString &, const TQString &);
+ TQString loader(int, bool useDefault = true) const;
+ TQString createType(int, const TQString &) const;
void setRecolour(bool);
- int internalNumEntry(const QString &, int) const;
- QRect internalRectEntry(const QString &, const QRect &) const;
- QColor internalColourEntry(const QString &, const QColor &) const;
- QString internalStringEntry(const QString &, const QString &) const;
+ int internalNumEntry(const TQString &, int) const;
+ TQRect internalRectEntry(const TQString &, const TQRect &) const;
+ TQColor internalColourEntry(const TQString &, const TQColor &) const;
+ TQString internalStringEntry(const TQString &, const TQString &) const;
class Private;
Private *d;
@@ -422,24 +422,24 @@ namespace KSim
* @param rcFile is the filename of the config file (optional)
* @param alt is the theme alternative number (optional)
*/
- KSim::Theme theme(const QString &url,
- const QString &rcFile = "gkrellmrc", int alt = 0) const;
+ KSim::Theme theme(const TQString &url,
+ const TQString &rcFile = "gkrellmrc", int alt = 0) const;
/**
* re-colours an image to the current KDE
* color scheme
*/
- void reColourImage(QImage &image);
+ void reColourImage(TQImage &image);
/**
* changes some of the entries in the config file so kconfig
* can handle the file better.
* @return the location of the config file
*/
- QString parseConfig(const QString &url, const QString &file);
+ TQString parseConfig(const TQString &url, const TQString &file);
/**
* change the dir structure of a theme directory
* so KSim can understand them better
*/
- void parseDir(const QString &url, int alt);
+ void parseDir(const TQString &url, int alt);
/**
* checks if the themeUrl entry is valid,
* if not it then reverts the current theme
@@ -449,20 +449,20 @@ namespace KSim
/**
* sets the pallete of the current theme
*/
- void themeColours(QWidget *);
+ void themeColours(TQWidget *);
/**
* @return current theme name
*/
- static QString currentName();
+ static TQString currentName();
/**
* @return current theme url, if there is no current theme
* then it will return the default theme
*/
- static QString currentUrl();
+ static TQString currentUrl();
/**
* @return the default theme url
*/
- static QString defaultUrl();
+ static TQString defaultUrl();
/**
* @return the current theme alternative
*/
@@ -475,11 +475,11 @@ namespace KSim
* if this is set to -1 (the default) then the current alternative
* will be used
*/
- static QString alternativeAsString(int alt = -1);
+ static TQString alternativeAsString(int alt = -1);
/**
* @return the font of the theme if the theme font is set to custom
*/
- static QFont currentFont();
+ static TQFont currentFont();
/**
* @return the font item of the theme, eg: 0 would be the small font
*/
diff --git a/ksim/library/themetypes.h b/ksim/library/themetypes.h
index 805302c..0f34fbf 100644
--- a/ksim/library/themetypes.h
+++ b/ksim/library/themetypes.h
@@ -58,10 +58,10 @@ namespace KSim
/**
* @return the ThemeType enum as a QString
*/
- inline QString typeToString(int type, bool incSlash = true)
+ inline TQString typeToString(int type, bool incSlash = true)
{
if (type == Types::None)
- return QString::null;
+ return TQString::null;
// This array MUST be in the same order
// as the ThemeType enum
@@ -72,9 +72,9 @@ namespace KSim
"uptime", "net", "inet", 0
};
- QString returnString;
+ TQString returnString;
returnString.setLatin1(typeNames[type]);
- return incSlash ? returnString + QString::fromLatin1("/") : returnString;
+ return incSlash ? returnString + TQString::fromLatin1("/") : returnString;
}
}
}
diff --git a/ksim/monitorprefs.cpp b/ksim/monitorprefs.cpp
index 1e67945..0038c85 100644
--- a/ksim/monitorprefs.cpp
+++ b/ksim/monitorprefs.cpp
@@ -29,7 +29,7 @@
#include <ksimconfig.h>
#include <pluginloader.h>
-KSim::MonitorPrefs::MonitorPrefs(QWidget *parent, const char *name)
+KSim::MonitorPrefs::MonitorPrefs(TQWidget *parent, const char *name)
: KListView(parent, name)
{
addColumn(i18n("Monitor"));
@@ -42,15 +42,15 @@ KSim::MonitorPrefs::MonitorPrefs(QWidget *parent, const char *name)
setDragEnabled(true);
setAcceptDrops(true);
setAllColumnsShowFocus(true);
- setSelectionMode(QListView::Single);
+ setSelectionMode(TQListView::Single);
// Scan for .desktop files and enter them into the KListView
m_locatedFiles = KGlobal::dirs()->findAllResources("data", "ksim/monitors/*.desktop");
m_locatedFiles.sort();
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = m_locatedFiles.begin(); it != m_locatedFiles.end(); ++it) {
KDesktopFile file((*it), true);
- (void)(new QCheckListItem(this, file.readName(), QCheckListItem::CheckBox))->setText(1, file.readComment());
+ (void)(new TQCheckListItem(this, file.readName(), TQCheckListItem::CheckBox))->setText(1, file.readComment());
}
sort();
@@ -63,11 +63,11 @@ KSim::MonitorPrefs::~MonitorPrefs()
void KSim::MonitorPrefs::saveConfig(KSim::Config *config)
{
- QCheckListItem *item;
- QStringList::ConstIterator it;
+ TQCheckListItem *item;
+ TQStringList::ConstIterator it;
for (it = m_locatedFiles.begin(); it != m_locatedFiles.end(); ++it) {
KSim::PluginInfo info = KSim::PluginLoader::self().findPluginInfo((*it));
- item = static_cast<QCheckListItem *>(findItem(info.name(), 0));
+ item = static_cast<TQCheckListItem *>(findItem(info.name(), 0));
config->setEnabledMonitor(info.libName(), item->isOn());
config->setMonitorCommand(info.libName(), item->text(2));
config->setMonitorLocation(info.libName(), itemIndex(item));
@@ -77,15 +77,15 @@ void KSim::MonitorPrefs::saveConfig(KSim::Config *config)
void KSim::MonitorPrefs::readConfig(KSim::Config *config)
{
int location;
- QCheckListItem *origItem;
- QStringList::ConstIterator it;
+ TQCheckListItem *origItem;
+ TQStringList::ConstIterator it;
for (it = m_locatedFiles.begin(); it != m_locatedFiles.end(); ++it) {
KSim::PluginInfo info = KSim::PluginLoader::self().findPluginInfo((*it));
location = config->monitorLocation(info.libName());
- origItem = static_cast<QCheckListItem *>(findItem(info.name(), 0));
+ origItem = static_cast<TQCheckListItem *>(findItem(info.name(), 0));
origItem->setOn(config->enabledMonitor(info.libName()));
origItem->setText(2, config->monitorCommand(info.libName()));
- if (QListViewItem *item = itemAtIndex(location)) {
+ if (TQListViewItem *item = itemAtIndex(location)) {
if (location) {
origItem->moveItem(item->itemAbove());
}
diff --git a/ksim/monitorprefs.h b/ksim/monitorprefs.h
index 6cb4798..03f3d5f 100644
--- a/ksim/monitorprefs.h
+++ b/ksim/monitorprefs.h
@@ -21,7 +21,7 @@
#define MONITORPREFS_H
#include <klistview.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
namespace KSim
{
@@ -31,7 +31,7 @@ namespace KSim
{
Q_OBJECT
public:
- MonitorPrefs(QWidget *parent, const char *name=0);
+ MonitorPrefs(TQWidget *parent, const char *name=0);
~MonitorPrefs();
public slots:
@@ -39,7 +39,7 @@ namespace KSim
void readConfig(KSim::Config *);
private:
- QStringList m_locatedFiles;
+ TQStringList m_locatedFiles;
};
}
#endif
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;
diff --git a/ksim/themeprefs.cpp b/ksim/themeprefs.cpp
index 3951f61..f2aa04d 100644
--- a/ksim/themeprefs.cpp
+++ b/ksim/themeprefs.cpp
@@ -20,11 +20,11 @@
#include "themeprefs.h"
#include "themeprefs.moc"
-#include <qdir.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qlabel.h>
-#include <qregexp.h>
+#include <tqdir.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqlabel.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kdebug.h>
@@ -46,7 +46,7 @@
class ThemeViewItem : public KListViewItem
{
public:
- ThemeViewItem(QListView *parent, const QString &text,
+ ThemeViewItem(TQListView *parent, const TQString &text,
const KURL &url) : KListViewItem(parent, text)
{
m_url = url;
@@ -58,52 +58,52 @@ class ThemeViewItem : public KListViewItem
KURL m_url;
};
-KSim::ThemePrefs::ThemePrefs(QWidget *parent, const char *name)
- : QWidget(parent, name)
+KSim::ThemePrefs::ThemePrefs(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
- m_themeLayout = new QGridLayout(this);
+ m_themeLayout = new TQGridLayout(this);
m_themeLayout->setSpacing(6);
- m_label = new QLabel(this);
+ m_label = new TQLabel(this);
m_label->setText(i18n("GKrellm theme support. To use"
" gkrellm themes just untar the themes into the folder below"));
- m_label->setAlignment(QLabel::WordBreak |
- QLabel::AlignVCenter | QLabel::AlignLeft);
+ m_label->setAlignment(TQLabel::WordBreak |
+ TQLabel::AlignVCenter | TQLabel::AlignLeft);
m_themeLayout->addMultiCellWidget(m_label, 0, 0, 0, 4);
- QString themeDir(locateLocal("data", "ksim"));
- themeDir += QString::fromLatin1("/themes");
+ TQString themeDir(locateLocal("data", "ksim"));
+ themeDir += TQString::fromLatin1("/themes");
m_urlLabel = new KURLLabel(this);
m_urlLabel->setText(i18n("Open Konqueror in KSim's theme folder"));
- m_urlLabel->setURL(QString::fromLatin1("file://") + themeDir);
- connect(m_urlLabel, SIGNAL(leftClickedURL(const QString &)),
- this, SLOT(openURL(const QString &)));
+ m_urlLabel->setURL(TQString::fromLatin1("file://") + themeDir);
+ connect(m_urlLabel, TQT_SIGNAL(leftClickedURL(const TQString &)),
+ this, TQT_SLOT(openURL(const TQString &)));
m_themeLayout->addMultiCellWidget(m_urlLabel, 1, 1, 0, 4);
m_line = new KSeparator(Horizontal, this);
m_themeLayout->addMultiCellWidget(m_line, 2, 2, 0, 4);
- m_authorLabel = new QLabel(this);
- m_authorLabel->setSizePolicy(QSizePolicy(QSizePolicy::Fixed,
- QSizePolicy::Minimum));
+ m_authorLabel = new TQLabel(this);
+ m_authorLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed,
+ TQSizePolicy::Minimum));
m_authorLabel->setText(i18n("Author:"));
m_themeLayout->addMultiCellWidget(m_authorLabel, 3, 3, 0, 0);
m_authLabel = new KSqueezedTextLabel(this);
- m_authLabel->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,
- QSizePolicy::Minimum));
+ m_authLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding,
+ TQSizePolicy::Minimum));
m_authLabel->setText(i18n("None"));
m_themeLayout->addMultiCellWidget(m_authLabel, 3, 3, 1, 4);
m_listView = new KListView(this);
m_listView->addColumn(i18n("Theme"));
m_listView->setFullWidth(true);
- connect(m_listView, SIGNAL(currentChanged(QListViewItem *)),
- this, SLOT(selectItem(QListViewItem *)));
+ connect(m_listView, TQT_SIGNAL(currentChanged(TQListViewItem *)),
+ this, TQT_SLOT(selectItem(TQListViewItem *)));
m_themeLayout->addMultiCellWidget(m_listView, 4, 4, 0, 4);
- m_alternateLabel = new QLabel(this);
+ m_alternateLabel = new TQLabel(this);
m_alternateLabel->setText(i18n("Alternate themes:"));
m_alternateLabel->setAlignment(AlignVCenter | AlignRight);
m_themeLayout->addMultiCellWidget(m_alternateLabel, 5, 5, 0, 1);
@@ -111,11 +111,11 @@ KSim::ThemePrefs::ThemePrefs(QWidget *parent, const char *name)
m_altTheme = new KIntSpinBox(this);
m_themeLayout->addMultiCellWidget(m_altTheme, 5, 5, 2, 2);
- m_fontLabel = new QLabel(this);
+ m_fontLabel = new TQLabel(this);
m_fontLabel->setText(i18n("Font:"));
m_fontLabel->setAlignment(AlignVCenter | AlignRight);
- m_fontLabel->setSizePolicy(QSizePolicy(QSizePolicy::Minimum,
- QSizePolicy::Fixed));
+ m_fontLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum,
+ TQSizePolicy::Fixed));
m_themeLayout->addMultiCellWidget(m_fontLabel, 5, 5, 3, 3);
m_fontsCombo = new KComboBox(this);
@@ -124,14 +124,14 @@ KSim::ThemePrefs::ThemePrefs(QWidget *parent, const char *name)
m_fontsCombo->insertItem(i18n("Large"));
m_fontsCombo->insertItem(i18n("Custom"));
m_fontsCombo->insertItem(i18n("Default"));
- m_fontsCombo->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,
- QSizePolicy::Fixed));
- connect(m_fontsCombo, SIGNAL(activated(int)),
- this, SLOT(showFontDialog(int)));
+ m_fontsCombo->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding,
+ TQSizePolicy::Fixed));
+ connect(m_fontsCombo, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(showFontDialog(int)));
m_themeLayout->addMultiCellWidget(m_fontsCombo, 5, 5, 4, 4);
- QStringList locatedFiles = KGlobal::dirs()->findDirs("data", "ksim/themes");
- for (QStringList::ConstIterator it = locatedFiles.begin(); it != locatedFiles.end(); ++it)
+ TQStringList locatedFiles = KGlobal::dirs()->findDirs("data", "ksim/themes");
+ for (TQStringList::ConstIterator it = locatedFiles.begin(); it != locatedFiles.end(); ++it)
readThemes(*it);
}
@@ -176,7 +176,7 @@ void KSim::ThemePrefs::setThemeAlts(int alternatives)
m_alternateLabel->setEnabled(alternatives == 0 ? false : true);
}
-void KSim::ThemePrefs::openURL(const QString &url)
+void KSim::ThemePrefs::openURL(const TQString &url)
{
kapp->invokeBrowser(url);
}
@@ -201,7 +201,7 @@ void KSim::ThemePrefs::completed()
{
kdDebug(2003) << "Finished listing" << endl;
- for (QListViewItemIterator it(m_listView); it.current(); it++)
+ for (TQListViewItemIterator it(m_listView); it.current(); it++)
{
if (it.current()->text(0) == m_currentTheme.name)
{
@@ -215,7 +215,7 @@ void KSim::ThemePrefs::completed()
}
}
-void KSim::ThemePrefs::selectItem(QListViewItem *item)
+void KSim::ThemePrefs::selectItem(TQListViewItem *item)
{
if (!item)
return;
@@ -233,26 +233,26 @@ void KSim::ThemePrefs::selectItem(QListViewItem *item)
if (theme.name() != "ksim")
KSim::ThemeLoader::self().parseDir(theme.path(), theme.alternatives());
- QToolTip::remove(m_authLabel);
+ TQToolTip::remove(m_authLabel);
if (theme.author().isEmpty()) {
m_authLabel->setText(i18n("None Specified"));
- QToolTip::add(m_authLabel, i18n("None specified"));
+ TQToolTip::add(m_authLabel, i18n("None specified"));
}
else {
m_authLabel->setText(theme.author());
- QToolTip::add(m_authLabel, theme.author());
+ TQToolTip::add(m_authLabel, theme.author());
}
kdDebug( 2003 ) << "theme.alternatives() = " << theme.alternatives() << endl;
setThemeAlts(theme.alternatives());
}
-void KSim::ThemePrefs::readThemes(const QString &location)
+void KSim::ThemePrefs::readThemes(const TQString &location)
{
kdDebug(2003) << "readThemes(" << location << ")" << endl;
ThemeInfoList themeList;
- QStringList items(QDir(location).entryList(QDir::Dirs, QDir::IgnoreCase));
- QStringList::ConstIterator it;
+ TQStringList items(TQDir(location).entryList(TQDir::Dirs, TQDir::IgnoreCase));
+ TQStringList::ConstIterator it;
for (it = items.begin(); it != items.end(); ++it) {
if ((*it) != "." && (*it) != "..")
themeList.append(ThemeInfo((*it), KURL(location + (*it) + "/")));
@@ -264,7 +264,7 @@ void KSim::ThemePrefs::readThemes(const QString &location)
void KSim::ThemePrefs::showFontDialog(int currentItem)
{
if (currentItem == 3) {
- QFont customFont = m_font;
+ TQFont customFont = m_font;
int result = KFontDialog::getFont(customFont);
if (result == KFontDialog::Accepted)
m_font = customFont;
diff --git a/ksim/themeprefs.h b/ksim/themeprefs.h
index 8ae569e..a0a4f2b 100644
--- a/ksim/themeprefs.h
+++ b/ksim/themeprefs.h
@@ -21,7 +21,7 @@
#define THEMEIMPL_H
#include <kurl.h>
-#include <qwidget.h>
+#include <tqwidget.h>
class QListViewItem;
class QGridLayout;
@@ -41,7 +41,7 @@ namespace KSim
{
public:
ThemeInfo() : name(0), url(0), alternatives(0) {}
- ThemeInfo(const QString &name, const KURL &url, int alts=0)
+ ThemeInfo(const TQString &name, const KURL &url, int alts=0)
: name(name), url(url), alternatives(alts) {}
bool operator==(const ThemeInfo &rhs) const
@@ -66,18 +66,18 @@ namespace KSim
return *this;
}
- QString name;
+ TQString name;
KURL url;
int alternatives;
};
- typedef QValueList<ThemeInfo> ThemeInfoList;
+ typedef TQValueList<ThemeInfo> ThemeInfoList;
class ThemePrefs : public QWidget
{
Q_OBJECT
public:
- ThemePrefs(QWidget *parent, const char *name=0);
+ ThemePrefs(TQWidget *parent, const char *name=0);
~ThemePrefs();
public slots:
@@ -87,12 +87,12 @@ namespace KSim
private slots:
void setCurrentTheme(const ThemeInfo &);
void setThemeAlts(int);
- void openURL(const QString &);
+ void openURL(const TQString &);
void insertItems(const ThemeInfoList &);
void clear();
void completed();
- void selectItem(QListViewItem *item);
- void readThemes(const QString &);
+ void selectItem(TQListViewItem *item);
+ void readThemes(const TQString &);
void showFontDialog(int);
private:
@@ -100,16 +100,16 @@ namespace KSim
KURLLabel *m_urlLabel;
KIntSpinBox *m_altTheme;
KComboBox *m_fontsCombo;
- QLabel *m_label;
- QLabel *m_authorLabel;
+ TQLabel *m_label;
+ TQLabel *m_authorLabel;
KSqueezedTextLabel *m_authLabel;
- QLabel *m_alternateLabel;
- QLabel *m_fontLabel;
+ TQLabel *m_alternateLabel;
+ TQLabel *m_fontLabel;
KSeparator *m_line;
ThemeInfo m_currentTheme;
- QFont m_font;
+ TQFont m_font;
ThemeInfoList m_themeList;
- QGridLayout *m_themeLayout;
+ TQGridLayout *m_themeLayout;
};
}
#endif