summaryrefslogtreecommitdiffstats
path: root/src/resultlistview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resultlistview.cpp')
-rw-r--r--src/resultlistview.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/resultlistview.cpp b/src/resultlistview.cpp
index eda1acc..031f61c 100644
--- a/src/resultlistview.cpp
+++ b/src/resultlistview.cpp
@@ -20,12 +20,12 @@
#include <kpopupmenu.h>
#include <klocale.h>
-#include <qclipboard.h>
-#include <qapplication.h>
-#include <qevent.h>
-#include <qcursor.h>
-#include <qdragobject.h>
-#include <qheader.h>
+#include <tqclipboard.h>
+#include <tqapplication.h>
+#include <tqevent.h>
+#include <tqcursor.h>
+#include <tqdragobject.h>
+#include <tqheader.h>
#include "resultlistview.h"
#include "resultlistviewtext.h"
@@ -34,11 +34,11 @@
using DragSupport::makePixmap;
using namespace ResultList;
-ResultListView::ResultListView(QWidget *parent, const char *name) :
- KListView(parent, name), m_itemRightClicked(0)
+ResultListView::ResultListView(TQWidget *tqparent, const char *name) :
+ KListView(tqparent, name), m_itemRightClicked(0)
{
- connect(this, SIGNAL(doubleClicked(QListViewItem *, const QPoint &, int)),
- SLOT(slotDoubleClicked(QListViewItem *, const QPoint &, int)));
+ connect(this, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint &, int)),
+ TQT_SLOT(slotDoubleClicked(TQListViewItem *, const TQPoint &, int)));
addColumn(i18n("Expression"));
addColumn(i18n("Result"));
@@ -57,7 +57,7 @@ ResultListView::ResultListView(QWidget *parent, const char *name) :
bool ResultListView::getStackValue(unsigned stackPosition, Abakus::number_t &result)
{
- QListViewItem *it = firstChild();
+ TQListViewItem *it = firstChild();
for(; it; it = it->itemBelow()) {
ResultListViewText *resultItem = dynamic_cast<ResultListViewText *>(it);
if(!resultItem->wasError() && resultItem->stackPosition() == stackPosition) {
@@ -69,20 +69,20 @@ bool ResultListView::getStackValue(unsigned stackPosition, Abakus::number_t &res
return false;
}
-QDragObject *ResultListView::dragObject()
+TQDragObject *ResultListView::dragObject()
{
- QPoint viewportPos = viewport()->mapFromGlobal(QCursor::pos());
+ TQPoint viewportPos = viewport()->mapFromGlobal(TQCursor::pos());
ResultListViewText *item = itemUnderCursor();
if(item) {
- QString text = item->resultText();
+ TQString text = item->resultText();
int column = header()->sectionAt(viewportPos.x());
if(column == ExpressionColumn)
text = item->expressionText();
- QDragObject *drag = new QTextDrag(text, this);
+ TQDragObject *drag = new TQTextDrag(text, this);
drag->setPixmap(makePixmap(text, font()));
return drag;
@@ -91,7 +91,7 @@ QDragObject *ResultListView::dragObject()
return 0;
}
-void ResultListView::contextMenuEvent(QContextMenuEvent *e)
+void ResultListView::contextMenuEvent(TQContextMenuEvent *e)
{
m_itemRightClicked = itemUnderCursor();
KPopupMenu *menu = constructPopupMenu(m_itemRightClicked);
@@ -99,7 +99,7 @@ void ResultListView::contextMenuEvent(QContextMenuEvent *e)
menu->popup(e->globalPos());
}
-void ResultListView::slotDoubleClicked(QListViewItem *item, const QPoint &, int c)
+void ResultListView::slotDoubleClicked(TQListViewItem *item, const TQPoint &, int c)
{
ResultListViewText *textItem = dynamic_cast<ResultListViewText *>(item);
if(!textItem)
@@ -115,9 +115,9 @@ KPopupMenu *ResultListView::constructPopupMenu(const ResultListViewText *item)
{
KPopupMenu *menu = new KPopupMenu(this, "list view context menu");
- menu->insertItem(i18n("Clear &History"), this, SLOT(clear()), ALT+Key_R);
+ menu->insertItem(i18n("Clear &History"), this, TQT_SLOT(clear()), ALT+Key_R);
- int id = menu->insertItem(i18n("Copy Result to Clipboard"), this, SLOT(slotCopyResult()));
+ int id = menu->insertItem(i18n("Copy Result to Clipboard"), this, TQT_SLOT(slotCopyResult()));
if(!item || item->wasError())
menu->setItemEnabled(id, false);
@@ -129,9 +129,9 @@ void ResultListView::slotCopyResult()
if(!m_itemRightClicked)
return;
- QClipboard *clipboard = QApplication::clipboard();
+ TQClipboard *clipboard = TQApplication::tqclipboard();
- clipboard->setText(m_itemRightClicked->resultText(), QClipboard::Clipboard);
+ clipboard->setText(m_itemRightClicked->resultText(), TQClipboard::Clipboard);
}
ResultListViewText *ResultListView::lastItem() const
@@ -141,8 +141,8 @@ ResultListViewText *ResultListView::lastItem() const
ResultListViewText *ResultListView::itemUnderCursor() const
{
- QPoint viewportPos = viewport()->mapFromGlobal(QCursor::pos());
- QListViewItem *underCursor = itemAt(viewportPos);
+ TQPoint viewportPos = viewport()->mapFromGlobal(TQCursor::pos());
+ TQListViewItem *underCursor = itemAt(viewportPos);
return static_cast<ResultListViewText *>(underCursor);
}