diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kplato/kpttaskappointmentsview.cc | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kplato/kpttaskappointmentsview.cc')
-rw-r--r-- | kplato/kpttaskappointmentsview.cc | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/kplato/kpttaskappointmentsview.cc b/kplato/kpttaskappointmentsview.cc index a686f108..81ad4242 100644 --- a/kplato/kpttaskappointmentsview.cc +++ b/kplato/kpttaskappointmentsview.cc @@ -22,24 +22,24 @@ #include "kptappointment.h" #include "kpttask.h" -#include <qapplication.h> +#include <tqapplication.h> #include <kcalendarsystem.h> #include <kglobal.h> #include <klocale.h> -#include <qheader.h> +#include <tqheader.h> namespace KPlato { -TaskAppointmentsView::ResourceItem::ResourceItem(Resource *r, QListView *parent, bool highlight) - : DoubleListViewBase::MasterListItem(parent, r->name(), highlight), +TaskAppointmentsView::ResourceItem::ResourceItem(Resource *r, TQListView *tqparent, bool highlight) + : DoubleListViewBase::MasterListItem(tqparent, r->name(), highlight), resource(r) { setFormat(0, 'f', 1); //kdDebug()<<k_funcinfo<<endl; } -TaskAppointmentsView::ResourceItem::ResourceItem(Resource *r, QListViewItem *p, bool highlight) +TaskAppointmentsView::ResourceItem::ResourceItem(Resource *r, TQListViewItem *p, bool highlight) : DoubleListViewBase::MasterListItem(p, r->name(), highlight), resource(r) { @@ -47,8 +47,8 @@ TaskAppointmentsView::ResourceItem::ResourceItem(Resource *r, QListViewItem *p, //kdDebug()<<k_funcinfo<<endl; } -TaskAppointmentsView::ResourceItem::ResourceItem(QString text, QListViewItem *parent, bool highlight) - : DoubleListViewBase::MasterListItem(parent, text, highlight), +TaskAppointmentsView::ResourceItem::ResourceItem(TQString text, TQListViewItem *tqparent, bool highlight) + : DoubleListViewBase::MasterListItem(tqparent, text, highlight), resource(0) { setFormat(0, 'f', 1); @@ -56,16 +56,16 @@ TaskAppointmentsView::ResourceItem::ResourceItem(QString text, QListViewItem *pa } //------------------------------------------- -TaskAppointmentsView::TaskAppointmentsView(QWidget *parent) - : DoubleListViewBase(parent), +TaskAppointmentsView::TaskAppointmentsView(TQWidget *tqparent) + : DoubleListViewBase(tqparent), m_task(0) { setNameHeader(i18n("Resource")); - QValueList<int> list = sizes(); + TQValueList<int> list = sizes(); int tot = list[0] + list[1]; - list[0] = QMIN(35, tot); + list[0] = TQMIN(35, tot); list[1] = tot-list[0]; setSizes(list); } @@ -86,8 +86,8 @@ void TaskAppointmentsView::draw() { if (!m_task) return; - QPtrList<Appointment> lst = m_task->appointments(); - QPtrListIterator<Appointment> it(lst); + TQPtrList<Appointment> lst = m_task->appointments(); + TQPtrListIterator<Appointment> it(lst); for (; it.current(); ++it) { Resource *r = it.current()->resource()->resource(); TaskAppointmentsView::ResourceItem *item = new TaskAppointmentsView::ResourceItem(r, masterListView()); @@ -97,7 +97,7 @@ void TaskAppointmentsView::draw() { slotUpdate(); } -void TaskAppointmentsView::drawContents(QPainter* painter) +void TaskAppointmentsView::drawContents(TQPainter* painter) { this->DoubleListViewBase::drawContents(painter); } @@ -106,21 +106,21 @@ void TaskAppointmentsView::slotUpdate() { //kdDebug()<<k_funcinfo<<endl; if (!m_task) return; - QApplication::setOverrideCursor(Qt::waitCursor); + TQApplication::setOverrideCursor(TQt::waitCursor); createSlaveItems(); KLocale *locale = KGlobal::locale(); const KCalendarSystem *cal = locale->calendar(); // Add columns for selected period/periods - QDate start = m_task->startTime().date(); - QDate end = m_task->endTime().date(); + TQDate start = m_task->startTime().date(); + TQDate end = m_task->endTime().date(); //kdDebug()<<k_funcinfo<<start.toString()<<" - "<<end.toString()<<endl; int c=0; - for (QDate dt = start; dt <= end; dt = cal->addDays(dt, 1), ++c) { - QString df = locale->formatDate(dt, true); + for (TQDate dt = start; dt <= end; dt = cal->addDays(dt, 1), ++c) { + TQString df = locale->formatDate(dt, true); addSlaveColumn(df); } - QListViewItemIterator it(masterListView()); + TQListViewItemIterator it(masterListView()); for (;it.current(); ++it) { TaskAppointmentsView::ResourceItem *item = static_cast<TaskAppointmentsView::ResourceItem*>(it.current()); if (!item) { @@ -128,14 +128,14 @@ void TaskAppointmentsView::slotUpdate() { } double eff; int col=0; - for (QDate d=start; d <= end; d = cal->addDays(d, 1), ++col) { + for (TQDate d=start; d <= end; d = cal->addDays(d, 1), ++col) { eff = (double)(item->effortMap.effortOnDate(d).minutes())/60.0; item->setSlaveItem(col, eff); item->addToTotal(eff); } } calculate(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } @@ -146,12 +146,12 @@ void TaskAppointmentsView::print(KPrinter &/*printer*/) { // bool TaskAppointmentsView::setContext(Context::TaskAppointmentsView &context) { // //kdDebug()<<k_funcinfo<<endl; // -// QValueList<int> list; +// TQValueList<int> list; // list << context.accountsviewsize << context.periodviewsize; // m_dlv->setSizes(list); // m_date = context.date; // if (!m_date.isValid()) -// m_date = QDate::currentDate(); +// m_date = TQDate::tqcurrentDate(); // m_period = context.period; // m_cumulative = context.cumulative; // |