summaryrefslogtreecommitdiffstats
path: root/parts/documentation/indexview.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 /parts/documentation/indexview.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 'parts/documentation/indexview.cpp')
-rw-r--r--parts/documentation/indexview.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/parts/documentation/indexview.cpp b/parts/documentation/indexview.cpp
index 29f0d9d5..6a7eddcf 100644
--- a/parts/documentation/indexview.cpp
+++ b/parts/documentation/indexview.cpp
@@ -19,10 +19,10 @@
***************************************************************************/
#include "indexview.h"
-#include <qapplication.h>
-#include <qevent.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqapplication.h>
+#include <tqevent.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klineedit.h>
#include <kiconloader.h>
@@ -39,24 +39,24 @@
#include "documentation_widget.h"
IndexView::IndexView(DocumentationWidget *parent, const char *name)
- :QWidget(parent, name), m_widget(parent)
+ :TQWidget(parent, name), m_widget(parent)
{
- QVBoxLayout *l = new QVBoxLayout(this, 0, 0);
+ TQVBoxLayout *l = new TQVBoxLayout(this, 0, 0);
- QHBoxLayout *hl = new QHBoxLayout(this, 0, 0);
+ TQHBoxLayout *hl = new TQHBoxLayout(this, 0, 0);
m_edit = new KLineEdit(this);
- hl->addWidget(new QLabel(m_edit, i18n("&Look for:"), this));
+ hl->addWidget(new TQLabel(m_edit, i18n("&Look for:"), this));
hl->addWidget(m_edit);
l->addLayout(hl);
m_index = new IndexBox(this);
l->addWidget(m_index);
- connect(m_index, SIGNAL(executed(QListBoxItem* )), this, SLOT(searchInIndex(QListBoxItem* )));
- connect(m_index, SIGNAL(mouseButtonPressed(int, QListBoxItem*, const QPoint& )),
- this, SLOT(itemMouseButtonPressed(int, QListBoxItem*, const QPoint& )));
- connect(m_edit, SIGNAL(returnPressed()), this, SLOT(searchInIndex()));
- connect(m_edit, SIGNAL(textChanged(const QString&)), this, SLOT(showIndex(const QString&)));
+ connect(m_index, TQT_SIGNAL(executed(TQListBoxItem* )), this, TQT_SLOT(searchInIndex(TQListBoxItem* )));
+ connect(m_index, TQT_SIGNAL(mouseButtonPressed(int, TQListBoxItem*, const TQPoint& )),
+ this, TQT_SLOT(itemMouseButtonPressed(int, TQListBoxItem*, const TQPoint& )));
+ connect(m_edit, TQT_SIGNAL(returnPressed()), this, TQT_SLOT(searchInIndex()));
+ connect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(showIndex(const TQString&)));
m_edit->installEventFilter(this);
}
@@ -71,7 +71,7 @@ void IndexView::searchInIndex()
searchInIndex(m_index->item(m_index->currentItem()));
}
-void IndexView::searchInIndex(QListBoxItem *item)
+void IndexView::searchInIndex(TQListBoxItem *item)
{
kdDebug() << "IndexView::searchInIndex" << endl;
IndexItem *indexItem = dynamic_cast<IndexItem*>(item);
@@ -92,13 +92,13 @@ void IndexView::searchInIndex(QListBoxItem *item)
}
}
-void IndexView::showIndex(const QString &term)
+void IndexView::showIndex(const TQString &term)
{
- QListBoxItem *i = m_index->firstItem();
- QString sl = term.lower();
+ TQListBoxItem *i = m_index->firstItem();
+ TQString sl = term.lower();
while (i)
{
- QString t = i->text();
+ TQString t = i->text();
if ((t.length() >= sl.length()) && (i->text().left(term.length()).lower() == sl))
{
m_index->setCurrentItem(i);
@@ -118,14 +118,14 @@ void IndexView::showIndex(const QString &term)
}*/
}
-bool IndexView::eventFilter(QObject *watched, QEvent *e)
+bool IndexView::eventFilter(TQObject *watched, TQEvent *e)
{
if (!watched || !e)
return true;
- if ((watched == m_edit) && (e->type() == QEvent::KeyPress))
+ if ((watched == m_edit) && (e->type() == TQEvent::KeyPress))
{
- QKeyEvent *ke = (QKeyEvent*)e;
+ TQKeyEvent *ke = (TQKeyEvent*)e;
if (ke->key() == Key_Up)
{
int i = m_index->currentItem();
@@ -150,17 +150,17 @@ bool IndexView::eventFilter(QObject *watched, QEvent *e)
return true;
} else if ((ke->key() == Key_Next) || (ke->key() == Key_Prior))
{
- QApplication::sendEvent(m_index, e);
+ TQApplication::sendEvent(m_index, e);
m_edit->blockSignals(true);
m_edit->setText(m_index->currentText());
m_edit->blockSignals(false);
}
}
- return QWidget::eventFilter(watched, e);
+ return TQWidget::eventFilter(watched, e);
}
-void IndexView::itemMouseButtonPressed(int button, QListBoxItem *item, const QPoint &pos)
+void IndexView::itemMouseButtonPressed(int button, TQListBoxItem *item, const TQPoint &pos)
{
if ((button != Qt::RightButton) || (!item))
return;
@@ -171,7 +171,7 @@ void IndexView::itemMouseButtonPressed(int button, QListBoxItem *item, const QPo
DocUtils::docItemPopup(m_widget->part(), docItem, pos, false, true);
}
-void IndexView::setSearchTerm(const QString &term)
+void IndexView::setSearchTerm(const TQString &term)
{
m_edit->setFocus();
m_edit->setText(term);
@@ -182,7 +182,7 @@ void IndexView::askSearchTerm( )
m_edit->setFocus();
}
-void IndexView::focusInEvent(QFocusEvent */*e*/)
+void IndexView::focusInEvent(TQFocusEvent */*e*/)
{
m_edit->setFocus();
}