summaryrefslogtreecommitdiffstats
path: root/kpackage/kplview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kpackage/kplview.cpp')
-rw-r--r--kpackage/kplview.cpp80
1 files changed, 40 insertions, 40 deletions
diff --git a/kpackage/kplview.cpp b/kpackage/kplview.cpp
index 1889150..5b7d76c 100644
--- a/kpackage/kplview.cpp
+++ b/kpackage/kplview.cpp
@@ -25,9 +25,9 @@
*/
#include "../config.h"
-#include <qpixmap.h>
-#include <qptrstack.h>
-#include <qheader.h>
+#include <tqpixmap.h>
+#include <tqptrstack.h>
+#include <tqheader.h>
#include <kdebug.h>
#include <klocale.h>
@@ -43,30 +43,30 @@
#define MPOS 1
-KpTreeList::KpTreeList( QWidget *parent ) :
+KpTreeList::KpTreeList( TQWidget *parent ) :
KListView (parent)
{
markPkg = 0;
setShowSortIndicator(true);
- QPtrStack<QString> stack();
+ TQPtrStack<TQString> stack();
readTreeType();
- setFrameStyle(QFrame::Panel|QFrame::Sunken);
+ setFrameStyle(TQFrame::Panel|TQFrame::Sunken);
setLineWidth(2);
setItemMargin(2);
addColumn(i18n("Package"));
- setColumnWidthMode(0,QListView::Manual);
+ setColumnWidthMode(0,TQListView::Manual);
addColumn(i18n("Mark"));
- setColumnWidthMode(1,QListView::Manual);
+ setColumnWidthMode(1,TQListView::Manual);
addColumn(i18n("Summary"));
- setColumnWidthMode(2,QListView::Manual);
+ setColumnWidthMode(2,TQListView::Manual);
addColumn(i18n("Size"));
- setColumnWidthMode(3,QListView::Manual);
+ setColumnWidthMode(3,TQListView::Manual);
addColumn(i18n("Version"));
- setColumnWidthMode(4,QListView::Manual);
+ setColumnWidthMode(4,TQListView::Manual);
addColumn(i18n("Old Version"));
- setColumnWidthMode(5,QListView::Manual);
+ setColumnWidthMode(5,TQListView::Manual);
// setAllColumnsShowFocus(TRUE);
setRootIsDecorated(TRUE);
@@ -93,13 +93,13 @@ KpTreeListItem *KpTreeList::currentItem()
return (KpTreeListItem *)KListView::currentItem();
}
-void KpTreeList::contentsMousePressEvent ( QMouseEvent * e )
+void KpTreeList::contentsMousePressEvent ( TQMouseEvent * e )
{
bool markUpdate = false;
if (e->button() == LeftButton) {
if (inMark(e->x())) {
- QPoint vp = contentsToViewport(e->pos());
+ TQPoint vp = contentsToViewport(e->pos());
KpTreeListItem *i = ( KpTreeListItem *)itemAt( vp );
if (i && i->childCount() == 0) {
if (e->state() == ShiftButton) {
@@ -151,7 +151,7 @@ bool KpTreeList::inMark(int x) {
int i;
- QHeader* const thisHeader = header();
+ TQHeader* const thisHeader = header();
int mpos = thisHeader->mapToIndex(MPOS);
for (i = 0; i < mpos; i++)
@@ -259,7 +259,7 @@ void KpTreeList::markAll(KpTreeListItem *item)
}
}
-void KpTreeList::findMarked(KpTreeListItem *item, QPtrList<KpTreeListItem> &selList)
+void KpTreeList::findMarked(KpTreeListItem *item, TQPtrList<KpTreeListItem> &selList)
{
while (item) {
if (item->childCount() > 0) {
@@ -348,7 +348,7 @@ void KpTreeList::collapseTree(KpTreeListItem *pitem)
///////////////////////////////////////////////////////////////////////////
// A package has been highlighted in the list tree
-void KpTreeList::packageHighlighted(QListViewItem *item, packageDisplayWidget *packageDisplay)
+void KpTreeList::packageHighlighted(TQListViewItem *item, packageDisplayWidget *packageDisplay)
{
KpTreeListItem *sel = (KpTreeListItem *)item;
@@ -382,7 +382,7 @@ void KpTreeList::packageHighlighted(QListViewItem *item, packageDisplayWidget *p
notPress = false;
}
-KpTreeListItem *KpTreeList::search(const QString &str, const QString &head,
+KpTreeListItem *KpTreeList::search(const TQString &str, const TQString &head,
KpTreeListItem *start)
{
KpTreeListItem *item = firstChild();
@@ -403,7 +403,7 @@ KpTreeListItem *KpTreeList::search(const QString &str, const QString &head,
return 0;
}
-KpTreeListItem *KpTreeList::search(const QString &str, bool subStr, bool wrap,
+KpTreeListItem *KpTreeList::search(const TQString &str, bool subStr, bool wrap,
bool start=FALSE)
{
if (!firstChild())
@@ -427,7 +427,7 @@ bool KpTreeList::searchChild(KpTreeListItem *it)
{
do {
if (!searchSkip) {
- QString s = it->text(0);
+ TQString s = it->text(0);
// kdDebug() << "s='" << s << "'='" << searchStr << "\n";
if ((it->childCount() == 0) && (it->info->display(treeType)) &&
(searchSubstr ? s.contains(searchStr,FALSE) : s == searchStr)) {
@@ -455,7 +455,7 @@ bool KpTreeList::searchChild(KpTreeListItem *it)
KpTreeListItem *KpTreeList::changePack(KpTreeListItem *searchResult, bool push)
{
if (searchResult) {
- QListViewItem *i;
+ TQListViewItem *i;
i = searchResult;
while ((i = i->parent())) {
@@ -560,7 +560,7 @@ void KpTreeList::readTreeConfig()
int i,n;
int num[] = {185,37,180,54,95,95};
- QString colpos;
+ TQString colpos;
for (i = 0; i < 6; i++) {
colpos.setNum(i);
n = config->readNumEntry(colpos,num[i]);
@@ -571,14 +571,14 @@ void KpTreeList::readTreeConfig()
//////////////////////////////////////////////////////////////////////////////
-KpTreeListItem::KpTreeListItem( QListViewItem *parent, packageInfo* pinfo,
- const QPixmap& thePixmap,
- QString label1, QString label2 ,
- QString label3 , QString label4 ,
- QString label5 , QString label6 ,
- QString label7 , QString label8
+KpTreeListItem::KpTreeListItem( TQListViewItem *parent, packageInfo* pinfo,
+ const TQPixmap& thePixmap,
+ TQString label1, TQString label2 ,
+ TQString label3 , TQString label4 ,
+ TQString label5 , TQString label6 ,
+ TQString label7 , TQString label8
-) : QListViewItem(parent, label1, label2, label3, label4, label5,
+) : TQListViewItem(parent, label1, label2, label3, label4, label5,
label6, label7, label8)
{
info = pinfo;
@@ -589,12 +589,12 @@ KpTreeListItem::KpTreeListItem( QListViewItem *parent, packageInfo* pinfo,
}
KpTreeListItem::KpTreeListItem( KListView *parent, packageInfo* pinfo,
- const QPixmap& thePixmap,
- QString label1, QString label2 ,
- QString label3 , QString label4 ,
- QString label5 , QString label6 ,
- QString label7 , QString label8
-) : QListViewItem(parent, label1, label2, label3, label4, label5,
+ const TQPixmap& thePixmap,
+ TQString label1, TQString label2 ,
+ TQString label3 , TQString label4 ,
+ TQString label5 , TQString label6 ,
+ TQString label7 , TQString label8
+) : TQListViewItem(parent, label1, label2, label3, label4, label5,
label6, label7, label8)
{
info = pinfo;
@@ -606,12 +606,12 @@ KpTreeListItem::KpTreeListItem( KListView *parent, packageInfo* pinfo,
KpTreeListItem *KpTreeListItem::firstChild()
{
- return (KpTreeListItem *)QListViewItem::firstChild();
+ return (KpTreeListItem *)TQListViewItem::firstChild();
}
KpTreeListItem *KpTreeListItem::nextSibling()
{
- return (KpTreeListItem *)QListViewItem::nextSibling();
+ return (KpTreeListItem *)TQListViewItem::nextSibling();
}
void KpTreeListItem::toggleMark()
@@ -644,10 +644,10 @@ void KpTreeListItem::show()
setup();
}
-int KpTreeListItem::compare( QListViewItem *i, int col, bool ascending ) const
+int KpTreeListItem::compare( TQListViewItem *i, int col, bool ascending ) const
{ // Make sorting more certain
if (col == 3) { // size column
- QString k, j;
+ TQString k, j;
j = key( col, ascending );
j = j.replace(' ','0');
@@ -660,7 +660,7 @@ int KpTreeListItem::compare( QListViewItem *i, int col, bool ascending ) const
// kdDebug() << k <<"=" << j << "\n";
return j.compare(k);
} else {
- return QListViewItem::compare(i, col, ascending);
+ return TQListViewItem::compare(i, col, ascending);
}
}