diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /korganizer/plugins/projectview | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'korganizer/plugins/projectview')
-rw-r--r-- | korganizer/plugins/projectview/koprojectview.cpp | 104 | ||||
-rw-r--r-- | korganizer/plugins/projectview/koprojectview.h | 26 | ||||
-rw-r--r-- | korganizer/plugins/projectview/projectview.cpp | 8 | ||||
-rw-r--r-- | korganizer/plugins/projectview/projectview.h | 4 |
4 files changed, 71 insertions, 71 deletions
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 <qlayout.h> -#include <qheader.h> -#include <qpushbutton.h> -#include <qfont.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qlistbox.h> -#include <qpopupmenu.h> -#include <qstrlist.h> -#include <qlistview.h> +#include <tqlayout.h> +#include <tqheader.h> +#include <tqpushbutton.h> +#include <tqfont.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqlistbox.h> +#include <tqpopupmenu.h> +#include <tqstrlist.h> +#include <tqlistview.h> #include <kapplication.h> #include <kdebug.h> @@ -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<int> sizes = config.readIntListEntry("Separator ProjectView"); + TQValueList<int> 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<int> list = mGantt->splitter()->sizes(); + TQValueList<int> 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<KGanttItem> subs = mMainTask->getSubItems(); + TQPtrList<KGanttItem> 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<Event> l = t->getRelations(); + TQPtrList<Event> 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<Todo *,KGanttItem *>::ConstIterator +TQMap<Todo *,KGanttItem *>::ConstIterator KOProjectView::insertTodoItem(Todo *todo) { // kdDebug(5850) << "KOProjectView::insertTodoItem(): " << todo->getSummary() << endl; Todo *relatedTodo = dynamic_cast<Todo *>(todo->relatedTo()); if (relatedTodo) { // kdDebug(5850) << " has Related" << endl; - QMap<Todo *,KGanttItem *>::ConstIterator itemIterator; + TQMap<Todo *,KGanttItem *>::ConstIterator itemIterator; itemIterator = mTodoMap.find(relatedTodo); if (itemIterator == mTodoMap.end()) { // kdDebug(5850) << " related not yet in list" << endl; @@ -218,20 +218,20 @@ QMap<Todo *,KGanttItem *>::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) diff --git a/korganizer/plugins/projectview/koprojectview.h b/korganizer/plugins/projectview/koprojectview.h index a356fe024..4d2d8226c 100644 --- a/korganizer/plugins/projectview/koprojectview.h +++ b/korganizer/plugins/projectview/koprojectview.h @@ -20,10 +20,10 @@ #define KOPROJECTVIEW_H /* $Id$ */ -#include <qptrlist.h> -#include <qfontmetrics.h> +#include <tqptrlist.h> +#include <tqfontmetrics.h> -#include <qmap.h> +#include <tqmap.h> #include <libkcal/calendar.h> #include <libkcal/event.h> @@ -46,8 +46,8 @@ class QListView; */ class KOProjectViewItem : public KGanttItem { public: - KOProjectViewItem(Todo *,KGanttItem* parentTask, const QString& text, - const QDateTime& start, const QDateTime& end); + KOProjectViewItem(Todo *,KGanttItem* parentTask, const TQString& text, + const TQDateTime& start, const TQDateTime& end); ~KOProjectViewItem(); Todo *event(); @@ -67,7 +67,7 @@ class KOProjectView : public KOrg::BaseView { Q_OBJECT public: - KOProjectView(Calendar *, QWidget* parent=0, const char* name=0 ); + KOProjectView(Calendar *, TQWidget* parent=0, const char* name=0 ); ~KOProjectView() {} Incidence::List selectedIncidences(); @@ -85,16 +85,16 @@ class KOProjectView : public KOrg::BaseView void changeIncidenceDisplay(Incidence *, int); - void showDates(const QDate &start, const QDate &end); + void showDates(const TQDate &start, const TQDate &end); void showIncidences( const Incidence::List &incidenceList ); /* - void editItem(QListViewItem *item); - void showItem(QListViewItem *item); - void popupMenu(QListViewItem *item,const QPoint &,int); + void editItem(TQListViewItem *item); + void showItem(TQListViewItem *item); + void popupMenu(TQListViewItem *item,const TQPoint &,int); void newTodo(); void newSubTodo(); - void itemClicked(QListViewItem *); + void itemClicked(TQListViewItem *); */ protected slots: @@ -110,9 +110,9 @@ class KOProjectView : public KOrg::BaseView KGantt *mGantt; KGanttItem *mMainTask; - QMap<Todo *,KGanttItem *>::ConstIterator insertTodoItem(Todo *todo); + TQMap<Todo *,KGanttItem *>::ConstIterator insertTodoItem(Todo *todo); - QMap<Todo *,KGanttItem *> mTodoMap; + TQMap<Todo *,KGanttItem *> mTodoMap; }; #endif diff --git a/korganizer/plugins/projectview/projectview.cpp b/korganizer/plugins/projectview/projectview.cpp index 3fdf84b43..2e7b3dc61 100644 --- a/korganizer/plugins/projectview/projectview.cpp +++ b/korganizer/plugins/projectview/projectview.cpp @@ -17,7 +17,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qfile.h> +#include <tqfile.h> #include <kapplication.h> #include <kconfig.h> @@ -52,7 +52,7 @@ ProjectView::ProjectView(KOrg::MainWindow *parent, const char *name) : setXMLFile("plugins/projectviewui.rc"); - new KAction(i18n("&Project"), "project", 0, this, SLOT(showView()), + new KAction(i18n("&Project"), "project", 0, this, TQT_SLOT(showView()), actionCollection(), "view_project"); } @@ -60,12 +60,12 @@ ProjectView::~ProjectView() { } -QString ProjectView::info() +TQString ProjectView::info() { return i18n("This plugin provides a Gantt diagram as project view."); } -QString ProjectView::shortInfo() +TQString ProjectView::shortInfo() { return i18n("Project View Plugin"); } diff --git a/korganizer/plugins/projectview/projectview.h b/korganizer/plugins/projectview/projectview.h index acc9a604f..a3f372a87 100644 --- a/korganizer/plugins/projectview/projectview.h +++ b/korganizer/plugins/projectview/projectview.h @@ -29,8 +29,8 @@ class ProjectView : public KOrg::Part { ProjectView(KOrg::MainWindow *, const char *); ~ProjectView(); - QString info(); - QString shortInfo(); + TQString info(); + TQString shortInfo(); private slots: void showView(); |