summaryrefslogtreecommitdiffstats
path: root/korganizer/kotodoviewitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'korganizer/kotodoviewitem.cpp')
-rw-r--r--korganizer/kotodoviewitem.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp
index bb5f08c52..7e5541fa3 100644
--- a/korganizer/kotodoviewitem.cpp
+++ b/korganizer/kotodoviewitem.cpp
@@ -24,26 +24,26 @@
without including the source code for Qt in the source distribution.
*/
-#include <qpainter.h>
+#include <tqpainter.h>
#include <klocale.h>
#include <kdebug.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include "kotodoviewitem.h"
#include "kotodoview.h"
#include "koprefs.h"
#include "koglobals.h"
-KOTodoViewItem::KOTodoViewItem( QListView *parent, Todo *todo, KOTodoView *kotodo)
- : QCheckListItem( parent , "", CheckBox ), mTodo( todo ), mTodoView( kotodo )
+KOTodoViewItem::KOTodoViewItem( TQListView *parent, Todo *todo, KOTodoView *kotodo)
+ : TQCheckListItem( parent , "", CheckBox ), mTodo( todo ), mTodoView( kotodo )
{
construct();
}
KOTodoViewItem::KOTodoViewItem( KOTodoViewItem *parent, Todo *todo, KOTodoView *kotodo )
- : QCheckListItem( parent, "", CheckBox ), mTodo( todo ), mTodoView( kotodo )
+ : TQCheckListItem( parent, "", CheckBox ), mTodo( todo ), mTodoView( kotodo )
{
construct();
}
@@ -60,11 +60,11 @@ inline int KOTodoViewItem::compareDueDates( const KOTodoViewItem *b ) const
return b->mEffectiveDueDate.secsTo( mEffectiveDueDate );
}
-int KOTodoViewItem::compare( QListViewItem *it, int col, bool ascending ) const
+int KOTodoViewItem::compare( TQListViewItem *it, int col, bool ascending ) const
{
KOTodoViewItem *i = dynamic_cast<KOTodoViewItem *>( it );
if ( !i )
- return QListViewItem::compare( it, col, ascending );
+ return TQListViewItem::compare( it, col, ascending );
// throw completed todos to the bottom
if ( mTodo->isCompleted() && !i->todo()->isCompleted() )
@@ -97,15 +97,15 @@ int KOTodoViewItem::compare( QListViewItem *it, int col, bool ascending ) const
return mTodo->description().localeAwareCompare( i->todo()->description() );
default:
Q_ASSERT( false && "unknown column to compare" );
- return QListViewItem::compare( it, col, ascending );
+ return TQListViewItem::compare( it, col, ascending );
}
}
#if QT_VERSION >= 300
-void KOTodoViewItem::paintBranches(QPainter *p,const QColorGroup & cg,int w,
+void KOTodoViewItem::paintBranches(TQPainter *p,const TQColorGroup & cg,int w,
int y,int h)
{
- QListViewItem::paintBranches(p,cg,w,y,h);
+ TQListViewItem::paintBranches(p,cg,w,y,h);
}
#else
#endif
@@ -117,19 +117,19 @@ void KOTodoViewItem::construct()
setOn( mTodo->isCompleted() );
setText( KOTodoView::eSummaryColumn, mTodo->summary());
- static const QPixmap recurPxmp = KOGlobals::self()->smallIcon("recur");
+ static const TQPixmap recurPxmp = KOGlobals::self()->smallIcon("recur");
if ( mTodo->doesRecur() )
setPixmap( KOTodoView::eRecurColumn, recurPxmp );
if ( mTodo->priority()==0 ) {
setText( KOTodoView::ePriorityColumn, i18n("--") );
} else {
- setText( KOTodoView::ePriorityColumn, QString::number(mTodo->priority()) );
+ setText( KOTodoView::ePriorityColumn, TQString::number(mTodo->priority()) );
}
- setText( KOTodoView::ePercentColumn, QString::number(mTodo->percentComplete()) );
+ setText( KOTodoView::ePercentColumn, TQString::number(mTodo->percentComplete()) );
if (mTodo->hasDueDate()) {
- QString dtStr = mTodo->dtDueDateStr();
+ TQString dtStr = mTodo->dtDueDateStr();
if (!mTodo->doesFloat()) {
dtStr += " " + mTodo->dtDueTimeStr();
}
@@ -154,7 +154,7 @@ void KOTodoViewItem::construct()
if (pos < 0) {
setText( KOTodoView::eDescriptionColumn, "" );
} else {
- QString str = mTodo->description().mid(pos+1);
+ TQString str = mTodo->description().mid(pos+1);
str.stripWhiteSpace();
setText( KOTodoView::eDescriptionColumn, str );
}
@@ -195,12 +195,12 @@ bool KOTodoViewItem::isAlternate()
{
KOTodoViewItem *item;
bool previous = true;
- if (QListViewItem::parent())
+ if (TQListViewItem::parent())
{
- item = dynamic_cast<KOTodoViewItem *>(QListViewItem::parent());
+ item = dynamic_cast<KOTodoViewItem *>(TQListViewItem::parent());
if (item)
previous = item->m_odd;
- item = dynamic_cast<KOTodoViewItem *>(QListViewItem::parent()->firstChild());
+ item = dynamic_cast<KOTodoViewItem *>(TQListViewItem::parent()->firstChild());
}
else
{
@@ -222,24 +222,24 @@ bool KOTodoViewItem::isAlternate()
#endif
}
-void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment)
+void KOTodoViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment)
{
- QColorGroup _cg = cg;
+ TQColorGroup _cg = cg;
// If no todo is set, just don't paint anything...
if ( !mTodo ) return;
#ifndef KORG_NOLVALTERNATION
if (isAlternate())
- _cg.setColor(QColorGroup::Base, static_cast< KOTodoListView* >(listView())->alternateBackground());
+ _cg.setColor(TQColorGroup::Base, static_cast< KOTodoListView* >(listView())->alternateBackground());
if (mTodo->hasDueDate()) {
- if (mTodo->dtDue().date()==QDate::currentDate() &&
+ if (mTodo->dtDue().date()==TQDate::currentDate() &&
!mTodo->isCompleted()) {
- _cg.setColor(QColorGroup::Base, KOPrefs::instance()->mTodoDueTodayColor);
- _cg.setColor(QColorGroup::Text, getTextColor(KOPrefs::instance()->mTodoDueTodayColor));
+ _cg.setColor(TQColorGroup::Base, KOPrefs::instance()->mTodoDueTodayColor);
+ _cg.setColor(TQColorGroup::Text, getTextColor(KOPrefs::instance()->mTodoDueTodayColor));
}
- if (mTodo->dtDue().date() < QDate::currentDate() &&
+ if (mTodo->dtDue().date() < TQDate::currentDate() &&
!mTodo->isCompleted()) {
- _cg.setColor(QColorGroup::Base, KOPrefs::instance()->mTodoOverdueColor);
- _cg.setColor(QColorGroup::Text, getTextColor(KOPrefs::instance()->mTodoOverdueColor));
+ _cg.setColor(TQColorGroup::Base, KOPrefs::instance()->mTodoOverdueColor);
+ _cg.setColor(TQColorGroup::Text, getTextColor(KOPrefs::instance()->mTodoOverdueColor));
}
}
#endif
@@ -257,6 +257,6 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i
KGlobalSettings::highlightColor() );
p->restore();
} else {
- QCheckListItem::paintCell(p, _cg, column, width, alignment);
+ TQCheckListItem::paintCell(p, _cg, column, width, alignment);
}
}