summaryrefslogtreecommitdiffstats
path: root/kommander/widgets/combobox.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
commitdc6b8e72fed2586239e3514819238c520636c9d9 (patch)
tree88b200df0a0b7fab9d6f147596173556f1ed9a13 /kommander/widgets/combobox.cpp
parent6927d4436e54551917f600b706a8d6109e49de1c (diff)
downloadtdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz
tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kommander/widgets/combobox.cpp')
-rw-r--r--kommander/widgets/combobox.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/kommander/widgets/combobox.cpp b/kommander/widgets/combobox.cpp
index 250d3820..cab29337 100644
--- a/kommander/widgets/combobox.cpp
+++ b/kommander/widgets/combobox.cpp
@@ -19,10 +19,10 @@
#include <klocale.h>
/* QT INCLUDES */
-#include <qobject.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
/* OTHER INCLUDES */
#include <kommanderplugin.h>
@@ -36,18 +36,18 @@ enum Functions {
};
-ComboBox::ComboBox(QWidget *a_parent, const char *a_name)
+ComboBox::ComboBox(TQWidget *a_parent, const char *a_name)
: KComboBox(a_parent, a_name), KommanderWidget(this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
- connect(this, SIGNAL(activated(int)), this, SLOT(emitWidgetTextChanged(int)));
+ connect(this, TQT_SIGNAL(activated(int)), this, TQT_SLOT(emitWidgetTextChanged(int)));
KommanderPlugin::setDefaultGroup(Group::DCOP);
- KommanderPlugin::registerFunction(popupList, "popupList(QString widget)", i18n("Make the ComboBox expose it's list without mousing around."), 1);
+ KommanderPlugin::registerFunction(popupList, "popupList(TQString widget)", i18n("Make the ComboBox expose it's list without mousing around."), 1);
}
@@ -55,9 +55,9 @@ ComboBox::~ComboBox()
{
}
-QString ComboBox::currentState() const
+TQString ComboBox::currentState() const
{
- return QString("default");
+ return TQString("default");
}
bool ComboBox::isKommanderWidget() const
@@ -65,22 +65,22 @@ bool ComboBox::isKommanderWidget() const
return true;
}
-QStringList ComboBox::associatedText() const
+TQStringList ComboBox::associatedText() const
{
return KommanderWidget::associatedText();
}
-void ComboBox::setAssociatedText(const QStringList& a_at)
+void ComboBox::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void ComboBox::setPopulationText(const QString& a_text)
+void ComboBox::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText(a_text);
}
-QString ComboBox::populationText() const
+TQString ComboBox::populationText() const
{
return KommanderWidget::populationText();
}
@@ -90,10 +90,10 @@ void ComboBox::populate()
setWidgetText(KommanderWidget::evalAssociatedText( populationText()));
}
-void ComboBox::setWidgetText(const QString& a_text)
+void ComboBox::setWidgetText(const TQString& a_text)
{
clear();
- insertStringList(QStringList::split("\n", a_text));
+ insertStringList(TQStringList::split("\n", a_text));
emit widgetTextChanged(a_text);
}
@@ -102,16 +102,16 @@ void ComboBox::emitWidgetTextChanged(int a_index)
emit widgetTextChanged(text(a_index));
}
-void ComboBox::showEvent(QShowEvent *e)
+void ComboBox::showEvent(TQShowEvent *e)
{
- QComboBox::showEvent( e );
+ TQComboBox::showEvent( e );
emit widgetOpened();
}
-void ComboBox::contextMenuEvent( QContextMenuEvent * e )
+void ComboBox::contextMenuEvent( TQContextMenuEvent * e )
{
e->accept();
- QPoint p = e->globalPos();
+ TQPoint p = e->globalPos();
emit contextMenuRequested(p.x(), p.y());
}
@@ -124,7 +124,7 @@ bool ComboBox::isFunctionSupported(int f)
f == DCOP::addUniqueItem || f == DCOP::clear || f == DCOP::count || f == DCOP::setEditable || f == DCOP::geometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f >= FirstFunction && f <= LastFunction);
}
-QString ComboBox::handleDCOP(int function, const QStringList& args)
+TQString ComboBox::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::text:
@@ -135,7 +135,7 @@ QString ComboBox::handleDCOP(int function, const QStringList& args)
case DCOP::selection:
return currentText();
case DCOP::currentItem:
- return QString::number(currentItem());
+ return TQString::number(currentItem());
case DCOP::setCurrentItem:
setCurrentItem(args[0].toUInt());
break;
@@ -153,19 +153,19 @@ QString ComboBox::handleDCOP(int function, const QStringList& args)
insertItem(args[0], args[1].toInt());
break;
case DCOP::insertItems:
- insertStringList(QStringList::split("\n", args[0]), args[1].toInt());
+ insertStringList(TQStringList::split("\n", args[0]), args[1].toInt());
break;
case DCOP::addUniqueItem:
for (int i=0; i<count(); i++)
if (text(i) == args[0])
- return QString();
+ return TQString();
insertItem(args[0]);
break;
case DCOP::clear:
clear();
break;
case DCOP::count:
- return QString::number(count());
+ return TQString::number(count());
case DCOP::setSelection:
{
for (int i = 0; i < count(); i++)
@@ -184,27 +184,27 @@ QString ComboBox::handleDCOP(int function, const QStringList& args)
break;
case DCOP::setBackgroundColor:
{
- QColor color;
+ TQColor color;
color.setNamedColor(args[0]);
this->setPaletteBackgroundColor(color);
break;
}
case popupList:
- QComboBox::popup();
+ TQComboBox::popup();
break;
case DCOP::geometry:
{
- QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
break;
}
case DCOP::hasFocus:
- return QString::number(this->hasFocus());
+ return TQString::number(this->hasFocus());
break;
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
#include "combobox.moc"