From 9cc13dcbb01a96c9e60a07ca63c61d24b374f50d Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 16 Dec 2011 09:59:50 -0600 Subject: Revert "Rename a number of old tq methods that are no longer tq specific" This reverts commit 3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12. --- korganizer/calendarview.cpp | 96 ++++++++++++++++++++++----------------------- 1 file changed, 48 insertions(+), 48 deletions(-) (limited to 'korganizer/calendarview.cpp') diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index b45b4ae01..5b6d94928 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -93,14 +93,14 @@ #include #include -#include +#include #include #include #include #include #include #include -#include +#include #ifndef KORG_NOSPLITTER #include #endif @@ -137,7 +137,7 @@ CalendarView::CalendarView( TQWidget *parent, const char *name ) TQBoxLayout *topLayout = new TQVBoxLayout( this ); #ifndef KORG_NOSPLITTER - // create the main layout frames. + // create the main tqlayout frames. mPanner = new TQSplitter( Qt::Horizontal, this, "CalendarView::Panner" ); topLayout->addWidget( mPanner ); @@ -177,7 +177,7 @@ CalendarView::CalendarView( TQWidget *parent, const char *name ) mDateNavigatorContainer = new KDateNavigator( leftFrame, true, "CalendarView::DateNavigator", - TQDate::currentDate() ); + TQDate::tqcurrentDate() ); mTodoList = new KOTodoView( CalendarNull::self(), leftFrame, "todolist" ); mEventViewer = new KOEventViewer ( CalendarNull::self(), leftFrame, "EventViewer" ); @@ -185,7 +185,7 @@ CalendarView::CalendarView( TQWidget *parent, const char *name ) TQWidget *rightBox = new TQWidget( mainBox ); TQBoxLayout *rightLayout = new TQVBoxLayout( rightBox ); - mNavigatorBar = new NavigatorBar( TQDate::currentDate(), rightBox ); + mNavigatorBar = new NavigatorBar( TQDate::tqcurrentDate(), rightBox ); rightLayout->addWidget( mNavigatorBar ); mRightFrame = new TQWidgetStack( rightBox ); @@ -195,7 +195,7 @@ CalendarView::CalendarView( TQWidget *parent, const char *name ) if ( KOPrefs::instance()->mVerticalScreen ) { // mTodoList->setFixedHeight( 60 ); - mTodoList->setFixedHeight( mDateNavigatorContainer->sizeHint().height() ); + mTodoList->setFixedHeight( mDateNavigatorContainer->tqsizeHint().height() ); } #endif @@ -277,7 +277,7 @@ CalendarView::CalendarView( TQWidget *parent, const char *name ) KOGlobals::self()-> setHolidays( new KHolidays( KOPrefs::instance()->mHolidays ) ); - connect( TQApplication::clipboard(), TQT_SIGNAL( dataChanged() ), + connect( TQApplication::tqclipboard(), TQT_SIGNAL( dataChanged() ), TQT_SLOT( checkClipboard() ) ); connect( mTodoList, TQT_SIGNAL( incidenceSelected( Incidence *,const TQDate & ) ), @@ -387,7 +387,7 @@ TQDate CalendarView::activeDate( bool fallbackToToday ) // When all else fails, use the navigator start date, or today. if ( fallbackToToday ) { - return TQDate::currentDate(); + return TQDate::tqcurrentDate(); } else { return mDateNavigator->selectedDates().first(); } @@ -487,7 +487,7 @@ bool CalendarView::openCalendar(const TQString& filename, bool merge) // have become partially populated. Clear it out. if ( !merge ) mCalendar->close(); - KMessageBox::error(this,i18n("Could not load calendar '%1'.").arg(filename)); + KMessageBox::error(this,i18n("Could not load calendar '%1'.").tqarg(filename)); return false; } @@ -547,7 +547,7 @@ void CalendarView::readSettings() TQValueList sizes = config->readIntListEntry( "Separator1" ); if ( sizes.count() != 2 ) { - sizes << mDateNavigatorContainer->minimumSizeHint().width(); + sizes << mDateNavigatorContainer->tqminimumSizeHint().width(); sizes << 300; } mPanner->setSizes( sizes ); @@ -776,18 +776,18 @@ void CalendarView::incidenceChanged( Incidence *oldIncidence, if ( todo->isCompleted() || modification == KOGlobals::COMPLETION_MODIFIED_WITH_RECURRENCE ) { TQString timeStr = KGlobal::locale()->formatTime( TQTime::currentTime() ); - TQString description = i18n( "To-do completed: %1 (%2)" ).arg( - newIncidence->summary() ).arg( timeStr ); + TQString description = i18n( "To-do completed: %1 (%2)" ).tqarg( + newIncidence->summary() ).tqarg( timeStr ); - Journal::List journals = calendar()->journals( TQDate::currentDate() ); + Journal::List journals = calendar()->journals( TQDate::tqcurrentDate() ); Journal *journal; if ( journals.isEmpty() ) { journal = new Journal(); - journal->setDtStart( TQDateTime::currentDateTime() ); + journal->setDtStart( TQDateTime::tqcurrentDateTime() ); - TQString dateStr = KGlobal::locale()->formatDate( TQDate::currentDate() ); - journal->setSummary( i18n("Journal of %1").arg( dateStr ) ); + TQString dateStr = KGlobal::locale()->formatDate( TQDate::tqcurrentDate() ); + journal->setSummary( i18n("Journal of %1").tqarg( dateStr ) ); journal->setDescription( description ); //TODO: recorded to-dos should save into the standard resource always @@ -844,7 +844,7 @@ void CalendarView::checkForFilteredChange( Incidence *incidence ) // user so that he isn't surprised if his new event doesn't show up KMessageBox::information( this, i18n("The item \"%1\" is filtered by " "your current filter rules, so it will be hidden and not " - "appear in the view.").arg( incidence->summary() ), + "appear in the view.").tqarg( incidence->summary() ), i18n("Filter Applied"), "ChangedIncidenceFiltered" ); } } @@ -901,7 +901,7 @@ void CalendarView::updateUnmanagedViews() int CalendarView::msgItemDelete( Incidence *incidence ) { return KMessageBox::warningContinueCancel(this, - i18n("The item \"%1\" will be permanently deleted.").arg( incidence->summary() ), + i18n("The item \"%1\" will be permanently deleted.").tqarg( incidence->summary() ), i18n("KOrganizer Confirmation"), KGuiItem(i18n("&Delete"),"editdelete")); } @@ -925,7 +925,7 @@ void CalendarView::edit_cut() "Do you want to cut just this item and " "make all its sub-to-dos independent, or " "cut the to-do with all its sub-to-dos?" - ).arg( incidence->summary() ), + ).tqarg( incidence->summary() ), i18n("KOrganizer Confirmation"), i18n("Cut Only This"), i18n("Cut All")); @@ -935,7 +935,7 @@ void CalendarView::edit_cut() incidences.append( incidence ); makeChildrenIndependent( incidence ); } else if ( km == KMessageBox::No ) { // all - // load incidence + children + grandchildren... + // load incidence + tqchildren + grandtqchildren... getIncidenceHierarchy( incidence, incidences ); } @@ -962,7 +962,7 @@ void CalendarView::edit_copy() i18n("The item \"%1\" has sub-to-dos. " "Do you want to copy just this item or " "copy the to-do with all its sub-to-dos?" - ).arg( incidence->summary() ), + ).tqarg( incidence->summary() ), i18n("KOrganizer Confirmation"), i18n("Copy Only This"), i18n("Copy All")); @@ -971,7 +971,7 @@ void CalendarView::edit_copy() if ( km == KMessageBox::Yes ) { // only one incidences.append( incidence ); } else if ( km == KMessageBox::No ) { // all - // load incidence + children + grandchildren... + // load incidence + tqchildren + grandtqchildren... getIncidenceHierarchy( incidence, incidences ); } @@ -1248,7 +1248,7 @@ void CalendarView::newTodo( ResourceCalendar *res, const TQString &subRes ) todoEditor->setResource( res, subRes ); if ( mViewManager->currentView()->isEventView() ) { dtDue.setDate( mDateNavigator->selectedDates().first() ); - TQDateTime dtDummy = TQDateTime::currentDateTime(); + TQDateTime dtDummy = TQDateTime::tqcurrentDateTime(); mViewManager->currentView()->eventDurationHint( dtDue, dtDummy, allday ); todoEditor->setDates( dtDue, allday ); } @@ -1585,7 +1585,7 @@ void CalendarView::schedule_publish(Incidence *incidence) KMessageBox::information( this, i18n("The item information was successfully sent."), i18n("Publishing"), "IncidencePublishSuccess" ); } else { - KMessageBox::error( this, i18n("Unable to publish the item '%1'").arg( incidence->summary() ) ); + KMessageBox::error( this, i18n("Unable to publish the item '%1'").tqarg( incidence->summary() ) ); } } delete publishdlg; @@ -1661,7 +1661,7 @@ void CalendarView::schedule_forward( Incidence *incidence ) } else { KMessageBox::error( this, - i18n( "Unable to forward the item '%1'" ).arg( incidence->summary() ), + i18n( "Unable to forward the item '%1'" ).tqarg( incidence->summary() ), i18n( "Forwarding Error" ) ); } } @@ -1669,7 +1669,7 @@ void CalendarView::schedule_forward( Incidence *incidence ) void CalendarView::mailFreeBusy( int daysToPublish ) { - TQDateTime start = TQDateTime::currentDateTime(); + TQDateTime start = TQDateTime::tqcurrentDateTime(); TQDateTime end = start.addDays(daysToPublish); FreeBusy *freebusy = new FreeBusy(mCalendar, start, end); @@ -1727,16 +1727,16 @@ void CalendarView::schedule(Scheduler::Method method, Incidence *incidence) if ( scheduler.performTransaction( incidence, method ) ) { KMessageBox::information( this, i18n("The groupware message for item '%1'" "was successfully sent.\nMethod: %2") - .arg( incidence->summary() ) - .arg( Scheduler::methodName( method ) ), + .tqarg( incidence->summary() ) + .tqarg( Scheduler::methodName( method ) ), i18n("Sending Free/Busy"), "FreeBusyPublishSuccess" ); } else { KMessageBox::error( this, i18n("Groupware message sending failed. " "%2 is request/reply/add/cancel/counter/etc.", "Unable to send the item '%1'.\nMethod: %2") - .arg( incidence->summary() ) - .arg( Scheduler::methodName( method ) ) ); + .tqarg( incidence->summary() ) + .tqarg( Scheduler::methodName( method ) ) ); } } @@ -1817,7 +1817,7 @@ void CalendarView::exportICalendar() if ( TQFile( filename ).exists() ) { if ( KMessageBox::No == KMessageBox::warningYesNo( this, - i18n( "Do you want to overwrite %1?").arg(filename) ) ) { + i18n( "Do you want to overwrite %1?").tqarg(filename) ) ) { return; } } @@ -1845,7 +1845,7 @@ void CalendarView::exportVCalendar() if ( TQFile( filename ).exists() ) { if ( KMessageBox::No == KMessageBox::warningYesNo( this, - i18n( "Do you want to overwrite %1?").arg(filename ) ) ) { + i18n( "Do you want to overwrite %1?").tqarg(filename ) ) ) { return; } } @@ -1865,7 +1865,7 @@ void CalendarView::eventUpdated(Incidence *) void CalendarView::adaptNavigationUnits() { if (mViewManager->currentView()->isEventView()) { - int days = mViewManager->currentView()->currentDateCount(); + int days = mViewManager->currentView()->tqcurrentDateCount(); if (days == 1) { emit changeNavStringPrev(i18n("&Previous Day")); emit changeNavStringNext(i18n("&Next Day")); @@ -1934,7 +1934,7 @@ void CalendarView::processIncidenceSelection( Incidence *incidence, const TQDate void CalendarView::checkClipboard() { #ifndef KORG_NODND - if (ICalDrag::canDecode(TQApplication::clipboard()->data())) { + if (ICalDrag::canDecode(TQApplication::tqclipboard()->data())) { kdDebug(5850) << "CalendarView::checkClipboard() true" << endl; emit pasteEnabled(true); } else { @@ -2334,7 +2334,7 @@ void CalendarView::deleteTodoIncidence ( Todo *todo, bool force ) "Do you want to delete just this item and " "make all its sub-to-dos independent, or " "delete the to-do with all its sub-to-dos?" - ).arg( todo->summary() ), + ).tqarg( todo->summary() ), i18n("KOrganizer Confirmation"), i18n("Delete Only This"), i18n("Delete All")); @@ -2367,7 +2367,7 @@ void CalendarView::deleteIncidence(Incidence *incidence, bool force) KMessageBox::information( this, i18n("The item \"%1\" is marked read-only " "and cannot be deleted; it probably belongs to " "a read-only calendar resource.") - .arg(incidence->summary()), + .tqarg(incidence->summary()), i18n("Removing not possible"), "deleteReadOnlyIncidence" ); } @@ -2377,7 +2377,7 @@ void CalendarView::deleteIncidence(Incidence *incidence, bool force) CanDeleteIncidenceVisitor v; // Let the visitor do special things for special incidence types. - // e.g. todos with children cannot be deleted, so act(..) returns false + // e.g. todos with tqchildren cannot be deleted, so act(..) returns false if ( !v.act( incidence, this ) ) return; //If it is a todo, there are specific delete function @@ -2397,15 +2397,15 @@ void CalendarView::deleteIncidence(Incidence *incidence, bool force) km = KMessageBox::warningContinueCancel(this, i18n("The calendar item \"%1\" recurs over multiple dates; " "are you sure you want to delete it " - "and all its recurrences?").arg( incidence->summary() ), + "and all its recurrences?").tqarg( incidence->summary() ), i18n("KOrganizer Confirmation"), i18n("Delete All") ); } else { km = KOMessageBox::fourBtnMsgBox( this, TQMessageBox::Warning, i18n("The calendar item \"%1\" recurs over multiple dates. " "Do you want to delete only the current one on %2, only all " "future recurrences, or all its recurrences?" ) - .arg( incidence->summary() ) - .arg( KGlobal::locale()->formatDate(itemDate)), + .tqarg( incidence->summary() ) + .tqarg( KGlobal::locale()->formatDate(itemDate)), i18n("KOrganizer Confirmation"), i18n("Delete C&urrent"), i18n("Delete &Future"), i18n("Delete &All")); @@ -2524,14 +2524,14 @@ void CalendarView::purgeCompleted() if ( aTodo && !aTodo->relatedTo() ) rootTodos.append( aTodo ); } - // now that we have a list of all root todos, check them and their children + // now that we have a list of all root todos, check them and their tqchildren for ( it = rootTodos.begin(); it != rootTodos.end(); ++it ) { purgeCompletedSubTodos( *it, allDeleted ); } endMultiModify(); if ( !allDeleted ) { KMessageBox::information( this, i18n("Unable to purge to-dos with " - "uncompleted children."), i18n("Delete To-do"), + "uncompleted tqchildren."), i18n("Delete To-do"), "UncompletedChildrenPurgeTodos" ); } } @@ -2577,7 +2577,7 @@ void CalendarView::addIncidenceOn( Incidence *incadd, const TQDate &dt ) { if ( !incadd || !mChanger ) { KMessageBox::sorry(this, i18n("Unable to copy the item to %1.") - .arg( dt.toString() ), i18n("Copying Failed") ); + .tqarg( dt.toString() ), i18n("Copying Failed") ); return; } Incidence *incidence = mCalendar->incidence( incadd->uid() ); @@ -2621,7 +2621,7 @@ void CalendarView::moveIncidenceTo( Incidence *incmove, const TQDate &dt ) { if ( !incmove || !mChanger ) { KMessageBox::sorry( this, i18n("Unable to move the item to %1.") - .arg( dt.toString() ), i18n("Moving Failed") ); + .tqarg( dt.toString() ), i18n("Moving Failed") ); return; } Incidence *incidence = mCalendar->incidence( incmove->uid() ); @@ -2794,16 +2794,16 @@ void CalendarView::selectWeek( const TQDate &date ) } void CalendarView::getIncidenceHierarchy( Incidence *inc, - Incidence::List &children ) + Incidence::List &tqchildren ) { // protecion against looping hierarchies - if ( inc && !children.contains( inc ) ) { + if ( inc && !tqchildren.contains( inc ) ) { Incidence::List::ConstIterator it; Incidence::List immediateChildren = inc->relations(); for ( it = immediateChildren.constBegin(); it != immediateChildren.constEnd(); ++it ) { - getIncidenceHierarchy( *it, children ); + getIncidenceHierarchy( *it, tqchildren ); } - children.append( inc ); + tqchildren.append( inc ); } } -- cgit v1.2.1