diff options
Diffstat (limited to 'kplato/kptview.cc')
-rw-r--r-- | kplato/kptview.cc | 322 |
1 files changed, 161 insertions, 161 deletions
diff --git a/kplato/kptview.cc b/kplato/kptview.cc index 321bff42..a5b9f6b0 100644 --- a/kplato/kptview.cc +++ b/kplato/kptview.cc @@ -23,26 +23,26 @@ #include <KoMainWindow.h> -#include <qapplication.h> -#include <qpainter.h> -#include <qiconset.h> -#include <qlayout.h> -#include <qsplitter.h> -#include <qcanvas.h> -#include <qscrollview.h> -#include <qcolor.h> -#include <qlabel.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qvbox.h> -#include <qgrid.h> -#include <qsize.h> -#include <qheader.h> -#include <qtabwidget.h> -#include <qwidgetstack.h> -#include <qtimer.h> -#include <qpopupmenu.h> -#include <qpair.h> +#include <tqapplication.h> +#include <tqpainter.h> +#include <tqiconset.h> +#include <tqlayout.h> +#include <tqsplitter.h> +#include <tqcanvas.h> +#include <tqscrollview.h> +#include <tqcolor.h> +#include <tqlabel.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqvbox.h> +#include <tqgrid.h> +#include <tqsize.h> +#include <tqheader.h> +#include <tqtabwidget.h> +#include <tqwidgetstack.h> +#include <tqtimer.h> +#include <tqpopupmenu.h> +#include <tqpair.h> #include <kiconloader.h> #include <kaction.h> @@ -99,12 +99,12 @@ namespace KPlato { -View::View(Part* part, QWidget* parent, const char* /*name*/) - : KoView(part, parent, "Main View"), +View::View(Part* part, TQWidget* tqparent, const char* /*name*/) + : KoView(part, tqparent, "Main View"), m_ganttview(0), - m_ganttlayout(0), + m_gantttqlayout(0), m_pertview(0), - m_pertlayout(0), + m_perttqlayout(0), // m_reportview(0), m_baselineMode(false), m_currentEstimateType(Effort::Use_Expected) @@ -121,16 +121,16 @@ View::View(Part* part, QWidget* parent, const char* /*name*/) // build the DCOP object dcopObject(); - m_tab = new QWidgetStack(this); - QVBoxLayout *layout = new QVBoxLayout(this); - layout->add(m_tab); + m_tab = new TQWidgetStack(this); + TQVBoxLayout *tqlayout = new TQVBoxLayout(this); + tqlayout->add(m_tab); m_ganttview = new GanttView(m_tab, part->isReadWrite()); m_tab->addWidget(m_ganttview); m_updateGanttview = false; m_ganttview->draw(getPart()->getProject()); - m_pertview = new PertView( this, m_tab, layout ); + m_pertview = new PertView( this, m_tab, tqlayout ); m_tab->addWidget(m_pertview); m_resourceview = new ResourceView( this, m_tab ); @@ -144,150 +144,150 @@ View::View(Part* part, QWidget* parent, const char* /*name*/) //m_reportview = new ReportView(this, m_tab); //m_tab->addWidget(m_reportview); - connect(m_tab, SIGNAL(aboutToShow(QWidget *)), this, SLOT(slotAboutToShow(QWidget *))); + connect(m_tab, TQT_SIGNAL(aboutToShow(TQWidget *)), TQT_TQOBJECT(this), TQT_SLOT(slotAboutToShow(TQWidget *))); - connect(m_pertview, SIGNAL(addRelation(Node*, Node*)), SLOT(slotAddRelation(Node*, Node*))); - connect(m_pertview, SIGNAL(modifyRelation(Relation*)), SLOT(slotModifyRelation(Relation*))); - - connect(m_ganttview, SIGNAL(enableActions(bool)), SLOT(setTaskActionsEnabled(bool))); - connect(m_ganttview, SIGNAL(addRelation(Node*, Node*, int)), SLOT(slotAddRelation(Node*, Node*, int))); - connect(m_ganttview, SIGNAL(modifyRelation(Relation*, int)), SLOT(slotModifyRelation(Relation*, int))); - connect(m_ganttview, SIGNAL(modifyRelation(Relation*)), SLOT(slotModifyRelation(Relation*))); - connect(m_ganttview, SIGNAL(itemDoubleClicked()), SLOT(slotOpenNode())); - connect(m_ganttview, SIGNAL(itemRenamed(Node*, const QString&)),this,SLOT(slotRenameNode(Node*, const QString&))); - connect(m_ganttview, SIGNAL(requestPopupMenu(const QString&, const QPoint &)),this,SLOT(slotPopupMenu(const QString&, const QPoint&))); - connect(m_resourceview, SIGNAL(itemDoubleClicked()), SLOT(slotEditResource())); + connect(m_pertview, TQT_SIGNAL(addRelation(Node*, Node*)), TQT_SLOT(slotAddRelation(Node*, Node*))); + connect(m_pertview, TQT_SIGNAL(modifyRelation(Relation*)), TQT_SLOT(slotModifyRelation(Relation*))); + + connect(m_ganttview, TQT_SIGNAL(enableActions(bool)), TQT_SLOT(setTaskActionsEnabled(bool))); + connect(m_ganttview, TQT_SIGNAL(addRelation(Node*, Node*, int)), TQT_SLOT(slotAddRelation(Node*, Node*, int))); + connect(m_ganttview, TQT_SIGNAL(modifyRelation(Relation*, int)), TQT_SLOT(slotModifyRelation(Relation*, int))); + connect(m_ganttview, TQT_SIGNAL(modifyRelation(Relation*)), TQT_SLOT(slotModifyRelation(Relation*))); + connect(m_ganttview, TQT_SIGNAL(itemDoubleClicked()), TQT_SLOT(slotOpenNode())); + connect(m_ganttview, TQT_SIGNAL(itemRenamed(Node*, const TQString&)),TQT_TQOBJECT(this), TQT_SLOT(slotRenameNode(Node*, const TQString&))); + connect(m_ganttview, TQT_SIGNAL(requestPopupMenu(const TQString&, const TQPoint &)),TQT_TQOBJECT(this), TQT_SLOT(slotPopupMenu(const TQString&, const TQPoint&))); + connect(m_resourceview, TQT_SIGNAL(itemDoubleClicked()), TQT_SLOT(slotEditResource())); // The menu items // ------ Edit - actionCut = KStdAction::cut( this, SLOT( slotEditCut() ), actionCollection(), "edit_cut" ); - actionCopy = KStdAction::copy( this, SLOT( slotEditCopy() ), actionCollection(), "edit_copy" ); - actionPaste = KStdAction::paste( this, SLOT( slotEditPaste() ), actionCollection(), "edit_paste" ); - - actionIndentTask = new KAction(i18n("Indent Task"), "indent_task", 0, this, - SLOT(slotIndentTask()), actionCollection(), "indent_task"); - actionUnindentTask = new KAction(i18n("Unindent Task"), "unindent_task", 0, this, - SLOT(slotUnindentTask()), actionCollection(), "unindent_task"); - actionMoveTaskUp = new KAction(i18n("Move Up"), "move_task_up", 0, this, - SLOT(slotMoveTaskUp()), actionCollection(), "move_task_up"); - actionMoveTaskDown = new KAction(i18n("Move Down"), "move_task_down", 0, this, - SLOT(slotMoveTaskDown()), actionCollection(), "move_task_down"); + actionCut = KStdAction::cut( TQT_TQOBJECT(this), TQT_SLOT( slotEditCut() ), actionCollection(), "edit_cut" ); + actionCopy = KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT( slotEditCopy() ), actionCollection(), "edit_copy" ); + actionPaste = KStdAction::paste( TQT_TQOBJECT(this), TQT_SLOT( slotEditPaste() ), actionCollection(), "edit_paste" ); + + actionIndentTask = new KAction(i18n("Indent Task"), "indent_task", 0, TQT_TQOBJECT(this), + TQT_SLOT(slotIndentTask()), actionCollection(), "indent_task"); + actionUnindentTask = new KAction(i18n("Unindent Task"), "unindent_task", 0, TQT_TQOBJECT(this), + TQT_SLOT(slotUnindentTask()), actionCollection(), "unindent_task"); + actionMoveTaskUp = new KAction(i18n("Move Up"), "move_task_up", 0, TQT_TQOBJECT(this), + TQT_SLOT(slotMoveTaskUp()), actionCollection(), "move_task_up"); + actionMoveTaskDown = new KAction(i18n("Move Down"), "move_task_down", 0, TQT_TQOBJECT(this), + TQT_SLOT(slotMoveTaskDown()), actionCollection(), "move_task_down"); // ------ View - actionViewGantt = new KAction(i18n("Gantt"), "gantt_chart", 0, this, SLOT(slotViewGantt()), actionCollection(), "view_gantt"); + actionViewGantt = new KAction(i18n("Gantt"), "gantt_chart", 0, TQT_TQOBJECT(this), TQT_SLOT(slotViewGantt()), actionCollection(), "view_gantt"); - QString group = "EstimationType"; - actionViewExpected = new KRadioAction(i18n("Expected"), 0, 0, this, SLOT(slotViewExpected()), actionCollection(), "view_expected"); + TQString group = "EstimationType"; + actionViewExpected = new KRadioAction(i18n("Expected"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotViewExpected()), actionCollection(), "view_expected"); actionViewExpected->setExclusiveGroup(group); - actionViewOptimistic = new KRadioAction(i18n("Optimistic"), 0, 0, this, SLOT(slotViewOptimistic()), actionCollection(), "view_optimistic"); + actionViewOptimistic = new KRadioAction(i18n("Optimistic"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotViewOptimistic()), actionCollection(), "view_optimistic"); actionViewOptimistic->setExclusiveGroup(group); - actionViewPessimistic = new KRadioAction(i18n("Pessimistic"), 0, 0, this, SLOT(slotViewPessimistic()), actionCollection(), "view_pessimistic"); + actionViewPessimistic = new KRadioAction(i18n("Pessimistic"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotViewPessimistic()), actionCollection(), "view_pessimistic"); actionViewPessimistic->setExclusiveGroup(group); - actionViewGanttResources = new KToggleAction(i18n("Resources"), 0, 0, this, SLOT(slotViewGanttResources()), actionCollection(), "view_gantt_showResources"); - actionViewGanttTaskName = new KToggleAction(i18n("Task Name"), 0, 0, this, SLOT(slotViewGanttTaskName()), actionCollection(), "view_gantt_showTaskName"); - actionViewGanttTaskLinks = new KToggleAction(i18n("Task Links"), 0, 0, this, SLOT(slotViewGanttTaskLinks()), actionCollection(), "view_gantt_showTaskLinks"); - actionViewGanttProgress = new KToggleAction(i18n("Progress"), 0, 0, this, SLOT(slotViewGanttProgress()), actionCollection(), "view_gantt_showProgress"); - actionViewGanttFloat = new KToggleAction(i18n("Float"), 0, 0, this, SLOT(slotViewGanttFloat()), actionCollection(), "view_gantt_showFloat"); - actionViewGanttCriticalTasks = new KToggleAction(i18n("Critical Tasks"), 0, 0, this, SLOT(slotViewGanttCriticalTasks()), actionCollection(), "view_gantt_showCriticalTasks"); - actionViewGanttCriticalPath = new KToggleAction(i18n("Critical Path"), 0, 0, this, SLOT(slotViewGanttCriticalPath()), actionCollection(), "view_gantt_showCriticalPath"); + actionViewGanttResources = new KToggleAction(i18n("Resources"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotViewGanttResources()), actionCollection(), "view_gantt_showResources"); + actionViewGanttTaskName = new KToggleAction(i18n("Task Name"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotViewGanttTaskName()), actionCollection(), "view_gantt_showTaskName"); + actionViewGanttTaskLinks = new KToggleAction(i18n("Task Links"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotViewGanttTaskLinks()), actionCollection(), "view_gantt_showTaskLinks"); + actionViewGanttProgress = new KToggleAction(i18n("Progress"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotViewGanttProgress()), actionCollection(), "view_gantt_showProgress"); + actionViewGanttFloat = new KToggleAction(i18n("Float"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotViewGanttFloat()), actionCollection(), "view_gantt_showFloat"); + actionViewGanttCriticalTasks = new KToggleAction(i18n("Critical Tasks"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotViewGanttCriticalTasks()), actionCollection(), "view_gantt_showCriticalTasks"); + actionViewGanttCriticalPath = new KToggleAction(i18n("Critical Path"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotViewGanttCriticalPath()), actionCollection(), "view_gantt_showCriticalPath"); -// actionViewGanttNotScheduled = new KToggleAction(i18n("Not Scheduled"), 0, 0, this, SLOT(slotViewGanttNotScheduled()), actionCollection(), "view_gantt_showNotScheduled"); +// actionViewGanttNotScheduled = new KToggleAction(i18n("Not Scheduled"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotViewGanttNotScheduled()), actionCollection(), "view_gantt_showNotScheduled"); - actionViewTaskAppointments = new KToggleAction(i18n("Show Allocations"), 0, 0, this, SLOT(slotViewTaskAppointments()), actionCollection(), "view_task_appointments"); + actionViewTaskAppointments = new KToggleAction(i18n("Show Allocations"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotViewTaskAppointments()), actionCollection(), "view_task_appointments"); - actionViewPert = new KAction(i18n("Network"), "pert_chart", 0, this, SLOT(slotViewPert()), actionCollection(), "view_pert"); + actionViewPert = new KAction(i18n("Network"), "pert_chart", 0, TQT_TQOBJECT(this), TQT_SLOT(slotViewPert()), actionCollection(), "view_pert"); - actionViewResources = new KAction(i18n("Resources"), "resources", 0, this, SLOT(slotViewResources()), actionCollection(), "view_resources"); + actionViewResources = new KAction(i18n("Resources"), "resources", 0, TQT_TQOBJECT(this), TQT_SLOT(slotViewResources()), actionCollection(), "view_resources"); - actionViewResourceAppointments = new KToggleAction(i18n("Show Allocations"), 0, 0, this, SLOT(slotViewResourceAppointments()), actionCollection(), "view_resource_appointments"); + actionViewResourceAppointments = new KToggleAction(i18n("Show Allocations"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotViewResourceAppointments()), actionCollection(), "view_resource_appointments"); - actionViewAccounts = new KAction(i18n("Accounts"), "accounts", 0, this, SLOT(slotViewAccounts()), actionCollection(), "view_accounts"); + actionViewAccounts = new KAction(i18n("Accounts"), "accounts", 0, TQT_TQOBJECT(this), TQT_SLOT(slotViewAccounts()), actionCollection(), "view_accounts"); - //actionViewReports = new KAction(i18n("Reports"), "reports", 0, this, SLOT(slotViewReports()), actionCollection(), "view_reports"); + //actionViewReports = new KAction(i18n("Reports"), "reports", 0, TQT_TQOBJECT(this), TQT_SLOT(slotViewReports()), actionCollection(), "view_reports"); // ------ Insert - actionAddTask = new KAction(i18n("Task..."), "add_task", 0, this, - SLOT(slotAddTask()), actionCollection(), "add_task"); - actionAddSubtask = new KAction(i18n("Sub-Task..."), "add_sub_task", 0, this, - SLOT(slotAddSubTask()), actionCollection(), "add_sub_task"); - actionAddMilestone = new KAction(i18n("Milestone..."), "add_milestone", 0, this, - SLOT(slotAddMilestone()), actionCollection(), "add_milestone"); + actionAddTask = new KAction(i18n("Task..."), "add_task", 0, TQT_TQOBJECT(this), + TQT_SLOT(slotAddTask()), actionCollection(), "add_task"); + actionAddSubtask = new KAction(i18n("Sub-Task..."), "add_sub_task", 0, TQT_TQOBJECT(this), + TQT_SLOT(slotAddSubTask()), actionCollection(), "add_sub_task"); + actionAddMilestone = new KAction(i18n("Milestone..."), "add_milestone", 0, TQT_TQOBJECT(this), + TQT_SLOT(slotAddMilestone()), actionCollection(), "add_milestone"); // ------ Project - actionEditMainProject = new KAction(i18n("Edit Main Project..."), "edit", 0, this, SLOT(slotProjectEdit()), actionCollection(), "project_edit"); - actionEditStandardWorktime = new KAction(i18n("Edit Standard Worktime..."), "edit", 0, this, SLOT(slotProjectWorktime()), actionCollection(), "project_worktime"); - actionEditCalendar = new KAction(i18n("Edit Calendar..."), "edit", 0, this, SLOT(slotProjectCalendar()), actionCollection(), "project_calendar"); - actionEditAccounts = new KAction(i18n("Edit Accounts..."), "edit", 0, this, SLOT(slotProjectAccounts()), actionCollection(), "project_accounts"); - actionEditResources = new KAction(i18n("Edit Resources..."), "edit", 0, this, SLOT(slotProjectResources()), actionCollection(), "project_resources"); + actionEditMainProject = new KAction(i18n("Edit Main Project..."), "edit", 0, TQT_TQOBJECT(this), TQT_SLOT(slotProjectEdit()), actionCollection(), "project_edit"); + actionEditStandardWorktime = new KAction(i18n("Edit Standard Worktime..."), "edit", 0, TQT_TQOBJECT(this), TQT_SLOT(slotProjectWorktime()), actionCollection(), "project_worktime"); + actionEditCalendar = new KAction(i18n("Edit Calendar..."), "edit", 0, TQT_TQOBJECT(this), TQT_SLOT(slotProjectCalendar()), actionCollection(), "project_calendar"); + actionEditAccounts = new KAction(i18n("Edit Accounts..."), "edit", 0, TQT_TQOBJECT(this), TQT_SLOT(slotProjectAccounts()), actionCollection(), "project_accounts"); + actionEditResources = new KAction(i18n("Edit Resources..."), "edit", 0, TQT_TQOBJECT(this), TQT_SLOT(slotProjectResources()), actionCollection(), "project_resources"); actionCalculate = new KActionMenu(i18n("Calculate"), "project_calculate", actionCollection(), "project_calculate"); - connect(actionCalculate, SIGNAL(activated()), SLOT(slotProjectCalculate())); + connect(actionCalculate, TQT_SIGNAL(activated()), TQT_SLOT(slotProjectCalculate())); - actionCalculateExpected = new KAction(i18n("Expected"), 0, 0, this, SLOT(slotProjectCalculateExpected()), actionCollection(), "project_calculate_expected"); + actionCalculateExpected = new KAction(i18n("Expected"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotProjectCalculateExpected()), actionCollection(), "project_calculate_expected"); actionCalculate->insert(actionCalculateExpected); - actionCalculateOptimistic = new KAction(i18n("Optimistic"), 0, 0, this, SLOT(slotProjectCalculateOptimistic()), actionCollection(), "project_calculate_optimistic"); + actionCalculateOptimistic = new KAction(i18n("Optimistic"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotProjectCalculateOptimistic()), actionCollection(), "project_calculate_optimistic"); actionCalculate->insert(actionCalculateOptimistic); - actionCalculatePessimistic = new KAction(i18n("Pessimistic"), 0, 0, this, SLOT(slotProjectCalculatePessimistic()), actionCollection(), "project_calculate_pessimistic"); + actionCalculatePessimistic = new KAction(i18n("Pessimistic"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotProjectCalculatePessimistic()), actionCollection(), "project_calculate_pessimistic"); actionCalculate->insert(actionCalculatePessimistic); /* // ------ Reports - actionFirstpage = KStdAction::firstPage(m_reportview,SLOT(slotPrevPage()),actionCollection(),"go_firstpage"); - connect(m_reportview, SIGNAL(setFirstPageActionEnabled(bool)), actionFirstpage, SLOT(setEnabled(bool))); - actionPriorpage = KStdAction::prior(m_reportview,SLOT(slotPrevPage()),actionCollection(),"go_prevpage"); - connect(m_reportview, SIGNAL(setPriorPageActionEnabled(bool)), actionPriorpage, SLOT(setEnabled(bool))); - actionNextpage = KStdAction::next(m_reportview,SLOT(slotNextPage()),actionCollection(), "go_nextpage"); - connect(m_reportview, SIGNAL(setNextPageActionEnabled(bool)), actionNextpage, SLOT(setEnabled(bool))); - actionLastpage = KStdAction::lastPage(m_reportview,SLOT(slotLastPage()),actionCollection(), "go_lastpage"); - connect(m_reportview, SIGNAL(setLastPageActionEnabled(bool)), actionLastpage, SLOT(setEnabled(bool))); + actionFirstpage = KStdAction::firstPage(m_reportview,TQT_SLOT(slotPrevPage()),actionCollection(),"go_firstpage"); + connect(m_reportview, TQT_SIGNAL(setFirstPageActionEnabled(bool)), actionFirstpage, TQT_SLOT(setEnabled(bool))); + actionPriorpage = KStdAction::prior(m_reportview,TQT_SLOT(slotPrevPage()),actionCollection(),"go_prevpage"); + connect(m_reportview, TQT_SIGNAL(setPriorPageActionEnabled(bool)), actionPriorpage, TQT_SLOT(setEnabled(bool))); + actionNextpage = KStdAction::next(m_reportview,TQT_SLOT(slotNextPage()),actionCollection(), "go_nextpage"); + connect(m_reportview, TQT_SIGNAL(setNextPageActionEnabled(bool)), actionNextpage, TQT_SLOT(setEnabled(bool))); + actionLastpage = KStdAction::lastPage(m_reportview,TQT_SLOT(slotLastPage()),actionCollection(), "go_lastpage"); + connect(m_reportview, TQT_SIGNAL(setLastPageActionEnabled(bool)), actionLastpage, TQT_SLOT(setEnabled(bool))); m_reportview->enableNavigationBtn();*/ mainWindow()->toolBar("report")->hide(); -// new KAction(i18n("Design..."), "report_design", 0, this, -// SLOT(slotReportDesign()), actionCollection(), "report_design"); +// new KAction(i18n("Design..."), "report_design", 0, TQT_TQOBJECT(this), +// TQT_SLOT(slotReportDesign()), actionCollection(), "report_design"); // ------ Tools actionDefineWBS = - new KAction(i18n("Define WBS Pattern..."), "tools_define_wbs", 0, this, - SLOT(slotDefineWBS()), actionCollection(), "tools_generate_wbs"); + new KAction(i18n("Define WBS Pattern..."), "tools_define_wbs", 0, TQT_TQOBJECT(this), + TQT_SLOT(slotDefineWBS()), actionCollection(), "tools_generate_wbs"); actionGenerateWBS = - new KAction(i18n("Generate WBS Code"), "tools_generate_wbs", 0, this, - SLOT(slotGenerateWBS()), actionCollection(), "tools_define_wbs"); + new KAction(i18n("Generate WBS Code"), "tools_generate_wbs", 0, TQT_TQOBJECT(this), + TQT_SLOT(slotGenerateWBS()), actionCollection(), "tools_define_wbs"); // ------ Export (testing) - //actionExportGantt = new KAction(i18n("Export Ganttview"), "export_gantt", 0, this, - // SLOT(slotExportGantt()), actionCollection(), "export_gantt"); + //actionExportGantt = new KAction(i18n("Export Ganttview"), "export_gantt", 0, TQT_TQOBJECT(this), + // TQT_SLOT(slotExportGantt()), actionCollection(), "export_gantt"); // ------ Settings - actionConfigure = new KAction(i18n("Configure KPlato..."), "configure", 0, this, - SLOT(slotConfigure()), actionCollection(), "configure"); + actionConfigure = new KAction(i18n("Configure KPlato..."), "configure", 0, TQT_TQOBJECT(this), + TQT_SLOT(slotConfigure()), actionCollection(), "configure"); // ------ Popup - actionOpenNode = new KAction(i18n("Edit..."), "edit", 0, this, - SLOT(slotOpenNode()), actionCollection(), "node_properties"); - actionTaskProgress = new KAction(i18n("Progress..."), "edit", 0, this, - SLOT(slotTaskProgress()), actionCollection(), "task_progress"); - actionDeleteTask = new KAction(i18n("Delete Task"), "editdelete", 0, this, - SLOT(slotDeleteTask()), actionCollection(), "delete_task"); + actionOpenNode = new KAction(i18n("Edit..."), "edit", 0, TQT_TQOBJECT(this), + TQT_SLOT(slotOpenNode()), actionCollection(), "node_properties"); + actionTaskProgress = new KAction(i18n("Progress..."), "edit", 0, TQT_TQOBJECT(this), + TQT_SLOT(slotTaskProgress()), actionCollection(), "task_progress"); + actionDeleteTask = new KAction(i18n("Delete Task"), "editdelete", 0, TQT_TQOBJECT(this), + TQT_SLOT(slotDeleteTask()), actionCollection(), "delete_task"); - actionEditResource = new KAction(i18n("Edit Resource..."), "edit", 0, this, - SLOT(slotEditResource()), actionCollection(), "edit_resource"); + actionEditResource = new KAction(i18n("Edit Resource..."), "edit", 0, TQT_TQOBJECT(this), + TQT_SLOT(slotEditResource()), actionCollection(), "edit_resource"); // ------------------- Actions with a key binding and no GUI item // Temporary, till we get a menu entry - actNoInformation = new KAction("Toggle no information", CTRL+SHIFT+Key_T, this, SLOT(slotViewGanttNoInformation()), actionCollection(), "show_noinformation"); + actNoInformation = new KAction("Toggle no information", CTRL+SHIFT+Key_T, TQT_TQOBJECT(this), TQT_SLOT(slotViewGanttNoInformation()), actionCollection(), "show_noinformation"); #ifndef NDEBUG - //new KAction("Print Debug", CTRL+SHIFT+Key_P, this, SLOT( slotPrintDebug()), actionCollection(), "print_debug"); - new KAction("Print Debug", CTRL+SHIFT+Key_P, this, SLOT(slotPrintSelectedDebug()), actionCollection(), "print_debug"); - new KAction("Print Calendar Debug", CTRL+SHIFT+Key_C, this, SLOT(slotPrintCalendarDebug()), actionCollection(), "print_calendar_debug"); -// new KAction("Print Test Debug", CTRL+SHIFT+Key_T, this, SLOT(slotPrintTestDebug()), actionCollection(), "print_test_debug"); + //new KAction("Print Debug", CTRL+SHIFT+Key_P, TQT_TQOBJECT(this), TQT_SLOT( slotPrintDebug()), actionCollection(), "print_debug"); + new KAction("Print Debug", CTRL+SHIFT+Key_P, TQT_TQOBJECT(this), TQT_SLOT(slotPrintSelectedDebug()), actionCollection(), "print_debug"); + new KAction("Print Calendar Debug", CTRL+SHIFT+Key_C, TQT_TQOBJECT(this), TQT_SLOT(slotPrintCalendarDebug()), actionCollection(), "print_calendar_debug"); +// new KAction("Print Test Debug", CTRL+SHIFT+Key_T, TQT_TQOBJECT(this), TQT_SLOT(slotPrintTestDebug()), actionCollection(), "print_test_debug"); KAction* actExportGantt = new KAction( i18n( "Export Gantt" ), CTRL+SHIFT+Key_G, - this, SLOT( slotExportGantt() ), actionCollection(), "export_gantt" ); + TQT_TQOBJECT(this), TQT_SLOT( slotExportGantt() ), actionCollection(), "export_gantt" ); #endif // Stupid compilers ;) @@ -587,7 +587,7 @@ void View::projectCalculate() { return; } } - QApplication::setOverrideCursor(Qt::waitCursor); + TQApplication::setOverrideCursor(TQt::waitCursor); Schedule *ns = getProject().findSchedule((Schedule::Type)m_currentEstimateType); KCommand *cmd; if (ns) { @@ -596,7 +596,7 @@ void View::projectCalculate() { cmd = new CalculateProjectCmd(getPart(), getProject(), i18n("Standard"), (Effort::Use)m_currentEstimateType, i18n("Calculate")); } getPart()->addCommand(cmd); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } void View::slotViewReportDesign() { @@ -839,7 +839,7 @@ void View::slotDeleteTask() } KMacroCommand *cmd = new KMacroCommand(i18n("Delete Task")); cmd->addCommand(new NodeDeleteCmd(getPart(), node)); - QPtrListIterator<Relation> it = node->dependChildNodes(); + TQPtrListIterator<Relation> it = node->dependChildNodes(); for (; it.current(); ++it) { cmd->addCommand(new DeleteRelationCmd(getPart(), it.current())); } @@ -982,10 +982,10 @@ void View::slotExportGantt() { if (!m_ganttview) { return; } - QString fn = KFileDialog::getSaveFileName( QString::null, QString::null, this ); + TQString fn = KFileDialog::getSaveFileName( TQString(), TQString(), this ); if (!fn.isEmpty()) { - QFile f(fn); - m_ganttview->exportGantt(&f); + TQFile f(fn); + m_ganttview->exportGantt(TQT_TQIODEVICE(&f)); } } @@ -1018,16 +1018,16 @@ void View::slotConnectNode() { }*/ } -QPopupMenu * View::popupMenu( const QString& name ) +TQPopupMenu * View::popupMenu( const TQString& name ) { //kdDebug()<<k_funcinfo<<endl; Q_ASSERT(factory()); if ( factory() ) - return ((QPopupMenu*)factory()->container( name, this )); + return ((TQPopupMenu*)factory()->container( name, this )); return 0L; } -void View::slotChanged(QWidget *) +void View::slotChanged(TQWidget *) { //kdDebug()<<k_funcinfo<<endl; slotUpdate(false); @@ -1052,13 +1052,13 @@ void View::slotUpdate(bool calculate) updateView(m_tab->visibleWidget()); } -void View::slotAboutToShow(QWidget *widget) { +void View::slotAboutToShow(TQWidget *widget) { updateView(widget); } -void View::updateView(QWidget *widget) +void View::updateView(TQWidget *widget) { - QApplication::setOverrideCursor(Qt::waitCursor); + TQApplication::setOverrideCursor(TQt::waitCursor); setScheduleActionsEnabled(); setTaskActionsEnabled(false); mainWindow()->toolBar("report")->hide(); @@ -1097,10 +1097,10 @@ void View::updateView(QWidget *widget) mainWindow()->toolBar("report")->show(); m_reportview->enableNavigationBtn(); }*/ - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } -void View::slotRenameNode(Node *node, const QString& name) { +void View::slotRenameNode(Node *node, const TQString& name) { //kdDebug()<<k_funcinfo<<name<<endl; if (node) { NodeModifyNameCmd *cmd = new NodeModifyNameCmd(getPart(), *node, name, i18n("Modify Name")); @@ -1108,9 +1108,9 @@ void View::slotRenameNode(Node *node, const QString& name) { } } -void View::slotPopupMenu(const QString& menuname, const QPoint & pos) +void View::slotPopupMenu(const TQString& menuname, const TQPoint & pos) { - QPopupMenu* menu = this->popupMenu(menuname); + TQPopupMenu* menu = this->popupMenu(menuname); if (menu) menu->exec(pos); } @@ -1214,7 +1214,7 @@ void View::setBaselineMode(bool /*on*/) { } // called when widget w is about to be shown -void View::setTaskActionsEnabled(QWidget *w, bool on) { +void View::setTaskActionsEnabled(TQWidget *w, bool on) { Node *n = 0; if (w == m_ganttview) { n = m_ganttview->currentNode(); @@ -1284,14 +1284,14 @@ void View::slotPrintCalendarDebug() { getPart()->getProject().printCalendarDebug(""); } void View::slotPrintTestDebug() { - const QStringList &lst = getPart()->xmlLoader().log(); + const TQStringList &lst = getPart()->xmlLoader().log(); - for ( QStringList::ConstIterator it = lst.constBegin(); it != lst.constEnd(); ++it ) { + for ( TQStringList::ConstIterator it = lst.constBegin(); it != lst.constEnd(); ++it ) { kdDebug()<<*it<<endl; } // kdDebug()<<"------------Test 1---------------------"<<endl; // { -// DateTime d1(QDate(2006,1,2), QTime(8,0,0)); +// DateTime d1(TQDate(2006,1,2), TQTime(8,0,0)); // DateTime d2 = d1.addSecs(3600); // Duration d = d2 - d1; // bool b = d==Duration(0,0,0,3600); @@ -1316,15 +1316,15 @@ void View::slotPrintTestDebug() { // kdDebug()<<"------------Test 2 Single calendar-----------------"<<endl; // { // Calendar *t = new Calendar("Test 2"); -// QDate wdate(2006,1,2); +// TQDate wdate(2006,1,2); // DateTime before = DateTime(wdate.addDays(-1)); // DateTime after = DateTime(wdate.addDays(1)); -// QTime t1(8,0,0); -// QTime t2(10,0,0); +// TQTime t1(8,0,0); +// TQTime t2(10,0,0); // DateTime wdt1(wdate, t1); // DateTime wdt2(wdate, t2); -// CalendarDay *day = new CalendarDay(QDate(2006,1,2), Map::Working); -// day->addInterval(QPair<QTime, QTime>(t1, t2)); +// CalendarDay *day = new CalendarDay(TQDate(2006,1,2), Map::Working); +// day->addInterval(TQPair<TQTime, TQTime>(t1, t2)); // if (!t->addDay(day)) { // kdDebug()<<"Failed to add day"<<endl; // delete day; @@ -1375,17 +1375,17 @@ void View::slotPrintTestDebug() { // kdDebug()<<"------------Test 3 Parent calendar-----------------"<<endl; // { // Calendar *t = new Calendar("Test 3"); -// Calendar *p = new Calendar("Test 3 parent"); +// Calendar *p = new Calendar("Test 3 tqparent"); // t->setParent(p); -// QDate wdate(2006,1,2); +// TQDate wdate(2006,1,2); // DateTime before = DateTime(wdate.addDays(-1)); // DateTime after = DateTime(wdate.addDays(1)); -// QTime t1(8,0,0); -// QTime t2(10,0,0); +// TQTime t1(8,0,0); +// TQTime t2(10,0,0); // DateTime wdt1(wdate, t1); // DateTime wdt2(wdate, t2); -// CalendarDay *day = new CalendarDay(QDate(2006,1,2), Map::Working); -// day->addInterval(QPair<QTime, QTime>(t1, t2)); +// CalendarDay *day = new CalendarDay(TQDate(2006,1,2), Map::Working); +// day->addInterval(TQPair<TQTime, TQTime>(t1, t2)); // if (!p->addDay(day)) { // kdDebug()<<"Failed to add day"<<endl; // delete day; @@ -1434,9 +1434,9 @@ void View::slotPrintTestDebug() { // kdDebug()<<endl; // kdDebug()<<"------------Test 4 Parent calendar/weekdays-------------"<<endl; // { -// QTime t1(8,0,0); -// QTime t2(10,0,0); -// Calendar *p = new Calendar("Test 4 parent"); +// TQTime t1(8,0,0); +// TQTime t2(10,0,0); +// Calendar *p = new Calendar("Test 4 tqparent"); // CalendarDay *wd1 = p->weekday(0); // monday // if (wd1 == 0) { // kdDebug()<<"Failed to get weekday"<<endl; @@ -1447,18 +1447,18 @@ void View::slotPrintTestDebug() { // if (wd2 == 0) { // kdDebug()<<"Failed to get weekday"<<endl; // } -// wd2->addInterval(QPair<QTime, QTime>(t1, t2)); +// wd2->addInterval(TQPair<TQTime, TQTime>(t1, t2)); // wd2->setState(Map::Working); // // Calendar *t = new Calendar("Test 4"); // t->setParent(p); -// QDate wdate(2006,1,2); // monday jan 2 +// TQDate wdate(2006,1,2); // monday jan 2 // DateTime before = DateTime(wdate.addDays(-4)); //Thursday dec 29 // DateTime after = DateTime(wdate.addDays(4)); // Friday jan 6 // DateTime wdt1(wdate, t1); -// DateTime wdt2(QDate(2006, 1, 4), t2); // Wednesday -// CalendarDay *day = new CalendarDay(QDate(2006,1,2), Map::Working); -// day->addInterval(QPair<QTime, QTime>(t1, t2)); +// DateTime wdt2(TQDate(2006, 1, 4), t2); // Wednesday +// CalendarDay *day = new CalendarDay(TQDate(2006,1,2), Map::Working); +// day->addInterval(TQPair<TQTime, TQTime>(t1, t2)); // if (!p->addDay(day)) { // kdDebug()<<"Failed to add day"<<endl; // delete day; @@ -1473,11 +1473,11 @@ void View::slotPrintTestDebug() { // kdDebug()<<"1: Success="<<b<<" Find same day"<<endl; // // DateTime dt = t->firstAvailableAfter(after, after.addDays(10)); -// b = (dt.isValid() && dt == DateTime(QDate(2006,1,11), t1)); +// b = (dt.isValid() && dt == DateTime(TQDate(2006,1,11), t1)); // kdDebug()<<"2: Success="<<b<<" firstAvailableAfter("<<after<<"): ="<<dt<<endl; // // dt = t->firstAvailableBefore(before, before.addDays(-10)); -// b = (dt.isValid() && dt == DateTime(QDate(2005, 12, 28), t2)); +// b = (dt.isValid() && dt == DateTime(TQDate(2005, 12, 28), t2)); // kdDebug()<<"3: Success="<<b<<" firstAvailableBefore("<<before.toString()<<"): ="<<dt<<endl; // // dt = t->firstAvailableAfter(before, after); @@ -1501,11 +1501,11 @@ void View::slotPrintTestDebug() { // b = e1==e2; // kdDebug()<<"9: Success="<<b<<" effort "<<e1.toString()<<"="<<e2.toString()<<endl; // -// QPair<DateTime, DateTime> r = t->firstInterval(before, after); +// TQPair<DateTime, DateTime> r = t->firstInterval(before, after); // b = r.first == wdt1; // We find the monday jan 2 // kdDebug()<<"10: Success="<<b<<" firstInterval("<<before<<"): ="<<r.first<<", "<<r.second<<endl; // r = t->firstInterval(r.second, after); -// b = r.first == DateTime(QDate(2006, 1, 4),t1); // We find the wednesday jan 4 +// b = r.first == DateTime(TQDate(2006, 1, 4),t1); // We find the wednesday jan 4 // kdDebug()<<"11: Success="<<b<<" firstInterval("<<r.second<<"): ="<<r.first<<", "<<r.second<<endl; // // delete t; |