summaryrefslogtreecommitdiffstats
path: root/src/valuemanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/valuemanager.cpp')
-rw-r--r--src/valuemanager.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/valuemanager.cpp b/src/valuemanager.cpp
index 93cfa77..afb72dd 100644
--- a/src/valuemanager.cpp
+++ b/src/valuemanager.cpp
@@ -19,7 +19,7 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include "numerictypes.h"
#include "valuemanager.h"
@@ -34,43 +34,43 @@ ValueManager *ValueManager::instance()
return m_manager;
}
-ValueManager::ValueManager(QObject *parent, const char *name) :
- QObject(parent, name)
+ValueManager::ValueManager(TQObject *tqparent, const char *name) :
+ TQObject(tqparent, name)
{
m_values.insert("pi", Abakus::number_t::PI);
m_values.insert("e", Abakus::number_t::E);
}
-Abakus::number_t ValueManager::value(const QString &name) const
+Abakus::number_t ValueManager::value(const TQString &name) const
{
return m_values[name];
}
-bool ValueManager::isValueSet(const QString &name) const
+bool ValueManager::isValueSet(const TQString &name) const
{
- return m_values.contains(name);
+ return m_values.tqcontains(name);
}
-bool ValueManager::isValueReadOnly(const QString &name) const
+bool ValueManager::isValueReadOnly(const TQString &name) const
{
- QRegExp readOnlyValues("^(ans|pi|e|stackCount)$");
+ TQRegExp readOnlyValues("^(ans|pi|e|stackCount)$");
- return name.find(readOnlyValues) != -1;
+ return name.tqfind(readOnlyValues) != -1;
}
-void ValueManager::setValue(const QString &name, const Abakus::number_t value)
+void ValueManager::setValue(const TQString &name, const Abakus::number_t value)
{
- if(m_values.contains(name) && this->value(name) != value)
+ if(m_values.tqcontains(name) && this->value(name) != value)
emit signalValueChanged(name, value);
- else if(!m_values.contains(name))
+ else if(!m_values.tqcontains(name))
emit signalValueAdded(name, value);
- m_values.replace(name, value);
+ m_values.tqreplace(name, value);
}
-void ValueManager::removeValue(const QString &name)
+void ValueManager::removeValue(const TQString &name)
{
- if(m_values.contains(name))
+ if(m_values.tqcontains(name))
emit signalValueRemoved(name);
m_values.remove(name);
@@ -78,26 +78,26 @@ void ValueManager::removeValue(const QString &name)
void ValueManager::slotRemoveUserVariables()
{
- QStringList vars = valueNames();
+ TQStringList vars = valueNames();
- for(QStringList::ConstIterator var = vars.constBegin(); var != vars.constEnd(); ++var)
+ for(TQStringList::ConstIterator var = vars.constBegin(); var != vars.constEnd(); ++var)
if(!isValueReadOnly(*var))
removeValue(*var);
}
-QStringList ValueManager::valueNames() const
+TQStringList ValueManager::valueNames() const
{
return m_values.keys();
}
-QString ValueManager::description(const QString &valueName)
+TQString ValueManager::description(const TQString &valueName)
{
if(valueName == "e")
return i18n("Natural exponential base - 2.7182818");
if(valueName == "pi")
return i18n("pi (π) - 3.1415926");
- return QString();
+ return TQString();
}
#include "valuemanager.moc"