diff options
Diffstat (limited to 'korganizer/calendarview.cpp')
-rw-r--r-- | korganizer/calendarview.cpp | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 91b42b1e8..84199bfe4 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -26,8 +26,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. */ #include "calendarview.h" @@ -112,8 +112,8 @@ using namespace KOrg; -CalendarView::CalendarView( TQWidget *parent, const char *name ) - : CalendarViewBase( parent, name ), +CalendarView::CalendarView( TQWidget *tqparent, const char *name ) + : CalendarViewBase( tqparent, name ), mHistory( 0 ), mCalendar( CalendarNull::self() ), mChanger( 0 ) @@ -349,9 +349,9 @@ Calendar *CalendarView::calendar() else return CalendarNull::self(); } -QPair<ResourceCalendar *, TQString> CalendarView::viewSubResourceCalendar() +TQPair<ResourceCalendar *, TQString> CalendarView::viewSubResourceCalendar() { - QPair<ResourceCalendar *, TQString> p( 0, TQString() ); + TQPair<ResourceCalendar *, TQString> p( 0, TQString() ); KOrg::BaseView *cV = mViewManager->currentView(); if ( cV && cV == mViewManager->multiAgendaView() ) { cV = mViewManager->multiAgendaView()->selectedAgendaView(); @@ -364,7 +364,7 @@ QPair<ResourceCalendar *, TQString> CalendarView::viewSubResourceCalendar() KOIncidenceEditor *CalendarView::editorDialog( Incidence *incidence ) const { - if (mDialogList.find(incidence) != mDialogList.end ()) + if (mDialogList.tqfind(incidence) != mDialogList.end ()) return mDialogList[incidence]; else return 0; } @@ -456,13 +456,13 @@ bool CalendarView::openCalendar(const TQString& filename, bool merge) i18n( "No calendars found, unable to merge the file into your calendar." ) ); return false; } - // FIXME: This is a nasty hack, since we need to set a parent for the + // FIXME: This is a nasty hack, since we need to set a tqparent for the // resource selection dialog. However, we don't have any UI methods // in the calendar, only in the CalendarResources::DestinationPolicy // So we need to type-cast it and extract it from the CalendarResources - TQWidget *tmpparent = 0; + TQWidget *tmptqparent = 0; if ( cl ) { - tmpparent = cl->dialogParentWidget(); + tmptqparent = cl->dialogParentWidget(); cl->setDialogParentWidget( this ); } @@ -660,7 +660,7 @@ void CalendarView::writeFilterSettings( KConfig *config ) if ( mCurrentFilter ) { config->writeEntry( "Current Filter", mCurrentFilter->name() ); } else { - config->writeEntry( "Current Filter", TQString::null ); + config->writeEntry( "Current Filter", TQString() ); } } @@ -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 ); } @@ -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 ); } @@ -1075,7 +1075,7 @@ void CalendarView::edit_paste() Incidence::List::Iterator it; for ( it = pastedIncidences.begin(); it != pastedIncidences.end(); ++it ) { - QPair<ResourceCalendar *, TQString>p = viewSubResourceCalendar(); + TQPair<ResourceCalendar *, TQString>p = viewSubResourceCalendar(); // FIXME: use a visitor here if ( ( *it )->type() == "Event" ) { @@ -1137,7 +1137,7 @@ KOEventEditor *CalendarView::newEventEditor( ResourceCalendar *res, const TQStri // let the current view change the default start/end datetime bool allDay = allDayParam; TQDateTime startDt( startDtParam ), endDt( endDtParam ); - // Adjust the start/end date times (i.e. tqreplace invalid values by defaults, + // Adjust the start/end date times (i.e. replace invalid values by defaults, // and let the view adjust the type. dateTimesForNewEvent( startDt, endDt, allDay ); @@ -1283,13 +1283,13 @@ void CalendarView::newJournal() void CalendarView::newJournal( ResourceCalendar *res, const TQString &subRes ) { kdDebug(5850) << "CalendarView::newJournal()" << endl; - newJournal( res, subRes, TQString::null, TQDate() ); + newJournal( res, subRes, TQString(), TQDate() ); } void CalendarView::newJournal( ResourceCalendar *res, const TQString &subRes, const TQDate &date) { - newJournal( res, subRes, TQString::null, date ); + newJournal( res, subRes, TQString(), date ); } void CalendarView::newJournal( ResourceCalendar *res, const TQString &subRes, @@ -1314,12 +1314,12 @@ void CalendarView::newSubTodo() if ( todo ) newSubTodo( todo ); } -void CalendarView::newSubTodo(Todo *parentEvent) +void CalendarView::newSubTodo(Todo *tqparentEvent) { KOTodoEditor *todoEditor = mDialogManager->getTodoEditor(); connectIncidenceEditor( todoEditor ); todoEditor->newTodo(); - todoEditor->setDates( TQDateTime(), false, parentEvent ); + todoEditor->setDates( TQDateTime(), false, tqparentEvent ); todoEditor->show(); } @@ -1494,7 +1494,7 @@ void CalendarView::dissociateOccurrence( Incidence *incidence, const TQDate &dat return; } - QPair<ResourceCalendar *, TQString>p = + TQPair<ResourceCalendar *, TQString>p = CalHelper::incSubResourceCalendar( calendar(), incidence ); if ( !mChanger->beginChange( incidence, p.first, p.second ) ) { @@ -1528,7 +1528,7 @@ void CalendarView::dissociateFutureOccurrence( Incidence *incidence, const TQDat return; } - QPair<ResourceCalendar *, TQString>p = + TQPair<ResourceCalendar *, TQString>p = CalHelper::incSubResourceCalendar( calendar(), incidence ); if ( !mChanger->beginChange( incidence, p.first, p.second ) ) { @@ -1976,7 +1976,7 @@ void CalendarView::updateFilter() TQStringList filters; CalFilter *filter; - int pos = mFilters.find( mCurrentFilter ); + int pos = mFilters.tqfind( mCurrentFilter ); if ( pos < 0 ) { mCurrentFilter = 0; } @@ -2216,13 +2216,13 @@ bool CalendarView::editIncidence( Incidence *incidence, const TQDate &date, bool return false; } - // FIXME: This is a nasty hack, since we need to set a parent for the + // FIXME: This is a nasty hack, since we need to set a tqparent for the // resource selection dialog. However, we don't have any UI methods // in the calendar, only in the CalendarResources::DestinationPolicy // So we need to type-cast it and extract it from the CalendarResources - TQWidget *tmpparent = 0; + TQWidget *tmptqparent = 0; if ( stdcal ) { - tmpparent = stdcal->dialogParentWidget(); + tmptqparent = stdcal->dialogParentWidget(); stdcal->setDialogParentWidget( this ); } @@ -2252,7 +2252,7 @@ bool CalendarView::editIncidence( Incidence *incidence, const TQDate &date, bool return true; } - QPair<ResourceCalendar *, TQString>p = + TQPair<ResourceCalendar *, TQString>p = CalHelper::incSubResourceCalendar( calendar(), incidence ); Incidence *savedIncidence = incidence->clone(); @@ -2343,7 +2343,7 @@ void CalendarView::deleteTodoIncidence ( Todo *todo, bool force ) // Delete only the father if( km == KMessageBox::Yes ) { // Instead of making a subto-do independent, why not relate - // it to it's dead father's parent? + // it to it's dead father's tqparent? makeChildrenIndependent ( todo ); mChanger->deleteIncidence( todo, this ); } else if ( km == KMessageBox::No ) { @@ -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 @@ -2412,7 +2412,7 @@ void CalendarView::deleteIncidence(Incidence *incidence, bool force) } } - QPair<ResourceCalendar *, TQString>p = + TQPair<ResourceCalendar *, TQString>p = CalHelper::incSubResourceCalendar( calendar(), incidence ); switch(km) { @@ -2428,8 +2428,8 @@ void CalendarView::deleteIncidence(Incidence *incidence, bool force) // Moving the first in a series...don't bother with the nonstandard exclusion list Recurrence *recur = incidence->recurrence(); Event* thisevent = static_cast<Event*>(incidence); - QDateTime newEnd; - QDateTime newRecurEnd; + TQDateTime newEnd; + TQDateTime newRecurEnd; newRecurEnd = recur->endDateTime(); newEnd.setTime_t( incidence->dtEnd().toTime_t() + ( recur->getNextDateTime( recur->startDateTime() ).toTime_t() - recur->startDateTime().toTime_t() ) ); thisevent->setDtEnd( newEnd ); @@ -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" ); } } @@ -2563,7 +2563,7 @@ void CalendarView::updateCategories() allCats.sort(); TQStringList categories( KOPrefs::instance()->mCustomCategories ); for ( TQStringList::ConstIterator si = allCats.constBegin(); si != allCats.constEnd(); ++si ) { - if ( categories.find( *si ) == categories.end() ) { + if ( categories.tqfind( *si ) == categories.end() ) { categories.append( *si ); } } @@ -2609,7 +2609,7 @@ void CalendarView::addIncidenceOn( Incidence *incadd, const TQDate &dt ) todo->setHasDueDate( true ); } - QPair<ResourceCalendar *, TQString>p = viewSubResourceCalendar(); + TQPair<ResourceCalendar *, TQString>p = viewSubResourceCalendar(); if ( !mChanger->addIncidence( incidence, p.first, p.second, this ) ) { KODialogManager::errorSaveIncidence( this, incidence ); @@ -2631,7 +2631,7 @@ void CalendarView::moveIncidenceTo( Incidence *incmove, const TQDate &dt ) } Incidence *oldIncidence = incidence->clone(); - QPair<ResourceCalendar *, TQString>p = viewSubResourceCalendar(); + TQPair<ResourceCalendar *, TQString>p = viewSubResourceCalendar(); if ( !mChanger->beginChange( incidence, p.first, p.second ) ) { delete oldIncidence; @@ -2774,7 +2774,7 @@ Incidence* CalendarView::singleOccurrenceOrAll( Incidence *inc, } if ( dissociationOccurred && commitToCalendar ) { - QPair<ResourceCalendar *, TQString>p = viewSubResourceCalendar(); + TQPair<ResourceCalendar *, TQString>p = viewSubResourceCalendar(); mChanger->addIncidence( incToReturn, p.first, p.second, this ); mChanger->changeIncidence( incSaved, inc, whatChanged, this ); } @@ -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.tqcontains( inc ) ) { + if ( inc && !tqchildren.tqcontains( 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 ); } } |