summaryrefslogtreecommitdiffstats
path: root/lib/widgets/propeditor/pcombobox.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
commitd6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch)
treed109539636691d7b03036ca1c0ed29dbae6577cf /lib/widgets/propeditor/pcombobox.cpp
parent3331a47a9cad24795c7440ee8107143ce444ef34 (diff)
downloadtdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz
tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/widgets/propeditor/pcombobox.cpp')
-rw-r--r--lib/widgets/propeditor/pcombobox.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/lib/widgets/propeditor/pcombobox.cpp b/lib/widgets/propeditor/pcombobox.cpp
index 36296a25..958ba34d 100644
--- a/lib/widgets/propeditor/pcombobox.cpp
+++ b/lib/widgets/propeditor/pcombobox.cpp
@@ -19,18 +19,18 @@
***************************************************************************/
#include "pcombobox.h"
-#include <qcombobox.h>
-#include <qlayout.h>
+#include <tqcombobox.h>
+#include <tqlayout.h>
namespace PropertyLib{
-PComboBox::PComboBox(MultiProperty *property, const QMap<QString, QVariant> &list, QWidget *parent, const char *name)
+PComboBox::PComboBox(MultiProperty *property, const TQMap<TQString, TQVariant> &list, TQWidget *parent, const char *name)
:PropertyWidget(property, parent, name), m_valueList(list)
{
init(false);
}
-PComboBox::PComboBox(MultiProperty *property, const QMap<QString, QVariant> &list, bool rw, QWidget *parent, const char *name)
+PComboBox::PComboBox(MultiProperty *property, const TQMap<TQString, TQVariant> &list, bool rw, TQWidget *parent, const char *name)
:PropertyWidget(property, parent, name), m_valueList(list)
{
init(rw);
@@ -38,43 +38,43 @@ PComboBox::PComboBox(MultiProperty *property, const QMap<QString, QVariant> &lis
void PComboBox::init(bool rw)
{
- QHBoxLayout *l = new QHBoxLayout(this, 0, 0);
- m_edit = new QComboBox(rw, this);
- m_edit->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
+ TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
+ m_edit = new TQComboBox(rw, this);
+ m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(m_edit);
fillBox();
- connect(m_edit, SIGNAL(activated(int)), this, SLOT(updateProperty(int)));
+ connect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateProperty(int)));
}
void PComboBox::fillBox()
{
- for (QMap<QString, QVariant>::const_iterator it = m_valueList.begin(); it != m_valueList.end(); it++)
+ for (TQMap<TQString, TQVariant>::const_iterator it = m_valueList.begin(); it != m_valueList.end(); it++)
{
m_edit->insertItem(it.key());
}
}
-QVariant PComboBox::value() const
+TQVariant PComboBox::value() const
{
- QMap<QString, QVariant>::const_iterator it = m_valueList.find(m_edit->currentText());
+ TQMap<TQString, TQVariant>::const_iterator it = m_valueList.find(m_edit->currentText());
if (it == m_valueList.end())
- return QVariant("");
- return QVariant(it.data());
+ return TQVariant("");
+ return TQVariant(it.data());
}
-void PComboBox::setValue(const QVariant &value, bool emitChange)
+void PComboBox::setValue(const TQVariant &value, bool emitChange)
{
#if QT_VERSION >= 0x030100
if (!value.isNull())
#else
- if (value.canCast(QVariant::String))
+ if (value.canCast(TQVariant::String))
#endif
{
- disconnect(m_edit, SIGNAL(activated(int)), this, SLOT(updateProperty(int)));
+ disconnect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateProperty(int)));
m_edit->setCurrentText(findDescription(value));
- connect(m_edit, SIGNAL(activated(int)), this, SLOT(updateProperty(int)));
+ connect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateProperty(int)));
if (emitChange)
emit propertyChanged(m_property, value);
}
@@ -85,9 +85,9 @@ void PComboBox::updateProperty(int /*val*/)
emit propertyChanged(m_property, value());
}
-QString PComboBox::findDescription(const QVariant &value)
+TQString PComboBox::findDescription(const TQVariant &value)
{
- for (QMap<QString, QVariant>::const_iterator it = m_valueList.begin(); it != m_valueList.end(); ++ it)
+ for (TQMap<TQString, TQVariant>::const_iterator it = m_valueList.begin(); it != m_valueList.end(); ++ it)
{
if (it.data() == value)
return it.key();
@@ -95,7 +95,7 @@ QString PComboBox::findDescription(const QVariant &value)
return "";
}
-void PComboBox::setValueList(const QMap<QString, QVariant> &valueList)
+void PComboBox::setValueList(const TQMap<TQString, TQVariant> &valueList)
{
m_valueList = valueList;
m_edit->clear();