From 7be55ffa061c026e35e2d6a0effe1161ddb0d41f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:53:50 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- korganizer/plugins/projectview/koprojectview.cpp | 104 +++++++++++------------ 1 file changed, 52 insertions(+), 52 deletions(-) (limited to 'korganizer/plugins/projectview/koprojectview.cpp') diff --git a/korganizer/plugins/projectview/koprojectview.cpp b/korganizer/plugins/projectview/koprojectview.cpp index 0f2601954..6c448b371 100644 --- a/korganizer/plugins/projectview/koprojectview.cpp +++ b/korganizer/plugins/projectview/koprojectview.cpp @@ -17,16 +17,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -46,9 +46,9 @@ using namespace KOrg; KOProjectViewItem::KOProjectViewItem(Todo *event,KGanttItem* parentTask, - const QString& text, - const QDateTime& start, - const QDateTime& end) : + const TQString& text, + const TQDateTime& start, + const TQDateTime& end) : KGanttItem(parentTask,text,start,end) { mEvent = event; @@ -64,30 +64,30 @@ Todo *KOProjectViewItem::event() } -KOProjectView::KOProjectView(Calendar *calendar,QWidget* parent, +KOProjectView::KOProjectView(Calendar *calendar,TQWidget* parent, const char* name) : KOrg::BaseView(calendar,parent,name) { - QBoxLayout *topLayout = new QVBoxLayout(this); + TQBoxLayout *topLayout = new TQVBoxLayout(this); - QBoxLayout *topBar = new QHBoxLayout; + TQBoxLayout *topBar = new QHBoxLayout; topLayout->addLayout(topBar); - QLabel *title = new QLabel(i18n("Project View"),this); - title->setFrameStyle(QFrame::Panel|QFrame::Raised); + TQLabel *title = new TQLabel(i18n("Project View"),this); + title->setFrameStyle(TQFrame::Panel|TQFrame::Raised); topBar->addWidget(title,1); - QPushButton *zoomIn = new QPushButton(i18n("Zoom In"),this); + TQPushButton *zoomIn = new TQPushButton(i18n("Zoom In"),this); topBar->addWidget(zoomIn,0); - connect(zoomIn,SIGNAL(clicked()),SLOT(zoomIn())); + connect(zoomIn,TQT_SIGNAL(clicked()),TQT_SLOT(zoomIn())); - QPushButton *zoomOut = new QPushButton(i18n("Zoom Out"),this); + TQPushButton *zoomOut = new TQPushButton(i18n("Zoom Out"),this); topBar->addWidget(zoomOut,0); - connect(zoomOut,SIGNAL(clicked()),SLOT(zoomOut())); + connect(zoomOut,TQT_SIGNAL(clicked()),TQT_SLOT(zoomOut())); - QPushButton *menuButton = new QPushButton(i18n("Select Mode"),this); + TQPushButton *menuButton = new TQPushButton(i18n("Select Mode"),this); topBar->addWidget(menuButton,0); - connect(menuButton,SIGNAL(clicked()),SLOT(showModeMenu())); + connect(menuButton,TQT_SIGNAL(clicked()),TQT_SLOT(showModeMenu())); createMainTask(); @@ -107,8 +107,8 @@ KOProjectView::KOProjectView(Calendar *calendar,QWidget* parent, void KOProjectView::createMainTask() { mMainTask = new KGanttItem(0,i18n("main task"), - QDateTime::currentDateTime(), - QDateTime::currentDateTime()); + TQDateTime::currentDateTime(), + TQDateTime::currentDateTime()); mMainTask->setMode(KGanttItem::Rubberband); mMainTask->setStyle(KGanttItem::DrawBorder | KGanttItem::DrawText | KGanttItem::DrawHandle); @@ -122,7 +122,7 @@ void KOProjectView::readSettings() KConfig config( "korganizerrc", true, false); // Open read-only, no kdeglobals config.setGroup("Views"); - QValueList sizes = config.readIntListEntry("Separator ProjectView"); + TQValueList sizes = config.readIntListEntry("Separator ProjectView"); if (sizes.count() == 2) { mGantt->splitter()->setSizes(sizes); } @@ -134,7 +134,7 @@ void KOProjectView::writeSettings(KConfig *config) config->setGroup("Views"); - QValueList list = mGantt->splitter()->sizes(); + TQValueList list = mGantt->splitter()->sizes(); config->writeEntry("Separator ProjectView",list); } @@ -144,7 +144,7 @@ void KOProjectView::updateView() kdDebug(5850) << "KOProjectView::updateView()" << endl; // Clear Gantt view - QPtrList subs = mMainTask->getSubItems(); + TQPtrList subs = mMainTask->getSubItems(); KGanttItem *t=subs.first(); while(t) { KGanttItem *nt=subs.next(); @@ -154,12 +154,12 @@ void KOProjectView::updateView() #if 0 KGanttItem* t1 = new KGanttItem(mGantt->getMainTask(), "task 1, no subtasks", - QDateTime::currentDateTime().addDays(10), - QDateTime::currentDateTime().addDays(20) ); + TQDateTime::currentDateTime().addDays(10), + TQDateTime::currentDateTime().addDays(20) ); KGanttItem* t2 = new KGanttItem(mGantt->getMainTask(), "task 2, subtasks, no rubberband", - QDateTime(QDate(2000,10,1)), - QDateTime(QDate(2000,10,31)) ); + TQDateTime(TQDate(2000,10,1)), + TQDateTime(TQDate(2000,10,31)) ); #endif Todo::List todoList = calendar()->todos(); @@ -174,7 +174,7 @@ void KOProjectView::updateView() kdDebug(5850) << " (related to " << t->getRelatedTo()->getSummary() << ")" << endl; } - QPtrList l = t->getRelations(); + TQPtrList l = t->getRelations(); Event *c; for(c=l.first();c;c=l.next()) { kdDebug(5850) << " - relation: " << c->getSummary() << endl; @@ -194,14 +194,14 @@ void KOProjectView::updateView() } } -QMap::ConstIterator +TQMap::ConstIterator KOProjectView::insertTodoItem(Todo *todo) { // kdDebug(5850) << "KOProjectView::insertTodoItem(): " << todo->getSummary() << endl; Todo *relatedTodo = dynamic_cast(todo->relatedTo()); if (relatedTodo) { // kdDebug(5850) << " has Related" << endl; - QMap::ConstIterator itemIterator; + TQMap::ConstIterator itemIterator; itemIterator = mTodoMap.find(relatedTodo); if (itemIterator == mTodoMap.end()) { // kdDebug(5850) << " related not yet in list" << endl; @@ -218,20 +218,20 @@ QMap::ConstIterator KGanttItem *KOProjectView::createTask(KGanttItem *parent,Todo *todo) { - QDateTime startDt; - QDateTime endDt; + TQDateTime startDt; + TQDateTime endDt; if (todo->hasStartDate() && !todo->hasDueDate()) { // start date but no due date startDt = todo->dtStart(); - endDt = QDateTime::currentDateTime(); + endDt = TQDateTime::currentDateTime(); } else if (!todo->hasStartDate() && todo->hasDueDate()) { // due date but no start date startDt = todo->dtDue(); endDt = todo->dtDue(); } else if (!todo->hasStartDate() || !todo->hasDueDate()) { - startDt = QDateTime::currentDateTime(); - endDt = QDateTime::currentDateTime(); + startDt = TQDateTime::currentDateTime(); + endDt = TQDateTime::currentDateTime(); } else { startDt = todo->dtStart(); endDt = todo->dtDue(); @@ -239,10 +239,10 @@ KGanttItem *KOProjectView::createTask(KGanttItem *parent,Todo *todo) KGanttItem *task = new KOProjectViewItem(todo,parent,todo->summary(),startDt, endDt); - connect(task,SIGNAL(changed(KGanttItem*, KGanttItem::Change)), - SLOT(taskChanged(KGanttItem*,KGanttItem::Change))); + connect(task,TQT_SIGNAL(changed(KGanttItem*, KGanttItem::Change)), + TQT_SLOT(taskChanged(KGanttItem*,KGanttItem::Change))); if (todo->relations().count() > 0) { - task->setBrush(QBrush(QColor(240,240,240), QBrush::Dense4Pattern)); + task->setBrush(TQBrush(TQColor(240,240,240), TQBrush::Dense4Pattern)); } return task; @@ -276,7 +276,7 @@ void KOProjectView::changeIncidenceDisplay(Incidence *, int) updateView(); } -void KOProjectView::showDates(const QDate &, const QDate &) +void KOProjectView::showDates(const TQDate &, const TQDate &) { updateView(); } @@ -287,21 +287,21 @@ void KOProjectView::showIncidences( const Incidence::List & ) } #if 0 -void KOProjectView::editItem(QListViewItem *item) +void KOProjectView::editItem(TQListViewItem *item) { emit editIncidenceSignal(((KOProjectViewItem *)item)->event()); } -void KOProjectView::showItem(QListViewItem *item) +void KOProjectView::showItem(TQListViewItem *item) { emit showIncidenceSignal(((KOProjectViewItem *)item)->event()); } -void KOProjectView::popupMenu(QListViewItem *item,const QPoint &,int) +void KOProjectView::popupMenu(TQListViewItem *item,const TQPoint &,int) { mActiveItem = (KOProjectViewItem *)item; - if (item) mItemPopupMenu->popup(QCursor::pos()); - else mPopupMenu->popup(QCursor::pos()); + if (item) mItemPopupMenu->popup(TQCursor::pos()); + else mPopupMenu->popup(TQCursor::pos()); } void KOProjectView::newTodo() @@ -316,7 +316,7 @@ void KOProjectView::newSubTodo() } } -void KOProjectView::itemClicked(QListViewItem *item) +void KOProjectView::itemClicked(TQListViewItem *item) { if (!item) return; @@ -337,7 +337,7 @@ void KOProjectView::itemClicked(QListViewItem *item) void KOProjectView::showModeMenu() { - mGantt->menu()->popup(QCursor::pos()); + mGantt->menu()->popup(TQCursor::pos()); } void KOProjectView::taskChanged(KGanttItem *task,KGanttItem::Change change) -- cgit v1.2.1