summaryrefslogtreecommitdiffstats
path: root/kommander/editor/choosewidgetimpl.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/editor/choosewidgetimpl.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/editor/choosewidgetimpl.cpp')
-rw-r--r--kommander/editor/choosewidgetimpl.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/kommander/editor/choosewidgetimpl.cpp b/kommander/editor/choosewidgetimpl.cpp
index 53580a6e..527137b4 100644
--- a/kommander/editor/choosewidgetimpl.cpp
+++ b/kommander/editor/choosewidgetimpl.cpp
@@ -19,21 +19,21 @@
#include <klocale.h>
/** QT INCLUDES */
-#include <qptrstack.h>
-#include <qobject.h>
-#include <qobjectlist.h>
-#include <qlineedit.h>
-#include "qmetaobject.h"
+#include <tqptrstack.h>
+#include <tqobject.h>
+#include <tqobjectlist.h>
+#include <tqlineedit.h>
+#include "tqmetaobject.h"
/** OTHER INCLUDES */
#include "choosewidgetimpl.h"
#include "choosewidgetimpl.moc"
-ChooseWidget::ChooseWidget(QWidget* a_parent, const char* a_name, bool a_modal)
+ChooseWidget::ChooseWidget(TQWidget* a_parent, const char* a_name, bool a_modal)
: ChooseWidgetBase(a_parent, a_name, a_modal)
{
- connect( nameEdit, SIGNAL(textChanged(const QString&)), SLOT(textChanged(const QString&)) );
- connect( widgetView, SIGNAL(executed(QListViewItem*)), SLOT(selectedItem(QListViewItem*)));
+ connect( nameEdit, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(textChanged(const TQString&)) );
+ connect( widgetView, TQT_SIGNAL(executed(TQListViewItem*)), TQT_SLOT(selectedItem(TQListViewItem*)));
widgetView->setFullWidth(true);
widgetView->addColumn(i18n("Widgets"));
widgetView->setRootIsDecorated(true);
@@ -45,17 +45,17 @@ ChooseWidget::~ChooseWidget()
}
-void ChooseWidget::setWidget(QWidget* w)
+void ChooseWidget::setWidget(TQWidget* w)
{
widgetView->clear();
if (!w)
return;
- QListViewItem* item;
- QPtrStack<QWidget> p_widgets;
- QPtrStack<QListViewItem> p_items;
+ TQListViewItem* item;
+ TQPtrStack<TQWidget> p_widgets;
+ TQPtrStack<TQListViewItem> p_items;
- item = new QListViewItem(widgetView, QString("%1 (%2)").arg(w->name()).arg(w->className()));
+ item = new TQListViewItem(widgetView, TQString("%1 (%2)").arg(w->name()).arg(w->className()));
item->setOpen(true);
p_widgets.push(w);
@@ -64,13 +64,13 @@ void ChooseWidget::setWidget(QWidget* w)
while (!p_widgets.isEmpty()) {
w = p_widgets.pop();
item = p_items.pop();
- QObjectList *objectList = w->queryList(0, 0, true, false);
- for (QObjectListIt it(*objectList); it.current(); ++it) {
- QListViewItem* newItem = item;
+ TQObjectList *objectList = w->queryList(0, 0, true, false);
+ for (TQObjectListIt it(*objectList); it.current(); ++it) {
+ TQListViewItem* newItem = item;
if (isKommanderWidget(*it))
- newItem = new QListViewItem(item, QString("%1 (%2)").arg((*it)->name()).arg((*it)->className()));
+ newItem = new TQListViewItem(item, TQString("%1 (%2)").arg((*it)->name()).arg((*it)->className()));
if ((*it)->children()) {
- p_widgets.push((QWidget*)(*it));
+ p_widgets.push((TQWidget*)(*it));
p_items.push(newItem);
}
}
@@ -83,44 +83,44 @@ void ChooseWidget::setWidget(QWidget* w)
}
-QString ChooseWidget::selection()
+TQString ChooseWidget::selection()
{
if (widgetView->currentItem())
return widgetView->currentItem()->text(0);
else
- return QString::null;
+ return TQString::null;
}
-void ChooseWidget::textChanged(const QString& text)
+void ChooseWidget::textChanged(const TQString& text)
{
- QListViewItem* item = widgetView->findItem(text, 0, Qt::BeginsWith);
+ TQListViewItem* item = widgetView->findItem(text, 0, Qt::BeginsWith);
if (item) {
widgetView->setCurrentItem(item);
widgetView->ensureItemVisible(item);
}
}
-bool ChooseWidget::isKommanderWidget(QObject* w)
+bool ChooseWidget::isKommanderWidget(TQObject* w)
{
bool pExists = false;
- QMetaObject *metaObj = w->metaObject();
+ TQMetaObject *metaObj = w->metaObject();
if (metaObj)
{
int id = metaObj->findProperty("KommanderWidget", true);
- const QMetaProperty *metaProp = metaObj->property(id, true);
+ const TQMetaProperty *metaProp = metaObj->property(id, true);
if (metaProp && metaProp->isValid())
pExists = true;
}
if (pExists)
{
- QVariant flag = (w)->property("KommanderWidget");
- if(flag.isValid() && !(QString(w->name()).startsWith("qt_")))
+ TQVariant flag = (w)->property("KommanderWidget");
+ if(flag.isValid() && !(TQString(w->name()).startsWith("qt_")))
return true;
}
return false;
}
-void ChooseWidget::selectedItem(QListViewItem* item)
+void ChooseWidget::selectedItem(TQListViewItem* item)
{
if (item)
accept();