summaryrefslogtreecommitdiffstats
path: root/vcs/cvsservice/annotateview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'vcs/cvsservice/annotateview.cpp')
-rw-r--r--vcs/cvsservice/annotateview.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/vcs/cvsservice/annotateview.cpp b/vcs/cvsservice/annotateview.cpp
index 93a2a46d..afc185cd 100644
--- a/vcs/cvsservice/annotateview.cpp
+++ b/vcs/cvsservice/annotateview.cpp
@@ -15,9 +15,9 @@
#include "annotateview.h"
-#include <qheader.h>
-#include <qdatetime.h>
-#include <qpainter.h>
+#include <tqheader.h>
+#include <tqdatetime.h>
+#include <tqpainter.h>
#include <kglobalsettings.h>
#include <kglobal.h>
#include <klocale.h>
@@ -32,21 +32,21 @@ class AnnotateViewItem : public QListViewItem
public:
enum { LineNumberColumn, AuthorColumn, DateColumn,ContentColumn };
- AnnotateViewItem(AnnotateView *parent, QString rev, QString author,
- QDateTime date, QString content, QString comment,
+ AnnotateViewItem(AnnotateView *parent, TQString rev, TQString author,
+ TQDateTime date, TQString content, TQString comment,
bool odd, int linenumber);
- virtual int compare(QListViewItem *item, int col, bool ascending) const;
- virtual int width(const QFontMetrics &, const QListView *, int col) const;
- virtual QString text(int col) const;
- virtual void paintCell(QPainter *, const QColorGroup &, int, int, int);
+ virtual int compare(TQListViewItem *item, int col, bool ascending) const;
+ virtual int width(const TQFontMetrics &, const TQListView *, int col) const;
+ virtual TQString text(int col) const;
+ virtual void paintCell(TQPainter *, const TQColorGroup &, int, int, int);
private:
- QString m_revision;
- QString m_author;
- QString m_content;
- QString m_comment;
- QDateTime m_logDate;
+ TQString m_revision;
+ TQString m_author;
+ TQString m_content;
+ TQString m_comment;
+ TQDateTime m_logDate;
bool m_odd;
int m_lineNumber;
@@ -57,10 +57,10 @@ private:
const int AnnotateViewItem::BORDER = 4;
-AnnotateViewItem::AnnotateViewItem(AnnotateView *parent, QString rev,
- QString author, QDateTime date, QString content, QString comment,
+AnnotateViewItem::AnnotateViewItem(AnnotateView *parent, TQString rev,
+ TQString author, TQDateTime date, TQString content, TQString comment,
bool odd, int linenumber)
- : QListViewItem(parent)
+ : TQListViewItem(parent)
, m_revision(rev)
, m_author(author)
, m_content(content)
@@ -71,7 +71,7 @@ AnnotateViewItem::AnnotateViewItem(AnnotateView *parent, QString rev,
{}
-int AnnotateViewItem::compare(QListViewItem *item, int, bool) const
+int AnnotateViewItem::compare(TQListViewItem *item, int, bool) const
{
int linenum1 = m_lineNumber;
int linenum2 = static_cast<AnnotateViewItem*>(item)->m_lineNumber;
@@ -80,14 +80,14 @@ int AnnotateViewItem::compare(QListViewItem *item, int, bool) const
}
-QString AnnotateViewItem::text(int col) const
+TQString AnnotateViewItem::text(int col) const
{
switch (col)
{
case LineNumberColumn:
- return QString::number(m_lineNumber);
+ return TQString::number(m_lineNumber);
case AuthorColumn:
- return (m_revision + QChar(' ') + m_author);
+ return (m_revision + TQChar(' ') + m_author);
case DateColumn:
return KGlobal::locale()->formatDate(m_logDate.date(), true);
case ContentColumn:
@@ -96,13 +96,13 @@ QString AnnotateViewItem::text(int col) const
;
};
- return QString::null;
+ return TQString::null;
}
-void AnnotateViewItem::paintCell(QPainter *p, const QColorGroup &, int col, int width, int align)
+void AnnotateViewItem::paintCell(TQPainter *p, const TQColorGroup &, int col, int width, int align)
{
- QColor backgroundColor;
+ TQColor backgroundColor;
switch (col)
{
@@ -119,7 +119,7 @@ void AnnotateViewItem::paintCell(QPainter *p, const QColorGroup &, int col, int
p->fillRect(0, 0, width, height(), backgroundColor);
- QString str = text(col);
+ TQString str = text(col);
if (str.isEmpty())
return;
@@ -130,7 +130,7 @@ void AnnotateViewItem::paintCell(QPainter *p, const QColorGroup &, int col, int
}
-int AnnotateViewItem::width(const QFontMetrics &fm, const QListView *, int col) const
+int AnnotateViewItem::width(const TQFontMetrics &fm, const TQListView *, int col) const
{
return fm.width(text(col)) + 2*BORDER;
}
@@ -141,43 +141,43 @@ int AnnotateViewItem::width(const QFontMetrics &fm, const QListView *, int col)
/******************************************************************************/
AnnotateView::AnnotateView(AnnotatePage *parent, const char *name)
- : KListView(parent, name), QToolTip( viewport() ),
+ : KListView(parent, name), TQToolTip( viewport() ),
m_page(parent)
{
- setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
+ setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken);
setAllColumnsShowFocus(true);
setShowToolTips(false);
header()->hide();
- addColumn(QString::null);
- addColumn(QString::null);
- addColumn(QString::null);
- addColumn(QString::null);
+ addColumn(TQString::null);
+ addColumn(TQString::null);
+ addColumn(TQString::null);
+ addColumn(TQString::null);
setSorting(AnnotateViewItem::LineNumberColumn);
setColumnAlignment(AnnotateViewItem::LineNumberColumn, Qt::AlignRight);
- connect( this, SIGNAL(executed(QListViewItem*)),
- this, SLOT(itemClicked(QListViewItem*)) );
+ connect( this, TQT_SIGNAL(executed(TQListViewItem*)),
+ this, TQT_SLOT(itemClicked(TQListViewItem*)) );
}
-void AnnotateView::addLine(QString rev, QString author, QDateTime date,
- QString content, QString comment, bool odd)
+void AnnotateView::addLine(TQString rev, TQString author, TQDateTime date,
+ TQString content, TQString comment, bool odd)
{
new AnnotateViewItem(this, rev, author, date, content, comment,
odd, childCount()+1);
}
-QSize AnnotateView::sizeHint() const
+TQSize AnnotateView::sizeHint() const
{
- QFontMetrics fm(fontMetrics());
- return QSize(100 * fm.width("0"), 20 * fm.lineSpacing());
+ TQFontMetrics fm(fontMetrics());
+ return TQSize(100 * fm.width("0"), 20 * fm.lineSpacing());
}
-void AnnotateView::maybeTip( const QPoint & p )
+void AnnotateView::maybeTip( const TQPoint & p )
{
AnnotateViewItem * item = dynamic_cast<AnnotateViewItem*>( itemAt( p ) );
if (!item)
@@ -189,9 +189,9 @@ void AnnotateView::maybeTip( const QPoint & p )
return;
}
- QRect r = itemRect( item );
+ TQRect r = itemRect( item );
//get the dimension of the author + the date column
- QRect headerRect = header()->sectionRect(AnnotateViewItem::AuthorColumn);
+ TQRect headerRect = header()->sectionRect(AnnotateViewItem::AuthorColumn);
headerRect = headerRect.unite(header()->sectionRect(AnnotateViewItem::DateColumn));
r.setLeft(headerRect.left());
@@ -205,7 +205,7 @@ void AnnotateView::maybeTip( const QPoint & p )
}
}
-void AnnotateView::itemClicked(QListViewItem *item)
+void AnnotateView::itemClicked(TQListViewItem *item)
{
kdDebug(9006) << "itemClicked()" << endl;