summaryrefslogtreecommitdiffstats
path: root/ksim/generalprefs.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:52:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:52:55 +0000
commit5f5ee2367157176ed223b86343eb0a9e4022e020 (patch)
tree6a9c87f14ee38e90eff3c77c784f14e4f38fd5a1 /ksim/generalprefs.cpp
parent4facf42feec57b22dcf46badc115ad6c5b5cc512 (diff)
downloadtdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.tar.gz
tdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1157653 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksim/generalprefs.cpp')
-rw-r--r--ksim/generalprefs.cpp274
1 files changed, 137 insertions, 137 deletions
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);