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 | |
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')
226 files changed, 6349 insertions, 6349 deletions
diff --git a/korganizer/actionmanager.cpp b/korganizer/actionmanager.cpp index ce608165e..8d1bb0aef 100644 --- a/korganizer/actionmanager.cpp +++ b/korganizer/actionmanager.cpp @@ -69,19 +69,19 @@ #include <kdeversion.h> #include <kactionclasses.h> -#include <qapplication.h> -#include <qcursor.h> -#include <qtimer.h> -#include <qlabel.h> +#include <tqapplication.h> +#include <tqcursor.h> +#include <tqtimer.h> +#include <tqlabel.h> // FIXME: Several places in the file don't use KConfigXT yet! KOWindowList *ActionManager::mWindowList = 0; ActionManager::ActionManager( KXMLGUIClient *client, CalendarView *widget, - QObject *parent, KOrg::MainWindow *mainWindow, + TQObject *parent, KOrg::MainWindow *mainWindow, bool isPart ) - : QObject( parent ), KCalendarIface(), mRecent( 0 ), + : TQObject( parent ), KCalendarIface(), mRecent( 0 ), mResourceButtonsAction( 0 ), mResourceViewShowAction( 0 ), mCalendar( 0 ), mCalendarResources( 0 ), mResourceView( 0 ), mIsClosing( false ) { @@ -125,7 +125,7 @@ void ActionManager::init() mWindowList = new KOWindowList; // Show tip of the day, when the first calendar is shown. if ( !mIsPart ) - QTimer::singleShot( 0, this, SLOT( showTipOnStart() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( showTipOnStart() ) ); } // Note: We need this ActionManager to be fully constructed, and // parent() to have a valid reference to it before the following @@ -135,28 +135,28 @@ void ActionManager::init() initActions(); // set up autoSaving stuff - mAutoSaveTimer = new QTimer( this ); - connect( mAutoSaveTimer,SIGNAL( timeout() ), SLOT( checkAutoSave() ) ); + mAutoSaveTimer = new TQTimer( this ); + connect( mAutoSaveTimer,TQT_SIGNAL( timeout() ), TQT_SLOT( checkAutoSave() ) ); if ( KOPrefs::instance()->mAutoSave && KOPrefs::instance()->mAutoSaveInterval > 0 ) { mAutoSaveTimer->start( 1000 * 60 * KOPrefs::instance()->mAutoSaveInterval ); } - mAutoArchiveTimer = new QTimer( this ); - connect( mAutoArchiveTimer, SIGNAL( timeout() ), SLOT( slotAutoArchive() ) ); + mAutoArchiveTimer = new TQTimer( this ); + connect( mAutoArchiveTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotAutoArchive() ) ); // First auto-archive should be in 5 minutes (like in kmail). if ( KOPrefs::instance()->mAutoArchive ) mAutoArchiveTimer->start( 5 * 60 * 1000, true ); // singleshot setTitle(); - connect( mCalendarView, SIGNAL( modifiedChanged( bool ) ), SLOT( setTitle() ) ); - connect( mCalendarView, SIGNAL( configChanged() ), SLOT( updateConfig() ) ); + connect( mCalendarView, TQT_SIGNAL( modifiedChanged( bool ) ), TQT_SLOT( setTitle() ) ); + connect( mCalendarView, TQT_SIGNAL( configChanged() ), TQT_SLOT( updateConfig() ) ); - connect( mCalendarView, SIGNAL( incidenceSelected( Incidence * ) ), - this, SLOT( processIncidenceSelection( Incidence * ) ) ); - connect( mCalendarView, SIGNAL( exportHTML( HTMLExportSettings * ) ), - this, SLOT( exportHTML( HTMLExportSettings * ) ) ); + connect( mCalendarView, TQT_SIGNAL( incidenceSelected( Incidence * ) ), + this, TQT_SLOT( processIncidenceSelection( Incidence * ) ) ); + connect( mCalendarView, TQT_SIGNAL( exportHTML( HTMLExportSettings * ) ), + this, TQT_SLOT( exportHTML( HTMLExportSettings * ) ) ); processIncidenceSelection( 0 ); @@ -196,13 +196,13 @@ void ActionManager::createCalendarResources() mCalendarView->addExtension( &factory ); mResourceView = factory.resourceView(); - connect( mCalendarResources, SIGNAL( calendarChanged() ), - mCalendarView, SLOT(resourcesChanged() ) ); - connect( mCalendarResources, SIGNAL( signalErrorMessage( const QString & ) ), - mCalendarView, SLOT( showErrorMessage( const QString & ) ) ); + connect( mCalendarResources, TQT_SIGNAL( calendarChanged() ), + mCalendarView, TQT_SLOT(resourcesChanged() ) ); + connect( mCalendarResources, TQT_SIGNAL( signalErrorMessage( const TQString & ) ), + mCalendarView, TQT_SLOT( showErrorMessage( const TQString & ) ) ); - connect( mCalendarView, SIGNAL( configChanged() ), - SLOT( updateConfig() ) ); + connect( mCalendarView, TQT_SIGNAL( configChanged() ), + TQT_SLOT( updateConfig() ) ); initCalendar( mCalendarResources ); } @@ -225,58 +225,58 @@ void ActionManager::initActions() //~~~~~~~~~~~~~~~~~~~~~~~ LOADING / SAVING ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if ( mIsPart ) { if ( mMainWindow->hasDocument() ) { - KStdAction::openNew( this, SLOT(file_new()), mACollection, "korganizer_openNew" ); - KStdAction::open( this, SLOT( file_open() ), mACollection, "korganizer_open" ); - mRecent = KStdAction::openRecent( this, SLOT( file_open( const KURL& ) ), + KStdAction::openNew( this, TQT_SLOT(file_new()), mACollection, "korganizer_openNew" ); + KStdAction::open( this, TQT_SLOT( file_open() ), mACollection, "korganizer_open" ); + mRecent = KStdAction::openRecent( this, TQT_SLOT( file_open( const KURL& ) ), mACollection, "korganizer_openRecent" ); - KStdAction::revert( this,SLOT( file_revert() ), mACollection, "korganizer_revert" ); - KStdAction::saveAs( this, SLOT( file_saveas() ), mACollection, + KStdAction::revert( this,TQT_SLOT( file_revert() ), mACollection, "korganizer_revert" ); + KStdAction::saveAs( this, TQT_SLOT( file_saveas() ), mACollection, "korganizer_saveAs" ); - KStdAction::save( this, SLOT( file_save() ), mACollection, "korganizer_save" ); + KStdAction::save( this, TQT_SLOT( file_save() ), mACollection, "korganizer_save" ); } - KStdAction::print( mCalendarView, SLOT( print() ), mACollection, "korganizer_print" ); + KStdAction::print( mCalendarView, TQT_SLOT( print() ), mACollection, "korganizer_print" ); } else { - KStdAction::openNew( this, SLOT( file_new() ), mACollection ); - KStdAction::open( this, SLOT( file_open() ), mACollection ); - mRecent = KStdAction::openRecent( this, SLOT( file_open( const KURL& ) ), + KStdAction::openNew( this, TQT_SLOT( file_new() ), mACollection ); + KStdAction::open( this, TQT_SLOT( file_open() ), mACollection ); + mRecent = KStdAction::openRecent( this, TQT_SLOT( file_open( const KURL& ) ), mACollection ); if ( mMainWindow->hasDocument() ) { - KStdAction::revert( this,SLOT( file_revert() ), mACollection ); - KStdAction::save( this, SLOT( file_save() ), mACollection ); - KStdAction::saveAs( this, SLOT( file_saveas() ), mACollection ); + KStdAction::revert( this,TQT_SLOT( file_revert() ), mACollection ); + KStdAction::save( this, TQT_SLOT( file_save() ), mACollection ); + KStdAction::saveAs( this, TQT_SLOT( file_saveas() ), mACollection ); } - KStdAction::print( mCalendarView, SLOT( print() ), mACollection ); + KStdAction::print( mCalendarView, TQT_SLOT( print() ), mACollection ); } //~~~~~~~~~~~~~~~~~~~~~~~~ IMPORT / EXPORT ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - new KAction( i18n("Import &Calendar..."), 0, this, SLOT( file_merge() ), + new KAction( i18n("Import &Calendar..."), 0, this, TQT_SLOT( file_merge() ), mACollection, "import_icalendar" ); - new KAction( i18n("&Import From UNIX Ical tool"), 0, this, SLOT( file_icalimport() ), + new KAction( i18n("&Import From UNIX Ical tool"), 0, this, TQT_SLOT( file_icalimport() ), mACollection, "import_ical" ); new KAction( i18n("Get &Hot New Stuff..."), 0, this, - SLOT( downloadNewStuff() ), mACollection, + TQT_SLOT( downloadNewStuff() ), mACollection, "downloadnewstuff" ); new KAction( i18n("Export &Web Page..."), "webexport", 0, - mCalendarView, SLOT( exportWeb() ), + mCalendarView, TQT_SLOT( exportWeb() ), mACollection, "export_web" ); new KAction( i18n("&iCalendar..."), 0, - mCalendarView, SLOT( exportICalendar() ), + mCalendarView, TQT_SLOT( exportICalendar() ), mACollection, "export_icalendar" ); new KAction( i18n("&vCalendar..."), 0, - mCalendarView, SLOT( exportVCalendar() ), + mCalendarView, TQT_SLOT( exportVCalendar() ), mACollection, "export_vcalendar" ); new KAction( i18n("Upload &Hot New Stuff..."), 0, this, - SLOT( uploadNewStuff() ), mACollection, + TQT_SLOT( uploadNewStuff() ), mACollection, "uploadnewstuff" ); - new KAction( i18n("Archive O&ld Entries..."), 0, this, SLOT( file_archive() ), + new KAction( i18n("Archive O&ld Entries..."), 0, this, TQT_SLOT( file_archive() ), mACollection, "file_archive" ); new KAction( i18n("delete completed to-dos", "Pur&ge Completed To-dos"), 0, - mCalendarView, SLOT( purgeCompleted() ), mACollection, + mCalendarView, TQT_SLOT( purgeCompleted() ), mACollection, "purge_completed" ); @@ -287,45 +287,45 @@ void ActionManager::initActions() KOrg::History *h = mCalendarView->history(); if ( mIsPart ) { // edit menu - mCutAction = KStdAction::cut( mCalendarView, SLOT( edit_cut() ), + mCutAction = KStdAction::cut( mCalendarView, TQT_SLOT( edit_cut() ), mACollection, "korganizer_cut" ); - mCopyAction = KStdAction::copy( mCalendarView, SLOT( edit_copy() ), + mCopyAction = KStdAction::copy( mCalendarView, TQT_SLOT( edit_copy() ), mACollection, "korganizer_copy" ); - pasteAction = KStdAction::paste( mCalendarView, SLOT( edit_paste() ), + pasteAction = KStdAction::paste( mCalendarView, TQT_SLOT( edit_paste() ), mACollection, "korganizer_paste" ); - mUndoAction = KStdAction::undo( h, SLOT( undo() ), + mUndoAction = KStdAction::undo( h, TQT_SLOT( undo() ), mACollection, "korganizer_undo" ); - mRedoAction = KStdAction::redo( h, SLOT( redo() ), + mRedoAction = KStdAction::redo( h, TQT_SLOT( redo() ), mACollection, "korganizer_redo" ); } else { - mCutAction = KStdAction::cut( mCalendarView,SLOT( edit_cut() ), + mCutAction = KStdAction::cut( mCalendarView,TQT_SLOT( edit_cut() ), mACollection ); - mCopyAction = KStdAction::copy( mCalendarView,SLOT( edit_copy() ), + mCopyAction = KStdAction::copy( mCalendarView,TQT_SLOT( edit_copy() ), mACollection ); - pasteAction = KStdAction::paste( mCalendarView,SLOT( edit_paste() ), + pasteAction = KStdAction::paste( mCalendarView,TQT_SLOT( edit_paste() ), mACollection ); - mUndoAction = KStdAction::undo( h, SLOT( undo() ), mACollection ); - mRedoAction = KStdAction::redo( h, SLOT( redo() ), mACollection ); + mUndoAction = KStdAction::undo( h, TQT_SLOT( undo() ), mACollection ); + mRedoAction = KStdAction::redo( h, TQT_SLOT( redo() ), mACollection ); } mDeleteAction = new KAction( i18n("&Delete"), "editdelete", 0, - mCalendarView, SLOT( appointment_delete() ), + mCalendarView, TQT_SLOT( appointment_delete() ), mACollection, "edit_delete" ); if ( mIsPart ) { - KStdAction::find( mCalendarView->dialogManager(), SLOT( showSearchDialog() ), + KStdAction::find( mCalendarView->dialogManager(), TQT_SLOT( showSearchDialog() ), mACollection, "korganizer_find" ); } else { - KStdAction::find( mCalendarView->dialogManager(), SLOT( showSearchDialog() ), + KStdAction::find( mCalendarView->dialogManager(), TQT_SLOT( showSearchDialog() ), mACollection ); } pasteAction->setEnabled( false ); mUndoAction->setEnabled( false ); mRedoAction->setEnabled( false ); - connect( mCalendarView, SIGNAL( pasteEnabled( bool ) ), - pasteAction, SLOT( setEnabled( bool ) ) ); - connect( h, SIGNAL( undoAvailable( const QString & ) ), - SLOT( updateUndoAction( const QString & ) ) ); - connect( h, SIGNAL( redoAvailable( const QString & ) ), - SLOT( updateRedoAction( const QString & ) ) ); + connect( mCalendarView, TQT_SIGNAL( pasteEnabled( bool ) ), + pasteAction, TQT_SLOT( setEnabled( bool ) ) ); + connect( h, TQT_SIGNAL( undoAvailable( const TQString & ) ), + TQT_SLOT( updateUndoAction( const TQString & ) ) ); + connect( h, TQT_SIGNAL( redoAvailable( const TQString & ) ), + TQT_SLOT( updateRedoAction( const TQString & ) ) ); @@ -335,83 +335,83 @@ void ActionManager::initActions() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~ VIEWS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ new KAction( i18n("What's &Next"), KOGlobals::self()->smallIcon( "whatsnext" ), 0, - mCalendarView->viewManager(), SLOT( showWhatsNextView() ), + mCalendarView->viewManager(), TQT_SLOT( showWhatsNextView() ), mACollection, "view_whatsnext" ); new KAction( i18n("&Day"), KOGlobals::self()->smallIcon( "1day" ), 0, - mCalendarView->viewManager(), SLOT( showDayView() ), + mCalendarView->viewManager(), TQT_SLOT( showDayView() ), mACollection, "view_day" ); mNextXDays = new KAction( "", KOGlobals::self()->smallIcon( "xdays" ), 0, mCalendarView->viewManager(), - SLOT( showNextXView() ), + TQT_SLOT( showNextXView() ), mACollection, "view_nextx" ); mNextXDays->setText( i18n( "&Next Day", "Ne&xt %n Days", KOPrefs::instance()->mNextXDays ) ); new KAction( i18n("W&ork Week"), KOGlobals::self()->smallIcon( "5days" ), 0, - mCalendarView->viewManager(), SLOT( showWorkWeekView() ), + mCalendarView->viewManager(), TQT_SLOT( showWorkWeekView() ), mACollection, "view_workweek" ); new KAction( i18n("&Week"), KOGlobals::self()->smallIcon( "7days" ), 0, - mCalendarView->viewManager(), SLOT( showWeekView() ), + mCalendarView->viewManager(), TQT_SLOT( showWeekView() ), mACollection, "view_week" ); new KAction( i18n("&Month"), KOGlobals::self()->smallIcon( "month" ), 0, - mCalendarView->viewManager(), SLOT( showMonthView() ), + mCalendarView->viewManager(), TQT_SLOT( showMonthView() ), mACollection, "view_month" ); new KAction( i18n("&List"), KOGlobals::self()->smallIcon( "list" ), 0, - mCalendarView->viewManager(), SLOT( showListView() ), + mCalendarView->viewManager(), TQT_SLOT( showListView() ), mACollection, "view_list" ); new KAction( i18n("&To-do List"), KOGlobals::self()->smallIcon( "todo" ), 0, - mCalendarView->viewManager(), SLOT( showTodoView() ), + mCalendarView->viewManager(), TQT_SLOT( showTodoView() ), mACollection, "view_todo" ); new KAction( i18n("&Journal"), KOGlobals::self()->smallIcon( "journal" ), 0, - mCalendarView->viewManager(), SLOT( showJournalView() ), + mCalendarView->viewManager(), TQT_SLOT( showJournalView() ), mACollection, "view_journal" ); new KAction( i18n("&Timeline View"), KOGlobals::self()->smallIcon( "timeline" ), 0, - mCalendarView->viewManager(), SLOT( showTimelineView() ), + mCalendarView->viewManager(), TQT_SLOT( showTimelineView() ), mACollection, "view_timeline" ); //~~~~~~~~~~~~~~~~~~~~~~~~~~~ FILTERS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ new KAction( i18n("&Refresh"), 0, - mCalendarView, SLOT( updateView() ), + mCalendarView, TQT_SLOT( updateView() ), mACollection, "update" ); // TODO: // new KAction( i18n("Hide &Completed To-dos"), 0, -// mCalendarView, SLOT( toggleHideCompleted() ), +// mCalendarView, TQT_SLOT( toggleHideCompleted() ), // mACollection, "hide_completed_todos" ); mFilterAction = new KSelectAction( i18n("F&ilter"), 0, mACollection, "filter_select" ); mFilterAction->setEditable( false ); - connect( mFilterAction, SIGNAL( activated(int) ), - mCalendarView, SLOT( filterActivated( int ) ) ); - connect( mCalendarView, SIGNAL( newFilterListSignal( const QStringList & ) ), - mFilterAction, SLOT( setItems( const QStringList & ) ) ); - connect( mCalendarView, SIGNAL( selectFilterSignal( int ) ), - mFilterAction, SLOT( setCurrentItem( int ) ) ); - connect( mCalendarView, SIGNAL( filterChanged() ), - this, SLOT( setTitle() ) ); + connect( mFilterAction, TQT_SIGNAL( activated(int) ), + mCalendarView, TQT_SLOT( filterActivated( int ) ) ); + connect( mCalendarView, TQT_SIGNAL( newFilterListSignal( const TQStringList & ) ), + mFilterAction, TQT_SLOT( setItems( const TQStringList & ) ) ); + connect( mCalendarView, TQT_SIGNAL( selectFilterSignal( int ) ), + mFilterAction, TQT_SLOT( setCurrentItem( int ) ) ); + connect( mCalendarView, TQT_SIGNAL( filterChanged() ), + this, TQT_SLOT( setTitle() ) ); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ZOOM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // TODO: try to find / create better icons for the following 4 actions new KAction( i18n( "Zoom In Horizontally" ), "viewmag+", 0, - mCalendarView->viewManager(), SLOT( zoomInHorizontally() ), + mCalendarView->viewManager(), TQT_SLOT( zoomInHorizontally() ), mACollection, "zoom_in_horizontally" ); new KAction( i18n( "Zoom Out Horizontally" ), "viewmag-", 0, - mCalendarView->viewManager(), SLOT( zoomOutHorizontally() ), + mCalendarView->viewManager(), TQT_SLOT( zoomOutHorizontally() ), mACollection, "zoom_out_horizontally" ); new KAction( i18n( "Zoom In Vertically" ), "viewmag+", 0, - mCalendarView->viewManager(), SLOT( zoomInVertically() ), + mCalendarView->viewManager(), TQT_SLOT( zoomInVertically() ), mACollection, "zoom_in_vertically" ); new KAction( i18n( "Zoom Out Vertically" ), "viewmag-", 0, - mCalendarView->viewManager(), SLOT( zoomOutVertically() ), + mCalendarView->viewManager(), TQT_SLOT( zoomOutVertically() ), mACollection, "zoom_out_vertically" ); @@ -420,73 +420,73 @@ void ActionManager::initActions() //************************** Actions MENU ********************************* new KAction( i18n("Go to &Today"), "today", 0, - mCalendarView,SLOT( goToday() ), + mCalendarView,TQT_SLOT( goToday() ), mACollection, "go_today" ); - bool isRTL = QApplication::reverseLayout(); + bool isRTL = TQApplication::reverseLayout(); action = new KAction( i18n("Go &Backward"), isRTL ? "forward" : "back", 0, - mCalendarView,SLOT( goPrevious() ), + mCalendarView,TQT_SLOT( goPrevious() ), mACollection, "go_previous" ); // Changing the action text by setText makes the toolbar button disappear. // This has to be fixed first, before the connects below can be reenabled. /* - connect( mCalendarView, SIGNAL( changeNavStringPrev( const QString & ) ), - action, SLOT( setText( const QString & ) ) ); - connect( mCalendarView, SIGNAL( changeNavStringPrev( const QString & ) ), - this, SLOT( dumpText( const QString & ) ) );*/ + connect( mCalendarView, TQT_SIGNAL( changeNavStringPrev( const TQString & ) ), + action, TQT_SLOT( setText( const TQString & ) ) ); + connect( mCalendarView, TQT_SIGNAL( changeNavStringPrev( const TQString & ) ), + this, TQT_SLOT( dumpText( const TQString & ) ) );*/ action = new KAction( i18n("Go &Forward"), isRTL ? "back" : "forward", 0, - mCalendarView,SLOT( goNext() ), + mCalendarView,TQT_SLOT( goNext() ), mACollection, "go_next" ); /* - connect( mCalendarView,SIGNAL( changeNavStringNext( const QString & ) ), - action,SLOT( setText( const QString & ) ) ); + connect( mCalendarView,TQT_SIGNAL( changeNavStringNext( const TQString & ) ), + action,TQT_SLOT( setText( const TQString & ) ) ); */ //************************** Actions MENU ********************************* new KAction( i18n("New E&vent..."), KOGlobals::self()->smallIcon( "newappointment" ), 0, - mCalendarView, SLOT( newEvent() ), + mCalendarView, TQT_SLOT( newEvent() ), mACollection, "new_event" ); new KAction( i18n("New &To-do..."), KOGlobals::self()->smallIcon( "newtodo" ), 0, - mCalendarView, SLOT( newTodo() ), + mCalendarView, TQT_SLOT( newTodo() ), mACollection, "new_todo" ); action = new KAction( i18n("New Su&b-to-do..."), 0, - mCalendarView,SLOT( newSubTodo() ), + mCalendarView,TQT_SLOT( newSubTodo() ), mACollection, "new_subtodo" ); action->setEnabled( false ); - connect( mCalendarView,SIGNAL( todoSelected( bool ) ), - action,SLOT( setEnabled( bool ) ) ); + connect( mCalendarView,TQT_SIGNAL( todoSelected( bool ) ), + action,TQT_SLOT( setEnabled( bool ) ) ); new KAction( i18n("New &Journal..."), KOGlobals::self()->smallIcon( "newjournal" ), 0, - mCalendarView, SLOT( newJournal() ), + mCalendarView, TQT_SLOT( newJournal() ), mACollection, "new_journal" ); mShowIncidenceAction = new KAction( i18n("&Show"), 0, - mCalendarView,SLOT( showIncidence() ), + mCalendarView,TQT_SLOT( showIncidence() ), mACollection, "show_incidence" ); mEditIncidenceAction = new KAction( i18n("&Edit..."), 0, - mCalendarView,SLOT( editIncidence() ), + mCalendarView,TQT_SLOT( editIncidence() ), mACollection, "edit_incidence" ); mDeleteIncidenceAction = new KAction( i18n("&Delete"), Key_Delete, - mCalendarView,SLOT( deleteIncidence()), + mCalendarView,TQT_SLOT( deleteIncidence()), mACollection, "delete_incidence" ); action = new KAction( i18n("&Make Sub-to-do Independent"), 0, - mCalendarView,SLOT( todo_unsub() ), + mCalendarView,TQT_SLOT( todo_unsub() ), mACollection, "unsub_todo" ); action->setEnabled( false ); - connect( mCalendarView,SIGNAL( subtodoSelected( bool ) ), - action,SLOT( setEnabled( bool ) ) ); + connect( mCalendarView,TQT_SIGNAL( subtodoSelected( bool ) ), + action,TQT_SLOT( setEnabled( bool ) ) ); // TODO: Add item to move the incidence to different resource // mAssignResourceAction = new KAction( i18n("Assign &Resource..."), 0, -// mCalendarView, SLOT( assignResource()), +// mCalendarView, TQT_SLOT( assignResource()), // mACollection, "assign_resource" ); // TODO: Add item to quickly toggle the reminder of a given incidence // mToggleAlarmAction = new KToggleAction( i18n("&Activate Reminder"), 0, -// mCalendarView, SLOT( toggleAlarm()), +// mCalendarView, TQT_SLOT( toggleAlarm()), // mACollection, "activate_alarm" ); @@ -494,63 +494,63 @@ void ActionManager::initActions() //************************** SCHEDULE MENU ******************************** mPublishEvent = new KAction( i18n("&Publish Item Information..."), "mail_send", 0, - mCalendarView, SLOT( schedule_publish() ), + mCalendarView, TQT_SLOT( schedule_publish() ), mACollection, "schedule_publish" ); mPublishEvent->setEnabled( false ); action = new KAction( i18n("Send &Invitation to Attendees"),"mail_generic",0, - mCalendarView,SLOT( schedule_request() ), + mCalendarView,TQT_SLOT( schedule_request() ), mACollection,"schedule_request" ); action->setEnabled( false ); - connect( mCalendarView, SIGNAL( organizerEventsSelected( bool ) ), - action, SLOT( setEnabled( bool ) ) ); + connect( mCalendarView, TQT_SIGNAL( organizerEventsSelected( bool ) ), + action, TQT_SLOT( setEnabled( bool ) ) ); action = new KAction( i18n("Re&quest Update"), 0, - mCalendarView, SLOT( schedule_refresh() ), + mCalendarView, TQT_SLOT( schedule_refresh() ), mACollection, "schedule_refresh" ); action->setEnabled( false ); - connect( mCalendarView,SIGNAL( groupEventsSelected( bool ) ), - action,SLOT( setEnabled( bool ) ) ); + connect( mCalendarView,TQT_SIGNAL( groupEventsSelected( bool ) ), + action,TQT_SLOT( setEnabled( bool ) ) ); action = new KAction( i18n("Send &Cancelation to Attendees"), 0, - mCalendarView, SLOT( schedule_cancel() ), + mCalendarView, TQT_SLOT( schedule_cancel() ), mACollection, "schedule_cancel" ); action->setEnabled( false ); - connect( mCalendarView,SIGNAL( organizerEventsSelected( bool ) ), - action,SLOT( setEnabled( bool ) ) ); + connect( mCalendarView,TQT_SIGNAL( organizerEventsSelected( bool ) ), + action,TQT_SLOT( setEnabled( bool ) ) ); action = new KAction( i18n("Send Status &Update"),"mail_reply",0, - mCalendarView,SLOT( schedule_reply() ), + mCalendarView,TQT_SLOT( schedule_reply() ), mACollection,"schedule_reply" ); action->setEnabled( false ); - connect( mCalendarView,SIGNAL( groupEventsSelected( bool ) ), - action,SLOT( setEnabled( bool ) ) ); + connect( mCalendarView,TQT_SIGNAL( groupEventsSelected( bool ) ), + action,TQT_SLOT( setEnabled( bool ) ) ); action = new KAction( i18n("counter proposal","Request Chan&ge"),0, - mCalendarView,SLOT( schedule_counter() ), + mCalendarView,TQT_SLOT( schedule_counter() ), mACollection, "schedule_counter" ); action->setEnabled( false ); - connect( mCalendarView,SIGNAL( groupEventsSelected( bool ) ), - action,SLOT( setEnabled( bool ) ) ); + connect( mCalendarView,TQT_SIGNAL( groupEventsSelected( bool ) ), + action,TQT_SLOT( setEnabled( bool ) ) ); mForwardEvent = new KAction( i18n("&Send as iCalendar..."), "mail_forward", 0, - mCalendarView, SLOT(schedule_forward()), + mCalendarView, TQT_SLOT(schedule_forward()), mACollection, "schedule_forward" ); mForwardEvent->setEnabled( false ); action = new KAction( i18n("&Mail Free Busy Information..."), 0, - mCalendarView, SLOT( mailFreeBusy() ), + mCalendarView, TQT_SLOT( mailFreeBusy() ), mACollection, "mail_freebusy" ); action->setEnabled( true ); action = new KAction( i18n("&Upload Free Busy Information"), 0, - mCalendarView, SLOT( uploadFreeBusy() ), + mCalendarView, TQT_SLOT( uploadFreeBusy() ), mACollection, "upload_freebusy" ); action->setEnabled( true ); if ( !mIsPart ) { action = new KAction( i18n("&Addressbook"),"contents",0, - mCalendarView,SLOT( openAddressbook() ), + mCalendarView,TQT_SLOT( openAddressbook() ), mACollection,"addressbook" ); } @@ -561,13 +561,13 @@ void ActionManager::initActions() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SIDEBAR ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mDateNavigatorShowAction = new KToggleAction( i18n("Show Date Navigator"), 0, - this, SLOT( toggleDateNavigator() ), + this, TQT_SLOT( toggleDateNavigator() ), mACollection, "show_datenavigator" ); mTodoViewShowAction = new KToggleAction ( i18n("Show To-do View"), 0, - this, SLOT( toggleTodoView() ), + this, TQT_SLOT( toggleTodoView() ), mACollection, "show_todoview" ); mEventViewerShowAction = new KToggleAction ( i18n("Show Item Viewer"), 0, - this, SLOT( toggleEventViewer() ), + this, TQT_SLOT( toggleEventViewer() ), mACollection, "show_eventviewer" ); KConfig *config = KOGlobals::self()->config(); config->setGroup( "Settings" ); @@ -586,10 +586,10 @@ void ActionManager::initActions() if ( !mMainWindow->hasDocument() ) { mResourceViewShowAction = new KToggleAction ( i18n("Show Resource View"), 0, - this, SLOT( toggleResourceView() ), + this, TQT_SLOT( toggleResourceView() ), mACollection, "show_resourceview" ); mResourceButtonsAction = new KToggleAction( i18n("Show &Resource Buttons"), 0, - this, SLOT( toggleResourceButtons() ), + this, TQT_SLOT( toggleResourceButtons() ), mACollection, "show_resourcebuttons" ); mResourceViewShowAction->setChecked( config->readBoolEntry( "ResourceViewVisible", true ) ); @@ -604,45 +604,45 @@ void ActionManager::initActions() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SIDEBAR ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ new KAction( i18n("Configure &Date && Time..."), 0, - this, SLOT( configureDateTime() ), + this, TQT_SLOT( configureDateTime() ), mACollection, "conf_datetime" ); // TODO: Add an item to show the resource management dlg // new KAction( i18n("Manage &Resources..."), 0, -// this, SLOT( manageResources() ), +// this, TQT_SLOT( manageResources() ), // mACollection, "conf_resources" ); new KAction( i18n("Manage View &Filters..."), "configure", 0, - mCalendarView, SLOT( editFilters() ), + mCalendarView, TQT_SLOT( editFilters() ), mACollection, "edit_filters" ); new KAction( i18n("Manage C&ategories..."), 0, - mCalendarView->dialogManager(), SLOT( showCategoryEditDialog() ), + mCalendarView->dialogManager(), TQT_SLOT( showCategoryEditDialog() ), mACollection, "edit_categories" ); if ( mIsPart ) { new KAction( i18n("&Configure Calendar..."), "configure", 0, - mCalendarView, SLOT( edit_options() ), + mCalendarView, TQT_SLOT( edit_options() ), mACollection, "korganizer_configure" ); - KStdAction::keyBindings( this, SLOT( keyBindings() ), + KStdAction::keyBindings( this, TQT_SLOT( keyBindings() ), mACollection, "korganizer_configure_shortcuts" ); } else { - KStdAction::preferences( mCalendarView, SLOT( edit_options() ), + KStdAction::preferences( mCalendarView, TQT_SLOT( edit_options() ), mACollection ); - KStdAction::keyBindings( this, SLOT( keyBindings() ), mACollection ); + KStdAction::keyBindings( this, TQT_SLOT( keyBindings() ), mACollection ); } //**************************** HELP MENU ********************************** - KStdAction::tipOfDay( this, SLOT( showTip() ), mACollection, + KStdAction::tipOfDay( this, TQT_SLOT( showTip() ), mACollection, "help_tipofday" ); // new KAction( i18n("Show Intro Page"), 0, -// mCalendarView,SLOT( showIntro() ), +// mCalendarView,TQT_SLOT( showIntro() ), // mACollection,"show_intro" ); //************************* TOOLBAR ACTIONS ******************************* - QLabel *filterLabel = new QLabel( i18n("Filter: "), mCalendarView ); + TQLabel *filterLabel = new TQLabel( i18n("Filter: "), mCalendarView ); filterLabel->hide(); new KWidgetAction( filterLabel, i18n("Filter: "), 0, 0, 0, mACollection, "filter_label" ); @@ -705,7 +705,7 @@ void ActionManager::file_new() void ActionManager::file_open() { KURL url; - QString defaultPath = locateLocal( "data","korganizer/" ); + TQString defaultPath = locateLocal( "data","korganizer/" ); url = KFileDialog::getOpenURL( defaultPath,i18n("*.vcs *.ics|Calendar Files"), dialogParent() ); @@ -738,12 +738,12 @@ void ActionManager::file_icalimport() // FIXME: eventually, we will need a dialog box to select import type, etc. // for now, hard-coded to ical file, $HOME/.calendar. int retVal = -1; - QString progPath; + TQString progPath; KTempFile tmpfn; - QString homeDir = QDir::homeDirPath() + QString::fromLatin1( "/.calendar" ); + TQString homeDir = TQDir::homeDirPath() + TQString::fromLatin1( "/.calendar" ); - if ( !QFile::exists( homeDir ) ) { + if ( !TQFile::exists( homeDir ) ) { KMessageBox::error( dialogParent(), i18n( "You have no ical file in your home directory.\n" "Import cannot proceed.\n" ) ); @@ -878,7 +878,7 @@ bool ActionManager::openURL( const KURL &url,bool merge ) } setTitle(); } else { - QString tmpFile; + TQString tmpFile; if( KIO::NetAccess::download( url, tmpFile, view() ) ) { kdDebug(5850) << "--- Downloaded to " << tmpFile << endl; bool success = mCalendarView->openCalendar( tmpFile, merge ); @@ -901,7 +901,7 @@ bool ActionManager::openURL( const KURL &url,bool merge ) } return success; } else { - QString msg; + TQString msg; msg = i18n("Cannot download calendar from '%1'.").arg( url.prettyURL() ); KMessageBox::error( dialogParent(), msg ); return false; @@ -918,7 +918,7 @@ bool ActionManager::addResource( const KURL &mUrl ) ResourceCalendar *resource = 0; - QString name; + TQString name; kdDebug(5850) << "URL: " << mUrl << endl; if ( mUrl.isLocalFile() ) { @@ -948,7 +948,7 @@ bool ActionManager::addResource( const KURL &mUrl ) if ( mCalendarResources ) mCalendarResources->resourceAdded( resource ); } else { - QString msg = i18n("Unable to create calendar resource '%1'.") + TQString msg = i18n("Unable to create calendar resource '%1'.") .arg( name ); KMessageBox::error( dialogParent(), msg ); } @@ -976,7 +976,7 @@ void ActionManager::closeURL() bool ActionManager::saveURL() { - QString ext; + TQString ext; if ( mURL.isLocalFile() ) { ext = mFile.right( 4 ); @@ -993,7 +993,7 @@ bool ActionManager::saveURL() true ); if ( result != KMessageBox::Continue ) return false; - QString filename = mURL.fileName(); + TQString filename = mURL.fileName(); filename.replace( filename.length() - 4, 4, ".ics" ); mURL.setFileName( filename ); if ( mURL.isLocalFile() ) { @@ -1013,7 +1013,7 @@ bool ActionManager::saveURL() if ( !mURL.isLocalFile() ) { if ( !KIO::NetAccess::upload( mFile, mURL, view() ) ) { - QString msg = i18n("Cannot upload calendar to '%1'") + TQString msg = i18n("Cannot upload calendar to '%1'") .arg( mURL.prettyURL() ); KMessageBox::error( dialogParent() ,msg ); return false; @@ -1038,10 +1038,10 @@ void ActionManager::exportHTML() // seem to load the config theirselves settings.readConfig(); - QDate qd1; - qd1 = QDate::currentDate(); - QDate qd2; - qd2 = QDate::currentDate(); + TQDate qd1; + qd1 = TQDate::currentDate(); + TQDate qd2; + qd2 = TQDate::currentDate(); if ( settings.monthView() ) qd2.addMonths( 1 ); else @@ -1063,12 +1063,12 @@ void ActionManager::exportHTML( HTMLExportSettings *settings ) KCal::HtmlExport mExport( mCalendarView->calendar(), settings ); - QDate cdate = settings->dateStart().date(); - QDate qd2 = settings->dateEnd().date(); + TQDate cdate = settings->dateStart().date(); + TQDate qd2 = settings->dateEnd().date(); while ( cdate <= qd2 ) { - QStringList holidays = KOGlobals::self()->holiday( cdate ); + TQStringList holidays = KOGlobals::self()->holiday( cdate ); if ( !holidays.isEmpty() ) { - QStringList::ConstIterator it = holidays.begin(); + TQStringList::ConstIterator it = holidays.begin(); for ( ; it != holidays.end(); ++it ) { mExport.addHoliday( cdate, *it ); } @@ -1081,7 +1081,7 @@ void ActionManager::exportHTML( HTMLExportSettings *settings ) mExport.save( dest.path() ); } else { KTempFile tf; - QString tfile = tf.name(); + TQString tfile = tf.name(); tf.close(); mExport.save( tfile ); if ( !KIO::NetAccess::upload( tfile, dest, view() ) ) { @@ -1105,7 +1105,7 @@ bool ActionManager::saveAsURL( const KURL &url ) return false; } - QString fileOrig = mFile; + TQString fileOrig = mFile; KURL URLOrig = mURL; KTempFile *tempFile = 0; @@ -1153,7 +1153,7 @@ bool ActionManager::saveModifiedURL() int result = KMessageBox::warningYesNoCancel( dialogParent(), i18n("The calendar has been modified.\nDo you want to save it?"), - QString::null, + TQString::null, KStdGuiItem::save(), KStdGuiItem::discard() ); switch( result ) { case KMessageBox::Yes: @@ -1184,9 +1184,9 @@ KURL ActionManager::getSaveURL() if ( url.isEmpty() ) return url; - QString filename = url.fileName( false ); + TQString filename = url.fileName( false ); - QString e = filename.right( 4 ); + TQString e = filename.right( 4 ); if ( e != ".vcs" && e != ".ics" ) { // Default save format is iCalendar filename += ".ics"; @@ -1215,7 +1215,7 @@ void ActionManager::readProperties( KConfig *config ) bool isResourceCalendar( config->readBoolEntry( "UseResourceCalendar", true ) ); - QString calendarUrl = config->readPathEntry( "Calendar" ); + TQString calendarUrl = config->readPathEntry( "Calendar" ); if ( !isResourceCalendar && !calendarUrl.isEmpty() ) { mMainWindow->init( true ); @@ -1284,8 +1284,8 @@ void ActionManager::configureDateTime() KProcess *proc = new KProcess; *proc << "kcmshell" << "language"; - connect( proc,SIGNAL( processExited( KProcess * ) ), - SLOT( configureDateTimeFinished( KProcess * ) ) ); + connect( proc,TQT_SIGNAL( processExited( KProcess * ) ), + TQT_SLOT( configureDateTimeFinished( KProcess * ) ) ); if ( !proc->start() ) { KMessageBox::sorry( dialogParent(), @@ -1296,7 +1296,7 @@ void ActionManager::configureDateTime() void ActionManager::showTip() { - KTipDialog::showTip( dialogParent(),QString::null,true ); + KTipDialog::showTip( dialogParent(),TQString::null,true ); } void ActionManager::showTipOnStart() @@ -1314,7 +1314,7 @@ KOrg::MainWindow *ActionManager::findInstance( const KURL &url ) } } -void ActionManager::dumpText( const QString &str ) +void ActionManager::dumpText( const TQString &str ) { kdDebug(5850) << "ActionManager::dumpText(): " << str << endl; } @@ -1356,37 +1356,37 @@ void ActionManager::toggleResourceButtons() if ( mResourceView ) mResourceView->showButtons( visible ); } -bool ActionManager::openURL( const QString &url ) +bool ActionManager::openURL( const TQString &url ) { return openURL( KURL( url ) ); } -bool ActionManager::mergeURL( const QString &url ) +bool ActionManager::mergeURL( const TQString &url ) { return openURL( KURL( url ),true ); } -bool ActionManager::saveAsURL( const QString &url ) +bool ActionManager::saveAsURL( const TQString &url ) { return saveAsURL( KURL( url ) ); } -QString ActionManager::getCurrentURLasString() const +TQString ActionManager::getCurrentURLasString() const { return mURL.url(); } -bool ActionManager::editIncidence( const QString& uid ) +bool ActionManager::editIncidence( const TQString& uid ) { return mCalendarView->editIncidence( uid ); } -bool ActionManager::deleteIncidence( const QString& uid, bool force ) +bool ActionManager::deleteIncidence( const TQString& uid, bool force ) { return mCalendarView->deleteIncidence( uid, force ); } -bool ActionManager::addIncidence( const QString& ical ) +bool ActionManager::addIncidence( const TQString& ical ) { return mCalendarView->addIncidence( ical ); } @@ -1410,7 +1410,7 @@ void ActionManager::uploadNewStuff() mNewStuff->upload(); } -QString ActionManager::localFileName() +TQString ActionManager::localFileName() { return mFile; } @@ -1515,9 +1515,9 @@ void ActionManager::setTitle() mMainWindow->setTitle(); } -KCalendarIface::ResourceRequestReply ActionManager::resourceRequest( const QValueList<QPair<QDateTime, QDateTime> >&, - const QCString& resource, - const QString& vCalIn ) +KCalendarIface::ResourceRequestReply ActionManager::resourceRequest( const TQValueList<QPair<TQDateTime, TQDateTime> >&, + const TQCString& resource, + const TQString& vCalIn ) { kdDebug(5850) << k_funcinfo << "resource=" << resource << " vCalIn=" << vCalIn << endl; KCalendarIface::ResourceRequestReply reply; @@ -1525,32 +1525,32 @@ KCalendarIface::ResourceRequestReply ActionManager::resourceRequest( const QValu return reply; } -void ActionManager::openEventEditor( const QString& text ) +void ActionManager::openEventEditor( const TQString& text ) { mCalendarView->newEvent( text ); } -void ActionManager::openEventEditor( const QString& summary, - const QString& description, - const QString& attachment ) +void ActionManager::openEventEditor( const TQString& summary, + const TQString& description, + const TQString& attachment ) { mCalendarView->newEvent( summary, description, attachment ); } -void ActionManager::openEventEditor( const QString& summary, - const QString& description, - const QString& attachment, - const QStringList& attendees ) +void ActionManager::openEventEditor( const TQString& summary, + const TQString& description, + const TQString& attachment, + const TQStringList& attendees ) { mCalendarView->newEvent( summary, description, attachment, attendees ); } -void ActionManager::openEventEditor( const QString & summary, - const QString & description, - const QString & uri, - const QString & file, - const QStringList & attendees, - const QString & attachmentMimetype ) +void ActionManager::openEventEditor( const TQString & summary, + const TQString & description, + const TQString & uri, + const TQString & file, + const TQStringList & attendees, + const TQString & attachmentMimetype ) { int action = KOPrefs::instance()->defaultEmailAttachMethod(); if ( attachmentMimetype != "message/rfc822" ) { @@ -1562,11 +1562,11 @@ void ActionManager::openEventEditor( const QString & summary, menu->insertItem( i18n("Attach inline &without attachments"), KOPrefs::InlineBody ); menu->insertSeparator(); menu->insertItem( SmallIcon("cancel"), i18n("C&ancel"), KOPrefs::Ask ); - action = menu->exec( QCursor::pos(), 0 ); + action = menu->exec( TQCursor::pos(), 0 ); delete menu; } - QString attData; + TQString attData; KTempFile tf; tf.setAutoDelete( true ); switch ( action ) { @@ -1580,12 +1580,12 @@ void ActionManager::openEventEditor( const QString & summary, break; case KOPrefs::InlineBody: { - QFile f( file ); + TQFile f( file ); if ( !f.open( IO_ReadOnly ) ) return; KMime::Message *msg = new KMime::Message(); - msg->setContent( QCString( f.readAll() ) ); - QCString head = msg->head(); + msg->setContent( TQCString( f.readAll() ) ); + TQCString head = msg->head(); msg->parse(); if ( msg == msg->textContent() || msg->textContent() == 0 ) { // no attachments attData = file; @@ -1603,7 +1603,7 @@ void ActionManager::openEventEditor( const QString & summary, if ( head.find( "Content-Type:", begin, false ) != begin && head.find( "Content-Transfer-Encoding:", begin, false ) != begin && !(skipFolded && (head[begin] == ' ' || head[end] == '\t')) ) { - QCString line = head.mid( begin, end - begin ); + TQCString line = head.mid( begin, end - begin ); tf.file()->writeBlock( line.data(), line.length() ); tf.file()->writeBlock( "\n", 1 ); skipFolded = false; @@ -1616,12 +1616,12 @@ void ActionManager::openEventEditor( const QString & summary, if ( end < 0 && begin < (int)head.length() ) end = head.length() - 1; } - QCString cte = msg->textContent()->contentTransferEncoding()->as7BitString(); + TQCString cte = msg->textContent()->contentTransferEncoding()->as7BitString(); if ( !cte.stripWhiteSpace().isEmpty() ) { tf.file()->writeBlock( cte.data(), cte.length() ); tf.file()->writeBlock( "\n", 1 ); } - QCString ct = msg->textContent()->contentType()->as7BitString(); + TQCString ct = msg->textContent()->contentType()->as7BitString(); if ( !ct.stripWhiteSpace().isEmpty() ) tf.file()->writeBlock( ct.data(), ct.length() ); tf.file()->writeBlock( "\n", 1 ); @@ -1640,32 +1640,32 @@ void ActionManager::openEventEditor( const QString & summary, mCalendarView->newEvent( summary, description, attData, attendees, attachmentMimetype, action != KOPrefs::Link ); } -void ActionManager::openTodoEditor( const QString& text ) +void ActionManager::openTodoEditor( const TQString& text ) { mCalendarView->newTodo( text ); } -void ActionManager::openTodoEditor( const QString& summary, - const QString& description, - const QString& attachment ) +void ActionManager::openTodoEditor( const TQString& summary, + const TQString& description, + const TQString& attachment ) { mCalendarView->newTodo( summary, description, attachment ); } -void ActionManager::openTodoEditor( const QString& summary, - const QString& description, - const QString& attachment, - const QStringList& attendees ) +void ActionManager::openTodoEditor( const TQString& summary, + const TQString& description, + const TQString& attachment, + const TQStringList& attendees ) { mCalendarView->newTodo( summary, description, attachment, attendees ); } -void ActionManager::openTodoEditor(const QString & summary, - const QString & description, - const QString & uri, - const QString & file, - const QStringList & attendees, - const QString & attachmentMimetype) +void ActionManager::openTodoEditor(const TQString & summary, + const TQString & description, + const TQString & uri, + const TQString & file, + const TQStringList & attendees, + const TQString & attachmentMimetype) { int action = KOPrefs::instance()->defaultTodoAttachMethod(); if ( attachmentMimetype != "message/rfc822" ) { @@ -1676,11 +1676,11 @@ void ActionManager::openTodoEditor(const QString & summary, menu->insertItem( i18n("Attach &inline"), KOPrefs::TodoAttachInlineFull ); menu->insertSeparator(); menu->insertItem( SmallIcon("cancel"), i18n("C&ancel"), KOPrefs::TodoAttachAsk ); - action = menu->exec( QCursor::pos(), 0 ); + action = menu->exec( TQCursor::pos(), 0 ); delete menu; } - QString attData; + TQString attData; switch ( action ) { case KOPrefs::TodoAttachAsk: return; @@ -1698,25 +1698,25 @@ void ActionManager::openTodoEditor(const QString & summary, mCalendarView->newTodo( summary, description, attData, attendees, attachmentMimetype, action != KOPrefs::Link ); } -void ActionManager::openJournalEditor( const QDate& date ) +void ActionManager::openJournalEditor( const TQDate& date ) { mCalendarView->newJournal( date ); } -void ActionManager::openJournalEditor( const QString& text, const QDate& date ) +void ActionManager::openJournalEditor( const TQString& text, const TQDate& date ) { mCalendarView->newJournal( text, date ); } -void ActionManager::openJournalEditor( const QString& text ) +void ActionManager::openJournalEditor( const TQString& text ) { mCalendarView->newJournal( text ); } //TODO: -// void ActionManager::openJournalEditor( const QString& summary, -// const QString& description, -// const QString& attachment ) +// void ActionManager::openJournalEditor( const TQString& summary, +// const TQString& description, +// const TQString& attachment ) // { // mCalendarView->newJournal( summary, description, attachment ); // } @@ -1737,23 +1737,23 @@ void ActionManager::showEventView() mCalendarView->viewManager()->showEventView(); } -void ActionManager::goDate( const QDate& date ) +void ActionManager::goDate( const TQDate& date ) { mCalendarView->goDate( date ); } -void ActionManager::goDate( const QString& date ) +void ActionManager::goDate( const TQString& date ) { goDate( KGlobal::locale()->readDate( date ) ); } -void ActionManager::showDate(const QDate & date) +void ActionManager::showDate(const TQDate & date) { mCalendarView->showDate( date ); } -void ActionManager::updateUndoAction( const QString &text ) +void ActionManager::updateUndoAction( const TQString &text ) { if ( text.isNull() ) { mUndoAction->setEnabled( false ); @@ -1765,7 +1765,7 @@ void ActionManager::updateUndoAction( const QString &text ) } } -void ActionManager::updateRedoAction( const QString &text ) +void ActionManager::updateRedoAction( const TQString &text ) { if ( text.isNull() ) { mRedoAction->setEnabled( false ); @@ -1785,12 +1785,12 @@ bool ActionManager::queryClose() if ( mCalendar && mCalendar->isModified() ) { int res = KMessageBox::questionYesNoCancel( dialogParent(), - i18n("The calendar contains unsaved changes. Do you want to save them before exiting?"), QString::null, KStdGuiItem::save(), KStdGuiItem::discard() ); + i18n("The calendar contains unsaved changes. Do you want to save them before exiting?"), TQString::null, KStdGuiItem::save(), KStdGuiItem::discard() ); // Exit on yes and no, don't exit on cancel. If saving fails, ask for exiting. if ( res == KMessageBox::Yes ) { close = saveModifiedURL(); if ( !close ) { - int res1 = KMessageBox::questionYesNo( dialogParent(), i18n("Unable to save the calendar. Do you still want to close this window?"), QString::null, KStdGuiItem::close(), KStdGuiItem::cancel() ); + int res1 = KMessageBox::questionYesNo( dialogParent(), i18n("Unable to save the calendar. Do you still want to close this window?"), TQString::null, KStdGuiItem::close(), KStdGuiItem::cancel() ); close = ( res1 == KMessageBox::Yes ); } } else { @@ -1804,8 +1804,8 @@ bool ActionManager::queryClose() // FIXME: Put main window into a state indicating final saving. mIsClosing = true; // FIXME: Close main window when save is finished -// connect( mCalendarResources, SIGNAL( calendarSaved() ), -// mMainWindow, SLOT( close() ) ); +// connect( mCalendarResources, TQT_SIGNAL( calendarSaved() ), +// mMainWindow, TQT_SLOT( close() ) ); } if ( mCalendarResources->isSaving() ) { kdDebug(5850) << "ActionManager::queryClose(): isSaving" << endl; @@ -1830,7 +1830,7 @@ void ActionManager::saveCalendar() if ( !url().isEmpty() ) { saveURL(); } else { - QString location = locateLocal( "data", "korganizer/kontact.ics" ); + TQString location = locateLocal( "data", "korganizer/kontact.ics" ); saveAsURL( location ); } } @@ -1870,14 +1870,14 @@ void ActionManager::importCalendar( const KURL &url ) ImportDialog *dialog; dialog = new ImportDialog( url, mMainWindow->topLevelWidget() ); - connect( dialog, SIGNAL( dialogFinished( ImportDialog * ) ), - SLOT( slotImportDialogFinished( ImportDialog * ) ) ); - connect( dialog, SIGNAL( openURL( const KURL &, bool ) ), - SLOT( openURL( const KURL &, bool ) ) ); - connect( dialog, SIGNAL( newWindow( const KURL & ) ), - SIGNAL( actionNew( const KURL & ) ) ); - connect( dialog, SIGNAL( addResource( const KURL & ) ), - SLOT( addResource( const KURL & ) ) ); + connect( dialog, TQT_SIGNAL( dialogFinished( ImportDialog * ) ), + TQT_SLOT( slotImportDialogFinished( ImportDialog * ) ) ); + connect( dialog, TQT_SIGNAL( openURL( const KURL &, bool ) ), + TQT_SLOT( openURL( const KURL &, bool ) ) ); + connect( dialog, TQT_SIGNAL( newWindow( const KURL & ) ), + TQT_SIGNAL( actionNew( const KURL & ) ) ); + connect( dialog, TQT_SIGNAL( addResource( const KURL & ) ), + TQT_SLOT( addResource( const KURL & ) ) ); dialog->show(); } @@ -1902,23 +1902,23 @@ void ActionManager::slotAutoArchive() return; mAutoArchiveTimer->stop(); EventArchiver archiver; - connect( &archiver, SIGNAL( eventsDeleted() ), mCalendarView, SLOT( updateView() ) ); + connect( &archiver, TQT_SIGNAL( eventsDeleted() ), mCalendarView, TQT_SLOT( updateView() ) ); archiver.runAuto( mCalendarView->calendar(), mCalendarView, false /*no gui*/ ); // restart timer with the correct delay ( especially useful for the first time ) slotAutoArchivingSettingsModified(); } -void ActionManager::loadProfile( const QString & path ) +void ActionManager::loadProfile( const TQString & path ) { KOPrefs::instance()->writeConfig(); KConfig* const cfg = KOPrefs::instance()->config(); const KConfig profile( path+"/korganizerrc", /*read-only=*/false, /*useglobals=*/false ); - const QStringList groups = profile.groupList(); - for ( QStringList::ConstIterator it = groups.begin(), end = groups.end(); it != end; ++it ) + const TQStringList groups = profile.groupList(); + for ( TQStringList::ConstIterator it = groups.begin(), end = groups.end(); it != end; ++it ) { cfg->setGroup( *it ); - typedef QMap<QString, QString> StringMap; + typedef TQMap<TQString, TQString> StringMap; const StringMap entries = profile.entryMap( *it ); for ( StringMap::ConstIterator it2 = entries.begin(), end = entries.end(); it2 != end; ++it2 ) { @@ -1931,7 +1931,7 @@ void ActionManager::loadProfile( const QString & path ) } namespace { - void copyConfigEntry( KConfig* source, KConfig* dest, const QString& group, const QString& key, const QString& defaultValue=QString() ) + void copyConfigEntry( KConfig* source, KConfig* dest, const TQString& group, const TQString& key, const TQString& defaultValue=TQString() ) { source->setGroup( group ); dest->setGroup( group ); @@ -1939,7 +1939,7 @@ namespace { } } -void ActionManager::saveToProfile( const QString & path ) const +void ActionManager::saveToProfile( const TQString & path ) const { KOPrefs::instance()->writeConfig(); KConfig* const cfg = KOPrefs::instance()->config(); @@ -1948,7 +1948,7 @@ void ActionManager::saveToProfile( const QString & path ) const ::copyConfigEntry( cfg, &profile, "Views", "Agenda View Calendar Display" ); } -QWidget *ActionManager::dialogParent() +TQWidget *ActionManager::dialogParent() { return mCalendarView->topLevelWidget(); } diff --git a/korganizer/actionmanager.h b/korganizer/actionmanager.h index b8c9cadbc..f19f7b4bb 100644 --- a/korganizer/actionmanager.h +++ b/korganizer/actionmanager.h @@ -27,7 +27,7 @@ #ifndef KORG_ACTIONMANAGER_H #define KORG_ACTIONMANAGER_H -#include <qobject.h> +#include <tqobject.h> #include <kurl.h> #include <korganizer/part.h> #include <kdepimmacros.h> @@ -71,12 +71,12 @@ using namespace KCal; actions are in one location. It also provides DCOP interface[s]. */ -class KDE_EXPORT ActionManager : public QObject, public KCalendarIface +class KDE_EXPORT ActionManager : public TQObject, public KCalendarIface { Q_OBJECT public: ActionManager( KXMLGUIClient *client, CalendarView *widget, - QObject *parent, KOrg::MainWindow *mainWindow, + TQObject *parent, KOrg::MainWindow *mainWindow, bool isPart ); virtual ~ActionManager(); @@ -130,90 +130,90 @@ class KDE_EXPORT ActionManager : public QObject, public KCalendarIface /** Is there a instance with this URL? */ static KOrg::MainWindow* findInstance( const KURL &url ); /** Open calendar file from URL */ - bool openURL( const QString &url ); + bool openURL( const TQString &url ); /** Open calendar file from URL */ - bool mergeURL( const QString &url ); + bool mergeURL( const TQString &url ); /** Save calendar file to URL */ - bool saveAsURL( const QString &url ); + bool saveAsURL( const TQString &url ); /** Close calendar file opened from URL */ void closeURL(); - /** Get current URL as QString */ - QString getCurrentURLasString() const; + /** Get current URL as TQString */ + TQString getCurrentURLasString() const; /** Delete the incidence with the given unique id from current calendar. @param uid UID of the incidence to delete. @param force If true, all recurrences and sub-todos (if applicable) will be deleted without prompting for confirmation. */ - virtual bool deleteIncidence( const QString& uid, bool force = false ); + virtual bool deleteIncidence( const TQString& uid, bool force = false ); - bool editIncidence( const QString& uid ); + bool editIncidence( const TQString& uid ); /** Add an incidence to the active calendar. @param ical A calendar in iCalendar format containing the incidence. */ - bool addIncidence( const QString& ical ); + bool addIncidence( const TQString& ical ); //// Implementation of the DCOP interface - virtual ResourceRequestReply resourceRequest( const QValueList<QPair<QDateTime, QDateTime> >& busy, - const QCString& resource, - const QString& vCalIn ); - - void openEventEditor( const QString& ); - void openEventEditor( const QString& summary, - const QString& description, - const QString& attachment ); - void openEventEditor( const QString& summary, - const QString& description, - const QString& attachment, - const QStringList& attendees ); - void openEventEditor( const QString& summary, - const QString& description, - const QString& uri, - const QString& file, - const QStringList& attendees, - const QString& attachmentMimetype ); - - void openTodoEditor( const QString& ); - void openTodoEditor( const QString& summary, - const QString& description, - const QString& attachment ); - void openTodoEditor( const QString& summary, - const QString& description, - const QString& attachment, - const QStringList& attendees ); - void openTodoEditor( const QString& summary, - const QString& description, - const QString& uri, - const QString& file, - const QStringList& attendees, - const QString& attachmentMimetype ); - - void openJournalEditor( const QDate& date ); - void openJournalEditor( const QString& text, const QDate& date ); - void openJournalEditor( const QString& text ); + virtual ResourceRequestReply resourceRequest( const TQValueList<QPair<TQDateTime, TQDateTime> >& busy, + const TQCString& resource, + const TQString& vCalIn ); + + void openEventEditor( const TQString& ); + void openEventEditor( const TQString& summary, + const TQString& description, + const TQString& attachment ); + void openEventEditor( const TQString& summary, + const TQString& description, + const TQString& attachment, + const TQStringList& attendees ); + void openEventEditor( const TQString& summary, + const TQString& description, + const TQString& uri, + const TQString& file, + const TQStringList& attendees, + const TQString& attachmentMimetype ); + + void openTodoEditor( const TQString& ); + void openTodoEditor( const TQString& summary, + const TQString& description, + const TQString& attachment ); + void openTodoEditor( const TQString& summary, + const TQString& description, + const TQString& attachment, + const TQStringList& attendees ); + void openTodoEditor( const TQString& summary, + const TQString& description, + const TQString& uri, + const TQString& file, + const TQStringList& attendees, + const TQString& attachmentMimetype ); + + void openJournalEditor( const TQDate& date ); + void openJournalEditor( const TQString& text, const TQDate& date ); + void openJournalEditor( const TQString& text ); //TODO: - // void openJournalEditor( const QString& summary, - // const QString& description, - // const QString& attachment ); + // void openJournalEditor( const TQString& summary, + // const TQString& description, + // const TQString& attachment ); void showJournalView(); void showTodoView(); void showEventView(); - void goDate( const QDate& ); - void goDate( const QString& ); - void showDate( const QDate &date ); + void goDate( const TQDate& ); + void goDate( const TQString& ); + void showDate( const TQDate &date ); - QString localFileName(); + TQString localFileName(); bool queryClose(); - void loadProfile( const QString & path ); + void loadProfile( const TQString & path ); - void saveToProfile( const QString & path ) const; + void saveToProfile( const TQString & path ) const; signals: /** @@ -333,9 +333,9 @@ class KDE_EXPORT ActionManager : public QObject, public KCalendarIface void setTitle(); - void updateUndoAction( const QString & ); + void updateUndoAction( const TQString & ); - void updateRedoAction( const QString & ); + void updateRedoAction( const TQString & ); void slotImportDialogFinished( ImportDialog * ); @@ -350,10 +350,10 @@ class KDE_EXPORT ActionManager : public QObject, public KCalendarIface /** Return widget used as parent for dialogs and message boxes. */ - QWidget *dialogParent(); + TQWidget *dialogParent(); private slots: - void dumpText( const QString & ); // only for debugging purposes + void dumpText( const TQString & ); // only for debugging purposes private: class ActionStringsVisitor; @@ -364,12 +364,12 @@ class KDE_EXPORT ActionManager : public QObject, public KCalendarIface KOrg::Part::List mParts; // List of parts loaded KURL mURL; // URL of calendar file - QString mFile; // Local name of calendar file - QString mLastUrl; // URL of last loaded calendar. + TQString mFile; // Local name of calendar file + TQString mLastUrl; // URL of last loaded calendar. KTempFile *mTempFile; - QTimer *mAutoSaveTimer; // used if calendar is to be autosaved - QTimer *mAutoArchiveTimer; // used for the auto-archiving feature + TQTimer *mAutoSaveTimer; // used if calendar is to be autosaved + TQTimer *mAutoArchiveTimer; // used for the auto-archiving feature // list of all existing KOrganizer instances static KOWindowList *mWindowList; diff --git a/korganizer/agendaview.cpp b/korganizer/agendaview.cpp index c013faa82..df1417897 100644 --- a/korganizer/agendaview.cpp +++ b/korganizer/agendaview.cpp @@ -22,14 +22,14 @@ using namespace KOrg; -AgendaView::AgendaView(Calendar * cal, QWidget * parent, const char * name) : +AgendaView::AgendaView(Calendar * cal, TQWidget * parent, const char * name) : KOEventView( cal, parent, name ) { KCal::CalendarResources *calres = dynamic_cast<KCal::CalendarResources*>( cal ); if ( calres ) { - connect( calres, SIGNAL(signalResourceAdded(ResourceCalendar *)), SLOT(resourcesChanged()) ); - connect( calres, SIGNAL(signalResourceModified( ResourceCalendar *)), SLOT(resourcesChanged()) ); - connect( calres, SIGNAL(signalResourceDeleted(ResourceCalendar *)), SLOT(resourcesChanged()) ); + connect( calres, TQT_SIGNAL(signalResourceAdded(ResourceCalendar *)), TQT_SLOT(resourcesChanged()) ); + connect( calres, TQT_SIGNAL(signalResourceModified( ResourceCalendar *)), TQT_SLOT(resourcesChanged()) ); + connect( calres, TQT_SIGNAL(signalResourceDeleted(ResourceCalendar *)), TQT_SLOT(resourcesChanged()) ); } } diff --git a/korganizer/agendaview.h b/korganizer/agendaview.h index 5a1c84c6b..cf262dac5 100644 --- a/korganizer/agendaview.h +++ b/korganizer/agendaview.h @@ -28,9 +28,9 @@ class AgendaView : public KOEventView { Q_OBJECT public: - AgendaView( Calendar *cal,QWidget *parent=0,const char *name=0 ); + AgendaView( Calendar *cal,TQWidget *parent=0,const char *name=0 ); - virtual void setTypeAheadReceiver( QObject * ) = 0; + virtual void setTypeAheadReceiver( TQObject * ) = 0; public slots: virtual void finishTypeAhead() = 0; diff --git a/korganizer/archivedialog.cpp b/korganizer/archivedialog.cpp index 89d7ecdd4..88d20fded 100644 --- a/korganizer/archivedialog.cpp +++ b/korganizer/archivedialog.cpp @@ -24,12 +24,12 @@ // ArchiveDialog -- archive/delete past events. -#include <qlabel.h> -#include <qlayout.h> -#include <qdatetime.h> -#include <qcheckbox.h> -#include <qwhatsthis.h> -#include <qhgroupbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqdatetime.h> +#include <tqcheckbox.h> +#include <tqwhatsthis.h> +#include <tqhgroupbox.h> #include <kdebug.h> #include <klocale.h> @@ -47,19 +47,19 @@ #include "archivedialog.h" #include "eventarchiver.h" #include <knuminput.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> #include "archivedialog.moc" -ArchiveDialog::ArchiveDialog(Calendar *cal,QWidget *parent, const char *name) +ArchiveDialog::ArchiveDialog(Calendar *cal,TQWidget *parent, const char *name) : KDialogBase (Plain,i18n("Archive/Delete Past Events and To-dos"), User1|Cancel,User1,parent,name,false,true, i18n("&Archive")) { mCalendar = cal; - QFrame *topFrame = plainPage(); - QVBoxLayout *topLayout = new QVBoxLayout(topFrame); + TQFrame *topFrame = plainPage(); + TQVBoxLayout *topLayout = new TQVBoxLayout(topFrame); topLayout->setSpacing(spacingHint()); KActiveLabel *descLabel = new KActiveLabel( @@ -74,16 +74,16 @@ ArchiveDialog::ArchiveDialog(Calendar *cal,QWidget *parent, const char *name) topFrame); topLayout->addWidget(descLabel); - QButtonGroup* radioBG = new QButtonGroup( this ); + TQButtonGroup* radioBG = new TQButtonGroup( this ); radioBG->hide(); // just for the exclusive behavior - connect( radioBG, SIGNAL( clicked( int ) ), SLOT( slotActionChanged() ) ); + connect( radioBG, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( slotActionChanged() ) ); - QHBoxLayout *dateLayout = new QHBoxLayout(0); - mArchiveOnceRB = new QRadioButton(i18n("Archive now items older than:"),topFrame); + TQHBoxLayout *dateLayout = new TQHBoxLayout(0); + mArchiveOnceRB = new TQRadioButton(i18n("Archive now items older than:"),topFrame); dateLayout->addWidget(mArchiveOnceRB); radioBG->insert(mArchiveOnceRB); mDateEdit = new KDateEdit(topFrame); - QWhatsThis::add(mDateEdit, + TQWhatsThis::add(mDateEdit, i18n("The date before which items should be archived. All older events and to-dos will " "be saved and deleted, the newer (and events exactly on that date) will be kept.")); dateLayout->addWidget(mDateEdit); @@ -91,11 +91,11 @@ ArchiveDialog::ArchiveDialog(Calendar *cal,QWidget *parent, const char *name) // Checkbox, numinput and combo for auto-archiving // (similar to kmail's mExpireFolderCheckBox/mReadExpiryTimeNumInput in kmfolderdia.cpp) - QHBox* autoArchiveHBox = new QHBox(topFrame); + TQHBox* autoArchiveHBox = new TQHBox(topFrame); topLayout->addWidget(autoArchiveHBox); - mAutoArchiveRB = new QRadioButton(i18n("Automaticall&y archive items older than:"), autoArchiveHBox); + mAutoArchiveRB = new TQRadioButton(i18n("Automaticall&y archive items older than:"), autoArchiveHBox); radioBG->insert(mAutoArchiveRB); - QWhatsThis::add(mAutoArchiveRB, + TQWhatsThis::add(mAutoArchiveRB, i18n("If this feature is enabled, KOrganizer will regularly check if events and to-dos have to be archived; " "this means you will not need to use this dialog box again, except to change the settings.")); @@ -103,25 +103,25 @@ ArchiveDialog::ArchiveDialog(Calendar *cal,QWidget *parent, const char *name) mExpiryTimeNumInput->setRange(1, 500, 1, false); mExpiryTimeNumInput->setEnabled(false); mExpiryTimeNumInput->setValue(7); - QWhatsThis::add(mExpiryTimeNumInput, + TQWhatsThis::add(mExpiryTimeNumInput, i18n("The age of the events and to-dos to archive. All older items " "will be saved and deleted, the newer will be kept.")); - mExpiryUnitsComboBox = new QComboBox(autoArchiveHBox); + mExpiryUnitsComboBox = new TQComboBox(autoArchiveHBox); // Those items must match the "Expiry Unit" enum in the kcfg file! mExpiryUnitsComboBox->insertItem(i18n("Day(s)")); mExpiryUnitsComboBox->insertItem(i18n("Week(s)")); mExpiryUnitsComboBox->insertItem(i18n("Month(s)")); mExpiryUnitsComboBox->setEnabled(false); - QHBoxLayout *fileLayout = new QHBoxLayout(0); + TQHBoxLayout *fileLayout = new TQHBoxLayout(0); fileLayout->setSpacing(spacingHint()); - QLabel *l = new QLabel(i18n("Archive &file:"),topFrame); + TQLabel *l = new TQLabel(i18n("Archive &file:"),topFrame); fileLayout->addWidget(l); mArchiveFile = new KURLRequester(KOPrefs::instance()->mArchiveFile,topFrame); mArchiveFile->setMode(KFile::File); mArchiveFile->setFilter(i18n("*.ics|iCalendar Files")); - QWhatsThis::add(mArchiveFile, + TQWhatsThis::add(mArchiveFile, i18n("The path of the archive. The events and to-dos will be added to the " "archive file, so any events that are already in the file " "will not be modified or deleted. You can later load or merge the " @@ -131,26 +131,26 @@ ArchiveDialog::ArchiveDialog(Calendar *cal,QWidget *parent, const char *name) fileLayout->addWidget(mArchiveFile); topLayout->addLayout(fileLayout); - QHGroupBox *typeBox = new QHGroupBox( i18n("Type of Items to Archive"), + TQHGroupBox *typeBox = new TQHGroupBox( i18n("Type of Items to Archive"), topFrame); - mEvents = new QCheckBox( i18n("&Events"), typeBox ); - mTodos = new QCheckBox( i18n("&To-dos"), typeBox ); + mEvents = new TQCheckBox( i18n("&Events"), typeBox ); + mTodos = new TQCheckBox( i18n("&To-dos"), typeBox ); topLayout->addWidget( typeBox ); - QWhatsThis::add( typeBox, i18n("Here you can select which items " + TQWhatsThis::add( typeBox, i18n("Here you can select which items " "should be archived. Events are archived if they " "ended before the date given above; to-dos are archived if " "they were finished before the date.") ); - mDeleteCb = new QCheckBox(i18n("&Delete only, do not save"), + mDeleteCb = new TQCheckBox(i18n("&Delete only, do not save"), topFrame); - QWhatsThis::add(mDeleteCb, + TQWhatsThis::add(mDeleteCb, i18n("Select this option to delete old events and to-dos without saving them. " "It is not possible to recover the events later.")); topLayout->addWidget(mDeleteCb); - connect(mDeleteCb, SIGNAL(toggled(bool)), mArchiveFile, SLOT(setDisabled(bool))); - connect(mDeleteCb, SIGNAL(toggled(bool)), this, SLOT(slotEnableUser1())); - connect(mArchiveFile->lineEdit(),SIGNAL(textChanged ( const QString & )), - this,SLOT(slotEnableUser1())); + connect(mDeleteCb, TQT_SIGNAL(toggled(bool)), mArchiveFile, TQT_SLOT(setDisabled(bool))); + connect(mDeleteCb, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotEnableUser1())); + connect(mArchiveFile->lineEdit(),TQT_SIGNAL(textChanged ( const TQString & )), + this,TQT_SLOT(slotEnableUser1())); // Load settings from KOPrefs mExpiryTimeNumInput->setValue( KOPrefs::instance()->mExpiryTime ); @@ -194,7 +194,7 @@ void ArchiveDialog::slotActionChanged() void ArchiveDialog::slotUser1() { EventArchiver archiver; - connect( &archiver, SIGNAL( eventsDeleted() ), this, SLOT( slotEventsDeleted() ) ); + connect( &archiver, TQT_SIGNAL( eventsDeleted() ), this, TQT_SLOT( slotEventsDeleted() ) ); KOPrefs::instance()->mAutoArchive = mAutoArchiveRB->isChecked(); KOPrefs::instance()->mExpiryTime = mExpiryTimeNumInput->value(); @@ -212,7 +212,7 @@ void ArchiveDialog::slotUser1() return; } // Force filename to be ending with vCalendar extension - QString filename = destUrl.fileName(); + TQString filename = destUrl.fileName(); if (!filename.endsWith(".vcs") && !filename.endsWith(".ics")) { filename.append(".ics"); destUrl.setFileName(filename); diff --git a/korganizer/archivedialog.h b/korganizer/archivedialog.h index 3f5c2247f..39a625cbf 100644 --- a/korganizer/archivedialog.h +++ b/korganizer/archivedialog.h @@ -42,7 +42,7 @@ class ArchiveDialog : public KDialogBase { Q_OBJECT public: - ArchiveDialog(Calendar *calendar,QWidget *parent=0, const char *name=0); + ArchiveDialog(Calendar *calendar,TQWidget *parent=0, const char *name=0); virtual ~ArchiveDialog(); signals: @@ -59,13 +59,13 @@ class ArchiveDialog : public KDialogBase private: KURLRequester *mArchiveFile; KDateEdit *mDateEdit; - QCheckBox *mDeleteCb; - QRadioButton *mArchiveOnceRB; - QRadioButton *mAutoArchiveRB; + TQCheckBox *mDeleteCb; + TQRadioButton *mArchiveOnceRB; + TQRadioButton *mAutoArchiveRB; KIntNumInput *mExpiryTimeNumInput; - QComboBox *mExpiryUnitsComboBox; - QCheckBox *mEvents; - QCheckBox *mTodos; + TQComboBox *mExpiryUnitsComboBox; + TQCheckBox *mEvents; + TQCheckBox *mTodos; Calendar *mCalendar; }; diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 6a91254e5..b13b0691f 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -91,27 +91,27 @@ #include <krun.h> #include <kdirwatch.h> -#include <qapplication.h> -#include <qclipboard.h> -#include <qcursor.h> -#include <qmultilineedit.h> -#include <qtimer.h> -#include <qwidgetstack.h> -#include <qptrlist.h> -#include <qfile.h> -#include <qlayout.h> +#include <tqapplication.h> +#include <tqclipboard.h> +#include <tqcursor.h> +#include <tqmultilineedit.h> +#include <tqtimer.h> +#include <tqwidgetstack.h> +#include <tqptrlist.h> +#include <tqfile.h> +#include <tqlayout.h> #ifndef KORG_NOSPLITTER -#include <qsplitter.h> +#include <tqsplitter.h> #endif -#include <qvbox.h> -#include <qwhatsthis.h> +#include <tqvbox.h> +#include <tqwhatsthis.h> #include <stdlib.h> #include <assert.h> using namespace KOrg; -CalendarView::CalendarView( QWidget *parent, const char *name ) +CalendarView::CalendarView( TQWidget *parent, const char *name ) : CalendarViewBase( parent, name ), mHistory( 0 ), mCalendar( CalendarNull::self() ), @@ -133,61 +133,61 @@ CalendarView::CalendarView( QWidget *parent, const char *name ) mNavigator = new DateNavigator( this ); mDateChecker = new DateChecker( this ); - QBoxLayout *topLayout = new QVBoxLayout( this ); + TQBoxLayout *topLayout = new TQVBoxLayout( this ); #ifndef KORG_NOSPLITTER // create the main layout frames. - mPanner = new QSplitter( QSplitter::Horizontal, this, + mPanner = new TQSplitter( TQSplitter::Horizontal, this, "CalendarView::Panner" ); topLayout->addWidget( mPanner ); - mLeftSplitter = new QSplitter( QSplitter::Vertical, mPanner, + mLeftSplitter = new TQSplitter( TQSplitter::Vertical, mPanner, "CalendarView::LeftFrame" ); -// mPanner->setResizeMode( mLeftSplitter, QSplitter::Stretch ); +// mPanner->setResizeMode( mLeftSplitter, TQSplitter::Stretch ); mDateNavigator = new DateNavigatorContainer( mLeftSplitter, "CalendarView::DateNavigator" ); -// mLeftSplitter->setResizeMode( mDateNavigator, QSplitter::Stretch ); +// mLeftSplitter->setResizeMode( mDateNavigator, TQSplitter::Stretch ); mLeftSplitter->setCollapsible( mDateNavigator, true ); mTodoList = new KOTodoView( CalendarNull::self(), mLeftSplitter, "todolist" ); mEventViewer = new KOEventViewer( mLeftSplitter,"EventViewer" ); - QVBox *rightBox = new QVBox( mPanner ); + TQVBox *rightBox = new TQVBox( mPanner ); mNavigatorBar = new NavigatorBar( rightBox ); - mRightFrame = new QWidgetStack( rightBox ); + mRightFrame = new TQWidgetStack( rightBox ); rightBox->setStretchFactor( mRightFrame, 1 ); mLeftFrame = mLeftSplitter; #else - QWidget *mainBox; - QWidget *leftFrame; + TQWidget *mainBox; + TQWidget *leftFrame; if ( KOPrefs::instance()->mVerticalScreen ) { - mainBox = new QVBox( this ); - leftFrame = new QHBox( mainBox ); + mainBox = new TQVBox( this ); + leftFrame = new TQHBox( mainBox ); } else { - mainBox = new QHBox( this ); - leftFrame = new QVBox( mainBox ); + mainBox = new TQHBox( this ); + leftFrame = new TQVBox( mainBox ); } topLayout->addWidget( mainBox ); mDateNavigator = new KDateNavigator( leftFrame, true, "CalendarView::DateNavigator", - QDate::currentDate() ); + TQDate::currentDate() ); mTodoList = new KOTodoView( CalendarNull::self(), leftFrame, "todolist" ); mEventViewer = new KOEventViewer ( leftFrame, "EventViewer" ); - QWidget *rightBox = new QWidget( mainBox ); - QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); + TQWidget *rightBox = new TQWidget( mainBox ); + TQBoxLayout *rightLayout = new TQVBoxLayout( rightBox ); - mNavigatorBar = new NavigatorBar( QDate::currentDate(), rightBox ); + mNavigatorBar = new NavigatorBar( TQDate::currentDate(), rightBox ); rightLayout->addWidget( mNavigatorBar ); - mRightFrame = new QWidgetStack( rightBox ); + mRightFrame = new TQWidgetStack( rightBox ); rightLayout->addWidget( mRightFrame ); mLeftFrame = leftFrame; @@ -198,73 +198,73 @@ CalendarView::CalendarView( QWidget *parent, const char *name ) } #endif - connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), - SLOT( showDates( const KCal::DateList & ) ) ); - connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), - mDateNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); - - connect( mNavigatorBar, SIGNAL( goPrevYear() ), - mNavigator, SLOT( selectPreviousYear() ) ); - connect( mNavigatorBar, SIGNAL( goNextYear() ), - mNavigator, SLOT( selectNextYear() ) ); - connect( mNavigatorBar, SIGNAL( goPrevMonth() ), - mNavigator, SLOT( selectPreviousMonth() ) ); - connect( mNavigatorBar, SIGNAL( goNextMonth() ), - mNavigator, SLOT( selectNextMonth() ) ); - connect( mNavigatorBar, SIGNAL( goMonth(int) ), - mNavigator, SLOT( selectMonth(int) ) ); - - connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), - mNavigatorBar, SLOT( selectDates( const KCal::DateList & ) ) ); - - connect( mDateNavigator, SIGNAL( weekClicked( const QDate & ) ), - mNavigator, SLOT( selectWeek( const QDate & ) ) ); - - connect( mDateNavigator, SIGNAL( goPrevYear() ), - mNavigator, SLOT( selectPreviousYear() ) ); - connect( mDateNavigator, SIGNAL( goNextYear() ), - mNavigator, SLOT( selectNextYear() ) ); - connect( mDateNavigator, SIGNAL( goPrevMonth() ), - mNavigator, SLOT( selectPreviousMonth() ) ); - connect( mDateNavigator, SIGNAL( goNextMonth() ), - mNavigator, SLOT( selectNextMonth() ) ); - connect( mDateNavigator, SIGNAL( goMonth(int) ), - mNavigator, SLOT( selectMonth(int) ) ); - - connect( mDateNavigator, SIGNAL( goPrevious() ), - mNavigator, SLOT( selectPrevious() ) ); - connect( mDateNavigator, SIGNAL( goNext() ), - mNavigator, SLOT( selectNext() ) ); - - connect( mDateNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), - mNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); - - connect( mDateNavigator, SIGNAL(incidenceDropped(Incidence*, const QDate&)), - SLOT( addIncidenceOn( Incidence *, const QDate & ) ) ); - connect( mDateNavigator, SIGNAL(incidenceDroppedMove(Incidence*,const QDate&)), - SLOT( moveIncidenceTo( Incidence *, const QDate & ) ) ); - - connect( mDateChecker, SIGNAL( dayPassed( const QDate & ) ), - mTodoList, SLOT( dayPassed( const QDate & ) ) ); - connect( mDateChecker, SIGNAL( dayPassed( const QDate & ) ), - SIGNAL( dayPassed( const QDate & ) ) ); - connect( mDateChecker, SIGNAL( dayPassed( const QDate & ) ), - mDateNavigator, SLOT( updateToday() ) ); - - connect( this, SIGNAL( configChanged() ), - mDateNavigator, SLOT( updateConfig() ) ); - - connect( this, SIGNAL( incidenceSelected(Incidence *) ), - mEventViewer, SLOT ( setIncidence (Incidence *) ) ); + connect( mNavigator, TQT_SIGNAL( datesSelected( const KCal::DateList & ) ), + TQT_SLOT( showDates( const KCal::DateList & ) ) ); + connect( mNavigator, TQT_SIGNAL( datesSelected( const KCal::DateList & ) ), + mDateNavigator, TQT_SLOT( selectDates( const KCal::DateList & ) ) ); + + connect( mNavigatorBar, TQT_SIGNAL( goPrevYear() ), + mNavigator, TQT_SLOT( selectPreviousYear() ) ); + connect( mNavigatorBar, TQT_SIGNAL( goNextYear() ), + mNavigator, TQT_SLOT( selectNextYear() ) ); + connect( mNavigatorBar, TQT_SIGNAL( goPrevMonth() ), + mNavigator, TQT_SLOT( selectPreviousMonth() ) ); + connect( mNavigatorBar, TQT_SIGNAL( goNextMonth() ), + mNavigator, TQT_SLOT( selectNextMonth() ) ); + connect( mNavigatorBar, TQT_SIGNAL( goMonth(int) ), + mNavigator, TQT_SLOT( selectMonth(int) ) ); + + connect( mNavigator, TQT_SIGNAL( datesSelected( const KCal::DateList & ) ), + mNavigatorBar, TQT_SLOT( selectDates( const KCal::DateList & ) ) ); + + connect( mDateNavigator, TQT_SIGNAL( weekClicked( const TQDate & ) ), + mNavigator, TQT_SLOT( selectWeek( const TQDate & ) ) ); + + connect( mDateNavigator, TQT_SIGNAL( goPrevYear() ), + mNavigator, TQT_SLOT( selectPreviousYear() ) ); + connect( mDateNavigator, TQT_SIGNAL( goNextYear() ), + mNavigator, TQT_SLOT( selectNextYear() ) ); + connect( mDateNavigator, TQT_SIGNAL( goPrevMonth() ), + mNavigator, TQT_SLOT( selectPreviousMonth() ) ); + connect( mDateNavigator, TQT_SIGNAL( goNextMonth() ), + mNavigator, TQT_SLOT( selectNextMonth() ) ); + connect( mDateNavigator, TQT_SIGNAL( goMonth(int) ), + mNavigator, TQT_SLOT( selectMonth(int) ) ); + + connect( mDateNavigator, TQT_SIGNAL( goPrevious() ), + mNavigator, TQT_SLOT( selectPrevious() ) ); + connect( mDateNavigator, TQT_SIGNAL( goNext() ), + mNavigator, TQT_SLOT( selectNext() ) ); + + connect( mDateNavigator, TQT_SIGNAL( datesSelected( const KCal::DateList & ) ), + mNavigator, TQT_SLOT( selectDates( const KCal::DateList & ) ) ); + + connect( mDateNavigator, TQT_SIGNAL(incidenceDropped(Incidence*, const TQDate&)), + TQT_SLOT( addIncidenceOn( Incidence *, const TQDate & ) ) ); + connect( mDateNavigator, TQT_SIGNAL(incidenceDroppedMove(Incidence*,const TQDate&)), + TQT_SLOT( moveIncidenceTo( Incidence *, const TQDate & ) ) ); + + connect( mDateChecker, TQT_SIGNAL( dayPassed( const TQDate & ) ), + mTodoList, TQT_SLOT( dayPassed( const TQDate & ) ) ); + connect( mDateChecker, TQT_SIGNAL( dayPassed( const TQDate & ) ), + TQT_SIGNAL( dayPassed( const TQDate & ) ) ); + connect( mDateChecker, TQT_SIGNAL( dayPassed( const TQDate & ) ), + mDateNavigator, TQT_SLOT( updateToday() ) ); + + connect( this, TQT_SIGNAL( configChanged() ), + mDateNavigator, TQT_SLOT( updateConfig() ) ); + + connect( this, TQT_SIGNAL( incidenceSelected(Incidence *) ), + mEventViewer, TQT_SLOT ( setIncidence (Incidence *) ) ); //TODO: do a pretty Summary, - QString s; + TQString s; s = i18n( "<p><em>No Item Selected</em></p>" "<p>Select an event, to-do or journal entry to view its details " "here.</p>"); mEventViewer->setDefaultText( s ); - QWhatsThis::add( mEventViewer, + TQWhatsThis::add( mEventViewer, i18n( "View the details of events, journal entries or to-dos " "selected in KOrganizer's main view here." ) ); mEventViewer->setIncidence( 0 ); @@ -275,13 +275,13 @@ CalendarView::CalendarView( QWidget *parent, const char *name ) KOGlobals::self()-> setHolidays( new KHolidays( KOPrefs::instance()->mHolidays ) ); - connect( QApplication::clipboard(), SIGNAL( dataChanged() ), - SLOT( checkClipboard() ) ); + connect( TQApplication::clipboard(), TQT_SIGNAL( dataChanged() ), + TQT_SLOT( checkClipboard() ) ); - connect( mTodoList, SIGNAL( incidenceSelected( Incidence * ) ), - SLOT( processTodoListSelection( Incidence * ) ) ); - disconnect( mTodoList, SIGNAL( incidenceSelected( Incidence * ) ), - this, SLOT( processMainViewSelection( Incidence * ) ) ); + connect( mTodoList, TQT_SIGNAL( incidenceSelected( Incidence * ) ), + TQT_SLOT( processTodoListSelection( Incidence * ) ) ); + disconnect( mTodoList, TQT_SIGNAL( incidenceSelected( Incidence * ) ), + this, TQT_SLOT( processMainViewSelection( Incidence * ) ) ); kdDebug(5850) << "CalendarView::CalendarView() done" << endl; } @@ -305,8 +305,8 @@ void CalendarView::setCalendar( Calendar *cal ) delete mHistory; mHistory = new History( mCalendar ); - connect( mHistory, SIGNAL( undone() ), SLOT( updateView() ) ); - connect( mHistory, SIGNAL( redone() ), SLOT( updateView() ) ); + connect( mHistory, TQT_SIGNAL( undone() ), TQT_SLOT( updateView() ) ); + connect( mHistory, TQT_SIGNAL( redone() ), TQT_SLOT( updateView() ) ); if ( mChanger ) delete mChanger; setIncidenceChanger( new IncidenceChanger( mCalendar, this ) ); @@ -322,23 +322,23 @@ void CalendarView::setIncidenceChanger( IncidenceChangerBase *changer ) { mChanger = changer; emit newIncidenceChanger( mChanger ); - connect( mChanger, SIGNAL( incidenceAdded( Incidence* ) ), - this, SLOT( incidenceAdded( Incidence* ) ) ); - connect( mChanger, SIGNAL( incidenceChanged( Incidence*, Incidence*, int ) ), - this, SLOT( incidenceChanged( Incidence*, Incidence*, int ) ) ); - connect( mChanger, SIGNAL( incidenceChanged( Incidence*, Incidence* ) ), - this, SLOT( incidenceChanged( Incidence*, Incidence* ) ) ); - connect( mChanger, SIGNAL( incidenceToBeDeleted( Incidence * ) ), - this, SLOT( incidenceToBeDeleted( Incidence * ) ) ); - connect( mChanger, SIGNAL( incidenceDeleted( Incidence * ) ), - this, SLOT( incidenceDeleted( Incidence * ) ) ); + connect( mChanger, TQT_SIGNAL( incidenceAdded( Incidence* ) ), + this, TQT_SLOT( incidenceAdded( Incidence* ) ) ); + connect( mChanger, TQT_SIGNAL( incidenceChanged( Incidence*, Incidence*, int ) ), + this, TQT_SLOT( incidenceChanged( Incidence*, Incidence*, int ) ) ); + connect( mChanger, TQT_SIGNAL( incidenceChanged( Incidence*, Incidence* ) ), + this, TQT_SLOT( incidenceChanged( Incidence*, Incidence* ) ) ); + connect( mChanger, TQT_SIGNAL( incidenceToBeDeleted( Incidence * ) ), + this, TQT_SLOT( incidenceToBeDeleted( Incidence * ) ) ); + connect( mChanger, TQT_SIGNAL( incidenceDeleted( Incidence * ) ), + this, TQT_SLOT( incidenceDeleted( Incidence * ) ) ); - connect( mChanger, SIGNAL( schedule( Scheduler::Method, Incidence*) ), - this, SLOT( schedule( Scheduler::Method, Incidence*) ) ); + connect( mChanger, TQT_SIGNAL( schedule( Scheduler::Method, Incidence*) ), + this, TQT_SLOT( schedule( Scheduler::Method, Incidence*) ) ); - connect( this, SIGNAL( cancelAttendees( Incidence * ) ), - mChanger, SLOT( cancelAttendees( Incidence * ) ) ); + connect( this, TQT_SIGNAL( cancelAttendees( Incidence * ) ), + mChanger, TQT_SLOT( cancelAttendees( Incidence * ) ) ); } Calendar *CalendarView::calendar() @@ -354,14 +354,14 @@ KOIncidenceEditor *CalendarView::editorDialog( Incidence *incidence ) const else return 0; } -QDate CalendarView::startDate() +TQDate CalendarView::startDate() { DateList dates = mNavigator->selectedDates(); return dates.first(); } -QDate CalendarView::endDate() +TQDate CalendarView::endDate() { DateList dates = mNavigator->selectedDates(); @@ -369,7 +369,7 @@ QDate CalendarView::endDate() } -bool CalendarView::openCalendar(const QString& filename, bool merge) +bool CalendarView::openCalendar(const TQString& filename, bool merge) { kdDebug(5850) << "CalendarView::openCalendar(): " << filename << endl; @@ -378,7 +378,7 @@ bool CalendarView::openCalendar(const QString& filename, bool merge) return false; } - if (!QFile::exists(filename)) { + if (!TQFile::exists(filename)) { kdDebug(5850) << "CalendarView::openCalendar(): Error! File '" << filename << "' doesn't exist." << endl; } @@ -424,7 +424,7 @@ bool CalendarView::openCalendar(const QString& filename, bool merge) } } -bool CalendarView::saveCalendar( const QString& filename ) +bool CalendarView::saveCalendar( const TQString& filename ) { kdDebug(5850) << "CalendarView::saveCalendar(): " << filename << endl; @@ -466,7 +466,7 @@ void CalendarView::readSettings() { // kdDebug(5850) << "CalendarView::readSettings()" << endl; - QString str; + TQString str; // read settings from the KConfig, supplying reasonable // defaults where none are to be found @@ -476,7 +476,7 @@ void CalendarView::readSettings() #ifndef KORG_NOSPLITTER config->setGroup( "KOrganizer Geometry" ); - QValueList<int> sizes = config->readIntListEntry( "Separator1" ); + TQValueList<int> sizes = config->readIntListEntry( "Separator1" ); if ( sizes.count() != 2 ) { sizes << mDateNavigator->minimumSizeHint().width(); sizes << 300; @@ -490,7 +490,7 @@ void CalendarView::readSettings() mEventViewer->readSettings( config ); mViewManager->readSettings( config ); - mTodoList->restoreLayout( config, QString( "Todo Layout" ) ); + mTodoList->restoreLayout( config, TQString( "Todo Layout" ) ); readFilterSettings( config ); @@ -510,7 +510,7 @@ void CalendarView::writeSettings() #ifndef KORG_NOSPLITTER config->setGroup( "KOrganizer Geometry" ); - QValueList<int> list = mPanner->sizes(); + TQValueList<int> list = mPanner->sizes(); config->writeEntry( "Separator1", list ); list = mLeftSplitter->sizes(); @@ -518,7 +518,7 @@ void CalendarView::writeSettings() #endif mEventViewer->writeSettings( config ); mViewManager->writeSettings( config ); - mTodoList->saveLayout( config, QString( "Todo Layout" ) ); + mTodoList->saveLayout( config, TQString( "Todo Layout" ) ); KOPrefs::instance()->writeConfig(); @@ -538,11 +538,11 @@ void CalendarView::readFilterSettings( KConfig *config ) config->setGroup( "General" ); // FIXME: Move the filter loading and saving to the CalFilter class in libkcal - QStringList filterList = config->readListEntry ("CalendarFilters" ); - QString currentFilter = config->readEntry( "Current Filter" ); + TQStringList filterList = config->readListEntry ("CalendarFilters" ); + TQString currentFilter = config->readEntry( "Current Filter" ); - QStringList::ConstIterator it = filterList.begin(); - QStringList::ConstIterator end = filterList.end(); + TQStringList::ConstIterator it = filterList.begin(); + TQStringList::ConstIterator end = filterList.end(); while( it != end ) { // kdDebug(5850) << " filter: " << (*it) << endl; CalFilter *filter; @@ -571,7 +571,7 @@ void CalendarView::writeFilterSettings( KConfig *config ) { // kdDebug(5850) << "CalendarView::writeFilterSettings()" << endl; - QStringList filterList; + TQStringList filterList; CalFilter *filter = mFilters.first(); while( filter ) { @@ -588,17 +588,17 @@ void CalendarView::writeFilterSettings( KConfig *config ) if ( mCurrentFilter ) { config->writeEntry( "Current Filter", mCurrentFilter->name() ); } else { - config->writeEntry( "Current Filter", QString::null ); + config->writeEntry( "Current Filter", TQString::null ); } } -void CalendarView::goDate( const QDate& date ) +void CalendarView::goDate( const TQDate& date ) { mNavigator->selectDate( date ); } -void CalendarView::showDate(const QDate & date) +void CalendarView::showDate(const TQDate & date) { int dateCount = mNavigator->datesCount(); if ( dateCount == 7 ) @@ -628,7 +628,7 @@ void CalendarView::goPrevious() mNavigator->selectPrevious(); } -void CalendarView::updateConfig( const QCString& receiver) +void CalendarView::updateConfig( const TQCString& receiver) { if ( receiver != "korganizer" ) return; kdDebug(5850) << "CalendarView::updateConfig()" << endl; @@ -636,12 +636,12 @@ void CalendarView::updateConfig( const QCString& receiver) KOGlobals::self()-> setHolidays( new KHolidays( KOPrefs::instance()->mHolidays ) ); - QString tz( mCalendar->timeZoneId() ); + TQString tz( mCalendar->timeZoneId() ); // Only set a new time zone if it changed. This prevents the window // from being modified on start if ( tz != KOPrefs::instance()->mTimeZoneId ) { - const QString question( i18n("The timezone setting was changed. Do you want to keep the absolute time of " + const TQString question( i18n("The timezone setting was changed. Do you want to keep the absolute time of " "the items in your calendar, which will show them to be at a different time than " "before, or move them to be at the old time also in the new timezone?") ); int rc = KMessageBox::questionYesNo( this, question, @@ -714,18 +714,18 @@ void CalendarView::incidenceChanged( Incidence *oldIncidence, Todo *todo = static_cast<Todo *>(newIncidence); if ( todo->isCompleted() || what == KOGlobals::COMPLETION_MODIFIED_WITH_RECURRENCE ) { - QString timeStr = KGlobal::locale()->formatTime( QTime::currentTime() ); - QString description = i18n( "To-do completed: %1 (%2)" ).arg( + TQString timeStr = KGlobal::locale()->formatTime( TQTime::currentTime() ); + TQString description = i18n( "To-do completed: %1 (%2)" ).arg( newIncidence->summary() ).arg( timeStr ); - Journal::List journals = calendar()->journals( QDate::currentDate() ); + Journal::List journals = calendar()->journals( TQDate::currentDate() ); Journal *journal; if ( journals.isEmpty() ) { journal = new Journal(); - journal->setDtStart( QDateTime::currentDateTime() ); + journal->setDtStart( TQDateTime::currentDateTime() ); - QString dateStr = KGlobal::locale()->formatDate( QDate::currentDate() ); + TQString dateStr = KGlobal::locale()->formatDate( TQDate::currentDate() ); journal->setSummary( i18n("Journal of %1").arg( dateStr ) ); journal->setDescription( description ); @@ -786,7 +786,7 @@ void CalendarView::checkForFilteredChange( Incidence *incidence ) } } -void CalendarView::startMultiModify( const QString &text ) +void CalendarView::startMultiModify( const TQString &text ) { history()->startMultiModify( text ); } @@ -814,7 +814,7 @@ void CalendarView::changeIncidenceDisplay( Incidence *incidence, int action ) } -void CalendarView::updateView(const QDate &start, const QDate &end) +void CalendarView::updateView(const TQDate &start, const TQDate &end) { mTodoList->updateView(); mViewManager->updateView(start, end); @@ -873,10 +873,10 @@ void CalendarView::edit_paste() // In all other cases, paste the event on the first day of the // selection in the day matrix on the left - QDate date; + TQDate date; // create an invalid time to check if we got a new time for the eevent - QTime time(-1,-1); - QDateTime startDT, endDT; + TQTime time(-1,-1); + TQDateTime startDT, endDT; bool useEndTime = false; KOAgendaView *aView = mViewManager->agendaView(); @@ -929,7 +929,7 @@ void CalendarView::edit_options() mDialogManager->showOptionsDialog(); } -void CalendarView::dateTimesForNewEvent( QDateTime &startDt, QDateTime &endDt, bool &allDay ) +void CalendarView::dateTimesForNewEvent( TQDateTime &startDt, TQDateTime &endDt, bool &allDay ) { if ( !startDt.isValid() ) { // Default start is the first selected date with the preferred time as set @@ -949,12 +949,12 @@ void CalendarView::dateTimesForNewEvent( QDateTime &startDt, QDateTime &endDt, b mViewManager->currentView()->eventDurationHint( startDt, endDt, allDay ); } -KOEventEditor *CalendarView::newEventEditor( const QDateTime &startDtParam, - const QDateTime &endDtParam, bool allDayParam) +KOEventEditor *CalendarView::newEventEditor( const TQDateTime &startDtParam, + const TQDateTime &endDtParam, bool allDayParam) { // let the current view change the default start/end datetime bool allDay = allDayParam; - QDateTime startDt( startDtParam ), endDt( endDtParam ); + TQDateTime startDt( startDtParam ), endDt( endDtParam ); // Adjust the start/end date times (i.e. replace invalid values by defaults, // and let the view adjust the type. dateTimesForNewEvent( startDt, endDt, allDay ); @@ -973,30 +973,30 @@ KOEventEditor *CalendarView::newEventEditor( const QDateTime &startDtParam, void CalendarView::newEvent() { kdDebug(5850) << "CalendarView::newEvent()" << endl; - newEvent( QDateTime(), QDateTime() ); + newEvent( TQDateTime(), TQDateTime() ); } -void CalendarView::newEvent( const QDate &dt ) +void CalendarView::newEvent( const TQDate &dt ) { - QDateTime startDt( dt, KOPrefs::instance()->mStartTime.time() ); - return newEvent( QDateTime( dt ), QDateTime() ); + TQDateTime startDt( dt, KOPrefs::instance()->mStartTime.time() ); + return newEvent( TQDateTime( dt ), TQDateTime() ); } -void CalendarView::newEvent( const QDateTime &startDt ) +void CalendarView::newEvent( const TQDateTime &startDt ) { - return newEvent( startDt, QDateTime() ); + return newEvent( startDt, TQDateTime() ); } -void CalendarView::newEvent( const QDateTime &startDt, const QDateTime &endDt, +void CalendarView::newEvent( const TQDateTime &startDt, const TQDateTime &endDt, bool allDay ) { KOEventEditor *eventEditor = newEventEditor( startDt, endDt, allDay ); eventEditor->show(); } -void CalendarView::newEvent( const QString &summary, const QString &description, - const QStringList &attachments, const QStringList &attendees, - const QStringList &attachmentMimetypes, bool inlineAttachment ) +void CalendarView::newEvent( const TQString &summary, const TQString &description, + const TQStringList &attachments, const TQStringList &attendees, + const TQStringList &attachmentMimetypes, bool inlineAttachment ) { KOEventEditor *eventEditor = newEventEditor(); eventEditor->setTexts( summary, description ); @@ -1007,9 +1007,9 @@ void CalendarView::newEvent( const QString &summary, const QString &description, eventEditor->show(); } -void CalendarView::newTodo( const QString &summary, const QString &description, - const QStringList &attachments, const QStringList &attendees, - const QStringList &attachmentMimetypes, bool inlineAttachment ) +void CalendarView::newTodo( const TQString &summary, const TQString &description, + const TQStringList &attachments, const TQStringList &attendees, + const TQStringList &attachmentMimetypes, bool inlineAttachment ) { kdDebug(5850) << k_funcinfo << endl; KOTodoEditor *todoEditor = mDialogManager->getTodoEditor(); @@ -1024,14 +1024,14 @@ void CalendarView::newTodo( const QString &summary, const QString &description, void CalendarView::newTodo() { kdDebug(5850) << k_funcinfo << endl; - QDateTime dtDue; + TQDateTime dtDue; bool allday = true; KOTodoEditor *todoEditor = mDialogManager->getTodoEditor(); connectIncidenceEditor( todoEditor ); todoEditor->newTodo(); if ( mViewManager->currentView()->isEventView() ) { dtDue.setDate( mNavigator->selectedDates().first() ); - QDateTime dtDummy = QDateTime::currentDateTime(); + TQDateTime dtDummy = TQDateTime::currentDateTime(); mViewManager->currentView()-> eventDurationHint( dtDue, dtDummy, allday ); todoEditor->setDates( dtDue, allday ); @@ -1039,27 +1039,27 @@ void CalendarView::newTodo() todoEditor->show(); } -void CalendarView::newTodo( const QDate &date ) +void CalendarView::newTodo( const TQDate &date ) { KOTodoEditor *todoEditor = mDialogManager->getTodoEditor(); connectIncidenceEditor( todoEditor ); todoEditor->newTodo(); - todoEditor->setDates( QDateTime( date, QTime::currentTime() ), true ); + todoEditor->setDates( TQDateTime( date, TQTime::currentTime() ), true ); todoEditor->show(); } void CalendarView::newJournal() { kdDebug(5850) << "CalendarView::newJournal()" << endl; - newJournal( QString::null, QDate() ); + newJournal( TQString::null, TQDate() ); } -void CalendarView::newJournal( const QDate &date) +void CalendarView::newJournal( const TQDate &date) { - newJournal( QString::null, date ); + newJournal( TQString::null, date ); } -void CalendarView::newJournal( const QString &text, const QDate &date ) +void CalendarView::newJournal( const TQString &text, const TQDate &date ) { KOJournalEditor *journalEditor = mDialogManager->getJournalEditor(); connectIncidenceEditor( journalEditor ); @@ -1084,20 +1084,20 @@ void CalendarView::newSubTodo(Todo *parentEvent) KOTodoEditor *todoEditor = mDialogManager->getTodoEditor(); connectIncidenceEditor( todoEditor ); todoEditor->newTodo(); - todoEditor->setDates( QDateTime(), false, parentEvent ); + todoEditor->setDates( TQDateTime(), false, parentEvent ); todoEditor->show(); } void CalendarView::newFloatingEvent() { DateList tmpList = mNavigator->selectedDates(); - QDate date = tmpList.first(); + TQDate date = tmpList.first(); - newEvent( QDateTime( date, QTime( 12, 0, 0 ) ), - QDateTime( date, QTime( 12, 0, 0 ) ), true ); + newEvent( TQDateTime( date, TQTime( 12, 0, 0 ) ), + TQDateTime( date, TQTime( 12, 0, 0 ) ), true ); } -bool CalendarView::addIncidence( const QString &ical ) +bool CalendarView::addIncidence( const TQString &ical ) { kdDebug(5850) << "CalendarView::addIncidence:\n" << ical << endl; ICalFormat format; @@ -1201,7 +1201,7 @@ bool CalendarView::makeSubTodosIndependents ( Todo *todo ) return true; } -bool CalendarView::deleteIncidence( const QString &uid, bool force ) +bool CalendarView::deleteIncidence( const TQString &uid, bool force ) { Incidence *inc = mCalendar->incidence( uid ); if ( inc ) { @@ -1241,7 +1241,7 @@ void CalendarView::toggleAlarm( Incidence *incidence ) // mClickedItem->updateIcons(); } -void CalendarView::dissociateOccurrence( Incidence *incidence, const QDate &date ) +void CalendarView::dissociateOccurrence( Incidence *incidence, const TQDate &date ) { if ( !incidence || !mChanger ) { kdDebug(5850) << "CalendarView::toggleAlarm() called without having a clicked item" << endl; @@ -1269,7 +1269,7 @@ void CalendarView::dissociateOccurrence( Incidence *incidence, const QDate &date delete oldincidence; } -void CalendarView::dissociateFutureOccurrence( Incidence *incidence, const QDate &date ) +void CalendarView::dissociateFutureOccurrence( Incidence *incidence, const TQDate &date ) { if ( !incidence || !mChanger ) { kdDebug(5850) << "CalendarView::toggleAlarm() called without having a clicked item" << endl; @@ -1319,7 +1319,7 @@ void CalendarView::schedule_publish(Incidence *incidence) publishdlg->addAttendee( *it ); } } - if ( publishdlg->exec() == QDialog::Accepted ) { + if ( publishdlg->exec() == TQDialog::Accepted ) { Incidence *inc = incidence->clone(); inc->registerObserver( 0 ); inc->clearAttendees(); @@ -1383,10 +1383,10 @@ void CalendarView::schedule_forward(Incidence * incidence) } PublishDialog publishdlg; - if ( publishdlg.exec() == QDialog::Accepted ) { - QString recipients = publishdlg.addresses(); + if ( publishdlg.exec() == TQDialog::Accepted ) { + TQString recipients = publishdlg.addresses(); ICalFormat format; - QString messageText = format.createScheduleMessage( incidence, Scheduler::Request ); + TQString messageText = format.createScheduleMessage( incidence, Scheduler::Request ); KOMailClient mailer; if ( mailer.mailTo( incidence, recipients, messageText ) ) { @@ -1400,8 +1400,8 @@ void CalendarView::schedule_forward(Incidence * incidence) void CalendarView::mailFreeBusy( int daysToPublish ) { - QDateTime start = QDateTime::currentDateTime(); - QDateTime end = start.addDays(daysToPublish); + TQDateTime start = TQDateTime::currentDateTime(); + TQDateTime end = start.addDays(daysToPublish); FreeBusy *freebusy = new FreeBusy(mCalendar, start, end); freebusy->setOrganizer( Person( KOPrefs::instance()->fullName(), @@ -1412,7 +1412,7 @@ void CalendarView::mailFreeBusy( int daysToPublish ) << KGlobal::locale()->formatDateTime( end ) << endl; PublishDialog *publishdlg = new PublishDialog(); - if ( publishdlg->exec() == QDialog::Accepted ) { + if ( publishdlg->exec() == TQDialog::Accepted ) { // Send the mail KCal::MailScheduler scheduler( mCalendar ); if ( scheduler.publish( freebusy, publishdlg->addresses() ) ) { @@ -1507,7 +1507,7 @@ void CalendarView::print() #ifndef KORG_NOPRINTER KOCoreHelper helper; CalPrinter printer( this, mCalendar, &helper ); - connect( this, SIGNAL(configChanged()), &printer, SLOT(updateConfig()) ); + connect( this, TQT_SIGNAL(configChanged()), &printer, TQT_SLOT(updateConfig()) ); KOrg::BaseView *currentView = mViewManager->currentView(); @@ -1531,14 +1531,14 @@ void CalendarView::exportWeb() // seem to load the config theirselves if ( settings ) settings->readConfig(); ExportWebDialog *dlg = new ExportWebDialog( settings, this ); - connect( dlg, SIGNAL( exportHTML( HTMLExportSettings* ) ), - this, SIGNAL( exportHTML( HTMLExportSettings* ) ) ); + connect( dlg, TQT_SIGNAL( exportHTML( HTMLExportSettings* ) ), + this, TQT_SIGNAL( exportHTML( HTMLExportSettings* ) ) ); dlg->show(); } void CalendarView::exportICalendar() { - QString filename = KFileDialog::getSaveFileName("icalout.ics",i18n("*.ics|ICalendars"),this); + TQString filename = KFileDialog::getSaveFileName("icalout.ics",i18n("*.ics|ICalendars"),this); // Force correct extension if (filename.right(4) != ".ics") filename += ".ics"; @@ -1557,7 +1557,7 @@ void CalendarView::exportVCalendar() if (result != KMessageBox::Continue) return; } - QString filename = KFileDialog::getSaveFileName("vcalout.vcs",i18n("*.vcs|vCalendars"),this); + TQString filename = KFileDialog::getSaveFileName("vcalout.vcs",i18n("*.vcs|vCalendars"),this); // TODO: I don't like forcing extensions: // Force correct extension @@ -1634,7 +1634,7 @@ void CalendarView::processIncidenceSelection( Incidence *incidence ) void CalendarView::checkClipboard() { #ifndef KORG_NODND - if (ICalDrag::canDecode(QApplication::clipboard()->data())) { + if (ICalDrag::canDecode(TQApplication::clipboard()->data())) { kdDebug(5850) << "CalendarView::checkClipboard() true" << endl; emit pasteEnabled(true); } else { @@ -1672,7 +1672,7 @@ void CalendarView::editFilters() */ void CalendarView::updateFilter() { - QStringList filters; + TQStringList filters; CalFilter *filter; int pos = mFilters.find( mCurrentFilter ); @@ -1709,7 +1709,7 @@ void CalendarView::filterActivated( int filterNo ) emit filterChanged(); } -QString CalendarView::currentFilterName() const +TQString CalendarView::currentFilterName() const { if ( mCurrentFilter) { return mCurrentFilter->name(); @@ -1862,7 +1862,7 @@ void CalendarView::editIncidence() editIncidence( selectedIncidence() ); } -bool CalendarView::editIncidence( const QString& uid ) +bool CalendarView::editIncidence( const TQString& uid ) { kdDebug(5850) << "CalendarView::editIncidence()" << endl; return editIncidence( mCalendar->incidence( uid ) ); @@ -2028,7 +2028,7 @@ void CalendarView::deleteIncidence(Incidence *incidence, bool force) } if ( incidence->doesRecur() ) { - QDate itemDate = mViewManager->currentSelectionDate(); + TQDate itemDate = mViewManager->currentSelectionDate(); kdDebug(5850) << "Recurrence-Date: " << itemDate.toString() << endl; int km = KMessageBox::Ok; if ( !force ) { @@ -2040,7 +2040,7 @@ void CalendarView::deleteIncidence(Incidence *incidence, bool force) "and all its recurrences?").arg( incidence->summary() ), i18n("KOrganizer Confirmation"), i18n("Delete All") ); } else { - km = KOMessageBox::fourBtnMsgBox( this, QMessageBox::Warning, + 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?" ) @@ -2091,8 +2091,8 @@ void CalendarView::deleteIncidence(Incidence *incidence, bool force) void CalendarView::connectIncidenceEditor( KOIncidenceEditor *editor ) { - connect( this, SIGNAL( newIncidenceChanger( IncidenceChangerBase* ) ), - editor, SLOT( setIncidenceChanger( IncidenceChangerBase* ) ) ); + connect( this, TQT_SIGNAL( newIncidenceChanger( IncidenceChangerBase* ) ), + editor, TQT_SLOT( setIncidenceChanger( IncidenceChangerBase* ) ) ); editor->setIncidenceChanger( mChanger ); } @@ -2172,17 +2172,17 @@ void CalendarView::editCanceled( Incidence *i ) mCalendar->endChange( i ); } -void CalendarView::showErrorMessage( const QString &msg ) +void CalendarView::showErrorMessage( const TQString &msg ) { KMessageBox::error( this, msg ); } void CalendarView::updateCategories() { - QStringList allCats( calendar()->categories() ); + TQStringList allCats( calendar()->categories() ); allCats.sort(); - QStringList categories( KOPrefs::instance()->mCustomCategories ); - for ( QStringList::ConstIterator si = allCats.constBegin(); si != allCats.constEnd(); ++si ) { + TQStringList categories( KOPrefs::instance()->mCustomCategories ); + for ( TQStringList::ConstIterator si = allCats.constBegin(); si != allCats.constEnd(); ++si ) { if ( categories.find( *si ) == categories.end() ) { categories.append( *si ); } @@ -2193,7 +2193,7 @@ void CalendarView::updateCategories() emit categoriesChanged(); } -void CalendarView::addIncidenceOn( Incidence *incadd, const QDate &dt ) +void CalendarView::addIncidenceOn( Incidence *incadd, const TQDate &dt ) { if ( !incadd || !mChanger ) { KMessageBox::sorry(this, i18n("Unable to copy the item to %1.") @@ -2210,8 +2210,8 @@ void CalendarView::addIncidenceOn( Incidence *incadd, const QDate &dt ) Event *event = static_cast<Event*>(incidence); // Adjust date - QDateTime start = event->dtStart(); - QDateTime end = event->dtEnd(); + TQDateTime start = event->dtStart(); + TQDateTime end = event->dtEnd(); int duration = start.daysTo( end ); start.setDate( dt ); @@ -2222,7 +2222,7 @@ void CalendarView::addIncidenceOn( Incidence *incadd, const QDate &dt ) } else if ( incidence->type() == "Todo" ) { Todo *todo = static_cast<Todo*>(incidence); - QDateTime due = todo->dtDue(); + TQDateTime due = todo->dtDue(); due.setDate( dt ); todo->setDtDue( due ); @@ -2235,7 +2235,7 @@ void CalendarView::addIncidenceOn( Incidence *incadd, const QDate &dt ) } } -void CalendarView::moveIncidenceTo( Incidence *incmove, const QDate &dt ) +void CalendarView::moveIncidenceTo( Incidence *incmove, const TQDate &dt ) { if ( !incmove || !mChanger ) { KMessageBox::sorry( this, i18n("Unable to move the item to %1.") @@ -2257,8 +2257,8 @@ void CalendarView::moveIncidenceTo( Incidence *incmove, const QDate &dt ) Event *event = static_cast<Event*>(incidence); // Adjust date - QDateTime start = event->dtStart(); - QDateTime end = event->dtEnd(); + TQDateTime start = event->dtStart(); + TQDateTime end = event->dtEnd(); int duration = start.daysTo( end ); start.setDate( dt ); @@ -2269,7 +2269,7 @@ void CalendarView::moveIncidenceTo( Incidence *incmove, const QDate &dt ) } else if ( incidence->type() == "Todo" ) { Todo *todo = static_cast<Todo*>(incidence); - QDateTime due = todo->dtDue(); + TQDateTime due = todo->dtDue(); due.setDate( dt ); todo->setDtDue( due ); diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index ceb2b2d7a..a3e9a9ab3 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h @@ -25,9 +25,9 @@ #ifndef CALENDARVIEW_H #define CALENDARVIEW_H -#include <qwidget.h> -#include <qptrlist.h> -#include <qmap.h> +#include <tqwidget.h> +#include <tqptrlist.h> +#include <tqmap.h> #include <kfile.h> #include <korganizer/koeventviewer.h> #include <libkcal/scheduler.h> @@ -58,13 +58,13 @@ using namespace KCal; class CalendarViewExtension : public QWidget { public: - CalendarViewExtension( QWidget *parent, const char *name = 0 ) - : QWidget( parent, name ) {} + CalendarViewExtension( TQWidget *parent, const char *name = 0 ) + : TQWidget( parent, name ) {} class Factory { public: - virtual CalendarViewExtension *create( QWidget *parent ) = 0; + virtual CalendarViewExtension *create( TQWidget *parent ) = 0; }; }; @@ -87,7 +87,7 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar:: @param parent parent window @param name Qt internal widget object name */ - CalendarView( QWidget *parent = 0, const char *name = 0 ); + CalendarView( TQWidget *parent = 0, const char *name = 0 ); virtual ~CalendarView(); @@ -121,16 +121,16 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar:: KOViewManager *viewManager() const { return mViewManager; } KODialogManager *dialogManager() const { return mDialogManager; } - QWidgetStack *viewStack() const { return mRightFrame; } - QWidget *leftFrame() const { return mLeftFrame; } + TQWidgetStack *viewStack() const { return mRightFrame; } + TQWidget *leftFrame() const { return mLeftFrame; } NavigatorBar *navigatorBar() const { return mNavigatorBar; } DateNavigator *dateNavigator() const { return mNavigator; } KOIncidenceEditor *editorDialog( Incidence* ) const; IncidenceChangerBase *incidenceChanger() const { return mChanger; } - QDate startDate(); - QDate endDate(); + TQDate startDate(); + TQDate endDate(); void addView( KOrg::BaseView * ); @@ -148,7 +148,7 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar:: is no selection, return the selected todo from the todo list on the left */ Incidence *selectedIncidence(); /** Returns the name of the current filter */ - QString currentFilterName() const; + TQString currentFilterName() const; signals: /** when change is made to options dialog, the topwidget will catch this @@ -162,7 +162,7 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar:: child windows can also close. */ void closingDown(); /** emitted right before we die */ - void closed( QWidget * ); + void closed( TQWidget * ); /** Emitted when state of modified flag changes */ void modifiedChanged( bool ); @@ -171,8 +171,8 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar:: void readOnlyChanged( bool ); /** Emitted when the unit of navigation changes */ - void changeNavStringPrev( const QString & ); - void changeNavStringNext( const QString & ); + void changeNavStringPrev( const TQString & ); + void changeNavStringNext( const TQString & ); /** Emitted when state of events selection has changed and user is organizer*/ void organizerEventsSelected( bool ); @@ -190,7 +190,7 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar:: /** Emitted, when a day changed (i.e. korganizer was running at midnight). The argument is the new date */ - void dayPassed( const QDate & ); + void dayPassed( const TQDate & ); /** Attendees were removed from this incidence. Only the removed attendees are present in the incidence, so we just need to send a cancel messages @@ -205,7 +205,7 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar:: */ void pasteEnabled( bool ); /** Send status message, which can e.g. be displayed in the status bar. */ - void statusMessage( const QString & ); + void statusMessage( const TQString & ); void calendarViewExpanded( bool ); @@ -215,14 +215,14 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar:: void newIncidenceChanger( IncidenceChangerBase* ); void exportHTML( HTMLExportSettings* ); - void newFilterListSignal( const QStringList & ); + void newFilterListSignal( const TQStringList & ); void selectFilterSignal( int ); void filterChanged(); public slots: /** options dialog made a changed to the configuration. we catch this * and notify all widgets which need to update their configuration. */ - void updateConfig( const QCString& ); + void updateConfig( const TQCString& ); /** Calendar configuration was changed, so refresh categories list */ void updateCategories(); @@ -233,13 +233,13 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar:: calendar into existing one, if it is false, clear calendar, before loading. Return true, if calendar could be successfully loaded. */ - bool openCalendar( const QString &filename, bool merge = false ); + bool openCalendar( const TQString &filename, bool merge = false ); /** Save calendar data to file. Return true if calendar could be successfully saved. */ - bool saveCalendar( const QString &filename ); + bool saveCalendar( const TQString &filename ); /** Close calendar. Clear calendar data and reset views to display an empty @@ -252,7 +252,7 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar:: void showIncidence(); void editIncidence(); - bool editIncidence( const QString& uid ); + bool editIncidence( const TQString& uid ); void deleteIncidence(); /** @@ -263,7 +263,7 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar:: optionally a VTIMEZONE component. If there is more than one incidence, only the first is added to KOrganizer's calendar. */ - bool addIncidence( const QString &ical ); + bool addIncidence( const TQString &ical ); void connectIncidenceEditor( KOIncidenceEditor * ); @@ -272,16 +272,16 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar:: void newEvent(); /** create an editeventwin with supplied date/time, and if bool is true, * make the event take all day. */ - void newEvent( const QDate &startDt ); - void newEvent( const QDateTime &startDt ); - void newEvent( const QDateTime &startDt, const QDateTime &EndDt, bool allDay = false ); + void newEvent( const TQDate &startDt ); + void newEvent( const TQDateTime &startDt ); + void newEvent( const TQDateTime &startDt, const TQDateTime &EndDt, bool allDay = false ); /** Create new Event from given summary, description, attachment list and attendees list */ - void newEvent( const QString &summary, const QString &description = QString::null, - const QStringList &attachment = QStringList(), const QStringList &attendees = QStringList(), - const QStringList &attachmentMimetypes = QStringList(), bool inlineAttachment = false ); + void newEvent( const TQString &summary, const TQString &description = TQString::null, + const TQStringList &attachment = TQStringList(), const TQStringList &attendees = TQStringList(), + const TQStringList &attachmentMimetypes = TQStringList(), bool inlineAttachment = false ); void newFloatingEvent(); /** Create a read-only viewer dialog for the supplied incidence. It calls the correct showXXX method*/ @@ -327,28 +327,28 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar:: @param force If true, all recurrences and sub-todos (if applicable) will be deleted without prompting for confirmation. */ - bool deleteIncidence( const QString &uid, bool force = false ); + bool deleteIncidence( const TQString &uid, bool force = false ); /** create new todo */ void newTodo(); /** create new todo, due on date */ - void newTodo( const QDate &date ); + void newTodo( const TQDate &date ); /** create new todo with a parent todo */ void newSubTodo(); /** create new todo with a parent todo */ void newSubTodo( Todo * ); - void newTodo( const QString &summary, const QString &description = QString::null, - const QStringList &attachments = QStringList(), const QStringList &attendees = QStringList(), - const QStringList &attachmentMimetypes = QStringList(), bool inlineAttachment = false ); + void newTodo( const TQString &summary, const TQString &description = TQString::null, + const TQStringList &attachments = TQStringList(), const TQStringList &attendees = TQStringList(), + const TQStringList &attachmentMimetypes = TQStringList(), bool inlineAttachment = false ); void newJournal(); - void newJournal( const QDate &date ); - void newJournal( const QString &text, const QDate &date = QDate() ); + void newJournal( const TQDate &date ); + void newJournal( const TQString &text, const TQDate &date = TQDate() ); void toggleAlarm( Incidence * ); - void dissociateOccurrence( Incidence *, const QDate & ); - void dissociateFutureOccurrence( Incidence *, const QDate & ); + void dissociateOccurrence( Incidence *, const TQDate & ); + void dissociateFutureOccurrence( Incidence *, const TQDate & ); /** @@ -383,12 +383,12 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar:: void incidenceChanged( Incidence *oldEvent, Incidence *newEvent, int what ); void incidenceToBeDeleted( Incidence *incidence ); void incidenceDeleted( Incidence * ); - void startMultiModify( const QString &text ); + void startMultiModify( const TQString &text ); void endMultiModify(); void editCanceled( Incidence * ); - void updateView( const QDate &start, const QDate &end ); + void updateView( const TQDate &start, const TQDate &end ); void updateView(); void updateUnmanagedViews(); @@ -487,10 +487,10 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar:: void showEventViewer( bool ); /** Move the current view date to the specified date */ - void goDate( const QDate& date ); + void goDate( const TQDate& date ); /** Show the given date without changing date selection length. */ - void showDate( const QDate &date ); + void showDate( const TQDate &date ); /** Move the current view date to today */ void goToday(); @@ -517,10 +517,10 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar:: void slotAutoArchivingSettingsModified() { emit autoArchivingSettingsModified(); } - void showErrorMessage( const QString & ); + void showErrorMessage( const TQString & ); void schedule( Scheduler::Method, Incidence *incidence ); - void addIncidenceOn( Incidence *, const QDate & ); - void moveIncidenceTo( Incidence *, const QDate & ); + void addIncidenceOn( Incidence *, const TQDate & ); + void moveIncidenceTo( Incidence *, const TQDate & ); void filterActivated( int filterNum ); void resourcesChanged(); @@ -554,9 +554,9 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar:: /** Adjust the given date/times by valid defaults (selection or configured defaults, if invalid values are given) and allow the view to adjust the type. */ - void dateTimesForNewEvent( QDateTime &startDt, QDateTime &endDt, bool &allDay ); - KOEventEditor *newEventEditor( const QDateTime &startDtParam = QDateTime(), - const QDateTime &endDtParam = QDateTime() , bool allDayParam = false ); + void dateTimesForNewEvent( TQDateTime &startDt, TQDateTime &endDt, bool &allDay ); + KOEventEditor *newEventEditor( const TQDateTime &startDtParam = TQDateTime(), + const TQDateTime &endDtParam = TQDateTime() , bool allDayParam = false ); private: void init(); @@ -569,17 +569,17 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar:: KOrg::History *mHistory; - QSplitter *mPanner; - QSplitter *mLeftSplitter; - QWidget *mLeftFrame; - QWidgetStack *mRightFrame; + TQSplitter *mPanner; + TQSplitter *mLeftSplitter; + TQWidget *mLeftFrame; + TQWidgetStack *mRightFrame; NavigatorBar *mNavigatorBar; DateNavigatorContainer *mDateNavigator; - QPtrList<CalendarViewExtension> mExtensions; + TQPtrList<CalendarViewExtension> mExtensions; Calendar *mCalendar; @@ -591,18 +591,18 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar:: KODialogManager *mDialogManager; // Calendar filters - QPtrList<CalFilter> mFilters; + TQPtrList<CalFilter> mFilters; CalFilter *mCurrentFilter; // various housekeeping variables. bool mModified; // flag indicating if calendar is modified bool mReadOnly; // flag indicating if calendar is read-only - QDate mSaveSingleDate; + TQDate mSaveSingleDate; Incidence *mSelectedIncidence; KOTodoView *mTodoList; - QMap<Incidence*,KOIncidenceEditor*> mDialogList; + TQMap<Incidence*,KOIncidenceEditor*> mDialogList; KOrg::IncidenceChangerBase *mChanger; }; diff --git a/korganizer/customlistviewitem.h b/korganizer/customlistviewitem.h index c4ea1a97f..c25d780d3 100644 --- a/korganizer/customlistviewitem.h +++ b/korganizer/customlistviewitem.h @@ -24,8 +24,8 @@ #ifndef CUSTOMLISTVIEWITEM_H #define CUSTOMLISTVIEWITEM_H -#include <qmap.h> -#include <qstring.h> +#include <tqmap.h> +#include <tqstring.h> #include <klistview.h> template<class T> @@ -42,14 +42,14 @@ class CustomListViewItem : public KListViewItem T data() const { return mData; } - QString key(int column, bool) const + TQString key(int column, bool) const { - QMap<int,QString>::ConstIterator it = mKeyMap.find(column); + TQMap<int,TQString>::ConstIterator it = mKeyMap.find(column); if (it == mKeyMap.end()) return text(column); else return *it; } - void setSortKey(int column,const QString &key) + void setSortKey(int column,const TQString &key) { mKeyMap.insert(column,key); } @@ -57,7 +57,7 @@ class CustomListViewItem : public KListViewItem private: T mData; - QMap<int,QString> mKeyMap; + TQMap<int,TQString> mKeyMap; }; #endif diff --git a/korganizer/datechecker.cpp b/korganizer/datechecker.cpp index 43654983b..c0ce30eb6 100644 --- a/korganizer/datechecker.cpp +++ b/korganizer/datechecker.cpp @@ -23,7 +23,7 @@ without including the source code for Qt in the source distribution. */ -#include <qtimer.h> +#include <tqtimer.h> #include <kdebug.h> #include <klocale.h> @@ -31,8 +31,8 @@ #include "datechecker.h" -DateChecker::DateChecker( QObject *parent, const char *name ) - : QObject( parent, name ), mUpdateTimer( 0 ) +DateChecker::DateChecker( TQObject *parent, const char *name ) + : TQObject( parent, name ), mUpdateTimer( 0 ) { enableRollover( FollowMonth ); } @@ -54,19 +54,19 @@ void DateChecker::enableRollover( RolloverType r ) case FollowDay: case FollowMonth: if ( !mUpdateTimer ) { - mUpdateTimer = new QTimer( this, "mUpdateTimer" ); - connect( mUpdateTimer, SIGNAL( timeout() ), - SLOT( possiblyPastMidnight() ) ); + mUpdateTimer = new TQTimer( this, "mUpdateTimer" ); + connect( mUpdateTimer, TQT_SIGNAL( timeout() ), + TQT_SLOT( possiblyPastMidnight() ) ); } mUpdateTimer->start( 0, true ); - mLastDayChecked = QDate::currentDate(); + mLastDayChecked = TQDate::currentDate(); } mUpdateRollover = r; } void DateChecker::passedMidnight() { - QDate today = QDate::currentDate(); + TQDate today = TQDate::currentDate(); if ( today.month() != mLastDayChecked.month() ) { if ( mUpdateRollover == FollowMonth ) { @@ -78,15 +78,15 @@ void DateChecker::passedMidnight() void DateChecker::possiblyPastMidnight() { - if ( mLastDayChecked != QDate::currentDate() ) { + if ( mLastDayChecked != TQDate::currentDate() ) { passedMidnight(); - mLastDayChecked = QDate::currentDate(); + mLastDayChecked = TQDate::currentDate(); } // Set the timer to go off 1 second after midnight // or after 8 minutes, whichever comes first. if ( mUpdateTimer ) { - QTime now = QTime::currentTime(); - QTime midnight = QTime( 23, 59, 59 ); + TQTime now = TQTime::currentTime(); + TQTime midnight = TQTime( 23, 59, 59 ); int msecsWait = QMIN( 480000, now.msecsTo( midnight ) + 2000 ); mUpdateTimer->stop(); diff --git a/korganizer/datechecker.h b/korganizer/datechecker.h index f2d20bf3b..4866faf8a 100644 --- a/korganizer/datechecker.h +++ b/korganizer/datechecker.h @@ -25,8 +25,8 @@ #ifndef DATECHECKER_H #define DATECHECKER_H -#include <qobject.h> -#include <qdatetime.h> +#include <tqobject.h> +#include <tqdatetime.h> class QTimer; @@ -38,7 +38,7 @@ class DateChecker: public QObject { Q_OBJECT public: - DateChecker( QObject *parent = 0, const char *name = 0 ); + DateChecker( TQObject *parent = 0, const char *name = 0 ); ~DateChecker(); /** @@ -57,8 +57,8 @@ class DateChecker: public QObject signals: // Signals emitted at midnight carrying the new date. - void dayPassed( const QDate & ); - void monthPassed( const QDate & ); + void dayPassed( const TQDate & ); + void monthPassed( const TQDate & ); protected slots: /** @@ -78,8 +78,8 @@ class DateChecker: public QObject void passedMidnight(); private: - QTimer *mUpdateTimer; - QDate mLastDayChecked; + TQTimer *mUpdateTimer; + TQDate mLastDayChecked; RolloverType mUpdateRollover; }; diff --git a/korganizer/datenavigator.cpp b/korganizer/datenavigator.cpp index 56360ca2e..6f5570a10 100644 --- a/korganizer/datenavigator.cpp +++ b/korganizer/datenavigator.cpp @@ -34,10 +34,10 @@ using namespace KCal; -DateNavigator::DateNavigator( QObject *parent, const char *name ) - : QObject( parent, name ) +DateNavigator::DateNavigator( TQObject *parent, const char *name ) + : TQObject( parent, name ) { - mSelectedDates.append( QDate::currentDate() ); + mSelectedDates.append( TQDate::currentDate() ); } DateNavigator::~DateNavigator() @@ -63,13 +63,13 @@ void DateNavigator::selectDates( const DateList& dateList ) } } -void DateNavigator::selectDate( const QDate &date ) +void DateNavigator::selectDate( const TQDate &date ) { - QDate d = date; + TQDate d = date; if ( !d.isValid() ) { - kdDebug(5850) << "DateNavigator::selectDates(QDate): an invalid date was passed as a parameter!" << endl; - d = QDate::currentDate(); + kdDebug(5850) << "DateNavigator::selectDates(TQDate): an invalid date was passed as a parameter!" << endl; + d = TQDate::currentDate(); } mSelectedDates.clear(); @@ -83,7 +83,7 @@ void DateNavigator::selectDates( int count ) selectDates( mSelectedDates.first(), count ); } -void DateNavigator::selectDates( const QDate &d, int count ) +void DateNavigator::selectDates( const TQDate &d, int count ) { DateList dates; @@ -97,7 +97,7 @@ void DateNavigator::selectDates( const QDate &d, int count ) emitSelected(); } -void DateNavigator::selectWeekByDay( int weekDay, const QDate &d ) +void DateNavigator::selectWeekByDay( int weekDay, const TQDate &d ) { int dateCount = mSelectedDates.count(); bool weekStart = ( weekDay == KGlobal::locale()->weekStartDay() ); @@ -110,13 +110,13 @@ void DateNavigator::selectWeek() selectWeek( mSelectedDates.first() ); } -void DateNavigator::selectWeek( const QDate &d ) +void DateNavigator::selectWeek( const TQDate &d ) { int dayOfWeek = KOGlobals::self()->calendarSystem()->dayOfWeek( d ); int weekStart = KGlobal::locale()->weekStartDay(); - QDate firstDate = d.addDays( weekStart - dayOfWeek ); + TQDate firstDate = d.addDays( weekStart - dayOfWeek ); if ( weekStart != 1 && dayOfWeek < weekStart ) { firstDate = firstDate.addDays( -7 ); @@ -130,13 +130,13 @@ void DateNavigator::selectWorkWeek() selectWorkWeek( mSelectedDates.first() ); } -void DateNavigator::selectWorkWeek( const QDate &d ) +void DateNavigator::selectWorkWeek( const TQDate &d ) { int weekStart = KGlobal::locale()->weekStartDay(); int dayOfWeek = KOGlobals::self()->calendarSystem()->dayOfWeek( d ); - QDate currentDate = d.addDays( weekStart - dayOfWeek ); + TQDate currentDate = d.addDays( weekStart - dayOfWeek ); if ( weekStart != 1 && dayOfWeek < weekStart ) { currentDate = currentDate.addDays( -7 ); @@ -156,7 +156,7 @@ void DateNavigator::selectWorkWeek( const QDate &d ) void DateNavigator::selectToday() { - QDate d = QDate::currentDate(); + TQDate d = TQDate::currentDate(); int dateCount = mSelectedDates.count(); @@ -166,7 +166,7 @@ void DateNavigator::selectToday() void DateNavigator::selectPreviousYear() { - QDate firstSelected = mSelectedDates.first(); + TQDate firstSelected = mSelectedDates.first(); int weekDay = firstSelected.dayOfWeek(); firstSelected = KOGlobals::self()->calendarSystem()->addYears( firstSelected, -1 ); @@ -175,7 +175,7 @@ void DateNavigator::selectPreviousYear() void DateNavigator::selectPreviousMonth() { - QDate firstSelected = mSelectedDates.first(); + TQDate firstSelected = mSelectedDates.first(); int weekDay = firstSelected.dayOfWeek(); firstSelected = KOGlobals::self()->calendarSystem()->addMonths( firstSelected, -1 ); @@ -184,7 +184,7 @@ void DateNavigator::selectPreviousMonth() void DateNavigator::selectPreviousWeek() { - QDate firstSelected = mSelectedDates.first(); + TQDate firstSelected = mSelectedDates.first(); int weekDay = firstSelected.dayOfWeek(); firstSelected = KOGlobals::self()->calendarSystem()->addDays( firstSelected, -7 ); @@ -193,7 +193,7 @@ void DateNavigator::selectPreviousWeek() void DateNavigator::selectNextWeek() { - QDate firstSelected = mSelectedDates.first(); + TQDate firstSelected = mSelectedDates.first(); int weekDay = firstSelected.dayOfWeek(); firstSelected = KOGlobals::self()->calendarSystem()->addDays( firstSelected, 7 ); @@ -203,7 +203,7 @@ void DateNavigator::selectNextWeek() void DateNavigator::selectNextMonth() { - QDate firstSelected = mSelectedDates.first(); + TQDate firstSelected = mSelectedDates.first(); int weekDay = firstSelected.dayOfWeek(); firstSelected = KOGlobals::self()->calendarSystem()->addMonths( firstSelected, 1 ); @@ -213,7 +213,7 @@ void DateNavigator::selectNextMonth() void DateNavigator::selectNextYear() { - QDate firstSelected = mSelectedDates.first(); + TQDate firstSelected = mSelectedDates.first(); int weekDay = firstSelected.dayOfWeek(); firstSelected = KOGlobals::self()->calendarSystem()->addYears( firstSelected, 1 ); @@ -242,7 +242,7 @@ void DateNavigator::selectNext() void DateNavigator::selectMonth(int month) { - QDate firstSelected = mSelectedDates.first(); + TQDate firstSelected = mSelectedDates.first(); int weekDay = firstSelected.dayOfWeek(); const KCalendarSystem *calSys = KOGlobals::self()->calendarSystem(); diff --git a/korganizer/datenavigator.h b/korganizer/datenavigator.h index 062f1a67d..d91bad318 100644 --- a/korganizer/datenavigator.h +++ b/korganizer/datenavigator.h @@ -26,7 +26,7 @@ #include <libkcal/incidencebase.h> -#include <qobject.h> +#include <tqobject.h> /** This class controls date navigation. All requests to move the views to another @@ -37,7 +37,7 @@ class DateNavigator : public QObject { Q_OBJECT public: - DateNavigator( QObject *parent = 0, const char *name = 0 ); + DateNavigator( TQObject *parent = 0, const char *name = 0 ); ~DateNavigator(); KCal::DateList selectedDates(); @@ -46,18 +46,18 @@ class DateNavigator : public QObject public slots: void selectDates( const KCal::DateList & ); - void selectDate( const QDate & ); + void selectDate( const TQDate & ); void selectDates( int count ); - void selectDates( const QDate &, int count ); + void selectDates( const TQDate &, int count ); void selectWeek(); - void selectWeek( const QDate & ); + void selectWeek( const TQDate & ); void selectWorkWeek(); - void selectWorkWeek( const QDate & ); + void selectWorkWeek( const TQDate & ); - void selectWeekByDay( int weekDay, const QDate & ); + void selectWeekByDay( int weekDay, const TQDate & ); void selectToday(); diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp index 61be083b4..e3c092fc0 100644 --- a/korganizer/datenavigatorcontainer.cpp +++ b/korganizer/datenavigatorcontainer.cpp @@ -35,19 +35,19 @@ #include "datenavigatorcontainer.h" -#include <qwhatsthis.h> -#include <qtimer.h> +#include <tqwhatsthis.h> +#include <tqtimer.h> -DateNavigatorContainer::DateNavigatorContainer( QWidget *parent, +DateNavigatorContainer::DateNavigatorContainer( TQWidget *parent, const char *name ) - : QFrame( parent, name ), mCalendar( 0 ), + : TQFrame( parent, name ), mCalendar( 0 ), mHorizontalCount( 1 ), mVerticalCount( 1 ) { mExtraViews.setAutoDelete( true ); - setFrameStyle( QFrame::Sunken | QFrame::StyledPanel ); + setFrameStyle( TQFrame::Sunken | TQFrame::StyledPanel ); mNavigatorView = new KDateNavigator( this, name ); - QWhatsThis::add( mNavigatorView, + TQWhatsThis::add( mNavigatorView, i18n( "<qt><p>Select the dates you want to " "display in KOrganizer's main view here. Hold down the " "mouse button to select more than one day.</p>" @@ -67,24 +67,24 @@ DateNavigatorContainer::~DateNavigatorContainer() void DateNavigatorContainer::connectNavigatorView( KDateNavigator *v ) { - connect( v, SIGNAL( datesSelected( const KCal::DateList & ) ), - SIGNAL( datesSelected( const KCal::DateList & ) ) ); - connect( v, SIGNAL( incidenceDropped( Incidence *, const QDate & ) ), - SIGNAL( incidenceDropped( Incidence *, const QDate & ) ) ); - connect( v, SIGNAL( incidenceDroppedMove( Incidence *, const QDate & ) ), - SIGNAL( incidenceDroppedMove( Incidence *, const QDate & ) ) ); - connect( v, SIGNAL( weekClicked( const QDate & ) ), - SIGNAL( weekClicked( const QDate & ) ) ); - - connect( v, SIGNAL( goPrevious() ), SIGNAL( goPrevious() ) ); - connect( v, SIGNAL( goNext() ), SIGNAL( goNext() ) ); - - connect( v, SIGNAL( goNextMonth() ), SIGNAL( goNextMonth() ) ); - connect( v, SIGNAL( goPrevMonth() ), SIGNAL( goPrevMonth() ) ); - connect( v, SIGNAL( goNextYear() ), SIGNAL( goNextYear() ) ); - connect( v, SIGNAL( goPrevYear() ), SIGNAL( goPrevYear() ) ); - - connect( v, SIGNAL( goMonth( int ) ), SIGNAL( goMonth( int ) ) ); + connect( v, TQT_SIGNAL( datesSelected( const KCal::DateList & ) ), + TQT_SIGNAL( datesSelected( const KCal::DateList & ) ) ); + connect( v, TQT_SIGNAL( incidenceDropped( Incidence *, const TQDate & ) ), + TQT_SIGNAL( incidenceDropped( Incidence *, const TQDate & ) ) ); + connect( v, TQT_SIGNAL( incidenceDroppedMove( Incidence *, const TQDate & ) ), + TQT_SIGNAL( incidenceDroppedMove( Incidence *, const TQDate & ) ) ); + connect( v, TQT_SIGNAL( weekClicked( const TQDate & ) ), + TQT_SIGNAL( weekClicked( const TQDate & ) ) ); + + connect( v, TQT_SIGNAL( goPrevious() ), TQT_SIGNAL( goPrevious() ) ); + connect( v, TQT_SIGNAL( goNext() ), TQT_SIGNAL( goNext() ) ); + + connect( v, TQT_SIGNAL( goNextMonth() ), TQT_SIGNAL( goNextMonth() ) ); + connect( v, TQT_SIGNAL( goPrevMonth() ), TQT_SIGNAL( goPrevMonth() ) ); + connect( v, TQT_SIGNAL( goNextYear() ), TQT_SIGNAL( goNextYear() ) ); + connect( v, TQT_SIGNAL( goPrevYear() ), TQT_SIGNAL( goPrevYear() ) ); + + connect( v, TQT_SIGNAL( goMonth( int ) ), TQT_SIGNAL( goMonth( int ) ) ); } void DateNavigatorContainer::setCalendar( Calendar *cal ) @@ -139,11 +139,11 @@ void DateNavigatorContainer::updateConfig() void DateNavigatorContainer::selectDates( const DateList &dateList ) { if ( !dateList.isEmpty() ) { - QDate start( dateList.first() ); - QDate end( dateList.last() ); - QDate navfirst( mNavigatorView->startDate() ); - QDate navsecond; // start of the second shown month if existant - QDate navlast; + TQDate start( dateList.first() ); + TQDate end( dateList.last() ); + TQDate navfirst( mNavigatorView->startDate() ); + TQDate navsecond; // start of the second shown month if existant + TQDate navlast; if ( !mExtraViews.isEmpty() ) { navlast = mExtraViews.last()->endDate(); navsecond = mExtraViews.first()->startDate(); @@ -167,9 +167,9 @@ void DateNavigatorContainer::selectDates( const DateList &dateList ) } } -void DateNavigatorContainer::setBaseDates( const QDate &start ) +void DateNavigatorContainer::setBaseDates( const TQDate &start ) { - QDate baseDate = start; + TQDate baseDate = start; mNavigatorView->setBaseDate( baseDate ); for( KDateNavigator *n = mExtraViews.first(); n; n = mExtraViews.next() ) { baseDate = KOGlobals::self()->calendarSystem()->addMonths( baseDate, 1 ); @@ -177,7 +177,7 @@ void DateNavigatorContainer::setBaseDates( const QDate &start ) } } -void DateNavigatorContainer::resizeEvent( QResizeEvent * ) +void DateNavigatorContainer::resizeEvent( TQResizeEvent * ) { #if 0 kdDebug(5850) << "DateNavigatorContainer::resizeEvent()" << endl; @@ -186,12 +186,12 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * ) kdDebug(5850) << " SIZEHINT: " << sizeHint() << endl; kdDebug(5850) << " MINIMUM SIZE: " << minimumSize() << endl; #endif - QTimer::singleShot( 0, this, SLOT( resizeAllContents() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( resizeAllContents() ) ); } void DateNavigatorContainer::resizeAllContents() { - QSize minSize = mNavigatorView->minimumSizeHint(); + TQSize minSize = mNavigatorView->minimumSizeHint(); // kdDebug(5850) << " NAVIGATORVIEW minimumSizeHint: " << minSize << endl; @@ -251,16 +251,16 @@ void DateNavigatorContainer::resizeAllContents() } } -QSize DateNavigatorContainer::minimumSizeHint() const +TQSize DateNavigatorContainer::minimumSizeHint() const { int margin = KDialog::spacingHint() * 2; - return mNavigatorView->minimumSizeHint() + QSize( margin, margin ); + return mNavigatorView->minimumSizeHint() + TQSize( margin, margin ); } -QSize DateNavigatorContainer::sizeHint() const +TQSize DateNavigatorContainer::sizeHint() const { int margin = KDialog::spacingHint() * 2; - return mNavigatorView->sizeHint() + QSize( margin, margin ); + return mNavigatorView->sizeHint() + TQSize( margin, margin ); } #include "datenavigatorcontainer.moc" diff --git a/korganizer/datenavigatorcontainer.h b/korganizer/datenavigatorcontainer.h index 07be7cbf0..2facad303 100644 --- a/korganizer/datenavigatorcontainer.h +++ b/korganizer/datenavigatorcontainer.h @@ -25,7 +25,7 @@ #ifndef DATENAVIGATORCONTAINER_H #define DATENAVIGATORCONTAINER_H -#include <qframe.h> +#include <tqframe.h> class KDateNavigator; @@ -33,7 +33,7 @@ class DateNavigatorContainer: public QFrame { Q_OBJECT public: - DateNavigatorContainer( QWidget *parent = 0, const char *name = 0 ); + DateNavigatorContainer( TQWidget *parent = 0, const char *name = 0 ); ~DateNavigatorContainer(); /** @@ -41,8 +41,8 @@ class DateNavigatorContainer: public QFrame */ void setCalendar( Calendar * ); - QSize minimumSizeHint() const; - QSize sizeHint() const; + TQSize minimumSizeHint() const; + TQSize sizeHint() const; public slots: void selectDates( const KCal::DateList & ); @@ -53,9 +53,9 @@ class DateNavigatorContainer: public QFrame signals: void datesSelected( const KCal::DateList & ); - void incidenceDropped( Incidence *, const QDate & ); - void incidenceDroppedMove( Incidence *, const QDate & ); - void weekClicked( const QDate &); + void incidenceDropped( Incidence *, const TQDate & ); + void incidenceDroppedMove( Incidence *, const TQDate & ); + void weekClicked( const TQDate &); void goPrevious(); void goNext(); @@ -68,12 +68,12 @@ class DateNavigatorContainer: public QFrame void goMonth( int month ); protected: - void resizeEvent( QResizeEvent * ); - void setBaseDates( const QDate &start ); + void resizeEvent( TQResizeEvent * ); + void setBaseDates( const TQDate &start ); void connectNavigatorView( KDateNavigator *v ); protected slots: /** Resizes all the child elements after the size of the widget - changed. This slot is called by a QTimer::singleShot from + changed. This slot is called by a TQTimer::singleShot from resizeEvent. This makes the UI seem more responsive, since the other parts of the splitter are resized earlier now */ void resizeAllContents(); @@ -83,7 +83,7 @@ class DateNavigatorContainer: public QFrame KCal::Calendar *mCalendar; - QPtrList<KDateNavigator> mExtraViews; + TQPtrList<KDateNavigator> mExtraViews; int mHorizontalCount; int mVerticalCount; diff --git a/korganizer/docprefs.cpp b/korganizer/docprefs.cpp index 958eb236e..498886be4 100644 --- a/korganizer/docprefs.cpp +++ b/korganizer/docprefs.cpp @@ -30,7 +30,7 @@ KSimpleConfig *DocPrefs::mConfig = 0; -DocPrefs::DocPrefs( const QString &type ) +DocPrefs::DocPrefs( const TQString &type ) { if ( !mConfig ) { mConfig = new KSimpleConfig( locateLocal( "data", "korganizer/docprefs." + type + ".kconfig" ) ); @@ -42,17 +42,17 @@ DocPrefs::~DocPrefs() mConfig->sync(); } -void DocPrefs::setDoc( const QString &identifier ) +void DocPrefs::setDoc( const TQString &identifier ) { mDocId = identifier; } -QString DocPrefs::doc() const +TQString DocPrefs::doc() const { return mDocId; } -bool DocPrefs::readBoolEntry( const QString &id ) const +bool DocPrefs::readBoolEntry( const TQString &id ) const { mConfig->setGroup( mDocId ); bool result = mConfig->readBoolEntry( id, false ); @@ -60,7 +60,7 @@ bool DocPrefs::readBoolEntry( const QString &id ) const return result; } -void DocPrefs::writeEntry( const QString &id, bool value ) +void DocPrefs::writeEntry( const TQString &id, bool value ) { // kdDebug(5850) << "DocPrefs::writeEntry(): " << id << " : " << (value ? "True" : "False" ) << endl; mConfig->setGroup( mDocId ); diff --git a/korganizer/docprefs.h b/korganizer/docprefs.h index 0c9609ed5..70d1cac9d 100644 --- a/korganizer/docprefs.h +++ b/korganizer/docprefs.h @@ -24,26 +24,26 @@ #ifndef DOCPREFS_H #define DOCPREFS_H -#include <qstring.h> +#include <tqstring.h> class KSimpleConfig; class DocPrefs { public: - DocPrefs( const QString &type="general" ); + DocPrefs( const TQString &type="general" ); ~DocPrefs(); - void setDoc( const QString &identifier ); - QString doc() const; + void setDoc( const TQString &identifier ); + TQString doc() const; - bool readBoolEntry( const QString &identifier ) const; - void writeEntry( const QString &identifier, bool value ); + bool readBoolEntry( const TQString &identifier ) const; + void writeEntry( const TQString &identifier, bool value ); private: static KSimpleConfig *mConfig; - QString mDocId; + TQString mDocId; }; #endif diff --git a/korganizer/eventarchiver.cpp b/korganizer/eventarchiver.cpp index f4ff3cbf9..b5a9c0c98 100644 --- a/korganizer/eventarchiver.cpp +++ b/korganizer/eventarchiver.cpp @@ -36,8 +36,8 @@ #include <kdebug.h> #include "koprefs.h" -EventArchiver::EventArchiver( QObject* parent, const char* name ) - : QObject( parent, name ) +EventArchiver::EventArchiver( TQObject* parent, const char* name ) + : TQObject( parent, name ) { } @@ -45,14 +45,14 @@ EventArchiver::~EventArchiver() { } -void EventArchiver::runOnce( Calendar* calendar, const QDate& limitDate, QWidget* widget ) +void EventArchiver::runOnce( Calendar* calendar, const TQDate& limitDate, TQWidget* widget ) { run( calendar, limitDate, widget, true, true ); } -void EventArchiver::runAuto( Calendar* calendar, QWidget* widget, bool withGUI ) +void EventArchiver::runAuto( Calendar* calendar, TQWidget* widget, bool withGUI ) { - QDate limitDate( QDate::currentDate() ); + TQDate limitDate( TQDate::currentDate() ); int expiryTime = KOPrefs::instance()->mExpiryTime; switch (KOPrefs::instance()->mExpiryUnit) { case KOPrefs::UnitDays: // Days @@ -70,7 +70,7 @@ void EventArchiver::runAuto( Calendar* calendar, QWidget* widget, bool withGUI ) run( calendar, limitDate, widget, withGUI, false ); } -void EventArchiver::run( Calendar* calendar, const QDate& limitDate, QWidget* widget, bool withGUI, bool errorIfNone ) +void EventArchiver::run( Calendar* calendar, const TQDate& limitDate, TQWidget* widget, bool withGUI, bool errorIfNone ) { // We need to use rawEvents, otherwise events hidden by filters will not be archived. Incidence::List incidences; @@ -80,7 +80,7 @@ void EventArchiver::run( Calendar* calendar, const QDate& limitDate, QWidget* wi if ( KOPrefs::instance()->mArchiveEvents ) { events = calendar->rawEvents( - QDate( 1769, 12, 1 ), + TQDate( 1769, 12, 1 ), // #29555, also advertised by the "limitDate not included" in the class docu limitDate.addDays( -1 ), true ); @@ -118,9 +118,9 @@ void EventArchiver::run( Calendar* calendar, const QDate& limitDate, QWidget* wi } } -void EventArchiver::deleteIncidences( Calendar* calendar, const QDate& limitDate, QWidget* widget, const Incidence::List& incidences, bool withGUI ) +void EventArchiver::deleteIncidences( Calendar* calendar, const TQDate& limitDate, TQWidget* widget, const Incidence::List& incidences, bool withGUI ) { - QStringList incidenceStrs; + TQStringList incidenceStrs; Incidence::List::ConstIterator it; for( it = incidences.begin(); it != incidences.end(); ++it ) { incidenceStrs.append( (*it)->summary() ); @@ -141,7 +141,7 @@ void EventArchiver::deleteIncidences( Calendar* calendar, const QDate& limitDate emit eventsDeleted(); } -void EventArchiver::archiveIncidences( Calendar* calendar, const QDate& /*limitDate*/, QWidget* widget, const Incidence::List& incidences, bool /*withGUI*/) +void EventArchiver::archiveIncidences( Calendar* calendar, const TQDate& /*limitDate*/, TQWidget* widget, const Incidence::List& incidences, bool /*withGUI*/) { FileStorage storage( calendar ); @@ -166,7 +166,7 @@ void EventArchiver::archiveIncidences( Calendar* calendar, const QDate& /*limitD // Strip active events from calendar so that only events to be archived // remain. This is not really efficient, but there is no other easy way. - QStringList uids; + TQStringList uids; Incidence::List allIncidences = archiveCalendar.rawIncidences(); Incidence::List::ConstIterator it; for( it = incidences.begin(); it != incidences.end(); ++it ) { @@ -180,7 +180,7 @@ void EventArchiver::archiveIncidences( Calendar* calendar, const QDate& /*limitD // Get or create the archive file KURL archiveURL( KOPrefs::instance()->mArchiveFile ); - QString archiveFile; + TQString archiveFile; if ( KIO::NetAccess::exists( archiveURL, true, widget ) ) { if( !KIO::NetAccess::download( archiveURL, archiveFile, widget ) ) { diff --git a/korganizer/eventarchiver.h b/korganizer/eventarchiver.h index 2826e7a92..4d5a8544d 100644 --- a/korganizer/eventarchiver.h +++ b/korganizer/eventarchiver.h @@ -25,8 +25,8 @@ #ifndef EVENTARCHIVER_H #define EVENTARCHIVER_H -#include <qobject.h> -#include <qdatetime.h> +#include <tqobject.h> +#include <tqdatetime.h> #include <libkcal/event.h> namespace KCal { @@ -49,7 +49,7 @@ class EventArchiver : public QObject Q_OBJECT public: - EventArchiver( QObject* parent = 0, const char* name = 0 ); + EventArchiver( TQObject* parent = 0, const char* name = 0 ); virtual ~EventArchiver(); /** @@ -59,7 +59,7 @@ class EventArchiver : public QObject * @param widget parent widget for message boxes * Confirmation and "no events to process" dialogs will be shown */ - void runOnce( Calendar* calendar, const QDate& limitDate, QWidget* widget ); + void runOnce( Calendar* calendar, const TQDate& limitDate, TQWidget* widget ); /** * Delete or archive events. This is called regularly, when auto-archiving is enabled @@ -69,16 +69,16 @@ class EventArchiver : public QObject * Note that error dialogs like "cannot save" are shown even if from this method, so widget * should be set in all cases. */ - void runAuto( Calendar* calendar, QWidget* widget, bool withGUI ); + void runAuto( Calendar* calendar, TQWidget* widget, bool withGUI ); signals: void eventsDeleted(); private: - void run( Calendar* calendar, const QDate& limitDate, QWidget* widget, bool withGUI, bool errorIfNone ); + void run( Calendar* calendar, const TQDate& limitDate, TQWidget* widget, bool withGUI, bool errorIfNone ); - void deleteIncidences( Calendar* calendar, const QDate& limitDate, QWidget* widget, const Incidence::List& incidences, bool withGUI ); - void archiveIncidences( Calendar* calendar, const QDate& limitDate, QWidget* widget, const Incidence::List& incidences, bool withGUI ); + void deleteIncidences( Calendar* calendar, const TQDate& limitDate, TQWidget* widget, const Incidence::List& incidences, bool withGUI ); + void archiveIncidences( Calendar* calendar, const TQDate& limitDate, TQWidget* widget, const Incidence::List& incidences, bool withGUI ); }; #endif /* EVENTARCHIVER_H */ diff --git a/korganizer/exportwebdialog.cpp b/korganizer/exportwebdialog.cpp index e62b94c93..c926ad053 100644 --- a/korganizer/exportwebdialog.cpp +++ b/korganizer/exportwebdialog.cpp @@ -22,19 +22,19 @@ without including the source code for Qt in the source distribution. */ -#include <qlayout.h> -#include <qhgroupbox.h> -#include <qvgroupbox.h> -#include <qvbuttongroup.h> -#include <qradiobutton.h> -#include <qcheckbox.h> -#include <qlineedit.h> -#include <qhbox.h> -#include <qvbox.h> -#include <qpushbutton.h> -#include <qfiledialog.h> -#include <qtextstream.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqhgroupbox.h> +#include <tqvgroupbox.h> +#include <tqvbuttongroup.h> +#include <tqradiobutton.h> +#include <tqcheckbox.h> +#include <tqlineedit.h> +#include <tqhbox.h> +#include <tqvbox.h> +#include <tqpushbutton.h> +#include <tqfiledialog.h> +#include <tqtextstream.h> +#include <tqlabel.h> #include <klocale.h> #include <kdebug.h> @@ -68,7 +68,7 @@ // because we want custom buttons, a Tabbed dialog, and a different // headline... Maybe we should try to achieve the same without code // duplication. -ExportWebDialog::ExportWebDialog( HTMLExportSettings *settings, QWidget *parent, +ExportWebDialog::ExportWebDialog( HTMLExportSettings *settings, TQWidget *parent, const char *name) : KDialogBase( Tabbed,i18n("Export Calendar as Web Page"),Help|Default|User1|Cancel, User1, parent, name, false, false, i18n("Export") ), KPrefsWidManager( settings ), mSettings( settings ) @@ -81,8 +81,8 @@ ExportWebDialog::ExportWebDialog( HTMLExportSettings *settings, QWidget *parent, // setupFreeBusyPage(); // setupAdvancedPage(); - connect( this, SIGNAL( user1Clicked() ), SLOT( slotOk() ) ); - connect( this, SIGNAL( cancelClicked() ), SLOT( reject() ) ); + connect( this, TQT_SIGNAL( user1Clicked() ), TQT_SLOT( slotOk() ) ); + connect( this, TQT_SIGNAL( cancelClicked() ), TQT_SLOT( reject() ) ); readConfig(); } @@ -137,14 +137,14 @@ void ExportWebDialog::slotDefault() void ExportWebDialog::setupGeneralPage() { mGeneralPage = addPage( i18n("General") ); - QVBoxLayout *topLayout = new QVBoxLayout(mGeneralPage, 10); + TQVBoxLayout *topLayout = new TQVBoxLayout(mGeneralPage, 10); - QGroupBox *rangeGroup = new QHGroupBox( i18n("Date Range"), mGeneralPage ); + TQGroupBox *rangeGroup = new TQHGroupBox( i18n("Date Range"), mGeneralPage ); topLayout->addWidget( rangeGroup ); addWidDate( mSettings->dateStartItem(), rangeGroup ); addWidDate( mSettings->dateEndItem(), rangeGroup ); - QButtonGroup *typeGroup = new QVButtonGroup( i18n("View Type"), mGeneralPage ); + TQButtonGroup *typeGroup = new TQVButtonGroup( i18n("View Type"), mGeneralPage ); topLayout->addWidget( typeGroup ); // addWidBool( mSettings->weekViewItem(), typeGroup ); addWidBool( mSettings->monthViewItem(), typeGroup ); @@ -155,17 +155,17 @@ void ExportWebDialog::setupGeneralPage() addWidBool( mSettings->excludePrivateItem(), typeGroup ); addWidBool( mSettings->excludeConfidentialItem(), typeGroup ); - QGroupBox *destGroup = new QVGroupBox(i18n("Destination"), mGeneralPage ); + TQGroupBox *destGroup = new TQVGroupBox(i18n("Destination"), mGeneralPage ); topLayout->addWidget(destGroup); KPrefsWidPath *pathWid = addWidPath( mSettings->outputFileItem(), destGroup, "text/html", KFile::File ); - connect( pathWid->urlRequester(), SIGNAL( textChanged( const QString & ) ), - SLOT( slotTextChanged( const QString & ) ) ); + connect( pathWid->urlRequester(), TQT_SIGNAL( textChanged( const TQString & ) ), + TQT_SLOT( slotTextChanged( const TQString & ) ) ); topLayout->addStretch( 1 ); } -void ExportWebDialog::slotTextChanged( const QString & _text) +void ExportWebDialog::slotTextChanged( const TQString & _text) { enableButton( User1, !_text.isEmpty() ); } @@ -173,13 +173,13 @@ void ExportWebDialog::slotTextChanged( const QString & _text) void ExportWebDialog::setupTodoPage() { mTodoPage = addPage(i18n("To-dos")); - QVBoxLayout *topLayout = new QVBoxLayout( mTodoPage, 10 ); + TQVBoxLayout *topLayout = new TQVBoxLayout( mTodoPage, 10 ); - QHBox *hbox = new QHBox( mTodoPage ); + TQHBox *hbox = new TQHBox( mTodoPage ); topLayout->addWidget( hbox ); addWidString( mSettings->todoListTitleItem(), hbox ); - QVBox *vbox = new QVBox( mTodoPage ); + TQVBox *vbox = new TQVBox( mTodoPage ); topLayout->addWidget( vbox ); addWidBool( mSettings->taskDueDateItem(), vbox ); addWidBool( mSettings->taskLocationItem(), vbox ); @@ -194,13 +194,13 @@ void ExportWebDialog::setupTodoPage() void ExportWebDialog::setupEventPage() { mEventPage = addPage(i18n("Events")); - QVBoxLayout *topLayout = new QVBoxLayout( mEventPage, 10 ); + TQVBoxLayout *topLayout = new TQVBoxLayout( mEventPage, 10 ); - QHBox *hbox = new QHBox( mEventPage ); + TQHBox *hbox = new TQHBox( mEventPage ); topLayout->addWidget( hbox ); addWidString( mSettings->eventTitleItem(), hbox ); - QVBox *vbox = new QVBox( mEventPage ); + TQVBox *vbox = new TQVBox( mEventPage ); topLayout->addWidget( vbox ); addWidBool( mSettings->eventLocationItem(), vbox ); addWidBool( mSettings->eventCategoriesItem(), vbox ); @@ -214,13 +214,13 @@ void ExportWebDialog::setupEventPage() void ExportWebDialog::setupJournalPage() { mJournalPage = addPage(i18n("Journal")); - QVBoxLayout *topLayout = new QVBoxLayout( mJournalPage, 10 ); + TQVBoxLayout *topLayout = new TQVBoxLayout( mJournalPage, 10 ); - QHBox *hbox = new QHBox( mJournalPage ); + TQHBox *hbox = new TQHBox( mJournalPage ); topLayout->addWidget( hbox ); addWidString( mSettings->journalTitleItem(), hbox ); - QVBox *vbox = new QVBox( mJournalPage ); + TQVBox *vbox = new TQVBox( mJournalPage ); topLayout->addWidget( vbox ); // addWidBool( mSettings->eventExcludeConfidentialItem(), vbox ); @@ -230,13 +230,13 @@ void ExportWebDialog::setupJournalPage() void ExportWebDialog::setupFreeBusyPage() { mFreeBusyPage = addPage(i18n("Free/Busy")); - QVBoxLayout *topLayout = new QVBoxLayout( mFreeBusyPage, 10 ); + TQVBoxLayout *topLayout = new TQVBoxLayout( mFreeBusyPage, 10 ); - QHBox *hbox = new QHBox( mFreeBusyPage ); + TQHBox *hbox = new TQHBox( mFreeBusyPage ); topLayout->addWidget( hbox ); addWidString( mSettings->journalTitleItem(), hbox ); - QVBox *vbox = new QVBox( mFreeBusyPage ); + TQVBox *vbox = new TQVBox( mFreeBusyPage ); topLayout->addWidget( vbox ); // addWidBool( mSettings->eventExcludeConfidentialItem(), vbox ); @@ -246,9 +246,9 @@ void ExportWebDialog::setupFreeBusyPage() void ExportWebDialog::setupAdvancedPage() { mAdvancedPage = addPage(i18n("Advanced")); - QVBoxLayout *topLayout = new QVBoxLayout( mAdvancedPage, 10 ); + TQVBoxLayout *topLayout = new TQVBoxLayout( mAdvancedPage, 10 ); - QVBox *vbox = new QVBox( mAdvancedPage ); + TQVBox *vbox = new TQVBox( mAdvancedPage ); topLayout->addWidget( vbox ); // addWidBool( mSettings->eventExcludeConfidentialItem(), vbox ); diff --git a/korganizer/exportwebdialog.h b/korganizer/exportwebdialog.h index ead1e454c..4d2dcd39c 100644 --- a/korganizer/exportwebdialog.h +++ b/korganizer/exportwebdialog.h @@ -38,12 +38,12 @@ class ExportWebDialog : public KDialogBase, public KPrefsWidManager { Q_OBJECT public: - ExportWebDialog( HTMLExportSettings *settings, QWidget *parent = 0, + ExportWebDialog( HTMLExportSettings *settings, TQWidget *parent = 0, const char *name = 0 ); virtual ~ExportWebDialog(); public slots: - void slotTextChanged( const QString & _text); + void slotTextChanged( const TQString & _text); protected: void setupGeneralPage(); @@ -73,12 +73,12 @@ class ExportWebDialog : public KDialogBase, public KPrefsWidManager private: HTMLExportSettings* mSettings; - QFrame *mGeneralPage; - QFrame *mEventPage; - QFrame *mTodoPage; -// QFrame *mJournalPage; -// QFrame *mFreeBusyPage; -// QFrame *mAdvancedPage; + TQFrame *mGeneralPage; + TQFrame *mEventPage; + TQFrame *mTodoPage; +// TQFrame *mJournalPage; +// TQFrame *mFreeBusyPage; +// TQFrame *mAdvancedPage; }; #endif // _EXPORTWEBDIALOG_H diff --git a/korganizer/filtereditdialog.cpp b/korganizer/filtereditdialog.cpp index 72bf89023..32138bffb 100644 --- a/korganizer/filtereditdialog.cpp +++ b/korganizer/filtereditdialog.cpp @@ -24,13 +24,13 @@ without including the source code for Qt in the source distribution. */ -#include <qpushbutton.h> -#include <qcheckbox.h> -#include <qbuttongroup.h> -#include <qlineedit.h> -#include <qradiobutton.h> -#include <qlistbox.h> -#include <qwhatsthis.h> +#include <tqpushbutton.h> +#include <tqcheckbox.h> +#include <tqbuttongroup.h> +#include <tqlineedit.h> +#include <tqradiobutton.h> +#include <tqlistbox.h> +#include <tqwhatsthis.h> #include <kdebug.h> #include <klocale.h> @@ -46,18 +46,18 @@ #include "filtereditdialog.h" #include "filtereditdialog.moc" -FilterEditDialog::FilterEditDialog( QPtrList<CalFilter> *filters, - QWidget *parent, const char *name) +FilterEditDialog::FilterEditDialog( TQPtrList<CalFilter> *filters, + TQWidget *parent, const char *name) : KDialogBase( parent, name, false, i18n("Edit Calendar Filters"), Ok | Apply | Cancel ) { setMainWidget( mFilterEdit = new FilterEdit(filters, this)); - connect(mFilterEdit, SIGNAL(dataConsistent(bool)), - SLOT(setDialogConsistent(bool))); + connect(mFilterEdit, TQT_SIGNAL(dataConsistent(bool)), + TQT_SLOT(setDialogConsistent(bool))); updateFilterList(); - connect( mFilterEdit, SIGNAL( editCategories() ), SIGNAL( editCategories() ) ); - connect( mFilterEdit, SIGNAL( filterChanged() ), SIGNAL( filterChanged() ) ); + connect( mFilterEdit, TQT_SIGNAL( editCategories() ), TQT_SIGNAL( editCategories() ) ); + connect( mFilterEdit, TQT_SIGNAL( filterChanged() ), TQT_SIGNAL( filterChanged() ) ); } FilterEditDialog::~FilterEditDialog() @@ -92,18 +92,18 @@ void FilterEditDialog::setDialogConsistent(bool consistent) { enableButtonApply( consistent ); } -FilterEdit::FilterEdit(QPtrList<CalFilter> *filters, QWidget *parent) +FilterEdit::FilterEdit(TQPtrList<CalFilter> *filters, TQWidget *parent) : FilterEdit_base( parent), current(0), mCategorySelectDialog( 0 ) { mFilters = filters; - QWhatsThis::add( mNewButton, i18n( "Press this button to define a new filter." ) ); - QWhatsThis::add( mDeleteButton, i18n( "Press this button to remove the currently active filter." ) ); + TQWhatsThis::add( mNewButton, i18n( "Press this button to define a new filter." ) ); + TQWhatsThis::add( mDeleteButton, i18n( "Press this button to remove the currently active filter." ) ); - connect( mRulesList, SIGNAL(selectionChanged()), this, SLOT(filterSelected()) ); - connect( mNewButton, SIGNAL( clicked() ), SLOT( bNewPressed() ) ); - connect( mDeleteButton, SIGNAL( clicked() ), SLOT( bDeletePressed() ) ); - connect( mNameLineEdit, SIGNAL( textChanged(const QString &) ), SLOT( updateSelectedName(const QString &) ) ); - connect( mCatEditButton, SIGNAL( clicked() ), SLOT( editCategorySelection() ) ); + connect( mRulesList, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(filterSelected()) ); + connect( mNewButton, TQT_SIGNAL( clicked() ), TQT_SLOT( bNewPressed() ) ); + connect( mDeleteButton, TQT_SIGNAL( clicked() ), TQT_SLOT( bDeletePressed() ) ); + connect( mNameLineEdit, TQT_SIGNAL( textChanged(const TQString &) ), TQT_SLOT( updateSelectedName(const TQString &) ) ); + connect( mCatEditButton, TQT_SIGNAL( clicked() ), TQT_SLOT( editCategorySelection() ) ); } FilterEdit::~FilterEdit() { @@ -151,7 +151,7 @@ void FilterEdit::saveChanges() current->setCriteria( criteria ); current->setCompletedTimeSpan( mCompletedTimeSpan->value() ); - QStringList categoryList; + TQStringList categoryList; for( uint i = 0; i < mCatList->count(); ++i ) categoryList.append( mCatList->text( i ) ); current->setCategoryList( categoryList ); @@ -211,7 +211,7 @@ void FilterEdit::bDeletePressed() { emit filterChanged(); } -void FilterEdit::updateSelectedName(const QString &newText) { +void FilterEdit::updateSelectedName(const TQString &newText) { mRulesList->blockSignals( true ); mRulesList->changeItem(newText, mRulesList->currentItem()); mRulesList->blockSignals( false ); @@ -231,10 +231,10 @@ void FilterEdit::editCategorySelection() if ( !mCategorySelectDialog ) { mCategorySelectDialog = new KPIM::CategorySelectDialog( KOPrefs::instance(), this, "filterCatSelect" ); connect( mCategorySelectDialog, - SIGNAL( categoriesSelected( const QStringList & ) ), - SLOT( updateCategorySelection( const QStringList & ) ) ); - connect( mCategorySelectDialog, SIGNAL( editCategories() ), - SIGNAL( editCategories() ) ); + TQT_SIGNAL( categoriesSelected( const TQStringList & ) ), + TQT_SLOT( updateCategorySelection( const TQStringList & ) ) ); + connect( mCategorySelectDialog, TQT_SIGNAL( editCategories() ), + TQT_SIGNAL( editCategories() ) ); } mCategorySelectDialog->setSelected( current->categoryList() ); @@ -242,7 +242,7 @@ void FilterEdit::editCategorySelection() mCategorySelectDialog->show(); } -void FilterEdit::updateCategorySelection( const QStringList &categories ) +void FilterEdit::updateCategorySelection( const TQStringList &categories ) { mCatList->clear(); mCatList->insertStringList(categories); diff --git a/korganizer/filtereditdialog.h b/korganizer/filtereditdialog.h index b7f061b1c..b726e169f 100644 --- a/korganizer/filtereditdialog.h +++ b/korganizer/filtereditdialog.h @@ -46,7 +46,7 @@ class FilterEditDialog : public KDialogBase { Q_OBJECT public: - FilterEditDialog(QPtrList<CalFilter> *,QWidget *parent=0, const char *name=0); + FilterEditDialog(TQPtrList<CalFilter> *,TQWidget *parent=0, const char *name=0); virtual ~FilterEditDialog(); signals: @@ -70,7 +70,7 @@ class FilterEdit : public FilterEdit_base { Q_OBJECT public: - FilterEdit(QPtrList<CalFilter> *filters, QWidget *parent); + FilterEdit(TQPtrList<CalFilter> *filters, TQWidget *parent); ~FilterEdit(); void updateFilterList(); @@ -86,14 +86,14 @@ class FilterEdit : public FilterEdit_base void filterSelected(); void bNewPressed(); void bDeletePressed(); - void updateSelectedName(const QString &); - void updateCategorySelection(const QStringList &categories); + void updateSelectedName(const TQString &); + void updateCategorySelection(const TQStringList &categories); void editCategorySelection(); private: void filterSelected(CalFilter *f); - QPtrList<CalFilter> *mFilters; + TQPtrList<CalFilter> *mFilters; CalFilter *current; KPIM::CategorySelectDialog *mCategorySelectDialog; }; diff --git a/korganizer/freebusymanager.cpp b/korganizer/freebusymanager.cpp index fdb4f531b..81b65a3b7 100644 --- a/korganizer/freebusymanager.cpp +++ b/korganizer/freebusymanager.cpp @@ -61,25 +61,25 @@ #include <kabc/stdaddressbook.h> #include <kabc/addressee.h> -#include <qfile.h> -#include <qbuffer.h> -#include <qregexp.h> -#include <qdir.h> +#include <tqfile.h> +#include <tqbuffer.h> +#include <tqregexp.h> +#include <tqdir.h> #define DEBUG_5850 kdDebug(5850) using namespace KCal; -FreeBusyDownloadJob::FreeBusyDownloadJob( const QString &email, const KURL &url, +FreeBusyDownloadJob::FreeBusyDownloadJob( const TQString &email, const KURL &url, FreeBusyManager *manager, const char *name ) - : QObject( manager, name ), mManager( manager ), mEmail( email ) + : TQObject( manager, name ), mManager( manager ), mEmail( email ) { KIO::TransferJob *job = KIO::get( url, false, false ); - connect( job, SIGNAL( result( KIO::Job * ) ), - SLOT( slotResult( KIO::Job * ) ) ); - connect( job, SIGNAL( data( KIO::Job *, const QByteArray & ) ), - SLOT( slotData( KIO::Job *, const QByteArray & ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job * ) ), + TQT_SLOT( slotResult( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ), + TQT_SLOT( slotData( KIO::Job *, const TQByteArray & ) ) ); KIO::Scheduler::scheduleJob( job ); } @@ -88,9 +88,9 @@ FreeBusyDownloadJob::~FreeBusyDownloadJob() } -void FreeBusyDownloadJob::slotData( KIO::Job *, const QByteArray &data ) +void FreeBusyDownloadJob::slotData( KIO::Job *, const TQByteArray &data ) { - QByteArray tmp = data; + TQByteArray tmp = data; tmp.resize( tmp.size() + 1 ); tmp[tmp.size()-1] = 0; mFreeBusyData += tmp; @@ -117,8 +117,8 @@ void FreeBusyDownloadJob::slotResult( KIO::Job *job ) //// -FreeBusyManager::FreeBusyManager( QObject *parent, const char *name ) - : QObject( parent, name ), +FreeBusyManager::FreeBusyManager( TQObject *parent, const char *name ) + : TQObject( parent, name ), mCalendar( 0 ), mTimerID( 0 ), mUploadingFreeBusy( false ), mBrokenUrl( false ) { @@ -134,8 +134,8 @@ void FreeBusyManager::setCalendar( KCal::Calendar *c ) KCal::FreeBusy *FreeBusyManager::ownerFreeBusy() { - QDateTime start = QDateTime::currentDateTime(); - QDateTime end = start.addDays( KOPrefs::instance()->mFreeBusyPublishDays ); + TQDateTime start = TQDateTime::currentDateTime(); + TQDateTime end = start.addDays( KOPrefs::instance()->mFreeBusyPublishDays ); FreeBusy *freebusy = new FreeBusy( mCalendar, start, end ); freebusy->setOrganizer( Person( KOPrefs::instance()->fullName(), @@ -144,18 +144,18 @@ KCal::FreeBusy *FreeBusyManager::ownerFreeBusy() return freebusy; } -QString FreeBusyManager::ownerFreeBusyAsString() +TQString FreeBusyManager::ownerFreeBusyAsString() { FreeBusy *freebusy = ownerFreeBusy(); - QString result = freeBusyToIcal( freebusy ); + TQString result = freeBusyToIcal( freebusy ); delete freebusy; return result; } -QString FreeBusyManager::freeBusyToIcal( KCal::FreeBusy *freebusy ) +TQString FreeBusyManager::freeBusyToIcal( KCal::FreeBusy *freebusy ) { return mFormat.createScheduleMessage( freebusy, Scheduler::Publish ); } @@ -170,13 +170,13 @@ void FreeBusyManager::slotPerhapsUploadFB() // A timer is already running, so we don't need to do anything return; - int now = static_cast<int>( QDateTime::currentDateTime().toTime_t() ); + int now = static_cast<int>( TQDateTime::currentDateTime().toTime_t() ); int eta = static_cast<int>( mNextUploadTime.toTime_t() ) - now; if( !mUploadingFreeBusy ) { // Not currently uploading if( mNextUploadTime.isNull() || - QDateTime::currentDateTime() > mNextUploadTime ) { + TQDateTime::currentDateTime() > mNextUploadTime ) { // No uploading have been done in this session, or delay time is over publishFreeBusy(); return; @@ -205,7 +205,7 @@ void FreeBusyManager::slotPerhapsUploadFB() } // This is used for delayed Free/Busy list uploading -void FreeBusyManager::timerEvent( QTimerEvent* ) +void FreeBusyManager::timerEvent( TQTimerEvent* ) { publishFreeBusy(); } @@ -245,11 +245,11 @@ void FreeBusyManager::publishFreeBusy() } // // Substitute %u and %d [FIXME] -// QString defaultEmail = KOCore()::self()->email(); +// TQString defaultEmail = KOCore()::self()->email(); // int emailpos = defaultEmail.find( '@' ); // if (emailpos != -1) { -// const QString emailName = defaultEmail.left( emailpos ); -// const QString emailHost = defaultEmail.mid( emailpos + 1 ); +// const TQString emailName = defaultEmail.left( emailpos ); +// const TQString emailHost = defaultEmail.mid( emailpos + 1 ); // targetURL = targetURL.url().replace("%25u", emailName, true); // targetURL = targetURL.url().replace("%25d", emailHost, true); // } @@ -265,34 +265,34 @@ void FreeBusyManager::publishFreeBusy() } // Save the time of the next free/busy uploading - mNextUploadTime = QDateTime::currentDateTime(); + mNextUploadTime = TQDateTime::currentDateTime(); if( KOPrefs::instance()->mFreeBusyPublishDelay > 0 ) mNextUploadTime = mNextUploadTime.addSecs( KOPrefs::instance()->mFreeBusyPublishDelay * 60 ); - QString messageText = ownerFreeBusyAsString(); + TQString messageText = ownerFreeBusyAsString(); // We need to massage the list a bit so that Outlook understands // it. - messageText = messageText.replace( QRegExp( "ORGANIZER\\s*:MAILTO:" ), + messageText = messageText.replace( TQRegExp( "ORGANIZER\\s*:MAILTO:" ), "ORGANIZER:" ); // Create a local temp file and save the message to it KTempFile tempFile; - QTextStream *textStream = tempFile.textStream(); + TQTextStream *textStream = tempFile.textStream(); if( textStream ) { *textStream << messageText; tempFile.close(); #if 0 - QString defaultEmail = KOCore()::self()->email(); - QString emailHost = defaultEmail.mid( defaultEmail.find( '@' ) + 1 ); + TQString defaultEmail = KOCore()::self()->email(); + TQString emailHost = defaultEmail.mid( defaultEmail.find( '@' ) + 1 ); // Put target string together KURL targetURL; if( KOPrefs::instance()->mPublishKolab ) { // we use Kolab - QString server; + TQString server; if( KOPrefs::instance()->mPublishKolabServer == "%SERVER%" || KOPrefs::instance()->mPublishKolabServer.isEmpty() ) server = emailHost; @@ -302,7 +302,7 @@ void FreeBusyManager::publishFreeBusy() targetURL.setProtocol( "webdavs" ); targetURL.setHost( server ); - QString fbname = KOPrefs::instance()->mPublishUserName; + TQString fbname = KOPrefs::instance()->mPublishUserName; int at = fbname.find('@'); if( at > 1 && fbname.length() > (uint)at ) { fbname = fbname.left(at); @@ -329,8 +329,8 @@ void FreeBusyManager::publishFreeBusy() true /*overwrite*/, false /*don't resume*/, false /*don't show progress info*/ ); - connect( job, SIGNAL( result( KIO::Job * ) ), - SLOT( slotUploadFreeBusyResult( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job * ) ), + TQT_SLOT( slotUploadFreeBusyResult( KIO::Job * ) ) ); } } @@ -349,11 +349,11 @@ void FreeBusyManager::slotUploadFreeBusyResult(KIO::Job *_job) KURL src = job->srcURL(); Q_ASSERT( src.isLocalFile() ); if( src.isLocalFile() ) - QFile::remove(src.path()); + TQFile::remove(src.path()); mUploadingFreeBusy = false; } -bool FreeBusyManager::retrieveFreeBusy( const QString &email, bool forceDownload ) +bool FreeBusyManager::retrieveFreeBusy( const TQString &email, bool forceDownload ) { DEBUG_5850 << "FreeBusyManager::retrieveFreeBusy(): " << email << endl; if ( email.isEmpty() ) return false; @@ -381,7 +381,7 @@ bool FreeBusyManager::processRetrieveQueue() { if ( mRetrieveQueue.isEmpty() ) return true; - QString email = mRetrieveQueue.first(); + TQString email = mRetrieveQueue.first(); mRetrieveQueue.pop_front(); KURL sourceURL = freeBusyUrl( email ); @@ -397,20 +397,20 @@ bool FreeBusyManager::processRetrieveQueue() FreeBusyDownloadJob *job = new FreeBusyDownloadJob( email, sourceURL, this, "freebusy_download_job" ); - connect( job, SIGNAL( freeBusyDownloaded( KCal::FreeBusy *, - const QString & ) ), - SIGNAL( freeBusyRetrieved( KCal::FreeBusy *, const QString & ) ) ); - connect( job, SIGNAL( freeBusyDownloaded( KCal::FreeBusy *, - const QString & ) ), - SLOT( processRetrieveQueue() ) ); + connect( job, TQT_SIGNAL( freeBusyDownloaded( KCal::FreeBusy *, + const TQString & ) ), + TQT_SIGNAL( freeBusyRetrieved( KCal::FreeBusy *, const TQString & ) ) ); + connect( job, TQT_SIGNAL( freeBusyDownloaded( KCal::FreeBusy *, + const TQString & ) ), + TQT_SLOT( processRetrieveQueue() ) ); - connect( job, SIGNAL( freeBusyDownloadError( const QString& ) ), - this, SLOT( slotFreeBusyDownloadError( const QString& ) ) ); + connect( job, TQT_SIGNAL( freeBusyDownloadError( const TQString& ) ), + this, TQT_SLOT( slotFreeBusyDownloadError( const TQString& ) ) ); return true; } -void FreeBusyManager::slotFreeBusyDownloadError( const QString& email ) +void FreeBusyManager::slotFreeBusyDownloadError( const TQString& email ) { if( KOPrefs::instance()->thatIsMe( email ) ) { // We tried to download our own free-busy list from the net, but it failed @@ -429,16 +429,16 @@ void FreeBusyManager::cancelRetrieval() mRetrieveQueue.clear(); } -KURL FreeBusyManager::freeBusyUrl( const QString &email ) +KURL FreeBusyManager::freeBusyUrl( const TQString &email ) { DEBUG_5850 << "FreeBusyManager::freeBusyUrl(): " << email << endl; // First check if there is a specific FB url for this email - QString configFile = locateLocal( "data", "korganizer/freebusyurls" ); + TQString configFile = locateLocal( "data", "korganizer/freebusyurls" ); KConfig cfg( configFile ); cfg.setGroup( email ); - QString url = cfg.readEntry( "url" ); + TQString url = cfg.readEntry( "url" ); if ( !url.isEmpty() ) { DEBUG_5850 << "found cached url: " << url << endl; return KURL( url ); @@ -446,7 +446,7 @@ KURL FreeBusyManager::freeBusyUrl( const QString &email ) // Try with the url configurated by preferred email in kaddressbook KABC::Addressee::List list= KABC::StdAddressBook::self( true )->findByEmail( email ); KABC::Addressee::List::Iterator it; - QString pref; + TQString pref; for ( it = list.begin(); it != list.end(); ++it ) { pref = (*it).preferredEmail(); if ( !pref.isEmpty() && pref != email ) { @@ -476,8 +476,8 @@ KURL FreeBusyManager::freeBusyUrl( const QString &email ) } // Cut off everything left of the @ sign to get the user name. - const QString emailName = email.left( emailpos ); - const QString emailHost = email.mid( emailpos + 1 ); + const TQString emailName = email.left( emailpos ); + const TQString emailHost = email.mid( emailpos + 1 ); // Build the URL KURL sourceURL; @@ -486,7 +486,7 @@ KURL FreeBusyManager::freeBusyUrl( const QString &email ) if ( KOPrefs::instance()->mFreeBusyCheckHostname ) { // Don't try to fetch free/busy data for users not on the specified servers // This tests if the hostnames match, or one is a subset of the other - const QString hostDomain = sourceURL.host(); + const TQString hostDomain = sourceURL.host(); if ( hostDomain != emailHost && !hostDomain.endsWith( '.' + emailHost ) && !emailHost.endsWith( '.' + hostDomain ) ) { // Host names do not match @@ -524,12 +524,12 @@ KURL FreeBusyManager::freeBusyUrl( const QString &email ) } } -KCal::FreeBusy *FreeBusyManager::iCalToFreeBusy( const QCString &data ) +KCal::FreeBusy *FreeBusyManager::iCalToFreeBusy( const TQCString &data ) { DEBUG_5850 << "FreeBusyManager::iCalToFreeBusy()" << endl; DEBUG_5850 << data << endl; - QString freeBusyVCal = QString::fromUtf8( data ); + TQString freeBusyVCal = TQString::fromUtf8( data ); KCal::FreeBusy *fb = mFormat.parseFreeBusy( freeBusyVCal ); if ( !fb ) { DEBUG_5850 << "FreeBusyManager::iCalToFreeBusy(): Error parsing free/busy" @@ -539,18 +539,18 @@ KCal::FreeBusy *FreeBusyManager::iCalToFreeBusy( const QCString &data ) return fb; } -QString FreeBusyManager::freeBusyDir() +TQString FreeBusyManager::freeBusyDir() { return locateLocal( "data", "korganizer/freebusy" ); } -FreeBusy *FreeBusyManager::loadFreeBusy( const QString &email ) +FreeBusy *FreeBusyManager::loadFreeBusy( const TQString &email ) { DEBUG_5850 << "FreeBusyManager::loadFreeBusy(): " << email << endl; - QString fbd = freeBusyDir(); + TQString fbd = freeBusyDir(); - QFile f( fbd + "/" + email + ".ifb" ); + TQFile f( fbd + "/" + email + ".ifb" ); if ( !f.exists() ) { DEBUG_5850 << "FreeBusyManager::loadFreeBusy() " << f.name() << " doesn't exist." << endl; @@ -563,8 +563,8 @@ FreeBusy *FreeBusyManager::loadFreeBusy( const QString &email ) return 0; } - QTextStream ts( &f ); - QString str = ts.read(); + TQTextStream ts( &f ); + TQString str = ts.read(); return iCalToFreeBusy( str.utf8() ); } @@ -573,9 +573,9 @@ bool FreeBusyManager::saveFreeBusy( FreeBusy *freebusy, const Person &person ) { DEBUG_5850 << "FreeBusyManager::saveFreeBusy(): " << person.fullName() << endl; - QString fbd = freeBusyDir(); + TQString fbd = freeBusyDir(); - QDir freeBusyDirectory( fbd ); + TQDir freeBusyDirectory( fbd ); if ( !freeBusyDirectory.exists() ) { DEBUG_5850 << "Directory " << fbd << " does not exist!" << endl; DEBUG_5850 << "Creating directory: " << fbd << endl; @@ -586,11 +586,11 @@ bool FreeBusyManager::saveFreeBusy( FreeBusy *freebusy, const Person &person ) } } - QString filename( fbd ); + TQString filename( fbd ); filename += "/"; filename += person.email(); filename += ".ifb"; - QFile f( filename ); + TQFile f( filename ); DEBUG_5850 << "FreeBusyManager::saveFreeBusy(): filename: " << filename << endl; @@ -598,7 +598,7 @@ bool FreeBusyManager::saveFreeBusy( FreeBusy *freebusy, const Person &person ) freebusy->clearAttendees(); freebusy->setOrganizer( person ); - QString messageText = mFormat.createScheduleMessage( freebusy, + TQString messageText = mFormat.createScheduleMessage( freebusy, Scheduler::Publish ); if ( !f.open( IO_ReadWrite ) ) { @@ -606,7 +606,7 @@ bool FreeBusyManager::saveFreeBusy( FreeBusy *freebusy, const Person &person ) << endl; return false; } - QTextStream t( &f ); + TQTextStream t( &f ); t << messageText; f.close(); diff --git a/korganizer/freebusymanager.h b/korganizer/freebusymanager.h index c51af125b..a91d9f36d 100644 --- a/korganizer/freebusymanager.h +++ b/korganizer/freebusymanager.h @@ -39,8 +39,8 @@ #include <kurl.h> #include <libkcal/icalformat.h> #include <libkcal/freebusycache.h> -#include <qstring.h> -#include <qobject.h> +#include <tqstring.h> +#include <tqobject.h> namespace KIO { class Job; } namespace KCal { @@ -56,31 +56,31 @@ class FreeBusyDownloadJob : public QObject { Q_OBJECT public: - FreeBusyDownloadJob( const QString &email, const KURL &url, + FreeBusyDownloadJob( const TQString &email, const KURL &url, FreeBusyManager *manager, const char *name = 0 ); virtual ~FreeBusyDownloadJob(); protected slots: void slotResult( KIO::Job * ); - void slotData( KIO::Job *, const QByteArray &data ); + void slotData( KIO::Job *, const TQByteArray &data ); signals: - void freeBusyDownloaded( KCal::FreeBusy *, const QString& email ); - void freeBusyDownloadError( const QString& email ); + void freeBusyDownloaded( KCal::FreeBusy *, const TQString& email ); + void freeBusyDownloadError( const TQString& email ); private: FreeBusyManager *mManager; - QString mEmail; + TQString mEmail; - QCString mFreeBusyData; + TQCString mFreeBusyData; }; -class FreeBusyManager : public QObject, public KCal::FreeBusyCache +class FreeBusyManager : public TQObject, public KCal::FreeBusyCache { Q_OBJECT public: - FreeBusyManager( QObject *parent, const char *name ); + FreeBusyManager( TQObject *parent, const char *name ); void setCalendar( KCal::Calendar * ); @@ -91,35 +91,35 @@ class FreeBusyManager : public QObject, public KCal::FreeBusyCache KOrganizer downloads somebody else's free/busy list The call is asynchronous, and upon download, the receivers slot specified by member will be called. - The slot should be of type "member(const QString&, KCal::FreeBusy*)" + The slot should be of type "member(const TQString&, KCal::FreeBusy*)" Return true if a download is initiated, and false otherwise */ - bool retrieveFreeBusy( const QString &email, bool forceDownload ); + bool retrieveFreeBusy( const TQString &email, bool forceDownload ); void cancelRetrieval(); - KCal::FreeBusy *iCalToFreeBusy( const QCString &data ); + KCal::FreeBusy *iCalToFreeBusy( const TQCString &data ); /** Load freebusy information belonging to email. */ - KCal::FreeBusy *loadFreeBusy( const QString &email ); + KCal::FreeBusy *loadFreeBusy( const TQString &email ); /** Store freebusy information belonging to email. */ bool saveFreeBusy( KCal::FreeBusy *freebusy, const KCal::Person &person ); -// bool saveFreeBusy( KCal::FreeBusy *, const QString &email ); +// bool saveFreeBusy( KCal::FreeBusy *, const TQString &email ); /** Return URL of freeBusy information for given email address. */ - KURL freeBusyUrl( const QString &email ); + KURL freeBusyUrl( const TQString &email ); /** Return directory used for stroing free/busy information. */ - QString freeBusyDir(); + TQString freeBusyDir(); /** Change the broken Url status @@ -135,15 +135,15 @@ class FreeBusyManager : public QObject, public KCal::FreeBusyCache /** This signal is emitted to return results of free/busy requests. */ - void freeBusyRetrieved( KCal::FreeBusy *, const QString &email ); + void freeBusyRetrieved( KCal::FreeBusy *, const TQString &email ); protected: - void timerEvent( QTimerEvent* ); + void timerEvent( TQTimerEvent* ); /** Return free/busy list of calendar owner as iCalendar string. */ - QString ownerFreeBusyAsString(); + TQString ownerFreeBusyAsString(); /** Return free/busy list of calendar owner. @@ -153,23 +153,23 @@ class FreeBusyManager : public QObject, public KCal::FreeBusyCache /** Convert free/busy object to iCalendar string. */ - QString freeBusyToIcal( KCal::FreeBusy * ); + TQString freeBusyToIcal( KCal::FreeBusy * ); protected slots: bool processRetrieveQueue(); private slots: void slotUploadFreeBusyResult( KIO::Job * ); - void slotFreeBusyDownloadError( const QString& email ); + void slotFreeBusyDownloadError( const TQString& email ); private: KCal::Calendar *mCalendar; KCal::ICalFormat mFormat; - QStringList mRetrieveQueue; + TQStringList mRetrieveQueue; // Free/Busy uploading - QDateTime mNextUploadTime; + TQDateTime mNextUploadTime; int mTimerID; bool mUploadingFreeBusy; bool mBrokenUrl; diff --git a/korganizer/freebusyurldialog.cpp b/korganizer/freebusyurldialog.cpp index 39e4c14ed..61165545d 100644 --- a/korganizer/freebusyurldialog.cpp +++ b/korganizer/freebusyurldialog.cpp @@ -32,17 +32,17 @@ #include <kdebug.h> #include <kstandarddirs.h> -#include <qlayout.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlabel.h> -FreeBusyUrlDialog::FreeBusyUrlDialog( KCal::Attendee *attendee, QWidget *parent, +FreeBusyUrlDialog::FreeBusyUrlDialog( KCal::Attendee *attendee, TQWidget *parent, const char *name ) : KDialogBase( Plain, i18n("Edit Free/Busy Location"), Ok|Cancel, Ok, parent, name, true, false ) { - QFrame *topFrame = plainPage(); + TQFrame *topFrame = plainPage(); - QBoxLayout *topLayout = new QVBoxLayout( topFrame, 0, spacingHint() ); + TQBoxLayout *topLayout = new TQVBoxLayout( topFrame, 0, spacingHint() ); mWidget = new FreeBusyUrlWidget( attendee, topFrame ); topLayout->addWidget( mWidget ); @@ -57,14 +57,14 @@ void FreeBusyUrlDialog::slotOk() } -FreeBusyUrlWidget::FreeBusyUrlWidget( KCal::Attendee *attendee, QWidget *parent, +FreeBusyUrlWidget::FreeBusyUrlWidget( KCal::Attendee *attendee, TQWidget *parent, const char *name ) - : QWidget( parent, name ), mAttendee( attendee ) + : TQWidget( parent, name ), mAttendee( attendee ) { - QBoxLayout *topLayout = new QVBoxLayout( this ); + TQBoxLayout *topLayout = new TQVBoxLayout( this ); topLayout->setSpacing( KDialog::spacingHint() ); - QLabel *label = new QLabel( + TQLabel *label = new TQLabel( i18n("Location of Free/Busy information for %1 <%2>:") .arg( mAttendee->name() ).arg( mAttendee->email() ), this ); topLayout->addWidget( label ); @@ -81,7 +81,7 @@ void FreeBusyUrlWidget::loadConfig() { kdDebug(5850) << "FreeBusyUrlWidget::loadConfig()" << endl; - QString url = KCal::FreeBusyUrlStore::self()->readUrl( mAttendee->email() ); + TQString url = KCal::FreeBusyUrlStore::self()->readUrl( mAttendee->email() ); mUrlEdit->setText( url ); } @@ -90,7 +90,7 @@ void FreeBusyUrlWidget::saveConfig() { kdDebug(5850) << "FreeBusyUrlWidget::saveConfig()" << endl; - QString url = mUrlEdit->text(); + TQString url = mUrlEdit->text(); KCal::FreeBusyUrlStore::self()->writeUrl( mAttendee->email(), url ); diff --git a/korganizer/freebusyurldialog.h b/korganizer/freebusyurldialog.h index db5cff6c0..49c77f3f8 100644 --- a/korganizer/freebusyurldialog.h +++ b/korganizer/freebusyurldialog.h @@ -37,7 +37,7 @@ class FreeBusyUrlDialog : public KDialogBase { Q_OBJECT public: - FreeBusyUrlDialog( KCal::Attendee *, QWidget *parent = 0, + FreeBusyUrlDialog( KCal::Attendee *, TQWidget *parent = 0, const char *name = 0 ); public slots: @@ -51,7 +51,7 @@ class FreeBusyUrlWidget : public QWidget { Q_OBJECT public: - FreeBusyUrlWidget( KCal::Attendee *, QWidget *parent = 0, + FreeBusyUrlWidget( KCal::Attendee *, TQWidget *parent = 0, const char *name = 0 ); ~FreeBusyUrlWidget(); diff --git a/korganizer/history.cpp b/korganizer/history.cpp index 5afc325e7..6207ebec9 100644 --- a/korganizer/history.cpp +++ b/korganizer/history.cpp @@ -57,7 +57,7 @@ void History::undo() entry = mUndoEntry.current(); if ( entry ) emit undoAvailable( entry->text() ); - else emit undoAvailable( QString::null ); + else emit undoAvailable( TQString::null ); } void History::redo() @@ -76,7 +76,7 @@ void History::redo() entry = mRedoEntry.current(); if ( entry ) emit redoAvailable( entry->text() ); - else emit redoAvailable( QString::null ); + else emit redoAvailable( TQString::null ); } void History::truncate() @@ -84,8 +84,8 @@ void History::truncate() while ( mUndoEntry.current() != mEntries.last() ) { mEntries.removeLast(); } - mRedoEntry = QPtrList<Entry>( mEntries ); - emit redoAvailable( QString::null ); + mRedoEntry = TQPtrList<Entry>( mEntries ); + emit redoAvailable( TQString::null ); } void History::recordDelete( Incidence *incidence ) @@ -97,7 +97,7 @@ void History::recordDelete( Incidence *incidence ) truncate(); mEntries.append( entry ); mUndoEntry.toLast(); - mRedoEntry = QPtrList<Entry>( mEntries ); + mRedoEntry = TQPtrList<Entry>( mEntries ); emit undoAvailable( entry->text() ); } } @@ -111,7 +111,7 @@ void History::recordAdd( Incidence *incidence ) truncate(); mEntries.append( entry ); mUndoEntry.toLast(); - mRedoEntry = QPtrList<Entry>( mEntries ); + mRedoEntry = TQPtrList<Entry>( mEntries ); emit undoAvailable( entry->text() ); } } @@ -125,12 +125,12 @@ void History::recordEdit( Incidence *oldIncidence, Incidence *newIncidence ) truncate(); mEntries.append( entry ); mUndoEntry.toLast(); - mRedoEntry = QPtrList<Entry>( mEntries ); + mRedoEntry = TQPtrList<Entry>( mEntries ); emit undoAvailable( entry->text() ); } } -void History::startMultiModify( const QString &description ) +void History::startMultiModify( const TQString &description ) { if ( mCurrentMultiEntry ) { endMultiModify(); @@ -139,7 +139,7 @@ void History::startMultiModify( const QString &description ) truncate(); mEntries.append( mCurrentMultiEntry ); mUndoEntry.toLast(); - mRedoEntry = QPtrList<Entry>( mEntries ); + mRedoEntry = TQPtrList<Entry>( mEntries ); emit undoAvailable( mCurrentMultiEntry->text() ); } @@ -180,7 +180,7 @@ void History::EntryDelete::redo() mCalendar->deleteIncidence( incidence ); } -QString History::EntryDelete::text() +TQString History::EntryDelete::text() { return i18n("Delete %1").arg(mIncidence->type()); } @@ -209,7 +209,7 @@ void History::EntryAdd::redo() mCalendar->addIncidence( mIncidence->clone() ); } -QString History::EntryAdd::text() +TQString History::EntryAdd::text() { return i18n("Add %1").arg(mIncidence->type()); } @@ -246,12 +246,12 @@ void History::EntryEdit::redo() mCalendar->addIncidence( mNewIncidence->clone() ); } -QString History::EntryEdit::text() +TQString History::EntryEdit::text() { return i18n("Edit %1").arg(mNewIncidence->type()); } -History::MultiEntry::MultiEntry( Calendar *calendar, const QString &text ) +History::MultiEntry::MultiEntry( Calendar *calendar, const TQString &text ) : Entry( calendar ), mText( text ) { mEntries.setAutoDelete( true ); @@ -268,7 +268,7 @@ void History::MultiEntry::appendEntry( Entry* entry ) void History::MultiEntry::undo() { - QPtrListIterator<Entry> it( mEntries ); + TQPtrListIterator<Entry> it( mEntries ); it.toLast(); Entry *entry; while ( (entry = it.current()) != 0 ) { @@ -279,7 +279,7 @@ void History::MultiEntry::undo() void History::MultiEntry::redo() { - QPtrListIterator<Entry> it( mEntries ); + TQPtrListIterator<Entry> it( mEntries ); Entry *entry; while ( (entry = it.current()) != 0 ) { ++it; @@ -287,7 +287,7 @@ void History::MultiEntry::redo() } } -QString History::MultiEntry::text() +TQString History::MultiEntry::text() { return mText; } diff --git a/korganizer/history.h b/korganizer/history.h index a6d6a9f6f..4e71dea14 100644 --- a/korganizer/history.h +++ b/korganizer/history.h @@ -24,8 +24,8 @@ #ifndef KORG_HISTORY_H #define KORG_HISTORY_H -#include <qobject.h> -#include <qptrlist.h> +#include <tqobject.h> +#include <tqptrlist.h> namespace KCal { @@ -46,7 +46,7 @@ class History : public QObject void recordAdd( KCal::Incidence * ); void recordEdit( KCal::Incidence *oldIncidence, KCal::Incidence *newIncidence ); - void startMultiModify( const QString &description ); + void startMultiModify( const TQString &description ); void endMultiModify(); public slots: @@ -57,8 +57,8 @@ class History : public QObject void undone(); void redone(); - void undoAvailable( const QString & ); - void redoAvailable( const QString & ); + void undoAvailable( const TQString & ); + void redoAvailable( const TQString & ); protected: void truncate(); @@ -74,7 +74,7 @@ class History : public QObject virtual void undo() = 0; virtual void redo() = 0; - virtual QString text() = 0; + virtual TQString text() = 0; protected: KCal::Calendar *mCalendar; @@ -89,7 +89,7 @@ class History : public QObject void undo(); void redo(); - QString text(); + TQString text(); private: KCal::Incidence *mIncidence; @@ -104,7 +104,7 @@ class History : public QObject void undo(); void redo(); - QString text(); + TQString text(); private: KCal::Incidence *mIncidence; @@ -120,7 +120,7 @@ class History : public QObject void undo(); void redo(); - QString text(); + TQString text(); private: KCal::Incidence *mOldIncidence; @@ -130,26 +130,26 @@ class History : public QObject class MultiEntry : public Entry { public: - MultiEntry( KCal::Calendar *calendar, const QString &text ); + MultiEntry( KCal::Calendar *calendar, const TQString &text ); ~MultiEntry(); void appendEntry( Entry* entry ); void undo(); void redo(); - QString text(); + TQString text(); private: - QPtrList<Entry> mEntries; - QString mText; + TQPtrList<Entry> mEntries; + TQString mText; }; KCal::Calendar *mCalendar; MultiEntry *mCurrentMultiEntry; - QPtrList<Entry> mEntries; - QPtrListIterator<Entry> mUndoEntry; - QPtrListIterator<Entry> mRedoEntry; + TQPtrList<Entry> mEntries; + TQPtrListIterator<Entry> mUndoEntry; + TQPtrListIterator<Entry> mRedoEntry; }; } diff --git a/korganizer/importdialog.cpp b/korganizer/importdialog.cpp index a07d0ef1c..f1181225d 100644 --- a/korganizer/importdialog.cpp +++ b/korganizer/importdialog.cpp @@ -30,36 +30,36 @@ #include <klocale.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qradiobutton.h> -#include <qbuttongroup.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqradiobutton.h> +#include <tqbuttongroup.h> using namespace KCal; -ImportDialog::ImportDialog( const KURL &url, QWidget *parent ) +ImportDialog::ImportDialog( const KURL &url, TQWidget *parent ) : KDialogBase( Plain, i18n("Import Calendar"), Ok | Cancel, Ok, parent, 0, true, true ), mUrl( url ) { - QFrame *topFrame = plainPage(); - QVBoxLayout *topLayout = new QVBoxLayout( topFrame, 0, spacingHint() ); + TQFrame *topFrame = plainPage(); + TQVBoxLayout *topLayout = new TQVBoxLayout( topFrame, 0, spacingHint() ); - QString txt = i18n("Import calendar at '%1' into KOrganizer.") + TQString txt = i18n("Import calendar at '%1' into KOrganizer.") .arg( mUrl.prettyURL() ); - topLayout->addWidget( new QLabel( txt, topFrame ) ); + topLayout->addWidget( new TQLabel( txt, topFrame ) ); - QButtonGroup *radioBox = new QButtonGroup( 1, Horizontal, topFrame ); + TQButtonGroup *radioBox = new TQButtonGroup( 1, Horizontal, topFrame ); radioBox->setFlat( true ); topLayout->addWidget( radioBox ); - mAddButton = new QRadioButton( i18n("Add as new calendar"), radioBox ); + mAddButton = new TQRadioButton( i18n("Add as new calendar"), radioBox ); - mMergeButton = new QRadioButton( i18n("Merge into existing calendar"), + mMergeButton = new TQRadioButton( i18n("Merge into existing calendar"), radioBox ); - mOpenButton = new QRadioButton( i18n("Open in separate window"), radioBox ); + mOpenButton = new TQRadioButton( i18n("Open in separate window"), radioBox ); mAddButton->setChecked( true ); } diff --git a/korganizer/importdialog.h b/korganizer/importdialog.h index a62ffb3e7..f2cf436a4 100644 --- a/korganizer/importdialog.h +++ b/korganizer/importdialog.h @@ -36,7 +36,7 @@ class ImportDialog : public KDialogBase { Q_OBJECT public: - ImportDialog( const KURL &url, QWidget *parent ); + ImportDialog( const KURL &url, TQWidget *parent ); ~ImportDialog(); public slots: @@ -51,9 +51,9 @@ class ImportDialog : public KDialogBase private: KURL mUrl; - QRadioButton *mAddButton; - QRadioButton *mMergeButton; - QRadioButton *mOpenButton; + TQRadioButton *mAddButton; + TQRadioButton *mMergeButton; + TQRadioButton *mOpenButton; }; #endif diff --git a/korganizer/incidencechanger.cpp b/korganizer/incidencechanger.cpp index d440f0842..623eaa944 100644 --- a/korganizer/incidencechanger.cpp +++ b/korganizer/incidencechanger.cpp @@ -97,10 +97,10 @@ kdDebug(5850)<<"IncidenceChanger::deleteIncidence for incidence \""<<incidence-> emit incidenceToBeDeleted( incidence ); doDelete = mCalendar->deleteIncidence( incidence ); if ( !KOPrefs::instance()->thatIsMe( tmp->organizer().email() ) ) { - const QStringList myEmails = KOPrefs::instance()->allEmails(); + const TQStringList myEmails = KOPrefs::instance()->allEmails(); bool notifyOrganizer = false; - for ( QStringList::ConstIterator it = myEmails.begin(); it != myEmails.end(); ++it ) { - QString email = *it; + for ( TQStringList::ConstIterator it = myEmails.begin(); it != myEmails.end(); ++it ) { + TQString email = *it; Attendee *me = tmp->attendeeByMail(email); if ( me ) { if ( me->status() == KCal::Attendee::Accepted || me->status() == KCal::Attendee::Delegated ) @@ -314,7 +314,7 @@ kdDebug(5850)<<"IncidenceChanger::changeIncidence for incidence \""<<newinc->sum return true; } -bool IncidenceChanger::addIncidence( Incidence *incidence, QWidget *parent ) +bool IncidenceChanger::addIncidence( Incidence *incidence, TQWidget *parent ) { kdDebug(5850)<<"IncidenceChanger::addIncidence for incidence \""<<incidence->summary()<<"\""<<endl; if ( KOPrefs::instance()->mUseGroupwareCommunication ) { @@ -329,7 +329,7 @@ kdDebug(5850)<<"IncidenceChanger::addIncidence for incidence \""<<incidence->sum // in the calendar, only in the CalendarResources::DestinationPolicy // So we need to type-cast it and extract it from the CalendarResources CalendarResources *stdcal = dynamic_cast<CalendarResources*>(mCalendar); - QWidget *tmpparent = 0; + TQWidget *tmpparent = 0; if ( stdcal ) { tmpparent = stdcal->dialogParentWidget(); stdcal->setDialogParentWidget( parent ); diff --git a/korganizer/incidencechanger.h b/korganizer/incidencechanger.h index 0b1ed4cb2..1423b4888 100644 --- a/korganizer/incidencechanger.h +++ b/korganizer/incidencechanger.h @@ -30,14 +30,14 @@ class IncidenceChanger : public KOrg::IncidenceChangerBase { Q_OBJECT public: - IncidenceChanger( Calendar*cal, QObject *parent ) : IncidenceChangerBase( cal, parent ) {} + IncidenceChanger( Calendar*cal, TQObject *parent ) : IncidenceChangerBase( cal, parent ) {} ~IncidenceChanger() {} bool beginChange( Incidence * incidence ); bool sendGroupwareMessage( Incidence *incidence, KCal::Scheduler::Method method, bool deleting = false ); bool endChange( Incidence *incidence ); - bool addIncidence( Incidence *incidence, QWidget *parent = 0 ); + bool addIncidence( Incidence *incidence, TQWidget *parent = 0 ); bool changeIncidence( Incidence *oldinc, Incidence *newinc, int action = -1 ); bool deleteIncidence( Incidence *incidence ); diff --git a/korganizer/interfaces/calendar/calendardecoration.h b/korganizer/interfaces/calendar/calendardecoration.h index a6f487b7b..1653edb48 100644 --- a/korganizer/interfaces/calendar/calendardecoration.h +++ b/korganizer/interfaces/calendar/calendardecoration.h @@ -21,9 +21,9 @@ #ifndef KORG_CALENDARDECORATION_H #define KORG_CALENDARDECORATION_H -#include <qstring.h> -#include <qdatetime.h> -#include <qpixmap.h> +#include <tqstring.h> +#include <tqdatetime.h> +#include <tqpixmap.h> #include <klibloader.h> @@ -41,9 +41,9 @@ class CalendarDecoration : public Plugin { public: static int interfaceVersion() { return 2; } - static QString serviceType() { return "Calendar/Decoration"; } + static TQString serviceType() { return "Calendar/Decoration"; } - typedef QPtrList<CalendarDecoration> List; + typedef TQPtrList<CalendarDecoration> List; CalendarDecoration() {} virtual ~CalendarDecoration() {} @@ -51,26 +51,26 @@ class CalendarDecoration : public Plugin /** Return a short text for a given date, ususally only a few words. */ - virtual QString shortText( const QDate & ) { return QString::null; } + virtual TQString shortText( const TQDate & ) { return TQString::null; } /** Return along text for a given date. This text can be of any length, but usually it will have one or a few paragraphs. */ - virtual QString longText( const QDate & ) { return QString::null; } + virtual TQString longText( const TQDate & ) { return TQString::null; } /** Return a small pixmap. The size should be something like 30x30 pixels. */ - virtual QPixmap smallPixmap( const QDate &) { return QPixmap(); } + virtual TQPixmap smallPixmap( const TQDate &) { return TQPixmap(); } /** Return a large pixmap. The size should be something like 300x300 pixels. */ - virtual QPixmap largePixmap( const QDate &) { return QPixmap(); } + virtual TQPixmap largePixmap( const TQDate &) { return TQPixmap(); } /** Return a small widget. It should have the size of a pushbutton. */ - virtual QWidget *smallWidget( QWidget *, const QDate & ) { return 0; } + virtual TQWidget *smallWidget( TQWidget *, const TQDate & ) { return 0; } }; class CalendarDecorationFactory : public PluginFactory diff --git a/korganizer/interfaces/calendar/plugin.h b/korganizer/interfaces/calendar/plugin.h index 478b86468..eb0f78927 100644 --- a/korganizer/interfaces/calendar/plugin.h +++ b/korganizer/interfaces/calendar/plugin.h @@ -30,14 +30,14 @@ class Plugin { public: static int interfaceVersion() { return 2; } - static QString serviceType() { return "Calendar/Plugin"; } + static TQString serviceType() { return "Calendar/Plugin"; } Plugin() {} virtual ~Plugin() {} - virtual QString info() = 0; + virtual TQString info() = 0; - virtual void configure( QWidget * ) {} + virtual void configure( TQWidget * ) {} }; class PluginFactory : public KLibFactory @@ -46,8 +46,8 @@ class PluginFactory : public KLibFactory virtual Plugin *create() = 0; protected: - virtual QObject *createObject( QObject *, const char *,const char *, - const QStringList & ) + virtual TQObject *createObject( TQObject *, const char *,const char *, + const TQStringList & ) { return 0; } diff --git a/korganizer/interfaces/korganizer/baseview.h b/korganizer/interfaces/korganizer/baseview.h index abaa85917..64fbd72b5 100644 --- a/korganizer/interfaces/korganizer/baseview.h +++ b/korganizer/interfaces/korganizer/baseview.h @@ -22,9 +22,9 @@ #ifndef KORG_BASEVIEW_H #define KORG_BASEVIEW_H -#include <qwidget.h> -#include <qptrlist.h> -#include <qvaluelist.h> +#include <tqwidget.h> +#include <tqptrlist.h> +#include <tqvaluelist.h> #include <klocale.h> #include <kdebug.h> @@ -66,9 +66,9 @@ class KDE_EXPORT BaseView : public QWidget @param parent parent widget. @param name name of this widget. */ - BaseView( Calendar *cal, QWidget *parent = 0, + BaseView( Calendar *cal, TQWidget *parent = 0, const char *name = 0 ) - : QWidget( parent, name ), mCalendar( cal ), mChanger( 0 ) {} + : TQWidget( parent, name ), mCalendar( cal ), mChanger( 0 ) {} /** Destructor. Views will do view-specific cleanups here. @@ -117,7 +117,7 @@ class KDE_EXPORT BaseView : public QWidget @param start Start of date range. @param end End of date range. */ - virtual void showDates( const QDate &start, const QDate &end ) = 0; + virtual void showDates( const TQDate &start, const TQDate &end ) = 0; /** Show given incidences. Depending on the actual view it might not be possible to @@ -132,7 +132,7 @@ class KDE_EXPORT BaseView : public QWidget in the calendar since the last display refresh. */ virtual void updateView() = 0; - virtual void dayPassed( const QDate & ) { updateView(); } + virtual void dayPassed( const TQDate & ) { updateView(); } /** Assign a new incidence change helper object. @@ -163,7 +163,7 @@ class KDE_EXPORT BaseView : public QWidget /** Set the default start/end date/time for new events. Return true if anything was changed */ - virtual bool eventDurationHint(QDateTime &/*startDt*/, QDateTime &/*endDt*/, bool &/*allDay*/) { return false; } + virtual bool eventDurationHint(TQDateTime &/*startDt*/, TQDateTime &/*endDt*/, bool &/*allDay*/) { return false; } signals: void incidenceSelected( Incidence * ); @@ -208,12 +208,12 @@ class KDE_EXPORT BaseView : public QWidget void toggleAlarmSignal(Incidence *); /** Dissociate from a recurring incidence the occurrence on the given date to a new incidence */ - void dissociateOccurrenceSignal( Incidence *, const QDate & ); + void dissociateOccurrenceSignal( Incidence *, const TQDate & ); /** Dissociate from a recurring incidence all occurrences after the given date to a new incidence */ - void dissociateFutureOccurrenceSignal( Incidence *, const QDate & ); + void dissociateFutureOccurrenceSignal( Incidence *, const TQDate & ); - void startMultiModify( const QString & ); + void startMultiModify( const TQString & ); void endMultiModify(); /** @@ -225,23 +225,23 @@ class KDE_EXPORT BaseView : public QWidget * instructs the receiver to create a new event with the specified beginning * time. Doesn't make sense to connect to more than one receiver. */ - void newEventSignal( const QDate & ); + void newEventSignal( const TQDate & ); /** * instructs the receiver to create a new event with the specified beginning * time. Doesn't make sense to connect to more than one receiver. */ - void newEventSignal( const QDateTime & ); + void newEventSignal( const TQDateTime & ); /** * instructs the receiver to create a new event, with the specified * beginning end ending times. Doesn't make sense to connect to more * than one receiver. */ - void newEventSignal( const QDateTime &, const QDateTime & ); + void newEventSignal( const TQDateTime &, const TQDateTime & ); - void newTodoSignal( const QDate & ); + void newTodoSignal( const TQDate & ); void newSubTodoSignal( Todo * ); - void newJournalSignal( const QDate & ); + void newJournalSignal( const TQDate & ); private: Calendar *mCalendar; diff --git a/korganizer/interfaces/korganizer/calendarviewbase.h b/korganizer/interfaces/korganizer/calendarviewbase.h index fe0cd4961..02c2459bb 100644 --- a/korganizer/interfaces/korganizer/calendarviewbase.h +++ b/korganizer/interfaces/korganizer/calendarviewbase.h @@ -22,7 +22,7 @@ #ifndef KORG_CALENDARVIEWBASE_H #define KORG_CALENDARVIEWBASE_H -#include <qwidget.h> +#include <tqwidget.h> #include <libkcal/calendar.h> @@ -37,14 +37,14 @@ namespace KOrg { class CalendarViewBase : public QWidget { public: - CalendarViewBase( QWidget *parent, const char *name ) - : QWidget( parent, name ) {} + CalendarViewBase( TQWidget *parent, const char *name ) + : TQWidget( parent, name ) {} virtual ~CalendarViewBase() {} virtual KCal::Calendar *calendar() = 0; - virtual QDate startDate() = 0; - virtual QDate endDate() = 0; + virtual TQDate startDate() = 0; + virtual TQDate endDate() = 0; virtual Incidence *currentSelection() = 0; diff --git a/korganizer/interfaces/korganizer/corehelper.h b/korganizer/interfaces/korganizer/corehelper.h index 2ab839065..53b5d9fb2 100644 --- a/korganizer/interfaces/korganizer/corehelper.h +++ b/korganizer/interfaces/korganizer/corehelper.h @@ -23,9 +23,9 @@ #ifndef KORG_COREHELPER_H #define KORG_COREHELPER_H -#include <qstring.h> -#include <qdatetime.h> -#include <qcolor.h> +#include <tqstring.h> +#include <tqdatetime.h> +#include <tqcolor.h> #include "printplugin.h" class KCalendarSytstem; @@ -38,14 +38,14 @@ class CoreHelper CoreHelper() {} virtual ~CoreHelper() {} - virtual QColor defaultEventColor() = 0; - virtual QColor textColor( const QColor &bgColor ) = 0; - virtual QColor categoryColor( const QStringList &cats ) = 0; - virtual QString holidayString( const QDate &dt ) = 0; - virtual QTime dayStart() = 0; + virtual TQColor defaultEventColor() = 0; + virtual TQColor textColor( const TQColor &bgColor ) = 0; + virtual TQColor categoryColor( const TQStringList &cats ) = 0; + virtual TQString holidayString( const TQDate &dt ) = 0; + virtual TQTime dayStart() = 0; virtual const KCalendarSystem *calendarSystem() = 0; virtual KOrg::PrintPlugin::List loadPrintPlugins() = 0; - virtual bool isWorkingDay( const QDate &dt ) = 0; + virtual bool isWorkingDay( const TQDate &dt ) = 0; }; } diff --git a/korganizer/interfaces/korganizer/incidencechangerbase.h b/korganizer/interfaces/korganizer/incidencechangerbase.h index 9aeaf2438..9deb87642 100644 --- a/korganizer/interfaces/korganizer/incidencechangerbase.h +++ b/korganizer/interfaces/korganizer/incidencechangerbase.h @@ -22,7 +22,7 @@ #define KORG_INCIDENCECHANGERBASE_H #include <libkcal/scheduler.h> -#include <qobject.h> +#include <tqobject.h> class QWidget; namespace KCal { @@ -37,8 +37,8 @@ class IncidenceChangerBase : public QObject { Q_OBJECT public: - IncidenceChangerBase( Calendar*cal, QObject *parent = 0 ) : - QObject( parent ), mCalendar( cal ) {} + IncidenceChangerBase( Calendar*cal, TQObject *parent = 0 ) : + TQObject( parent ), mCalendar( cal ) {} virtual ~IncidenceChangerBase() {} virtual bool sendGroupwareMessage( Incidence *incidence, @@ -47,7 +47,7 @@ public: virtual bool beginChange( Incidence * incidence ) = 0; virtual bool endChange( Incidence *incidence ) = 0; - virtual bool addIncidence( Incidence *incidence, QWidget *parent = 0 ) = 0; + virtual bool addIncidence( Incidence *incidence, TQWidget *parent = 0 ) = 0; virtual bool changeIncidence( Incidence *newinc, Incidence *oldinc, int action = -1 ) = 0; virtual bool deleteIncidence( Incidence *incidence ) = 0; diff --git a/korganizer/interfaces/korganizer/mainwindow.h b/korganizer/interfaces/korganizer/mainwindow.h index cbfb7915c..3343470aa 100644 --- a/korganizer/interfaces/korganizer/mainwindow.h +++ b/korganizer/interfaces/korganizer/mainwindow.h @@ -22,7 +22,7 @@ #include <kxmlguiclient.h> -#include <qwidget.h> +#include <tqwidget.h> class KActionCollection; class KAction; @@ -68,7 +68,7 @@ class MainWindow /** Return widget whcih represents this main window. */ - virtual QWidget *topLevelWidget() = 0; + virtual TQWidget *topLevelWidget() = 0; /** Return ActionManager of this main window. */ @@ -80,7 +80,7 @@ class MainWindow /** Show status mesage in status bar. */ - virtual void showStatusMessage( const QString &message ) = 0; + virtual void showStatusMessage( const TQString &message ) = 0; /** Set window title. diff --git a/korganizer/interfaces/korganizer/part.h b/korganizer/interfaces/korganizer/part.h index 5db429298..2ce21c13f 100644 --- a/korganizer/interfaces/korganizer/part.h +++ b/korganizer/interfaces/korganizer/part.h @@ -21,7 +21,7 @@ #ifndef KORG_PART_H #define KORG_PART_H -#include <qstring.h> +#include <tqstring.h> #include <klibloader.h> #include <kparts/part.h> @@ -34,18 +34,18 @@ class Part : public KParts::Part { public: static int interfaceVersion() { return 2; } - static QString serviceType() { return "KOrganizer/Part"; } + static TQString serviceType() { return "KOrganizer/Part"; } - typedef QPtrList<Part> List; + typedef TQPtrList<Part> List; Part( MainWindow *parent, const char *name ) : KParts::Part( parent?(parent->topLevelWidget()):0, name ), mMainWindow( parent ) {} virtual ~Part() {} - virtual QString info() = 0; + virtual TQString info() = 0; /** short name of the part, used as category in the keybindings dialog */ - virtual QString shortInfo() = 0; + virtual TQString shortInfo() = 0; MainWindow *mainWindow() { return mMainWindow; } @@ -59,8 +59,8 @@ class PartFactory : public KLibFactory virtual Part *create( MainWindow *parent, const char *name = 0 ) = 0; protected: - virtual QObject *createObject( QObject *, const char *,const char *, - const QStringList & ) + virtual TQObject *createObject( TQObject *, const char *,const char *, + const TQStringList & ) { return 0; } diff --git a/korganizer/interfaces/korganizer/printplugin.h b/korganizer/interfaces/korganizer/printplugin.h index 0a7abd44c..a1414cdb8 100644 --- a/korganizer/interfaces/korganizer/printplugin.h +++ b/korganizer/interfaces/korganizer/printplugin.h @@ -23,7 +23,7 @@ #ifndef KORG_NOPRINTER -#include <qdatetime.h> +#include <tqdatetime.h> #include <kprinter.h> #include <calendar/plugin.h> #include <libkcal/incidence.h> @@ -55,9 +55,9 @@ class PrintPlugin : public KOrg::Plugin mCalendar(0), mConfig(0) {} virtual ~PrintPlugin() {} - typedef QPtrList<PrintPlugin> List; + typedef TQPtrList<PrintPlugin> List; static int interfaceVersion() { return 2; } - static QString serviceType() { return "KOrganizer/PrintPlugin"; } + static TQString serviceType() { return "KOrganizer/PrintPlugin"; } virtual void setKOrgCoreHelper( KOrg::CoreHelper*helper ) { mCoreHelper = helper; } virtual void setConfig( KConfig *cfg ) { mConfig = cfg; } @@ -69,11 +69,11 @@ class PrintPlugin : public KOrg::Plugin /** Returns short description of print format. */ - virtual QString description() = 0; + virtual TQString description() = 0; /** Returns long description of print format. */ - virtual QString info() = 0; + virtual TQString info() = 0; /** Returns the sort ID of the plugin. This value will be used to identify @@ -90,7 +90,7 @@ class PrintPlugin : public KOrg::Plugin */ virtual bool enabled() { return false; } - QWidget *configWidget( QWidget *w ) + TQWidget *configWidget( TQWidget *w ) { if ( !mConfigWidget ) { mConfigWidget = createConfigWidget( w ); @@ -100,7 +100,7 @@ class PrintPlugin : public KOrg::Plugin } /* Create the config widget. setSettingsWidget will be automatically called on it */ - virtual QWidget *createConfigWidget( QWidget * ) = 0; + virtual TQWidget *createConfigWidget( TQWidget * ) = 0; /** Actually do the printing. @@ -138,18 +138,18 @@ class PrintPlugin : public KOrg::Plugin /** Set date range which should be printed. */ - virtual void setDateRange( const QDate &from, const QDate &to ) + virtual void setDateRange( const TQDate &from, const TQDate &to ) { mFromDate = from; mToDate = to; } protected: - QDate mFromDate; - QDate mToDate; + TQDate mFromDate; + TQDate mToDate; protected: - QWidget *mConfigWidget; + TQWidget *mConfigWidget; KOrg::CoreHelper *mCoreHelper; /** The printer object. This will only be available in the doPrint method of the selected plugin */ diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp index 3c680c654..ae80a8d6f 100644 --- a/korganizer/journalentry.cpp +++ b/korganizer/journalentry.cpp @@ -25,12 +25,12 @@ // // Journal Entry -#include <qlabel.h> -#include <qlayout.h> -#include <qcheckbox.h> -#include <qwhatsthis.h> -#include <qtooltip.h> -#include <qtoolbutton.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqwhatsthis.h> +#include <tqtooltip.h> +#include <tqtoolbutton.h> #include <kdebug.h> #include <kdialog.h> @@ -60,32 +60,32 @@ class JournalTitleLable : public KActiveLabel { public: - JournalTitleLable( QWidget *parent, const char *name=0 ) : KActiveLabel( parent, name ) {} + JournalTitleLable( TQWidget *parent, const char *name=0 ) : KActiveLabel( parent, name ) {} - void openLink( const QString &/*link*/ ) {} + void openLink( const TQString &/*link*/ ) {} }; -JournalDateEntry::JournalDateEntry( Calendar *calendar, QWidget *parent ) : - QVBox( parent ), mCalendar( calendar ) +JournalDateEntry::JournalDateEntry( Calendar *calendar, TQWidget *parent ) : + TQVBox( parent ), mCalendar( calendar ) { //kdDebug(5850)<<"JournalEntry::JournalEntry, parent="<<parent<<endl; mChanger = 0; mTitle = new JournalTitleLable( this ); mTitle->setMargin(2); - mTitle->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); - connect( mTitle, SIGNAL( linkClicked( const QString & ) ), - this, SLOT( emitNewJournal() ) ); + mTitle->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ); + connect( mTitle, TQT_SIGNAL( linkClicked( const TQString & ) ), + this, TQT_SLOT( emitNewJournal() ) ); } JournalDateEntry::~JournalDateEntry() { } -void JournalDateEntry::setDate(const QDate &date) +void JournalDateEntry::setDate(const TQDate &date) { - QString dtstring = QString( "<qt><center><b><i>%1</i></b> " ) + TQString dtstring = TQString( "<qt><center><b><i>%1</i></b> " ) .arg( KGlobal::locale()->formatDate(date) ); dtstring += " <font size=\"-1\"><a href=\"#\">" + @@ -99,9 +99,9 @@ void JournalDateEntry::setDate(const QDate &date) void JournalDateEntry::clear() { - QValueList<JournalEntry*> values( mEntries.values() ); + TQValueList<JournalEntry*> values( mEntries.values() ); - QValueList<JournalEntry*>::Iterator it = values.begin(); + TQValueList<JournalEntry*>::Iterator it = values.begin(); for ( ; it != values.end(); ++it ) { delete (*it); } @@ -111,7 +111,7 @@ void JournalDateEntry::clear() // should only be called by the KOJournalView now. void JournalDateEntry::addJournal( Journal *j ) { - QMap<Journal*,JournalEntry*>::Iterator pos = mEntries.find( j ); + TQMap<Journal*,JournalEntry*>::Iterator pos = mEntries.find( j ); if ( pos != mEntries.end() ) return; JournalEntry *entry = new JournalEntry( j, this ); @@ -120,23 +120,23 @@ void JournalDateEntry::addJournal( Journal *j ) entry->setIncidenceChanger( mChanger ); mEntries.insert( j, entry ); - connect( this, SIGNAL( setIncidenceChangerSignal( IncidenceChangerBase * ) ), - entry, SLOT( setIncidenceChanger( IncidenceChangerBase * ) ) ); - connect( this, SIGNAL( setDateSignal( const QDate & ) ), - entry, SLOT( setDate( const QDate & ) ) ); - connect( this, SIGNAL( flushEntries() ), - entry, SLOT( flushEntry() ) ); - connect( entry, SIGNAL( deleteIncidence( Incidence* ) ), - this, SIGNAL( deleteIncidence( Incidence* ) ) ); - connect( entry, SIGNAL( editIncidence( Incidence* ) ), - this, SIGNAL( editIncidence( Incidence* ) ) ); + connect( this, TQT_SIGNAL( setIncidenceChangerSignal( IncidenceChangerBase * ) ), + entry, TQT_SLOT( setIncidenceChanger( IncidenceChangerBase * ) ) ); + connect( this, TQT_SIGNAL( setDateSignal( const TQDate & ) ), + entry, TQT_SLOT( setDate( const TQDate & ) ) ); + connect( this, TQT_SIGNAL( flushEntries() ), + entry, TQT_SLOT( flushEntry() ) ); + connect( entry, TQT_SIGNAL( deleteIncidence( Incidence* ) ), + this, TQT_SIGNAL( deleteIncidence( Incidence* ) ) ); + connect( entry, TQT_SIGNAL( editIncidence( Incidence* ) ), + this, TQT_SIGNAL( editIncidence( Incidence* ) ) ); } Journal::List JournalDateEntry::journals() const { - QValueList<Journal*> jList( mEntries.keys() ); + TQValueList<Journal*> jList( mEntries.keys() ); Journal::List l; - QValueList<Journal*>::Iterator it = jList.begin(); + TQValueList<Journal*>::Iterator it = jList.begin(); for ( ; it != jList.end(); ++it ) { l.append( *it ); } @@ -156,7 +156,7 @@ void JournalDateEntry::emitNewJournal() void JournalDateEntry::journalEdited( Journal *journal ) { - QMap<Journal*,JournalEntry*>::Iterator pos = mEntries.find( journal ); + TQMap<Journal*,JournalEntry*>::Iterator pos = mEntries.find( journal ); if ( pos == mEntries.end() ) return; pos.data()->setJournal( journal ); @@ -165,7 +165,7 @@ void JournalDateEntry::journalEdited( Journal *journal ) void JournalDateEntry::journalDeleted( Journal *journal ) { - QMap<Journal*,JournalEntry*>::Iterator pos = mEntries.find( journal ); + TQMap<Journal*,JournalEntry*>::Iterator pos = mEntries.find( journal ); if ( pos == mEntries.end() ) return; delete pos.data(); @@ -175,8 +175,8 @@ void JournalDateEntry::journalDeleted( Journal *journal ) -JournalEntry::JournalEntry( Journal* j, QWidget *parent ) : - QWidget( parent ), mJournal( j ) +JournalEntry::JournalEntry( Journal* j, TQWidget *parent ) : + TQWidget( parent ), mJournal( j ) { //kdDebug(5850)<<"JournalEntry::JournalEntry, parent="<<parent<<endl; mDirty = false; @@ -184,65 +184,65 @@ JournalEntry::JournalEntry( Journal* j, QWidget *parent ) : mChanger = 0; mReadOnly = false; - mLayout = new QGridLayout( this ); + mLayout = new TQGridLayout( this ); mLayout->setSpacing( KDialog::spacingHint() ); mLayout->setMargin( KDialog::marginHint() ); - QString whatsThis = i18n("Sets the Title of this journal entry."); + TQString whatsThis = i18n("Sets the Title of this journal entry."); - mTitleLabel = new QLabel( i18n("&Title: "), this ); + mTitleLabel = new TQLabel( i18n("&Title: "), this ); mLayout->addWidget( mTitleLabel, 0, 0 ); mTitleEdit = new KLineEdit( this ); mLayout->addWidget( mTitleEdit, 0, 1 ); mTitleLabel->setBuddy( mTitleEdit ); - QWhatsThis::add( mTitleLabel, whatsThis ); - QWhatsThis::add( mTitleEdit, whatsThis ); + TQWhatsThis::add( mTitleLabel, whatsThis ); + TQWhatsThis::add( mTitleEdit, whatsThis ); - mTimeCheck = new QCheckBox( i18n("Ti&me: "), this ); + mTimeCheck = new TQCheckBox( i18n("Ti&me: "), this ); mLayout->addWidget( mTimeCheck, 0, 2 ); mTimeEdit = new KTimeEdit( this ); mLayout->addWidget( mTimeEdit, 0, 3 ); - connect( mTimeCheck, SIGNAL(toggled(bool)), - this, SLOT(timeCheckBoxToggled(bool)) ); - QWhatsThis::add( mTimeCheck, i18n("Determines whether this journal entry has " + connect( mTimeCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(timeCheckBoxToggled(bool)) ); + TQWhatsThis::add( mTimeCheck, i18n("Determines whether this journal entry has " "a time associated with it") ); - QWhatsThis::add( mTimeEdit, i18n( "Sets the time associated with this journal " + TQWhatsThis::add( mTimeEdit, i18n( "Sets the time associated with this journal " "entry" ) ); - mDeleteButton = new QToolButton( this, "deleteButton" ); - QPixmap pix = KOGlobals::self()->smallIcon( "editdelete" ); + mDeleteButton = new TQToolButton( this, "deleteButton" ); + TQPixmap pix = KOGlobals::self()->smallIcon( "editdelete" ); mDeleteButton->setPixmap( pix ); - mDeleteButton->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); - QToolTip::add( mDeleteButton, i18n("Delete this journal entry") ); - QWhatsThis::add( mDeleteButton, i18n("Delete this journal entry") ); + mDeleteButton->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ); + TQToolTip::add( mDeleteButton, i18n("Delete this journal entry") ); + TQWhatsThis::add( mDeleteButton, i18n("Delete this journal entry") ); mLayout->addWidget( mDeleteButton, 0, 4 ); - connect( mDeleteButton, SIGNAL(pressed()), this, SLOT(deleteItem()) ); + connect( mDeleteButton, TQT_SIGNAL(pressed()), this, TQT_SLOT(deleteItem()) ); - mEditButton = new QToolButton( this, "editButton" ); + mEditButton = new TQToolButton( this, "editButton" ); mEditButton->setPixmap( KOGlobals::self()->smallIcon( "edit" ) ); - mEditButton->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); - QToolTip::add( mEditButton, i18n("Edit this journal entry") ); - QWhatsThis::add( mEditButton, i18n("Opens an editor dialog for this journal entry") ); + mEditButton->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ); + TQToolTip::add( mEditButton, i18n("Edit this journal entry") ); + TQWhatsThis::add( mEditButton, i18n("Opens an editor dialog for this journal entry") ); mLayout->addWidget( mEditButton, 0, 5 ); - connect( mEditButton, SIGNAL(clicked()), this, SLOT( editItem() ) ); + connect( mEditButton, TQT_SIGNAL(clicked()), this, TQT_SLOT( editItem() ) ); #ifndef KORG_NOPRINTER - mPrintButton = new QToolButton( this, "printButton" ); + mPrintButton = new TQToolButton( this, "printButton" ); mPrintButton->setPixmap( KOGlobals::self()->smallIcon( "printer1" ) ); - mPrintButton->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); - QToolTip::add( mPrintButton, i18n("Print this journal entry") ); - QWhatsThis::add( mPrintButton, i18n("Opens the print dialog for this journal entry") ); + mPrintButton->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ); + TQToolTip::add( mPrintButton, i18n("Print this journal entry") ); + TQWhatsThis::add( mPrintButton, i18n("Opens the print dialog for this journal entry") ); mLayout->addWidget( mPrintButton, 0, 6 ); - connect( mPrintButton, SIGNAL(clicked()), this, SLOT( printItem() ) ); + connect( mPrintButton, TQT_SIGNAL(clicked()), this, TQT_SLOT( printItem() ) ); #endif mEditor = new KTextEdit(this); mLayout->addMultiCellWidget( mEditor, 1, 2, 0, 6 ); - connect( mTitleEdit, SIGNAL(textChanged( const QString& )), SLOT(setDirty()) ); - connect( mTimeCheck, SIGNAL(toggled(bool)), SLOT(setDirty()) ); - connect( mTimeEdit, SIGNAL(timeChanged(QTime)), SLOT(setDirty()) ); - connect( mEditor, SIGNAL(textChanged()), SLOT(setDirty()) ); + connect( mTitleEdit, TQT_SIGNAL(textChanged( const TQString& )), TQT_SLOT(setDirty()) ); + connect( mTimeCheck, TQT_SIGNAL(toggled(bool)), TQT_SLOT(setDirty()) ); + connect( mTimeEdit, TQT_SIGNAL(timeChanged(TQTime)), TQT_SLOT(setDirty()) ); + connect( mEditor, TQT_SIGNAL(textChanged()), TQT_SLOT(setDirty()) ); mEditor->installEventFilter(this); @@ -282,13 +282,13 @@ void JournalEntry::printItem() if ( mJournal ) { KOCoreHelper helper; CalPrinter printer( this, 0, &helper ); - connect( this, SIGNAL(configChanged()), &printer, SLOT(updateConfig()) ); + connect( this, TQT_SIGNAL(configChanged()), &printer, TQT_SLOT(updateConfig()) ); Incidence::List selectedIncidences; selectedIncidences.append( mJournal ); printer.print( KOrg::CalPrinterBase::Incidence, - QDate(), QDate(), selectedIncidences ); + TQDate(), TQDate(), selectedIncidences ); } #endif } @@ -304,7 +304,7 @@ void JournalEntry::setReadOnly( bool readonly ) } -void JournalEntry::setDate(const QDate &date) +void JournalEntry::setDate(const TQDate &date) { writeJournal(); mDate = date; @@ -328,15 +328,15 @@ void JournalEntry::setDirty() kdDebug(5850) << "JournalEntry::setDirty()" << endl; } -bool JournalEntry::eventFilter( QObject *o, QEvent *e ) +bool JournalEntry::eventFilter( TQObject *o, TQEvent *e ) { // kdDebug(5850) << "JournalEntry::event received " << e->type() << endl; - if ( e->type() == QEvent::FocusOut || e->type() == QEvent::Hide || - e->type() == QEvent::Close ) { + if ( e->type() == TQEvent::FocusOut || e->type() == TQEvent::Hide || + e->type() == TQEvent::Close ) { writeJournal(); } - return QWidget::eventFilter( o, e ); // standard event processing + return TQWidget::eventFilter( o, e ); // standard event processing } @@ -358,8 +358,8 @@ void JournalEntry::writeJournalPrivate( Journal *j ) { j->setSummary( mTitleEdit->text() ); bool hasTime = mTimeCheck->isChecked(); - QTime tm( mTimeEdit->getTime() ); - j->setDtStart( QDateTime( mDate, hasTime?tm:QTime(0,0,0) ) ); + TQTime tm( mTimeEdit->getTime() ); + j->setDtStart( TQDateTime( mDate, hasTime?tm:TQTime(0,0,0) ) ); j->setFloats( !hasTime ); j->setDescription( mEditor->text() ); } diff --git a/korganizer/journalentry.h b/korganizer/journalentry.h index 761e77e58..02e85e1e5 100644 --- a/korganizer/journalentry.h +++ b/korganizer/journalentry.h @@ -26,7 +26,7 @@ // // Widget showing one Journal entry -#include <qvbox.h> +#include <tqvbox.h> class QLabel; class KActiveLabel; @@ -46,18 +46,18 @@ namespace KCal { } using namespace KCal; -class JournalEntry : public QWidget { +class JournalEntry : public TQWidget { Q_OBJECT public: typedef ListBase<JournalEntry> List; - JournalEntry( Journal* j, QWidget *parent ); + JournalEntry( Journal* j, TQWidget *parent ); virtual ~JournalEntry(); void setJournal(Journal *); Journal *journal() const { return mJournal; } - QDate date() const { return mDate; } + TQDate date() const { return mDate; } void clear(); void readJournal( Journal *j ); @@ -73,7 +73,7 @@ class JournalEntry : public QWidget { void timeCheckBoxToggled(bool on); public slots: void setIncidenceChanger( IncidenceChangerBase *changer ) { mChanger = changer; } - void setDate(const QDate &); + void setDate(const TQDate &); void flushEntry(); signals: @@ -82,7 +82,7 @@ class JournalEntry : public QWidget { protected: void clearFields(); - bool eventFilter( QObject *o, QEvent *e ); + bool eventFilter( TQObject *o, TQEvent *e ); void writeJournal(); @@ -90,19 +90,19 @@ class JournalEntry : public QWidget { void writeJournalPrivate( Journal *j ); Journal *mJournal; - QDate mDate; + TQDate mDate; bool mReadOnly; - QLabel *mTitleLabel; + TQLabel *mTitleLabel; KLineEdit *mTitleEdit; KTextEdit *mEditor; - QCheckBox *mTimeCheck; + TQCheckBox *mTimeCheck; KTimeEdit *mTimeEdit; - QButton *mDeleteButton; - QButton *mEditButton; - QButton *mPrintButton; + TQButton *mDeleteButton; + TQButton *mEditButton; + TQButton *mPrintButton; - QGridLayout *mLayout; + TQGridLayout *mLayout; bool mDirty; bool mWriteInProgress; @@ -110,30 +110,30 @@ class JournalEntry : public QWidget { }; -class JournalDateEntry : public QVBox { +class JournalDateEntry : public TQVBox { Q_OBJECT public: typedef ListBase<JournalDateEntry> List; - JournalDateEntry( Calendar *, QWidget *parent ); + JournalDateEntry( Calendar *, TQWidget *parent ); virtual ~JournalDateEntry(); void addJournal( Journal * ); Journal::List journals() const; - void setDate( const QDate & ); - QDate date() const { return mDate; } + void setDate( const TQDate & ); + TQDate date() const { return mDate; } void clear(); signals: void setIncidenceChangerSignal( IncidenceChangerBase *changer ); - void setDateSignal( const QDate & ); + void setDateSignal( const TQDate & ); void flushEntries(); void editIncidence( Incidence * ); void deleteIncidence( Incidence * ); - void newJournal( const QDate & ); + void newJournal( const TQDate & ); public slots: void emitNewJournal(); @@ -143,11 +143,11 @@ class JournalDateEntry : public QVBox { private: Calendar *mCalendar; - QDate mDate; - QMap<Journal*,JournalEntry*> mEntries; + TQDate mDate; + TQMap<Journal*,JournalEntry*> mEntries; KActiveLabel *mTitle; - QWidget *mAddBar; + TQWidget *mAddBar; IncidenceChangerBase *mChanger; }; diff --git a/korganizer/kcalendariface.h b/korganizer/kcalendariface.h index c84281d7f..a63f3f1c7 100644 --- a/korganizer/kcalendariface.h +++ b/korganizer/kcalendariface.h @@ -26,14 +26,14 @@ */ #include <dcopobject.h> -#include <qdatetime.h> -#include <qdatastream.h> -#include <qstringlist.h> +#include <tqdatetime.h> +#include <tqdatastream.h> +#include <tqstringlist.h> // yes, this is this very header - but it tells dcopidl to include it // in _stub.cpp and _skel.cpp files, to get the definition of the structs. #include "kcalendariface.h" -typedef QPair<QDateTime, QDateTime> QDateTimePair; +typedef QPair<TQDateTime, TQDateTime> QDateTimePair; /** Interface class for calendar requests. */ class KCalendarIface : public DCOPObject @@ -49,71 +49,71 @@ class KCalendarIface : public DCOPObject */ struct ResourceRequestReply { bool vCalInOK; - QString vCalOut; + TQString vCalOut; bool vCalOutOK; bool isFree; - QDateTime start; QDateTime end; + TQDateTime start; TQDateTime end; }; virtual KCalendarIface::ResourceRequestReply resourceRequest( - const QValueList< QDateTimePair >& busy, - const QCString& resource, - const QString& vCalIn ) = 0; - - virtual void openEventEditor( const QString& text ) = 0; - virtual void openEventEditor( const QString& summary, - const QString& description, - const QString& attachment ) = 0; - virtual void openEventEditor( const QString& summary, - const QString& description, - const QString& attachment, - const QStringList& attendees ) = 0; - virtual void openEventEditor( const QString& summary, - const QString& description, - const QString& uri, - const QString& file, - const QStringList& attendees, - const QString& attachmentMimetype ) = 0; - - virtual void openTodoEditor( const QString& text ) = 0; - virtual void openTodoEditor( const QString& summary, - const QString& description, - const QString& attachment ) = 0; - virtual void openTodoEditor( const QString& summary, - const QString& description, - const QString& attachment, - const QStringList& attendees ) = 0; - virtual void openTodoEditor( const QString& summary, - const QString& description, - const QString& uri, - const QString& file, - const QStringList& attendees, - const QString& attachmentMimetype ) = 0; - - virtual void openJournalEditor( const QDate& date ) = 0; - virtual void openJournalEditor( const QString& text, - const QDate& date ) = 0; - virtual void openJournalEditor( const QString& text ) = 0; + const TQValueList< QDateTimePair >& busy, + const TQCString& resource, + const TQString& vCalIn ) = 0; + + virtual void openEventEditor( const TQString& text ) = 0; + virtual void openEventEditor( const TQString& summary, + const TQString& description, + const TQString& attachment ) = 0; + virtual void openEventEditor( const TQString& summary, + const TQString& description, + const TQString& attachment, + const TQStringList& attendees ) = 0; + virtual void openEventEditor( const TQString& summary, + const TQString& description, + const TQString& uri, + const TQString& file, + const TQStringList& attendees, + const TQString& attachmentMimetype ) = 0; + + virtual void openTodoEditor( const TQString& text ) = 0; + virtual void openTodoEditor( const TQString& summary, + const TQString& description, + const TQString& attachment ) = 0; + virtual void openTodoEditor( const TQString& summary, + const TQString& description, + const TQString& attachment, + const TQStringList& attendees ) = 0; + virtual void openTodoEditor( const TQString& summary, + const TQString& description, + const TQString& uri, + const TQString& file, + const TQStringList& attendees, + const TQString& attachmentMimetype ) = 0; + + virtual void openJournalEditor( const TQDate& date ) = 0; + virtual void openJournalEditor( const TQString& text, + const TQDate& date ) = 0; + virtual void openJournalEditor( const TQString& text ) = 0; //TODO: - // virtual void openJournalEditor( const QString& summary, - // const QString& description, - // const QString& attachment ) = 0; + // virtual void openJournalEditor( const TQString& summary, + // const TQString& description, + // const TQString& attachment ) = 0; virtual void showJournalView() = 0; virtual void showTodoView() = 0; virtual void showEventView() = 0; - virtual void goDate( const QDate& date ) = 0; - virtual void goDate( const QString& date ) = 0; + virtual void goDate( const TQDate& date ) = 0; + virtual void goDate( const TQString& date ) = 0; - virtual void showDate( const QDate &date ) = 0; + virtual void showDate( const TQDate &date ) = 0; }; -inline QDataStream& operator<<( QDataStream& str, const KCalendarIface::ResourceRequestReply& reply ) +inline TQDataStream& operator<<( TQDataStream& str, const KCalendarIface::ResourceRequestReply& reply ) { str << reply.vCalInOK << reply.vCalOut << reply.vCalOutOK << reply.isFree << reply.start << reply.end; return str; } -inline QDataStream& operator>>( QDataStream& str, KCalendarIface::ResourceRequestReply& reply ) +inline TQDataStream& operator>>( TQDataStream& str, KCalendarIface::ResourceRequestReply& reply ) { str >> reply.vCalInOK >> reply.vCalOut >> reply.vCalOutOK >> reply.isFree >> reply.start >> reply.end; return str; diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp index 900a7b24e..1dea017a2 100644 --- a/korganizer/kdatenavigator.cpp +++ b/korganizer/kdatenavigator.cpp @@ -23,12 +23,12 @@ without including the source code for Qt in the source distribution. */ -#include <qstring.h> -#include <qkeycode.h> -#include <qlayout.h> -#include <qtimer.h> -#include <qframe.h> -#include <qlabel.h> +#include <tqstring.h> +#include <tqkeycode.h> +#include <tqlayout.h> +#include <tqtimer.h> +#include <tqframe.h> +#include <tqlabel.h> #include <kdebug.h> #include <klocale.h> @@ -45,27 +45,27 @@ #include "kdatenavigator.h" -KDateNavigator::KDateNavigator( QWidget *parent, const char *name ) - : QFrame( parent, name ), mBaseDate( 1970, 1, 1 ) +KDateNavigator::KDateNavigator( TQWidget *parent, const char *name ) + : TQFrame( parent, name ), mBaseDate( 1970, 1, 1 ) { - QGridLayout* topLayout = new QGridLayout( this, 8, 8 ); + TQGridLayout* topLayout = new TQGridLayout( this, 8, 8 ); mNavigatorBar = new NavigatorBar( this ); topLayout->addMultiCellWidget( mNavigatorBar, 0, 0, 0, 7 ); - connect( mNavigatorBar, SIGNAL( goPrevYear() ), SIGNAL( goPrevYear() ) ); - connect( mNavigatorBar, SIGNAL( goPrevMonth() ), SIGNAL( goPrevMonth() ) ); - connect( mNavigatorBar, SIGNAL( goNextMonth() ), SIGNAL( goNextMonth() ) ); - connect( mNavigatorBar, SIGNAL( goNextYear() ), SIGNAL( goNextYear() ) ); - connect( mNavigatorBar, SIGNAL( goMonth( int ) ), SIGNAL( goMonth( int ) ) ); + connect( mNavigatorBar, TQT_SIGNAL( goPrevYear() ), TQT_SIGNAL( goPrevYear() ) ); + connect( mNavigatorBar, TQT_SIGNAL( goPrevMonth() ), TQT_SIGNAL( goPrevMonth() ) ); + connect( mNavigatorBar, TQT_SIGNAL( goNextMonth() ), TQT_SIGNAL( goNextMonth() ) ); + connect( mNavigatorBar, TQT_SIGNAL( goNextYear() ), TQT_SIGNAL( goNextYear() ) ); + connect( mNavigatorBar, TQT_SIGNAL( goMonth( int ) ), TQT_SIGNAL( goMonth( int ) ) ); int i; - QString generalFont = KGlobalSettings::generalFont().family(); + TQString generalFont = KGlobalSettings::generalFont().family(); // Set up the heading fields. for( i = 0; i < 7; i++ ) { - mHeadings[i] = new QLabel( this ); - mHeadings[i]->setFont( QFont( generalFont, 10, QFont::Bold ) ); + mHeadings[i] = new TQLabel( this ); + mHeadings[i]->setFont( TQFont( generalFont, 10, TQFont::Bold ) ); mHeadings[i]->setAlignment( AlignCenter ); topLayout->addWidget( mHeadings[i], 1, i + 1 ); @@ -73,9 +73,9 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name ) // Create the weeknumber labels for( i = 0; i < 6; i++ ) { - mWeeknos[i] = new QLabel( this ); + mWeeknos[i] = new TQLabel( this ); mWeeknos[i]->setAlignment( AlignCenter ); - mWeeknos[i]->setFont( QFont( generalFont, 10 ) ); + mWeeknos[i]->setFont( TQFont( generalFont, 10 ) ); mWeeknos[i]->installEventFilter( this ); topLayout->addWidget( mWeeknos[i], i + 2, 0 ); @@ -83,13 +83,13 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name ) mDayMatrix = new KODayMatrix( this, "KDateNavigator::dayMatrix" ); - connect( mDayMatrix, SIGNAL( selected( const KCal::DateList & ) ), - SIGNAL( datesSelected( const KCal::DateList & ) ) ); + connect( mDayMatrix, TQT_SIGNAL( selected( const KCal::DateList & ) ), + TQT_SIGNAL( datesSelected( const KCal::DateList & ) ) ); - connect( mDayMatrix, SIGNAL( incidenceDropped( Incidence *, const QDate & ) ), - SIGNAL( incidenceDropped( Incidence *, const QDate & ) ) ); - connect( mDayMatrix, SIGNAL( incidenceDroppedMove( Incidence * , const QDate & ) ), - SIGNAL( incidenceDroppedMove( Incidence *, const QDate & ) ) ); + connect( mDayMatrix, TQT_SIGNAL( incidenceDropped( Incidence *, const TQDate & ) ), + TQT_SIGNAL( incidenceDropped( Incidence *, const TQDate & ) ) ); + connect( mDayMatrix, TQT_SIGNAL( incidenceDroppedMove( Incidence * , const TQDate & ) ), + TQT_SIGNAL( incidenceDroppedMove( Incidence *, const TQDate & ) ) ); topLayout->addMultiCellWidget( mDayMatrix, 2, 7, 1, 7 ); @@ -107,7 +107,7 @@ void KDateNavigator::setCalendar( Calendar *cal ) mDayMatrix->setCalendar( cal ); } -void KDateNavigator::setBaseDate( const QDate &date ) +void KDateNavigator::setBaseDate( const TQDate &date ) { if ( date != mBaseDate ) { mBaseDate = date; @@ -125,10 +125,10 @@ void KDateNavigator::setBaseDate( const QDate &date ) } } -QSizePolicy KDateNavigator::sizePolicy () const +TQSizePolicy KDateNavigator::sizePolicy () const { - return QSizePolicy( QSizePolicy::MinimumExpanding, - QSizePolicy::MinimumExpanding ); + return TQSizePolicy( TQSizePolicy::MinimumExpanding, + TQSizePolicy::MinimumExpanding ); } void KDateNavigator::updateToday() @@ -136,10 +136,10 @@ void KDateNavigator::updateToday() mDayMatrix->recalculateToday(); mDayMatrix->repaint(); } -QDate KDateNavigator::startDate() const +TQDate KDateNavigator::startDate() const { // Find the first day of the week of the current month. - QDate dayone( mBaseDate.year(), mBaseDate.month(), mBaseDate.day() ); + TQDate dayone( mBaseDate.year(), mBaseDate.month(), mBaseDate.day() ); int d2 = KOGlobals::self()->calendarSystem()->day( dayone ); //int di = d1 - d2 + 1; dayone = dayone.addDays( -d2 + 1 ); @@ -160,7 +160,7 @@ QDate KDateNavigator::startDate() const return dayone; } -QDate KDateNavigator::endDate() const +TQDate KDateNavigator::endDate() const { return startDate().addDays( 6*7 ); } @@ -168,7 +168,7 @@ QDate KDateNavigator::endDate() const void KDateNavigator::updateDates() { // kdDebug(5850) << "KDateNavigator::updateDates(), this=" << this << endl; - QDate dayone = startDate(); + TQDate dayone = startDate(); mDayMatrix->updateView( dayone ); @@ -177,11 +177,11 @@ void KDateNavigator::updateDates() // set the week numbers. for( int i = 0; i < 6; i++ ) { // Use QDate's weekNumber method to determine the week number! - QDate dtStart = mDayMatrix->getDate( i * 7 ); - QDate dtEnd = mDayMatrix->getDate( ( i + 1 ) * 7 - 1 ); + TQDate dtStart = mDayMatrix->getDate( i * 7 ); + TQDate dtEnd = mDayMatrix->getDate( ( i + 1 ) * 7 - 1 ); int weeknumstart = calsys->weekNumber( dtStart ); int weeknumend = calsys->weekNumber( dtEnd ); - QString weeknum; + TQString weeknum; if ( weeknumstart != weeknumend ) { weeknum = i18n("start/end week number of line in date picker", "%1/%2") @@ -217,7 +217,7 @@ void KDateNavigator::updateConfig() int weekstart = KGlobal::locale()->weekStartDay(); for( int i = 0; i < 7; i++ ) { day = weekstart + i <= 7 ? weekstart + i : ( weekstart + i ) % 7; - QString dayName = KOGlobals::self()->calendarSystem()->weekDayName( day, + TQString dayName = KOGlobals::self()->calendarSystem()->weekDayName( day, true ); if ( KOPrefs::instance()->mCompactDialogs ) dayName = dayName.left( 1 ); mHeadings[i]->setText( dayName ); @@ -251,7 +251,7 @@ void KDateNavigator::selectDates( const DateList &dateList ) } } -void KDateNavigator::wheelEvent ( QWheelEvent *e ) +void KDateNavigator::wheelEvent ( TQWheelEvent *e ) { if( e->delta() > 0 ) emit goPrevious(); else emit goNext(); @@ -259,13 +259,13 @@ void KDateNavigator::wheelEvent ( QWheelEvent *e ) e->accept(); } -bool KDateNavigator::eventFilter ( QObject *o, QEvent *e ) +bool KDateNavigator::eventFilter ( TQObject *o, TQEvent *e ) { - if ( e->type() == QEvent::MouseButtonPress ) { + if ( e->type() == TQEvent::MouseButtonPress ) { int i; for( i = 0; i < 6; ++i ) { if ( o == mWeeknos[ i ] ) { - QDate weekstart = mDayMatrix->getDate( i * 7 ); + TQDate weekstart = mDayMatrix->getDate( i * 7 ); emit weekClicked( weekstart ); break; } diff --git a/korganizer/kdatenavigator.h b/korganizer/kdatenavigator.h index 873c4cd3e..07e85c2d5 100644 --- a/korganizer/kdatenavigator.h +++ b/korganizer/kdatenavigator.h @@ -25,8 +25,8 @@ #ifndef KDATENAVIGATOR_H #define KDATENAVIGATOR_H -#include <qframe.h> -#include <qdatetime.h> +#include <tqframe.h> +#include <tqdatetime.h> #include <libkcal/incidencebase.h> @@ -46,7 +46,7 @@ class KDateNavigator: public QFrame { Q_OBJECT public: - KDateNavigator( QWidget *parent = 0, const char *name = 0 ); + KDateNavigator( TQWidget *parent = 0, const char *name = 0 ); ~KDateNavigator(); /** @@ -54,15 +54,15 @@ class KDateNavigator: public QFrame */ void setCalendar( Calendar * ); - void setBaseDate( const QDate & ); + void setBaseDate( const TQDate & ); KCal::DateList selectedDates() const { return mSelectedDates; } - QSizePolicy sizePolicy () const; + TQSizePolicy sizePolicy () const; NavigatorBar *navigatorBar() const { return mNavigatorBar; } - QDate startDate() const; - QDate endDate() const; + TQDate startDate() const; + TQDate endDate() const; public slots: void selectDates( const KCal::DateList & ); @@ -73,9 +73,9 @@ class KDateNavigator: public QFrame signals: void datesSelected( const KCal::DateList & ); - void incidenceDropped( Incidence *, const QDate & ); - void incidenceDroppedMove( Incidence *, const QDate & ); - void weekClicked( const QDate &); + void incidenceDropped( Incidence *, const TQDate & ); + void incidenceDroppedMove( Incidence *, const TQDate & ); + void weekClicked( const TQDate &); void goPrevious(); void goNext(); @@ -90,22 +90,22 @@ class KDateNavigator: public QFrame protected: void updateDates(); - void wheelEvent( QWheelEvent * ); + void wheelEvent( TQWheelEvent * ); - bool eventFilter( QObject *,QEvent * ); + bool eventFilter( TQObject *,TQEvent * ); void setShowWeekNums( bool enabled ); private: NavigatorBar *mNavigatorBar; - QLabel *mHeadings[ 7 ]; - QLabel *mWeeknos[ 7 ]; + TQLabel *mHeadings[ 7 ]; + TQLabel *mWeeknos[ 7 ]; KODayMatrix *mDayMatrix; KCal::DateList mSelectedDates; - QDate mBaseDate; + TQDate mBaseDate; // Disabling copy constructor and assignment operator KDateNavigator( const KDateNavigator & ); diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index 953bb606a..270ca8f80 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp @@ -26,13 +26,13 @@ */ #include <assert.h> -#include <qintdict.h> -#include <qdatetime.h> -#include <qapplication.h> -#include <qpopupmenu.h> -#include <qcursor.h> -#include <qpainter.h> -#include <qlabel.h> +#include <tqintdict.h> +#include <tqdatetime.h> +#include <tqapplication.h> +#include <tqpopupmenu.h> +#include <tqcursor.h> +#include <tqpainter.h> +#include <tqlabel.h> #include <kdebug.h> #include <klocale.h> @@ -62,19 +62,19 @@ //////////////////////////////////////////////////////////////////////////// MarcusBains::MarcusBains(KOAgenda *_agenda,const char *name) - : QFrame(_agenda->viewport(),name), agenda(_agenda) + : TQFrame(_agenda->viewport(),name), agenda(_agenda) { setLineWidth(0); setMargin(0); setBackgroundColor(Qt::red); - minutes = new QTimer(this); - connect(minutes, SIGNAL(timeout()), this, SLOT(updateLocation())); + minutes = new TQTimer(this); + connect(minutes, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateLocation())); minutes->start(0, true); - mTimeBox = new QLabel(this); + mTimeBox = new TQLabel(this); mTimeBox->setAlignment(Qt::AlignRight | Qt::AlignBottom); - QPalette pal = mTimeBox->palette(); - pal.setColor(QColorGroup::Foreground, Qt::red); + TQPalette pal = mTimeBox->palette(); + pal.setColor(TQColorGroup::Foreground, Qt::red); mTimeBox->setPalette(pal); mTimeBox->setAutoMask(true); @@ -90,7 +90,7 @@ MarcusBains::~MarcusBains() int MarcusBains::todayColumn() { - QDate currentDate = QDate::currentDate(); + TQDate currentDate = TQDate::currentDate(); DateList dateList = agenda->dateList(); DateList::ConstIterator it; @@ -107,7 +107,7 @@ int MarcusBains::todayColumn() void MarcusBains::updateLocation(bool recalculate) { - QTime tim = QTime::currentTime(); + TQTime tim = TQTime::currentTime(); if((tim.hour() == 0) && (oldTime.hour()==23)) recalculate = true; @@ -157,9 +157,9 @@ void MarcusBains::updateLocation(bool recalculate) /* Create an agenda widget with rows rows and columns columns. */ -KOAgenda::KOAgenda( int columns, int rows, int rowSize, QWidget *parent, +KOAgenda::KOAgenda( int columns, int rows, int rowSize, TQWidget *parent, const char *name, WFlags f ) - : QScrollView( parent, name, f ), mChanger( 0 ) + : TQScrollView( parent, name, f ), mChanger( 0 ) { mColumns = columns; mRows = rows; @@ -175,8 +175,8 @@ KOAgenda::KOAgenda( int columns, int rows, int rowSize, QWidget *parent, Create an agenda widget with columns columns and one row. This is used for all-day events. */ -KOAgenda::KOAgenda( int columns, QWidget *parent, const char *name, WFlags f ) - : QScrollView( parent, name, f ) +KOAgenda::KOAgenda( int columns, TQWidget *parent, const char *name, WFlags f ) + : TQScrollView( parent, name, f ) { mColumns = columns; mRows = 1; @@ -200,12 +200,12 @@ Incidence *KOAgenda::selectedIncidence() const } -QDate KOAgenda::selectedIncidenceDate() const +TQDate KOAgenda::selectedIncidenceDate() const { - return ( mSelectedItem ? mSelectedItem->itemDate() : QDate() ); + return ( mSelectedItem ? mSelectedItem->itemDate() : TQDate() ); } -const QString KOAgenda::lastSelectedUid() const +const TQString KOAgenda::lastSelectedUid() const { return mSelectedUid; } @@ -226,16 +226,16 @@ void KOAgenda::init() // effect. Has to be fixed. setFocusPolicy( WheelFocus ); - connect( &mScrollUpTimer, SIGNAL( timeout() ), SLOT( scrollUp() ) ); - connect( &mScrollDownTimer, SIGNAL( timeout() ), SLOT( scrollDown() ) ); + connect( &mScrollUpTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( scrollUp() ) ); + connect( &mScrollDownTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( scrollDown() ) ); - mStartCell = QPoint( 0, 0 ); - mEndCell = QPoint( 0, 0 ); + mStartCell = TQPoint( 0, 0 ); + mEndCell = TQPoint( 0, 0 ); mHasSelection = false; - mSelectionStartPoint = QPoint( 0, 0 ); - mSelectionStartCell = QPoint( 0, 0 ); - mSelectionEndCell = QPoint( 0, 0 ); + mSelectionStartPoint = TQPoint( 0, 0 ); + mSelectionStartCell = TQPoint( 0, 0 ); + mSelectionEndCell = TQPoint( 0, 0 ); mOldLowerScrollValue = -1; mOldUpperScrollValue = -1; @@ -247,7 +247,7 @@ void KOAgenda::init() mItemMoved = false; mSelectedItem = 0; - mSelectedUid = QString::null; + mSelectedUid = TQString::null; setAcceptDrops( true ); installEventFilter( this ); @@ -273,8 +273,8 @@ void KOAgenda::init() calculateWorkingHours(); - connect( verticalScrollBar(), SIGNAL( valueChanged( int ) ), - SLOT( checkScrollBoundaries( int ) ) ); + connect( verticalScrollBar(), TQT_SIGNAL( valueChanged( int ) ), + TQT_SLOT( checkScrollBoundaries( int ) ) ); // Create the Marcus Bains line. if( mAllDayMode ) { @@ -334,71 +334,71 @@ void KOAgenda::changeColumns(int columns) // init(); // update(); - QResizeEvent event( size(), size() ); + TQResizeEvent event( size(), size() ); - QApplication::sendEvent( this, &event ); + TQApplication::sendEvent( this, &event ); } /* This is the eventFilter function, which gets all events from the KOAgendaItems contained in the agenda. It has to handle moving and resizing for all items. */ -bool KOAgenda::eventFilter ( QObject *object, QEvent *event ) +bool KOAgenda::eventFilter ( TQObject *object, TQEvent *event ) { // kdDebug(5850) << "KOAgenda::eventFilter() " << int( event->type() ) << endl; switch( event->type() ) { - case QEvent::MouseButtonPress: - case QEvent::MouseButtonDblClick: - case QEvent::MouseButtonRelease: - case QEvent::MouseMove: - return eventFilter_mouse( object, static_cast<QMouseEvent *>( event ) ); + case TQEvent::MouseButtonPress: + case TQEvent::MouseButtonDblClick: + case TQEvent::MouseButtonRelease: + case TQEvent::MouseMove: + return eventFilter_mouse( object, static_cast<TQMouseEvent *>( event ) ); #ifndef QT_NO_WHEELEVENT - case QEvent::Wheel: - return eventFilter_wheel( object, static_cast<QWheelEvent *>( event ) ); + case TQEvent::Wheel: + return eventFilter_wheel( object, static_cast<TQWheelEvent *>( event ) ); #endif - case QEvent::KeyPress: - case QEvent::KeyRelease: - return eventFilter_key( object, static_cast<QKeyEvent *>( event ) ); + case TQEvent::KeyPress: + case TQEvent::KeyRelease: + return eventFilter_key( object, static_cast<TQKeyEvent *>( event ) ); - case ( QEvent::Leave ): + case ( TQEvent::Leave ): if ( !mActionItem ) setCursor( arrowCursor ); if ( object == viewport() ) emit leaveAgenda(); return true; - case QEvent::Enter: + case TQEvent::Enter: emit enterAgenda(); - return QScrollView::eventFilter( object, event ); + return TQScrollView::eventFilter( object, event ); #ifndef KORG_NODND - case QEvent::DragEnter: - case QEvent::DragMove: - case QEvent::DragLeave: - case QEvent::Drop: - // case QEvent::DragResponse: - return eventFilter_drag(object, static_cast<QDropEvent*>(event)); + case TQEvent::DragEnter: + case TQEvent::DragMove: + case TQEvent::DragLeave: + case TQEvent::Drop: + // case TQEvent::DragResponse: + return eventFilter_drag(object, static_cast<TQDropEvent*>(event)); #endif default: - return QScrollView::eventFilter( object, event ); + return TQScrollView::eventFilter( object, event ); } } -bool KOAgenda::eventFilter_drag( QObject *object, QDropEvent *de ) +bool KOAgenda::eventFilter_drag( TQObject *object, TQDropEvent *de ) { #ifndef KORG_NODND - QPoint viewportPos; + TQPoint viewportPos; if ( object != viewport() && object != this ) { - viewportPos = static_cast<QWidget *>( object )->mapToParent( de->pos() ); + viewportPos = static_cast<TQWidget *>( object )->mapToParent( de->pos() ); } else { viewportPos = de->pos(); } switch ( de->type() ) { - case QEvent::DragEnter: - case QEvent::DragMove: + case TQEvent::DragEnter: + case TQEvent::DragMove: if ( ICalDrag::canDecode( de ) || VCalDrag::canDecode( de ) ) { DndFactory factory( mCalendar ); @@ -412,10 +412,10 @@ bool KOAgenda::eventFilter_drag( QObject *object, QDropEvent *de ) return true; } else return false; break; - case QEvent::DragLeave: + case TQEvent::DragLeave: return false; break; - case QEvent::Drop: + case TQEvent::Drop: { if ( !ICalDrag::canDecode( de ) && !VCalDrag::canDecode( de ) ) { return false; @@ -426,23 +426,23 @@ bool KOAgenda::eventFilter_drag( QObject *object, QDropEvent *de ) if ( todo ) { de->acceptAction(); - QPoint pos; + TQPoint pos; // FIXME: This is a bad hack, as the viewportToContents seems to be off by // 2000 (which is the left upper corner of the viewport). It works correctly // for agendaItems. if ( object == this ) { - pos = viewportPos + QPoint( contentsX(), contentsY() ); + pos = viewportPos + TQPoint( contentsX(), contentsY() ); } else { pos = viewportToContents( viewportPos ); } - QPoint gpos = contentsToGrid( pos ); + TQPoint gpos = contentsToGrid( pos ); emit droppedToDo( todo, gpos, mAllDayMode ); return true; } } break; - case QEvent::DragResponse: + case TQEvent::DragResponse: default: break; } @@ -451,14 +451,14 @@ bool KOAgenda::eventFilter_drag( QObject *object, QDropEvent *de ) return false; } -bool KOAgenda::eventFilter_key( QObject *, QKeyEvent *ke ) +bool KOAgenda::eventFilter_key( TQObject *, TQKeyEvent *ke ) { // kdDebug(5850) << "KOAgenda::eventFilter_key() " << ke->type() << endl; // If Return is pressed bring up an editor for the current selected time span. if ( ke->key() == Key_Return ) { - if ( ke->type() == QEvent::KeyPress ) mReturnPressed = true; - else if ( ke->type() == QEvent::KeyRelease ) { + if ( ke->type() == TQEvent::KeyPress ) mReturnPressed = true; + else if ( ke->type() == TQEvent::KeyRelease ) { if ( mReturnPressed ) { emitNewEventForSelection(); mReturnPressed = false; @@ -472,7 +472,7 @@ bool KOAgenda::eventFilter_key( QObject *, QKeyEvent *ke ) // Ignore all input that does not produce any output if ( ke->text().isEmpty() ) return false; - if ( ke->type() == QEvent::KeyPress || ke->type() == QEvent::KeyRelease ) { + if ( ke->type() == TQEvent::KeyPress || ke->type() == TQEvent::KeyRelease ) { switch ( ke->key() ) { case Key_Escape: case Key_Return: @@ -494,7 +494,7 @@ bool KOAgenda::eventFilter_key( QObject *, QKeyEvent *ke ) case Key_Alt: break; default: - mTypeAheadEvents.append( new QKeyEvent( ke->type(), ke->key(), + mTypeAheadEvents.append( new TQKeyEvent( ke->type(), ke->key(), ke->ascii(), ke->state(), ke->text(), ke->isAutoRepeat(), ke->count() ) ); @@ -517,23 +517,23 @@ void KOAgenda::finishTypeAhead() { // kdDebug(5850) << "KOAgenda::finishTypeAhead()" << endl; if ( typeAheadReceiver() ) { - for( QEvent *e = mTypeAheadEvents.first(); e; + for( TQEvent *e = mTypeAheadEvents.first(); e; e = mTypeAheadEvents.next() ) { // kdDebug(5850) << "sendEvent() " << int( typeAheadReceiver() ) << endl; - QApplication::sendEvent( typeAheadReceiver(), e ); + TQApplication::sendEvent( typeAheadReceiver(), e ); } } mTypeAheadEvents.clear(); mTypeAhead = false; } #ifndef QT_NO_WHEELEVENT -bool KOAgenda::eventFilter_wheel ( QObject *object, QWheelEvent *e ) +bool KOAgenda::eventFilter_wheel ( TQObject *object, TQWheelEvent *e ) { - QPoint viewportPos; + TQPoint viewportPos; bool accepted=false; if ( ( e->state() & ShiftButton) == ShiftButton ) { if ( object != viewport() ) { - viewportPos = ( (QWidget *) object )->mapToParent( e->pos() ); + viewportPos = ( (TQWidget *) object )->mapToParent( e->pos() ); } else { viewportPos = e->pos(); } @@ -547,7 +547,7 @@ bool KOAgenda::eventFilter_wheel ( QObject *object, QWheelEvent *e ) if ( ( e->state() & ControlButton ) == ControlButton ){ if ( object != viewport() ) { - viewportPos = ( (QWidget *)object )->mapToParent( e->pos() ); + viewportPos = ( (TQWidget *)object )->mapToParent( e->pos() ); } else { viewportPos = e->pos(); } @@ -561,17 +561,17 @@ bool KOAgenda::eventFilter_wheel ( QObject *object, QWheelEvent *e ) return accepted; } #endif -bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) +bool KOAgenda::eventFilter_mouse(TQObject *object, TQMouseEvent *me) { - QPoint viewportPos; + TQPoint viewportPos; if (object != viewport()) { - viewportPos = ((QWidget *)object)->mapToParent(me->pos()); + viewportPos = ((TQWidget *)object)->mapToParent(me->pos()); } else { viewportPos = me->pos(); } switch (me->type()) { - case QEvent::MouseButtonPress: + case TQEvent::MouseButtonPress: // kdDebug(5850) << "koagenda: filtered button press" << endl; if (object != viewport()) { if (me->button() == RightButton) { @@ -602,7 +602,7 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) if (me->button() == RightButton) { // if mouse pointer is not in selection, select the cell below the cursor - QPoint gpos = contentsToGrid( viewportToContents( viewportPos ) ); + TQPoint gpos = contentsToGrid( viewportToContents( viewportPos ) ); if ( !ptInSelection( gpos ) ) { mSelectionStartCell = gpos; mSelectionEndCell = gpos; @@ -616,7 +616,7 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) else { // if mouse pointer is in selection, don't change selection - QPoint gpos = contentsToGrid( viewportToContents( viewportPos ) ); + TQPoint gpos = contentsToGrid( viewportToContents( viewportPos ) ); if ( !ptInSelection( gpos ) ) { selectItem(0); mActionItem = 0; @@ -627,7 +627,7 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) } break; - case QEvent::MouseButtonRelease: + case TQEvent::MouseButtonRelease: if (mActionItem) { endItemAction(); } else if ( mActionType == SELECT ) { @@ -639,10 +639,10 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) viewportToContents( viewportPos ) ) )); break; - case QEvent::MouseMove: { + case TQEvent::MouseMove: { // This nasty gridToContents(contentsToGrid(..)) is needed to // avoid an offset of a few pixels. Don't ask me why... - QPoint indicatorPos = gridToContents(contentsToGrid( + TQPoint indicatorPos = gridToContents(contentsToGrid( viewportToContents( viewportPos ))); if (object != viewport()) { KOAgendaItem *moveItem = dynamic_cast<KOAgendaItem *>(object); @@ -656,12 +656,12 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) // show cursor at the current begin of the item KOAgendaItem *firstItem = mActionItem->firstMultiItem(); if (!firstItem) firstItem = mActionItem; - indicatorPos = gridToContents( QPoint( firstItem->cellXLeft(), + indicatorPos = gridToContents( TQPoint( firstItem->cellXLeft(), firstItem->cellYTop() ) ); } else if ( mActionType == RESIZEBOTTOM ) { // RESIZETOP is handled correctly, only resizebottom works differently - indicatorPos = gridToContents( QPoint( mActionItem->cellXLeft(), + indicatorPos = gridToContents( TQPoint( mActionItem->cellXLeft(), mActionItem->cellYBottom()+1 ) ); } @@ -674,7 +674,7 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) // show cursor at end of timespan if ( ((mStartCell.y() < mEndCell.y()) && (mEndCell.x() >= mStartCell.x())) || (mEndCell.x() > mStartCell.x()) ) - indicatorPos = gridToContents( QPoint(mEndCell.x(), mEndCell.y()+1) ); + indicatorPos = gridToContents( TQPoint(mEndCell.x(), mEndCell.y()+1) ); else indicatorPos = gridToContents( mEndCell ); } @@ -682,7 +682,7 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) emit mousePosSignal( indicatorPos ); break; } - case QEvent::MouseButtonDblClick: + case TQEvent::MouseButtonDblClick: if (object == viewport()) { selectItem(0); emit newEventSignal(); @@ -702,7 +702,7 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) return true; } -bool KOAgenda::ptInSelection( QPoint gpos ) const +bool KOAgenda::ptInSelection( TQPoint gpos ) const { if ( !mHasSelection ) { return false; @@ -716,7 +716,7 @@ bool KOAgenda::ptInSelection( QPoint gpos ) const return true; } -void KOAgenda::startSelectAction( const QPoint &viewportPos ) +void KOAgenda::startSelectAction( const TQPoint &viewportPos ) { emit newStartSelectSignal(); @@ -724,8 +724,8 @@ void KOAgenda::startSelectAction( const QPoint &viewportPos ) mSelectionStartPoint = viewportPos; mHasSelection = true; - QPoint pos = viewportToContents( viewportPos ); - QPoint gpos = contentsToGrid( pos ); + TQPoint pos = viewportToContents( viewportPos ); + TQPoint gpos = contentsToGrid( pos ); // Store new selection mStartCell = gpos; @@ -736,12 +736,12 @@ void KOAgenda::startSelectAction( const QPoint &viewportPos ) updateContents(); } -void KOAgenda::performSelectAction(const QPoint& viewportPos) +void KOAgenda::performSelectAction(const TQPoint& viewportPos) { - QPoint pos = viewportToContents( viewportPos ); - QPoint gpos = contentsToGrid( pos ); + TQPoint pos = viewportToContents( viewportPos ); + TQPoint gpos = contentsToGrid( pos ); - QPoint clipperPos = clipper()-> + TQPoint clipperPos = clipper()-> mapFromGlobal(viewport()->mapToGlobal(viewportPos)); // Scroll if cursor was moved to upper or lower end of agenda. @@ -771,7 +771,7 @@ void KOAgenda::performSelectAction(const QPoint& viewportPos) } } -void KOAgenda::endSelectAction( const QPoint ¤tPos ) +void KOAgenda::endSelectAction( const TQPoint ¤tPos ) { mScrollUpTimer.stop(); mScrollDownTimer.stop(); @@ -782,19 +782,19 @@ void KOAgenda::endSelectAction( const QPoint ¤tPos ) if ( KOPrefs::instance()->mSelectionStartsEditor ) { if ( ( mSelectionStartPoint - currentPos ).manhattanLength() > - QApplication::startDragDistance() ) { + TQApplication::startDragDistance() ) { emitNewEventForSelection(); } } } KOAgenda::MouseActionType KOAgenda::isInResizeArea( bool horizontal, - const QPoint &pos, KOAgendaItem*item ) + const TQPoint &pos, KOAgendaItem*item ) { if (!item) return NOP; - QPoint gridpos = contentsToGrid( pos ); - QPoint contpos = gridToContents( gridpos + - QPoint( (KOGlobals::self()->reverseLayout())?1:0, 0 ) ); + TQPoint gridpos = contentsToGrid( pos ); + TQPoint contpos = gridToContents( gridpos + + TQPoint( (KOGlobals::self()->reverseLayout())?1:0, 0 ) ); //kdDebug(5850)<<"contpos="<<contpos<<", pos="<<pos<<", gpos="<<gpos<<endl; //kdDebug(5850)<<"clXLeft="<<clXLeft<<", clXRight="<<clXRight<<endl; @@ -834,9 +834,9 @@ KOAgenda::MouseActionType KOAgenda::isInResizeArea( bool horizontal, } } -void KOAgenda::startItemAction(const QPoint& viewportPos) +void KOAgenda::startItemAction(const TQPoint& viewportPos) { - QPoint pos = viewportToContents( viewportPos ); + TQPoint pos = viewportToContents( viewportPos ); mStartCell = contentsToGrid( pos ); mEndCell = mStartCell; @@ -852,18 +852,18 @@ void KOAgenda::startItemAction(const QPoint& viewportPos) setActionCursor( mActionType, true ); } -void KOAgenda::performItemAction(const QPoint& viewportPos) +void KOAgenda::performItemAction(const TQPoint& viewportPos) { // kdDebug(5850) << "viewportPos: " << viewportPos.x() << "," << viewportPos.y() << endl; -// QPoint point = viewport()->mapToGlobal(viewportPos); +// TQPoint point = viewport()->mapToGlobal(viewportPos); // kdDebug(5850) << "Global: " << point.x() << "," << point.y() << endl; // point = clipper()->mapFromGlobal(point); // kdDebug(5850) << "clipper: " << point.x() << "," << point.y() << endl; // kdDebug(5850) << "visible height: " << visibleHeight() << endl; - QPoint pos = viewportToContents( viewportPos ); + TQPoint pos = viewportToContents( viewportPos ); // kdDebug(5850) << "contents: " << x << "," << y << "\n" << endl; - QPoint gpos = contentsToGrid( pos ); - QPoint clipperPos = clipper()-> + TQPoint gpos = contentsToGrid( pos ); + TQPoint clipperPos = clipper()-> mapFromGlobal(viewport()->mapToGlobal(viewportPos)); // Cursor left active agenda area. @@ -925,7 +925,7 @@ void KOAgenda::performItemAction(const QPoint& viewportPos) if (!firstItem) firstItem = mActionItem; KOAgendaItem *lastItem = mActionItem->lastMultiItem(); if (!lastItem) lastItem = mActionItem; - QPoint deltapos = gpos - mEndCell; + TQPoint deltapos = gpos - mEndCell; KOAgendaItem *moveItem = firstItem; while (moveItem) { bool changed=false; @@ -947,7 +947,7 @@ void KOAgenda::performItemAction(const QPoint& viewportPos) mItems.append( newFirst ); moveItem->resize( int( mGridSpacingX * newFirst->cellWidth() ), int( mGridSpacingY * newFirst->cellHeight() )); - QPoint cpos = gridToContents( QPoint( newFirst->cellXLeft(), newFirst->cellYTop() ) ); + TQPoint cpos = gridToContents( TQPoint( newFirst->cellXLeft(), newFirst->cellYTop() ) ); addChild( newFirst, cpos.x(), cpos.y() ); } else { newFirst = insertItem( moveItem->incidence(), moveItem->itemDate(), @@ -992,7 +992,7 @@ void KOAgenda::performItemAction(const QPoint& viewportPos) mItems.append(newLast); moveItem->resize( int( mGridSpacingX * newLast->cellWidth() ), int( mGridSpacingY * newLast->cellHeight() )); - QPoint cpos = gridToContents( QPoint( newLast->cellXLeft(), newLast->cellYTop() ) ) ; + TQPoint cpos = gridToContents( TQPoint( newLast->cellXLeft(), newLast->cellYTop() ) ) ; addChild( newLast, cpos.x(), cpos.y() ); } else { newLast = insertItem( moveItem->incidence(), moveItem->itemDate(), @@ -1050,7 +1050,7 @@ void KOAgenda::endItemAction() if ( mItemMoved ) { bool modify = true; if ( mActionItem->incidence()->doesRecur() ) { - int res = KOMessageBox::fourBtnMsgBox( this, QMessageBox::Question, + int res = KOMessageBox::fourBtnMsgBox( this, TQMessageBox::Question, i18n("The item you try to change is a recurring item. Shall the changes " "be applied only to this single occurrence, only to the future items, " "or to all items in the recurrence?"), @@ -1132,7 +1132,7 @@ void KOAgenda::endItemAction() KOAgendaItem *modif = placeItem; - QPtrList<KOAgendaItem> oldconflictItems = placeItem->conflictItems(); + TQPtrList<KOAgendaItem> oldconflictItems = placeItem->conflictItems(); KOAgendaItem *item; for ( item = oldconflictItems.first(); item != 0; item = oldconflictItems.next() ) { @@ -1179,15 +1179,15 @@ void KOAgenda::setActionCursor( int actionType, bool acting ) } } -void KOAgenda::setNoActionCursor( KOAgendaItem *moveItem, const QPoint& viewportPos ) +void KOAgenda::setNoActionCursor( KOAgendaItem *moveItem, const TQPoint& viewportPos ) { // kdDebug(5850) << "viewportPos: " << viewportPos.x() << "," << viewportPos.y() << endl; -// QPoint point = viewport()->mapToGlobal(viewportPos); +// TQPoint point = viewport()->mapToGlobal(viewportPos); // kdDebug(5850) << "Global: " << point.x() << "," << point.y() << endl; // point = clipper()->mapFromGlobal(point); // kdDebug(5850) << "clipper: " << point.x() << "," << point.y() << endl; - QPoint pos = viewportToContents( viewportPos ); + TQPoint pos = viewportToContents( viewportPos ); bool noResize = (moveItem && moveItem->incidence() && moveItem->incidence()->type() == "Todo"); @@ -1201,10 +1201,10 @@ void KOAgenda::setNoActionCursor( KOAgendaItem *moveItem, const QPoint& viewport */ double KOAgenda::calcSubCellWidth( KOAgendaItem *item ) { - QPoint pt, pt1; - pt = gridToContents( QPoint( item->cellXLeft(), item->cellYTop() ) ); - pt1 = gridToContents( QPoint( item->cellXLeft(), item->cellYTop() ) + - QPoint( 1, 1 ) ); + TQPoint pt, pt1; + pt = gridToContents( TQPoint( item->cellXLeft(), item->cellYTop() ) ); + pt1 = gridToContents( TQPoint( item->cellXLeft(), item->cellYTop() ) + + TQPoint( 1, 1 ) ); pt1 -= pt; int maxSubCells = item->subCells(); double newSubCellWidth; @@ -1224,7 +1224,7 @@ void KOAgenda::adjustItemPosition( KOAgendaItem *item ) int clXLeft = item->cellXLeft(); if ( KOGlobals::self()->reverseLayout() ) clXLeft = item->cellXRight() + 1; - QPoint cpos = gridToContents( QPoint( clXLeft, item->cellYTop() ) ); + TQPoint cpos = gridToContents( TQPoint( clXLeft, item->cellYTop() ) ); moveChild( item, cpos.x(), cpos.y() ); } @@ -1234,9 +1234,9 @@ void KOAgenda::placeAgendaItem( KOAgendaItem *item, double subCellWidth ) // << " subCellWidth: " << subCellWidth << endl; // "left" upper corner, no subcells yet, RTL layouts have right/left switched, widths are negative then - QPoint pt = gridToContents( QPoint( item->cellXLeft(), item->cellYTop() ) ); + TQPoint pt = gridToContents( TQPoint( item->cellXLeft(), item->cellYTop() ) ); // right lower corner - QPoint pt1 = gridToContents( QPoint( item->cellXLeft() + item->cellWidth(), + TQPoint pt1 = gridToContents( TQPoint( item->cellXLeft() + item->cellWidth(), item->cellYBottom()+1 ) ); double subCellPos = item->subCell() * subCellWidth; @@ -1296,16 +1296,16 @@ void KOAgenda::placeSubCells( KOAgendaItem *placeItem ) kdDebug(5850) << "KOAgenda::placeSubCells()..." << endl; #endif - QPtrList<KOrg::CellItem> cells; + TQPtrList<KOrg::CellItem> cells; KOAgendaItem *item; for ( item = mItems.first(); item != 0; item = mItems.next() ) { cells.append( item ); } - QPtrList<KOrg::CellItem> items = KOrg::CellItem::placeItem( cells, + TQPtrList<KOrg::CellItem> items = KOrg::CellItem::placeItem( cells, placeItem ); - placeItem->setConflictItems( QPtrList<KOAgendaItem>() ); + placeItem->setConflictItems( TQPtrList<KOAgendaItem>() ); double newSubCellWidth = calcSubCellWidth( placeItem ); KOrg::CellItem *i; for ( i = items.first(); i; i = items.next() ) { @@ -1322,22 +1322,22 @@ void KOAgenda::placeSubCells( KOAgendaItem *placeItem ) int KOAgenda::columnWidth( int column ) { - int start = gridToContents( QPoint( column, 0 ) ).x(); + int start = gridToContents( TQPoint( column, 0 ) ).x(); if (KOGlobals::self()->reverseLayout() ) column--; else column++; - int end = gridToContents( QPoint( column, 0 ) ).x(); + int end = gridToContents( TQPoint( column, 0 ) ).x(); return end - start; } /* Draw grid in the background of the agenda. */ -void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) +void KOAgenda::drawContents(TQPainter* p, int cx, int cy, int cw, int ch) { - QPixmap db(cw, ch); + TQPixmap db(cw, ch); db.fill(KOPrefs::instance()->mAgendaBgColor); - QPainter dbp(&db); + TQPainter dbp(&db); dbp.translate(-cx,-cy); // kdDebug(5850) << "KOAgenda::drawContents()" << endl; @@ -1345,8 +1345,8 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) // Highlight working hours if (mWorkingHoursEnable) { - QPoint pt1( cx, mWorkingHoursYTop ); - QPoint pt2( cx+cw, mWorkingHoursYBottom ); + TQPoint pt1( cx, mWorkingHoursYTop ); + TQPoint pt2( cx+cw, mWorkingHoursYBottom ); if ( pt2.x() >= pt1.x() /*&& pt2.y() >= pt1.y()*/) { int gxStart = contentsToGrid( pt1 ).x(); int gxEnd = contentsToGrid( pt2 ).x(); @@ -1358,7 +1358,7 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) } int xoffset = ( KOGlobals::self()->reverseLayout()?1:0 ); while( gxStart <= gxEnd ) { - int xStart = gridToContents( QPoint( gxStart+xoffset, 0 ) ).x(); + int xStart = gridToContents( TQPoint( gxStart+xoffset, 0 ) ).x(); int xWidth = columnWidth( gxStart ) + 1; if ( pt2.y() < pt1.y() ) { // overnight working hours @@ -1389,32 +1389,32 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) // draw selection if ( mHasSelection ) { - QPoint pt, pt1; + TQPoint pt, pt1; if ( mSelectionEndCell.x() > mSelectionStartCell.x() ) { // multi day selection // draw start day pt = gridToContents( mSelectionStartCell ); - pt1 = gridToContents( QPoint( mSelectionStartCell.x() + 1, mRows + 1 ) ); - dbp.fillRect( QRect( pt, pt1 ), KOPrefs::instance()->mHighlightColor ); + pt1 = gridToContents( TQPoint( mSelectionStartCell.x() + 1, mRows + 1 ) ); + dbp.fillRect( TQRect( pt, pt1 ), KOPrefs::instance()->mHighlightColor ); // draw all other days between the start day and the day of the selection end for ( int c = mSelectionStartCell.x() + 1; c < mSelectionEndCell.x(); ++c ) { - pt = gridToContents( QPoint( c, 0 ) ); - pt1 = gridToContents( QPoint( c + 1, mRows + 1 ) ); - dbp.fillRect( QRect( pt, pt1 ), KOPrefs::instance()->mHighlightColor ); + pt = gridToContents( TQPoint( c, 0 ) ); + pt1 = gridToContents( TQPoint( c + 1, mRows + 1 ) ); + dbp.fillRect( TQRect( pt, pt1 ), KOPrefs::instance()->mHighlightColor ); } // draw end day - pt = gridToContents( QPoint( mSelectionEndCell.x(), 0 ) ); - pt1 = gridToContents( mSelectionEndCell + QPoint(1,1) ); - dbp.fillRect( QRect( pt, pt1), KOPrefs::instance()->mHighlightColor ); + pt = gridToContents( TQPoint( mSelectionEndCell.x(), 0 ) ); + pt1 = gridToContents( mSelectionEndCell + TQPoint(1,1) ); + dbp.fillRect( TQRect( pt, pt1), KOPrefs::instance()->mHighlightColor ); } else { // single day selection pt = gridToContents( mSelectionStartCell ); - pt1 = gridToContents( mSelectionEndCell + QPoint(1,1) ); - dbp.fillRect( QRect( pt, pt1 ), KOPrefs::instance()->mHighlightColor ); + pt1 = gridToContents( mSelectionEndCell + TQPoint(1,1) ); + dbp.fillRect( TQRect( pt, pt1 ), KOPrefs::instance()->mHighlightColor ); } } - QPen hourPen( KOPrefs::instance()->mAgendaBgColor.dark( 150 ) ); - QPen halfHourPen( KOPrefs::instance()->mAgendaBgColor.dark( 125 ) ); + TQPen hourPen( KOPrefs::instance()->mAgendaBgColor.dark( 150 ) ); + TQPen halfHourPen( KOPrefs::instance()->mAgendaBgColor.dark( 125 ) ); dbp.setPen( hourPen ); // Draw vertical lines of grid, start with the last line not yet visible @@ -1445,23 +1445,23 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) /* Convert srcollview contents coordinates to agenda grid coordinates. */ -QPoint KOAgenda::contentsToGrid ( const QPoint &pos ) const +TQPoint KOAgenda::contentsToGrid ( const TQPoint &pos ) const { int gx = int( KOGlobals::self()->reverseLayout() ? mColumns - pos.x()/mGridSpacingX : pos.x()/mGridSpacingX ); int gy = int( pos.y()/mGridSpacingY ); - return QPoint( gx, gy ); + return TQPoint( gx, gy ); } /* Convert agenda grid coordinates to scrollview contents coordinates. */ -QPoint KOAgenda::gridToContents( const QPoint &gpos ) const +TQPoint KOAgenda::gridToContents( const TQPoint &gpos ) const { int x = int( KOGlobals::self()->reverseLayout() ? (mColumns - gpos.x())*mGridSpacingX : gpos.x()*mGridSpacingX ); int y = int( gpos.y()*mGridSpacingY ); - return QPoint( x, y ); + return TQPoint( x, y ); } @@ -1469,7 +1469,7 @@ QPoint KOAgenda::gridToContents( const QPoint &gpos ) const Return Y coordinate corresponding to time. Coordinates are rounded to fit into the grid. */ -int KOAgenda::timeToY(const QTime &time) +int KOAgenda::timeToY(const TQTime &time) { // kdDebug(5850) << "Time: " << time.toString() << endl; int minutesPerCell = 24 * 60 / mRows; @@ -1487,14 +1487,14 @@ int KOAgenda::timeToY(const QTime &time) Return time corresponding to cell y coordinate. Coordinates are rounded to fit into the grid. */ -QTime KOAgenda::gyToTime(int gy) +TQTime KOAgenda::gyToTime(int gy) { // kdDebug(5850) << "gyToTime: " << gy << endl; int secondsPerCell = 24 * 60 * 60/ mRows; int timeSeconds = secondsPerCell * gy; - QTime time( 0, 0, 0 ); + TQTime time( 0, 0, 0 ); if ( timeSeconds < 24 * 60 * 60 ) { time = time.addSecs(timeSeconds); } else { @@ -1505,10 +1505,10 @@ QTime KOAgenda::gyToTime(int gy) return time; } -QMemArray<int> KOAgenda::minContentsY() +TQMemArray<int> KOAgenda::minContentsY() { - QMemArray<int> minArray; - minArray.fill( timeToY( QTime(23, 59) ), mSelectedDates.count() ); + TQMemArray<int> minArray; + minArray.fill( timeToY( TQTime(23, 59) ), mSelectedDates.count() ); for ( KOAgendaItem *item = mItems.first(); item != 0; item = mItems.next() ) { int ymin = item->cellYTop(); @@ -1522,10 +1522,10 @@ QMemArray<int> KOAgenda::minContentsY() return minArray; } -QMemArray<int> KOAgenda::maxContentsY() +TQMemArray<int> KOAgenda::maxContentsY() { - QMemArray<int> maxArray; - maxArray.fill( timeToY( QTime(0, 0) ), mSelectedDates.count() ); + TQMemArray<int> maxArray; + maxArray.fill( timeToY( TQTime(0, 0) ), mSelectedDates.count() ); for ( KOAgendaItem *item = mItems.first(); item != 0; item = mItems.next() ) { int ymax = item->cellYBottom(); @@ -1539,7 +1539,7 @@ QMemArray<int> KOAgenda::maxContentsY() return maxArray; } -void KOAgenda::setStartTime( const QTime &startHour ) +void KOAgenda::setStartTime( const TQTime &startHour ) { double startPos = ( startHour.hour()/24. + startHour.minute()/1440. + startHour.second()/86400. ) * mRows * gridSpacingY(); @@ -1550,7 +1550,7 @@ void KOAgenda::setStartTime( const QTime &startHour ) /* Insert KOAgendaItem into agenda. */ -KOAgendaItem *KOAgenda::insertItem( Incidence *incidence, const QDate &qd, int X, +KOAgendaItem *KOAgenda::insertItem( Incidence *incidence, const TQDate &qd, int X, int YTop, int YBottom ) { #if 0 @@ -1568,10 +1568,10 @@ KOAgendaItem *KOAgenda::insertItem( Incidence *incidence, const QDate &qd, int X mActionType = NOP; KOAgendaItem *agendaItem = new KOAgendaItem( incidence, qd, viewport() ); - connect( agendaItem, SIGNAL( removeAgendaItem( KOAgendaItem * ) ), - SLOT( removeAgendaItem( KOAgendaItem * ) ) ); - connect( agendaItem, SIGNAL( showAgendaItem( KOAgendaItem * ) ), - SLOT( showAgendaItem( KOAgendaItem * ) ) ); + connect( agendaItem, TQT_SIGNAL( removeAgendaItem( KOAgendaItem * ) ), + TQT_SLOT( removeAgendaItem( KOAgendaItem * ) ) ); + connect( agendaItem, TQT_SIGNAL( showAgendaItem( KOAgendaItem * ) ), + TQT_SLOT( showAgendaItem( KOAgendaItem * ) ) ); if ( YBottom <= YTop ) { kdDebug(5850) << "KOAgenda::insertItem(): Text: " << agendaItem->text() << " YSize<0" << endl; @@ -1602,7 +1602,7 @@ KOAgendaItem *KOAgenda::insertItem( Incidence *incidence, const QDate &qd, int X /* Insert all-day KOAgendaItem into agenda. */ -KOAgendaItem *KOAgenda::insertAllDayItem( Incidence *event, const QDate &qd, +KOAgendaItem *KOAgenda::insertAllDayItem( Incidence *event, const TQDate &qd, int XBegin, int XEnd ) { if ( !mAllDayMode ) { @@ -1613,10 +1613,10 @@ KOAgendaItem *KOAgenda::insertAllDayItem( Incidence *event, const QDate &qd, mActionType = NOP; KOAgendaItem *agendaItem = new KOAgendaItem( event, qd, viewport() ); - connect( agendaItem, SIGNAL( removeAgendaItem( KOAgendaItem* ) ), - SLOT( removeAgendaItem( KOAgendaItem* ) ) ); - connect( agendaItem, SIGNAL( showAgendaItem( KOAgendaItem* ) ), - SLOT( showAgendaItem( KOAgendaItem* ) ) ); + connect( agendaItem, TQT_SIGNAL( removeAgendaItem( KOAgendaItem* ) ), + TQT_SLOT( removeAgendaItem( KOAgendaItem* ) ) ); + connect( agendaItem, TQT_SIGNAL( showAgendaItem( KOAgendaItem* ) ), + TQT_SLOT( showAgendaItem( KOAgendaItem* ) ) ); agendaItem->setCellXY( XBegin, 0, 0 ); agendaItem->setCellXRight( XEnd ); @@ -1640,7 +1640,7 @@ KOAgendaItem *KOAgenda::insertAllDayItem( Incidence *event, const QDate &qd, } -void KOAgenda::insertMultiItem (Event *event,const QDate &qd,int XBegin,int XEnd, +void KOAgenda::insertMultiItem (Event *event,const TQDate &qd,int XBegin,int XEnd, int YTop,int YBottom) { if (mAllDayMode) { @@ -1650,11 +1650,11 @@ void KOAgenda::insertMultiItem (Event *event,const QDate &qd,int XBegin,int XEnd mActionType = NOP; int cellX,cellYTop,cellYBottom; - QString newtext; + TQString newtext; int width = XEnd - XBegin + 1; int count = 0; KOAgendaItem *current = 0; - QPtrList<KOAgendaItem> multiItems; + TQPtrList<KOAgendaItem> multiItems; int visibleCount = mSelectedDates.first().daysTo(mSelectedDates.last()); for ( cellX = XBegin; cellX <= XEnd; ++cellX ) { ++count; @@ -1664,7 +1664,7 @@ void KOAgenda::insertMultiItem (Event *event,const QDate &qd,int XBegin,int XEnd else cellYTop = 0; if ( cellX == XEnd ) cellYBottom = YBottom; else cellYBottom = rows() - 1; - newtext = QString("(%1/%2): ").arg( count ).arg( width ); + newtext = TQString("(%1/%2): ").arg( count ).arg( width ); newtext.append( event->summary() ); current = insertItem( event, qd, cellX, cellYTop, cellYBottom ); @@ -1699,7 +1699,7 @@ void KOAgenda::removeIncidence( Incidence *incidence ) // First find all items to be deleted and store them // in its own list. Otherwise removeAgendaItem will reset // the current position and mess this up. - QPtrList<KOAgendaItem> itemsToRemove; + TQPtrList<KOAgendaItem> itemsToRemove; KOAgendaItem *item = mItems.first(); while ( item ) { @@ -1732,7 +1732,7 @@ bool KOAgenda::removeAgendaItem( KOAgendaItem *item ) // we found the item. Let's remove it and update the conflicts bool taken = false; KOAgendaItem *thisItem = item; - QPtrList<KOAgendaItem> conflictItems = thisItem->conflictItems(); + TQPtrList<KOAgendaItem> conflictItems = thisItem->conflictItems(); removeChild( thisItem ); int pos = mItems.find( thisItem ); if ( pos>=0 ) { @@ -1748,7 +1748,7 @@ bool KOAgenda::removeAgendaItem( KOAgendaItem *item ) } mItemsToDelete.append( thisItem ); - QTimer::singleShot( 0, this, SLOT( deleteItemsToDelete() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( deleteItemsToDelete() ) ); return taken; } @@ -1757,7 +1757,7 @@ void KOAgenda::deleteItemsToDelete() mItemsToDelete.clear(); } -/*QSizePolicy KOAgenda::sizePolicy() const +/*TQSizePolicy KOAgenda::sizePolicy() const { // Thought this would make the all-day event agenda minimum size and the // normal agenda take the remaining space. But it doesnt work. The QSplitter @@ -1765,21 +1765,21 @@ void KOAgenda::deleteItemsToDelete() // Preferred one. // But it doesnt hurt, so it stays. if (mAllDayMode) { - return QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred); + return TQSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Preferred); } else { - return QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); + return TQSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Expanding); } } */ /* - Overridden from QScrollView to provide proper resizing of KOAgendaItems. + Overridden from TQScrollView to provide proper resizing of KOAgendaItems. */ -void KOAgenda::resizeEvent ( QResizeEvent *ev ) +void KOAgenda::resizeEvent ( TQResizeEvent *ev ) { // kdDebug(5850) << "KOAgenda::resizeEvent" << endl; - QSize newSize( ev->size() ); + TQSize newSize( ev->size() ); if (mAllDayMode) { mGridSpacingX = double( newSize.width() - 2 * frameWidth() ) / (double)mColumns; mGridSpacingY = newSize.height() - 2 * frameWidth(); @@ -1792,9 +1792,9 @@ void KOAgenda::resizeEvent ( QResizeEvent *ev ) mGridSpacingY = mDesiredGridSpacingY; } calculateWorkingHours(); - QTimer::singleShot( 0, this, SLOT( resizeAllContents() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( resizeAllContents() ) ); emit gridSpacingYChanged( mGridSpacingY * 4 ); - QScrollView::resizeEvent(ev); + TQScrollView::resizeEvent(ev); } void KOAgenda::resizeAllContents() @@ -1919,7 +1919,7 @@ void KOAgenda::selectItem(KOAgendaItem *item) emit incidenceSelected( incidence ); } -void KOAgenda::selectItemByUID( const QString& uid ) +void KOAgenda::selectItemByUID( const TQString& uid ) { KOAgendaItem *item; for ( item = mItems.first(); item != 0; item = mItems.next() ) { @@ -1931,7 +1931,7 @@ void KOAgenda::selectItemByUID( const QString& uid ) } // This function seems never be called. -void KOAgenda::keyPressEvent( QKeyEvent *kev ) +void KOAgenda::keyPressEvent( TQKeyEvent *kev ) { switch(kev->key()) { case Key_PageDown: @@ -1955,7 +1955,7 @@ void KOAgenda::calculateWorkingHours() { mWorkingHoursEnable = !mAllDayMode; - QTime tmp = KOPrefs::instance()->mWorkingHoursStart.time(); + TQTime tmp = KOPrefs::instance()->mWorkingHoursStart.time(); mWorkingHoursYTop = int( 4 * mGridSpacingY * ( tmp.hour() + tmp.minute() / 60. + tmp.second() / 3600. ) ); @@ -1977,24 +1977,24 @@ void KOAgenda::setDateList(const DateList &selectedDates) marcus_bains(); } -void KOAgenda::setHolidayMask(QMemArray<bool> *mask) +void KOAgenda::setHolidayMask(TQMemArray<bool> *mask) { mHolidayMask = mask; } -void KOAgenda::contentsMousePressEvent ( QMouseEvent *event ) +void KOAgenda::contentsMousePressEvent ( TQMouseEvent *event ) { kdDebug(5850) << "KOagenda::contentsMousePressEvent(): type: " << event->type() << endl; - QScrollView::contentsMousePressEvent(event); + TQScrollView::contentsMousePressEvent(event); } -void KOAgenda::setTypeAheadReceiver( QObject *o ) +void KOAgenda::setTypeAheadReceiver( TQObject *o ) { mTypeAheadReceiver = o; } -QObject *KOAgenda::typeAheadReceiver() const +TQObject *KOAgenda::typeAheadReceiver() const { return mTypeAheadReceiver; } diff --git a/korganizer/koagenda.h b/korganizer/koagenda.h index cec1b74d8..0b0d06986 100644 --- a/korganizer/koagenda.h +++ b/korganizer/koagenda.h @@ -24,9 +24,9 @@ #ifndef KOAGENDA_H #define KOAGENDA_H -#include <qscrollview.h> -#include <qtimer.h> -#include <qguardedptr.h> +#include <tqscrollview.h> +#include <tqtimer.h> +#include <tqguardedptr.h> #include <libkcal/incidencebase.h> @@ -49,7 +49,7 @@ class Todo; class Calendar; } -class MarcusBains : public QFrame { +class MarcusBains : public TQFrame { Q_OBJECT public: MarcusBains( KOAgenda *agenda = 0, const char *name = 0 ); @@ -60,10 +60,10 @@ class MarcusBains : public QFrame { private: int todayColumn(); - QTimer *minutes; - QLabel *mTimeBox; + TQTimer *minutes; + TQLabel *mTimeBox; KOAgenda *agenda; - QTime oldTime; + TQTime oldTime; int oldToday; }; @@ -72,47 +72,47 @@ class KOAgenda : public QScrollView { Q_OBJECT public: - KOAgenda ( int columns, int rows, int columnSize, QWidget *parent=0, + KOAgenda ( int columns, int rows, int columnSize, TQWidget *parent=0, const char *name = 0, WFlags f = 0 ); - KOAgenda ( int columns, QWidget *parent = 0, + KOAgenda ( int columns, TQWidget *parent = 0, const char *name = 0, WFlags f = 0 ); virtual ~KOAgenda(); Incidence *selectedIncidence() const; - QDate selectedIncidenceDate() const; + TQDate selectedIncidenceDate() const; /** * Returns the uid of the last incidence that was selected. This * persists across reloads and clear, so that if the same uid * reappears, it can be reselected. */ - const QString lastSelectedUid() const; + const TQString lastSelectedUid() const; - virtual bool eventFilter ( QObject *, QEvent * ); + virtual bool eventFilter ( TQObject *, TQEvent * ); - QPoint contentsToGrid ( const QPoint &pos ) const; - QPoint gridToContents ( const QPoint &gpos ) const; + TQPoint contentsToGrid ( const TQPoint &pos ) const; + TQPoint gridToContents ( const TQPoint &gpos ) const; - int timeToY ( const QTime &time ); - QTime gyToTime ( int y ); + int timeToY ( const TQTime &time ); + TQTime gyToTime ( int y ); - QMemArray<int> minContentsY(); - QMemArray<int> maxContentsY(); + TQMemArray<int> minContentsY(); + TQMemArray<int> maxContentsY(); int visibleContentsYMin(); int visibleContentsYMax(); - void setStartTime( const QTime &startHour ); + void setStartTime( const TQTime &startHour ); - KOAgendaItem *insertItem ( Incidence *incidence, const QDate &qd, int X, int YTop, + KOAgendaItem *insertItem ( Incidence *incidence, const TQDate &qd, int X, int YTop, int YBottom ); - KOAgendaItem *insertAllDayItem ( Incidence *event, const QDate &qd, int XBegin, + KOAgendaItem *insertAllDayItem ( Incidence *event, const TQDate &qd, int XBegin, int XEnd ); - void insertMultiItem ( Event *event, const QDate &qd, int XBegin, int XEnd, + void insertMultiItem ( Event *event, const TQDate &qd, int XBegin, int XEnd, int YTop, int YBottom ); /** remove an event and all its multi-items from the agenda. * This function removes the items from the view, but doesn't delete them immediately. * Instead, they are queued in mItemsToDelete and later deleted by - * the slot deleteItemsToDelete() (called by QTimer::singleShot ) */ + * the slot deleteItemsToDelete() (called by TQTimer::singleShot ) */ void removeIncidence( Incidence *incidence ); void changeColumns( int columns ); @@ -123,7 +123,7 @@ class KOAgenda : public QScrollView double gridSpacingX() const { return mGridSpacingX; } double gridSpacingY() const { return mGridSpacingY; } -// virtual QSizePolicy sizePolicy() const; +// virtual TQSizePolicy sizePolicy() const; void clear(); @@ -134,13 +134,13 @@ class KOAgenda : public QScrollView void checkScrollBoundaries(); - void setHolidayMask( QMemArray<bool> * ); + void setHolidayMask( TQMemArray<bool> * ); void setDateList( const DateList &selectedDates ); DateList dateList() const; - void setTypeAheadReceiver( QObject * ); - QObject *typeAheadReceiver() const; + void setTypeAheadReceiver( TQObject * ); + TQObject *typeAheadReceiver() const; void finishTypeAhead(); void setCalendar( Calendar*cal ) { mCalendar = cal; } @@ -166,36 +166,36 @@ class KOAgenda : public QScrollView /** Select the item associated with a given uid. Linear search, use carefully. */ - void selectItemByUID( const QString& uid ); + void selectItemByUID( const TQString& uid ); bool removeAgendaItem( KOAgendaItem *item ); void showAgendaItem( KOAgendaItem *item ); signals: void newEventSignal(); - void newTimeSpanSignal( const QPoint &, const QPoint & ); + void newTimeSpanSignal( const TQPoint &, const TQPoint & ); void newStartSelectSignal(); void showIncidenceSignal( Incidence * ); void editIncidenceSignal( Incidence * ); void deleteIncidenceSignal( Incidence * ); - void showIncidencePopupSignal( Incidence *, const QDate &); + void showIncidencePopupSignal( Incidence *, const TQDate &); void showNewEventPopupSignal(); void itemModified( KOAgendaItem *item ); void incidenceSelected( Incidence * ); - void startMultiModify( const QString & ); + void startMultiModify( const TQString & ); void endMultiModify(); void lowerYChanged( int ); void upperYChanged( int ); void startDragSignal(Incidence *); - void droppedToDo( Todo*todo, const QPoint &gpos, bool allDay ); + void droppedToDo( Todo*todo, const TQPoint &gpos, bool allDay ); void enableAgendaUpdate( bool enable ); - void zoomView( const int delta, const QPoint &pos, const Qt::Orientation ); + void zoomView( const int delta, const TQPoint &pos, const Qt::Orientation ); - void mousePosSignal(const QPoint &pos); + void mousePosSignal(const TQPoint &pos); void enterAgenda(); void leaveAgenda(); @@ -206,21 +206,21 @@ class KOAgenda : public QScrollView RESIZETOP, RESIZEBOTTOM, RESIZELEFT, RESIZERIGHT }; protected: - void drawContents( QPainter *p, int cx, int cy, int cw, int ch ); + void drawContents( TQPainter *p, int cx, int cy, int cw, int ch ); int columnWidth( int column ); - virtual void resizeEvent ( QResizeEvent * ); + virtual void resizeEvent ( TQResizeEvent * ); /** Handles mouse events. Called from eventFilter */ - virtual bool eventFilter_mouse ( QObject *, QMouseEvent * ); + virtual bool eventFilter_mouse ( TQObject *, TQMouseEvent * ); #ifndef QT_NO_WHEELEVENT /** Handles mousewheel events. Called from eventFilter */ - virtual bool eventFilter_wheel ( QObject *, QWheelEvent * ); + virtual bool eventFilter_wheel ( TQObject *, TQWheelEvent * ); #endif /** Handles key events. Called from eventFilter */ - virtual bool eventFilter_key ( QObject *, QKeyEvent * ); + virtual bool eventFilter_key ( TQObject *, TQKeyEvent * ); /** Handles drag and drop events. Called from eventFilter */ - virtual bool eventFilter_drag( QObject *, QDropEvent * ); + virtual bool eventFilter_drag( TQObject *, TQDropEvent * ); /** returns RESIZELEFT if pos is near the lower edge of the action item, RESIZERIGHT if pos is near the higher edge, and MOVE otherwise. @@ -228,32 +228,32 @@ class KOAgenda : public QScrollView the event, although that means moving to the right! horizontal is the same as mAllDayAgenda. */ - MouseActionType isInResizeArea( bool horizontal, const QPoint &pos, KOAgendaItem *item ); + MouseActionType isInResizeArea( bool horizontal, const TQPoint &pos, KOAgendaItem *item ); /** Return whether the cell specified by the grid point belongs to the current select */ - bool ptInSelection( QPoint gpos ) const; + bool ptInSelection( TQPoint gpos ) const; /** Start selecting time span. */ - void startSelectAction( const QPoint &viewportPos ); + void startSelectAction( const TQPoint &viewportPos ); /** Select time span. */ - void performSelectAction( const QPoint &viewportPos ); + void performSelectAction( const TQPoint &viewportPos ); /** Emd selecting time span. */ - void endSelectAction( const QPoint &viewportPos ); + void endSelectAction( const TQPoint &viewportPos ); /** Start moving/resizing agenda item */ - void startItemAction(const QPoint& viewportPos); + void startItemAction(const TQPoint& viewportPos); /** Move/resize agenda item */ - void performItemAction(const QPoint& viewportPos); + void performItemAction(const TQPoint& viewportPos); /** End moving/resizing agenda item */ void endItemAction(); /** Set cursor, when no item action is in progress */ - void setNoActionCursor( KOAgendaItem *moveItem, const QPoint &viewportPos ); + void setNoActionCursor( KOAgendaItem *moveItem, const TQPoint &viewportPos ); /** Sets the cursor according to the given action type. If acting==true, the corresponding action is running (i.e. the item is really moved). If acting==false the cursor should just indicate that the corresponding action @@ -272,11 +272,11 @@ class KOAgenda : public QScrollView /** Process the keyevent, including the ignored keyevents of eventwidgets. * Implements pgup/pgdn and cursor key navigation in the view. */ - void keyPressEvent( QKeyEvent * ); + void keyPressEvent( TQKeyEvent * ); void calculateWorkingHours(); - virtual void contentsMousePressEvent ( QMouseEvent * ); + virtual void contentsMousePressEvent ( TQMouseEvent * ); void emitNewEventForSelection(); @@ -312,44 +312,44 @@ class KOAgenda : public QScrollView int mScrollDelay; int mScrollOffset; - QTimer mScrollUpTimer; - QTimer mScrollDownTimer; + TQTimer mScrollUpTimer; + TQTimer mScrollDownTimer; // Number of Columns/Rows of agenda grid int mColumns; int mRows; // Cells to store Move and Resize coordiantes while performing the action - QPoint mStartCell; - QPoint mEndCell; + TQPoint mStartCell; + TQPoint mEndCell; // Working Hour coordiantes bool mWorkingHoursEnable; - QMemArray<bool> *mHolidayMask; + TQMemArray<bool> *mHolidayMask; int mWorkingHoursYTop; int mWorkingHoursYBottom; // Selection bool mHasSelection; - QPoint mSelectionStartPoint; - QPoint mSelectionStartCell; - QPoint mSelectionEndCell; + TQPoint mSelectionStartPoint; + TQPoint mSelectionStartCell; + TQPoint mSelectionEndCell; // List of dates to be displayed DateList mSelectedDates; // The KOAgendaItem, which has been right-clicked last - QGuardedPtr<KOAgendaItem> mClickedItem; + TQGuardedPtr<KOAgendaItem> mClickedItem; // The KOAgendaItem, which is being moved/resized - QGuardedPtr<KOAgendaItem> mActionItem; + TQGuardedPtr<KOAgendaItem> mActionItem; // Currently selected item - QGuardedPtr<KOAgendaItem> mSelectedItem; + TQGuardedPtr<KOAgendaItem> mSelectedItem; // Uid of the last selected item. Used for reselecting in situations // where the selected item points to a no longer valid incidence, for // example during resource reload. - QString mSelectedUid; + TQString mSelectedUid; // The Marcus Bains Line widget. MarcusBains *mMarcusBains; @@ -359,17 +359,17 @@ class KOAgenda : public QScrollView bool mItemMoved; // List of all Items contained in agenda - QPtrList<KOAgendaItem> mItems; - QPtrList<KOAgendaItem> mItemsToDelete; + TQPtrList<KOAgendaItem> mItems; + TQPtrList<KOAgendaItem> mItemsToDelete; - QPopupMenu *mItemPopup; // Right mouse button popup menu for KOAgendaItems + TQPopupMenu *mItemPopup; // Right mouse button popup menu for KOAgendaItems int mOldLowerScrollValue; int mOldUpperScrollValue; bool mTypeAhead; - QObject *mTypeAheadReceiver; - QPtrList<QEvent> mTypeAheadEvents; + TQObject *mTypeAheadReceiver; + TQPtrList<TQEvent> mTypeAheadEvents; bool mReturnPressed; KOrg::IncidenceChangerBase *mChanger; diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index 34d851a7f..629f59c31 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp @@ -23,9 +23,9 @@ without including the source code for Qt in the source distribution. */ -#include <qtooltip.h> -#include <qdragobject.h> -#include <qpainter.h> +#include <tqtooltip.h> +#include <tqdragobject.h> +#include <tqpainter.h> #include <kiconloader.h> #include <kdebug.h> @@ -51,21 +51,21 @@ //-------------------------------------------------------------------------- -QToolTipGroup *KOAgendaItem::mToolTipGroup = 0; +TQToolTipGroup *KOAgendaItem::mToolTipGroup = 0; -QPixmap *KOAgendaItem::alarmPxmp = 0; -QPixmap *KOAgendaItem::recurPxmp = 0; -QPixmap *KOAgendaItem::readonlyPxmp = 0; -QPixmap *KOAgendaItem::replyPxmp = 0; -QPixmap *KOAgendaItem::groupPxmp = 0; -QPixmap *KOAgendaItem::groupPxmpTentative = 0; -QPixmap *KOAgendaItem::organizerPxmp = 0; +TQPixmap *KOAgendaItem::alarmPxmp = 0; +TQPixmap *KOAgendaItem::recurPxmp = 0; +TQPixmap *KOAgendaItem::readonlyPxmp = 0; +TQPixmap *KOAgendaItem::replyPxmp = 0; +TQPixmap *KOAgendaItem::groupPxmp = 0; +TQPixmap *KOAgendaItem::groupPxmpTentative = 0; +TQPixmap *KOAgendaItem::organizerPxmp = 0; //-------------------------------------------------------------------------- -KOAgendaItem::KOAgendaItem( Incidence *incidence, const QDate &qd, QWidget *parent, +KOAgendaItem::KOAgendaItem( Incidence *incidence, const TQDate &qd, TQWidget *parent, const char *name, WFlags f ) : - QWidget( parent, name, f ), mIncidence( incidence ), mDate( qd ), + TQWidget( parent, name, f ), mIncidence( incidence ), mDate( qd ), mLabelText( mIncidence->summary() ), mIconAlarm( false ), mIconRecur( false ), mIconReadonly( false ), mIconReply( false ), mIconGroup( false ), mIconGroupTentative( false ), mIconOrganizer( false ), @@ -76,7 +76,7 @@ KOAgendaItem::KOAgendaItem( Incidence *incidence, const QDate &qd, QWidget *pare setCellXY( 0, 0, 1 ); setCellXRight( 0 ); setMouseTracking( true ); - mResourceColor = QColor(); + mResourceColor = TQColor(); updateIcons(); // select() does nothing, if state hasn't change, so preset mSelected. @@ -188,7 +188,7 @@ int KOAgendaItem::cellWidth() const return mCellXRight - mCellXLeft + 1; } -void KOAgendaItem::setItemDate( const QDate &qd ) +void KOAgendaItem::setItemDate( const TQDate &qd ) { mDate = qd; } @@ -530,59 +530,59 @@ void KOAgendaItem::expandRight(int dx) setCellX( newXLeft, newXRight ); } -QToolTipGroup *KOAgendaItem::toolTipGroup() +TQToolTipGroup *KOAgendaItem::toolTipGroup() { - if (!mToolTipGroup) mToolTipGroup = new QToolTipGroup(0); + if (!mToolTipGroup) mToolTipGroup = new TQToolTipGroup(0); return mToolTipGroup; } -void KOAgendaItem::dragEnterEvent( QDragEnterEvent *e ) +void KOAgendaItem::dragEnterEvent( TQDragEnterEvent *e ) { #ifndef KORG_NODND if ( ICalDrag::canDecode( e ) || VCalDrag::canDecode( e ) ) { e->ignore(); return; } - if ( KVCardDrag::canDecode( e ) || QTextDrag::canDecode( e ) ) + if ( KVCardDrag::canDecode( e ) || TQTextDrag::canDecode( e ) ) e->accept(); else e->ignore(); #endif } -void KOAgendaItem::addAttendee( const QString &newAttendee ) +void KOAgendaItem::addAttendee( const TQString &newAttendee ) { kdDebug(5850) << " Email: " << newAttendee << endl; - QString name, email; + TQString name, email; KPIM::getNameAndMail( newAttendee, name, email ); if ( !( name.isEmpty() && email.isEmpty() ) ) { mIncidence->addAttendee(new Attendee(name,email)); - KMessageBox::information( this, i18n("Attendee \"%1\" added to the calendar item \"%2\"").arg(KPIM::normalizedAddress(name, email, QString())).arg(text()), i18n("Attendee added"), "AttendeeDroppedAdded" ); + KMessageBox::information( this, i18n("Attendee \"%1\" added to the calendar item \"%2\"").arg(KPIM::normalizedAddress(name, email, TQString())).arg(text()), i18n("Attendee added"), "AttendeeDroppedAdded" ); } } -void KOAgendaItem::dropEvent( QDropEvent *e ) +void KOAgendaItem::dropEvent( TQDropEvent *e ) { // TODO: Organize this better: First check for attachment (not only file, also any other url!), then if it's a vcard, otherwise check for attendees, then if the data is binary, add a binary attachment. #ifndef KORG_NODND - QString text; + TQString text; - bool decoded = QTextDrag::decode( e, text ); + bool decoded = TQTextDrag::decode( e, text ); if( decoded && text.startsWith( "file:" ) ) { mIncidence->addAttachment( new Attachment( text ) ); return; } #ifndef KORG_NOKABC - QString vcards; + TQString vcards; KABC::VCardConverter converter; KVCardDrag::decode( e, vcards ); KABC::Addressee::List list = converter.parseVCards( vcards ); KABC::Addressee::List::Iterator it; for ( it = list.begin(); it != list.end(); ++it ) { - QString em( (*it).fullEmail() ); + TQString em( (*it).fullEmail() ); if (em.isEmpty()) { em=(*it).realName(); } @@ -592,8 +592,8 @@ void KOAgendaItem::dropEvent( QDropEvent *e ) if( decoded ) { kdDebug(5850) << "Dropped : " << text << endl; - QStringList emails = QStringList::split( ",", text ); - for( QStringList::ConstIterator it = emails.begin(); it != emails.end(); + TQStringList emails = TQStringList::split( ",", text ); + for( TQStringList::ConstIterator it = emails.begin(); it != emails.end(); ++it ) { addAttendee( *it ); } @@ -604,12 +604,12 @@ void KOAgendaItem::dropEvent( QDropEvent *e ) } -QPtrList<KOAgendaItem> KOAgendaItem::conflictItems() +TQPtrList<KOAgendaItem> KOAgendaItem::conflictItems() { return mConflictItems; } -void KOAgendaItem::setConflictItems( QPtrList<KOAgendaItem> ci ) +void KOAgendaItem::setConflictItems( TQPtrList<KOAgendaItem> ci ) { mConflictItems = ci; KOAgendaItem *item; @@ -624,7 +624,7 @@ void KOAgendaItem::addConflictItem( KOAgendaItem *ci ) if ( mConflictItems.find( ci ) < 0 ) mConflictItems.append( ci ); } -QString KOAgendaItem::label() const +TQString KOAgendaItem::label() const { return mLabelText; } @@ -644,17 +644,17 @@ bool KOAgendaItem::overlaps( KOrg::CellItem *o ) const return false; } -void KOAgendaItem::paintFrame( QPainter *p, const QColor &color ) +void KOAgendaItem::paintFrame( TQPainter *p, const TQColor &color ) { - QColor oldpen(p->pen().color()); + TQColor oldpen(p->pen().color()); p->setPen( color ); p->drawRect( 0, 0, width(), height() ); p->drawRect( 1, 1, width() - 2, height() - 2 ); p->setPen( oldpen ); } -static void conditionalPaint( QPainter *p, bool cond, int &x, int ft, - const QPixmap &pxmp ) +static void conditionalPaint( TQPainter *p, bool cond, int &x, int ft, + const TQPixmap &pxmp ) { if ( !cond ) return; @@ -662,22 +662,22 @@ static void conditionalPaint( QPainter *p, bool cond, int &x, int ft, x += pxmp.width() + ft; } -void KOAgendaItem::paintEventIcon( QPainter *p, int &x, int ft ) +void KOAgendaItem::paintEventIcon( TQPainter *p, int &x, int ft ) { if ( !mIncidence ) return; - static const QPixmap eventPxmp = + static const TQPixmap eventPxmp = KOGlobals::self()->smallIcon( "appointment" ); if ( mIncidence->type() != "Event" ) return; conditionalPaint( p, true, x, ft, eventPxmp ); } -void KOAgendaItem::paintTodoIcon( QPainter *p, int &x, int ft ) +void KOAgendaItem::paintTodoIcon( TQPainter *p, int &x, int ft ) { if ( !mIncidence ) return; - static const QPixmap todoPxmp = + static const TQPixmap todoPxmp = KOGlobals::self()->smallIcon( "todo" ); - static const QPixmap completedPxmp = + static const TQPixmap completedPxmp = KOGlobals::self()->smallIcon( "checkedbox" ); if ( mIncidence->type() != "Todo" ) return; @@ -686,7 +686,7 @@ void KOAgendaItem::paintTodoIcon( QPainter *p, int &x, int ft ) conditionalPaint( p, b, x, ft, completedPxmp ); } -void KOAgendaItem::paintAlarmIcon( QPainter *p, int &x, int ft ) +void KOAgendaItem::paintAlarmIcon( TQPainter *p, int &x, int ft ) { if (!mIconAlarm) return; int y = ft; @@ -698,7 +698,7 @@ void KOAgendaItem::paintAlarmIcon( QPainter *p, int &x, int ft ) x += alarmPxmp->width() + ft; } -void KOAgendaItem::paintIcons( QPainter *p, int &x, int ft ) +void KOAgendaItem::paintIcons( TQPainter *p, int &x, int ft ) { paintEventIcon( p, x, ft ); paintTodoIcon( p, x, ft ); @@ -711,7 +711,7 @@ void KOAgendaItem::paintIcons( QPainter *p, int &x, int ft ) conditionalPaint( p, mIconOrganizer, x, ft, *organizerPxmp ); } -void KOAgendaItem::paintEvent( QPaintEvent *ev ) +void KOAgendaItem::paintEvent( TQPaintEvent *ev ) { //HACK // to reproduce a crash: @@ -721,7 +721,7 @@ void KOAgendaItem::paintEvent( QPaintEvent *ev ) // the following check if ( !mIncidence )return; - QRect visRect = visibleRect(); + TQRect visRect = visibleRect(); // when scrolling horizontally in the side-by-side view, the repainted area is clipped // to the newly visible area, which is a problem since the content changes when visRect // changes, so repaint the full item in that case @@ -730,7 +730,7 @@ void KOAgendaItem::paintEvent( QPaintEvent *ev ) return; } - QPainter p( this ); + TQPainter p( this ); const int ft = 2; // frame thickness for layout, see paintFrame() const int margin = 1 + ft; // frame + space between frame and content @@ -740,40 +740,40 @@ void KOAgendaItem::paintEvent( QPaintEvent *ev ) // Also look at #17984 if ( !alarmPxmp ) { - alarmPxmp = new QPixmap( KOGlobals::self()->smallIcon("bell") ); - recurPxmp = new QPixmap( KOGlobals::self()->smallIcon("recur") ); - readonlyPxmp = new QPixmap( KOGlobals::self()->smallIcon("readonlyevent") ); - replyPxmp = new QPixmap( KOGlobals::self()->smallIcon("mail_reply") ); - groupPxmp = new QPixmap( KOGlobals::self()->smallIcon("groupevent") ); - groupPxmpTentative = new QPixmap( KOGlobals::self()->smallIcon("groupeventtentative") ); - organizerPxmp = new QPixmap( KOGlobals::self()->smallIcon("organizer") ); + alarmPxmp = new TQPixmap( KOGlobals::self()->smallIcon("bell") ); + recurPxmp = new TQPixmap( KOGlobals::self()->smallIcon("recur") ); + readonlyPxmp = new TQPixmap( KOGlobals::self()->smallIcon("readonlyevent") ); + replyPxmp = new TQPixmap( KOGlobals::self()->smallIcon("mail_reply") ); + groupPxmp = new TQPixmap( KOGlobals::self()->smallIcon("groupevent") ); + groupPxmpTentative = new TQPixmap( KOGlobals::self()->smallIcon("groupeventtentative") ); + organizerPxmp = new TQPixmap( KOGlobals::self()->smallIcon("organizer") ); } - QColor bgColor; + TQColor bgColor; if ( mIncidence->type() == "Todo" ) { if ( static_cast<Todo*>(mIncidence)->isOverdue() ) bgColor = KOPrefs::instance()->todoOverdueColor(); else if ( static_cast<Todo*>(mIncidence)->dtDue().date() == - QDateTime::currentDateTime().date() ) + TQDateTime::currentDateTime().date() ) bgColor = KOPrefs::instance()->todoDueTodayColor(); } - QColor categoryColor; - QStringList categories = mIncidence->categories(); - QString cat = categories.first(); + TQColor categoryColor; + TQStringList categories = mIncidence->categories(); + TQString cat = categories.first(); if (cat.isEmpty()) categoryColor = KOPrefs::instance()->mEventColor; else categoryColor = *(KOPrefs::instance()->categoryColor(cat)); - QColor resourceColor = mResourceColor; + TQColor resourceColor = mResourceColor; if ( !resourceColor.isValid() ) resourceColor = categoryColor; if (!KOPrefs::instance()->hasCategoryColor(cat)) categoryColor = resourceColor; - QColor frameColor; + TQColor frameColor; if ( KOPrefs::instance()->agendaViewColors() == KOPrefs::ResourceOnly || KOPrefs::instance()->agendaViewColors() == KOPrefs::CategoryInsideResourceOutside ) { frameColor = bgColor.isValid() ? bgColor : resourceColor; @@ -791,17 +791,17 @@ void KOAgendaItem::paintEvent( QPaintEvent *ev ) } if ( mSelected ) { - frameColor = QColor( 85 + frameColor.red() * 2/3, + frameColor = TQColor( 85 + frameColor.red() * 2/3, 85 + frameColor.green() * 2/3, 85 + frameColor.blue() * 2/3 ); } else { frameColor = frameColor.dark( 115 ); } - QColor textColor = getTextColor(bgColor); + TQColor textColor = getTextColor(bgColor); p.setPen( textColor ); p.setBackgroundColor( bgColor ); p.setFont(KOPrefs::instance()->mAgendaViewFont); - QFontMetrics fm = p.fontMetrics(); + TQFontMetrics fm = p.fontMetrics(); int singleLineHeight = fm.boundingRect( mLabelText ).height(); @@ -811,8 +811,8 @@ void KOAgendaItem::paintEvent( QPaintEvent *ev ) // calculate the height of the full version (case 4) to test whether it is // possible - QString shortH; - QString longH; + TQString shortH; + TQString longH; if ( !isMultiItem() ) { shortH = KGlobal::locale()->formatTime(mIncidence->dtStart().time()); if (mIncidence->type() != "Todo") @@ -829,7 +829,7 @@ void KOAgendaItem::paintEvent( QPaintEvent *ev ) } KWordWrap *ww = KWordWrap::formatText( fm, - QRect(0, 0, width() - (2 * margin), -1), + TQRect(0, 0, width() - (2 * margin), -1), 0, mLabelText ); int th = ww->boundingRect().height(); @@ -889,7 +889,7 @@ void KOAgendaItem::paintEvent( QPaintEvent *ev ) } ww = KWordWrap::formatText( fm, - QRect( 0, 0, txtWidth, + TQRect( 0, 0, txtWidth, (height() - (2 * margin)) ), 0, mLabelText ); @@ -920,7 +920,7 @@ void KOAgendaItem::paintEvent( QPaintEvent *ev ) // paint headline p.fillRect( 0, 0, width(), (ft/2) + margin + hlHeight, - QBrush( frameColor ) ); + TQBrush( frameColor ) ); } x += visRect.left(); @@ -932,7 +932,7 @@ void KOAgendaItem::paintEvent( QPaintEvent *ev ) else { // paint headline p.fillRect( 0, 0, width(), (ft/2) + margin + hlHeight, - QBrush( frameColor ) ); + TQBrush( frameColor ) ); txtWidth = width() - margin - x; eventX = x; @@ -940,7 +940,7 @@ void KOAgendaItem::paintEvent( QPaintEvent *ev ) hTxtWidth = width() - margin - x; } - QString headline; + TQString headline; int hw = fm.boundingRect( longH ).width(); if ( hw > hTxtWidth ) { headline = shortH; @@ -957,13 +957,13 @@ void KOAgendaItem::paintEvent( QPaintEvent *ev ) // draw event text ww = KWordWrap::formatText( fm, - QRect( 0, 0, txtWidth, height() - margin - y ), + TQRect( 0, 0, txtWidth, height() - margin - y ), 0, mLabelText ); p.setBackgroundColor( bgColor ); p.setPen( textColor ); - QString ws = ww->wrappedString(); + TQString ws = ww->wrappedString(); if ( ws.left( ws.length()-1 ).find( '\n' ) >= 0 ) ww->drawText( &p, eventX, y, Qt::AlignAuto | KWordWrap::FadeOut ); diff --git a/korganizer/koagendaitem.h b/korganizer/koagendaitem.h index 2595e9c98..39a71e7ee 100644 --- a/korganizer/koagendaitem.h +++ b/korganizer/koagendaitem.h @@ -27,7 +27,7 @@ #include "cellitem.h" -#include <qdatetime.h> +#include <tqdatetime.h> class QToolTipGroup; class QDragEnterEvent; @@ -71,11 +71,11 @@ struct MultiItemInfo when the move started. The prev and next members of mStartMoveInfo are used for that longer sequence including all (shown and hidden) items. */ -class KOAgendaItem : public QWidget, public KOrg::CellItem +class KOAgendaItem : public TQWidget, public KOrg::CellItem { Q_OBJECT public: - KOAgendaItem(Incidence *incidence, const QDate &qd, QWidget *parent, const char *name=0, + KOAgendaItem(Incidence *incidence, const TQDate &qd, TQWidget *parent, const char *name=0, WFlags f=0 ); int cellXLeft() const { return mCellXLeft; } @@ -121,26 +121,26 @@ class KOAgendaItem : public QWidget, public KOrg::CellItem bool setIncidence( Incidence * ); Incidence *incidence() const { return mIncidence; } - QDate itemDate() { return mDate; } + TQDate itemDate() { return mDate; } /** Update the date of this item's occurrence (not in the event) */ - void setItemDate( const QDate &qd ); + void setItemDate( const TQDate &qd ); - void setText ( const QString & text ) { mLabelText = text; } - QString text () { return mLabelText; } + void setText ( const TQString & text ) { mLabelText = text; } + TQString text () { return mLabelText; } - static QToolTipGroup *toolTipGroup(); + static TQToolTipGroup *toolTipGroup(); - QPtrList<KOAgendaItem> conflictItems(); - void setConflictItems(QPtrList<KOAgendaItem>); + TQPtrList<KOAgendaItem> conflictItems(); + void setConflictItems(TQPtrList<KOAgendaItem>); void addConflictItem(KOAgendaItem *ci); - QString label() const; + TQString label() const; bool overlaps( KOrg::CellItem * ) const; - void setResourceColor( const QColor& color ) { mResourceColor = color; } - QColor resourceColor() {return mResourceColor;} + void setResourceColor( const TQColor& color ) { mResourceColor = color; } + TQColor resourceColor() {return mResourceColor;} signals: void removeAgendaItem( KOAgendaItem* ); void showAgendaItem( KOAgendaItem* ); @@ -148,19 +148,19 @@ class KOAgendaItem : public QWidget, public KOrg::CellItem public slots: void updateIcons(); void select(bool=true); - void addAttendee( const QString & ); + void addAttendee( const TQString & ); protected: - void dragEnterEvent(QDragEnterEvent *e); - void dropEvent(QDropEvent *e); - void paintEvent(QPaintEvent *e); - void paintFrame(QPainter *p, const QColor &color); - void paintEventIcon(QPainter *p, int &x, int ft); - void paintTodoIcon(QPainter *p, int &x, int ft); - void paintAlarmIcon(QPainter *p, int &x, int ft); + void dragEnterEvent(TQDragEnterEvent *e); + void dropEvent(TQDropEvent *e); + void paintEvent(TQPaintEvent *e); + void paintFrame(TQPainter *p, const TQColor &color); + void paintEventIcon(TQPainter *p, int &x, int ft); + void paintTodoIcon(TQPainter *p, int &x, int ft); + void paintAlarmIcon(TQPainter *p, int &x, int ft); // paint all visible icons - void paintIcons(QPainter *p, int &x, int ft); + void paintIcons(TQPainter *p, int &x, int ft); /** private movement functions. startMove needs to be called of only one of * the multitems. it will then loop through the whole series using @@ -177,8 +177,8 @@ class KOAgendaItem : public QWidget, public KOrg::CellItem int mSubCells; // Total number of subcells in cell of this item Incidence *mIncidence; // corresponding event or todo - QDate mDate; //date this events occurs (for recurrence) - QString mLabelText; + TQDate mDate; //date this events occurs (for recurrence) + TQString mLabelText; bool mIconAlarm, mIconRecur, mIconReadonly; bool mIconReply, mIconGroup, mIconGroupTentative; bool mIconOrganizer; @@ -189,20 +189,20 @@ class KOAgendaItem : public QWidget, public KOrg::CellItem // Variables to remember start position MultiItemInfo* mStartMoveInfo; //Color of the resource - QColor mResourceColor; + TQColor mResourceColor; private: - static QToolTipGroup *mToolTipGroup; + static TQToolTipGroup *mToolTipGroup; bool mSelected; - QPtrList<KOAgendaItem> mConflictItems; - - static QPixmap *alarmPxmp; - static QPixmap *recurPxmp; - static QPixmap *readonlyPxmp; - static QPixmap *replyPxmp; - static QPixmap *groupPxmp; - static QPixmap *groupPxmpTentative; - static QPixmap *organizerPxmp; + TQPtrList<KOAgendaItem> mConflictItems; + + static TQPixmap *alarmPxmp; + static TQPixmap *recurPxmp; + static TQPixmap *readonlyPxmp; + static TQPixmap *replyPxmp; + static TQPixmap *groupPxmp; + static TQPixmap *groupPxmpTentative; + static TQPixmap *organizerPxmp; }; #endif diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index e81e04850..256c4d0dd 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp @@ -22,22 +22,22 @@ without including the source code for Qt in the source distribution. */ -#include <qhbox.h> -#include <qvbox.h> -#include <qlabel.h> -#include <qframe.h> -#include <qlayout.h> +#include <tqhbox.h> +#include <tqvbox.h> +#include <tqlabel.h> +#include <tqframe.h> +#include <tqlayout.h> #ifndef KORG_NOSPLITTER -#include <qsplitter.h> +#include <tqsplitter.h> #endif -#include <qfont.h> -#include <qfontmetrics.h> -#include <qpopupmenu.h> -#include <qtooltip.h> -#include <qpainter.h> -#include <qpushbutton.h> -#include <qcursor.h> -#include <qbitarray.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqpopupmenu.h> +#include <tqtooltip.h> +#include <tqpainter.h> +#include <tqpushbutton.h> +#include <tqcursor.h> +#include <tqbitarray.h> #include <kapplication.h> #include <kdebug.h> @@ -76,8 +76,8 @@ using namespace KOrg; -EventIndicator::EventIndicator(Location loc,QWidget *parent,const char *name) - : QFrame(parent,name) +EventIndicator::EventIndicator(Location loc,TQWidget *parent,const char *name) + : TQFrame(parent,name) { mColumns = 1; mEnabled.resize( mColumns ); @@ -93,7 +93,7 @@ EventIndicator::~EventIndicator() { } -void EventIndicator::drawContents(QPainter *p) +void EventIndicator::drawContents(TQPainter *p) { // kdDebug(5850) << "======== top: " << contentsRect().top() << " bottom " // << contentsRect().bottom() << " left " << contentsRect().left() @@ -106,7 +106,7 @@ void EventIndicator::drawContents(QPainter *p) int xOffset = KOGlobals::self()->reverseLayout() ? (mColumns - 1 - i)*cellWidth + cellWidth/2 -mPixmap.width()/2 : i*cellWidth + cellWidth/2 -mPixmap.width()/2; - p->drawPixmap(QPoint(xOffset,0),mPixmap); + p->drawPixmap(TQPoint(xOffset,0),mPixmap); } } } @@ -132,12 +132,12 @@ void EventIndicator::enableColumn(int column, bool enable) //////////////////////////////////////////////////////////////////////////// -KOAlternateLabel::KOAlternateLabel(const QString &shortlabel, const QString &longlabel, - const QString &extensivelabel, QWidget *parent, const char *name ) - : QLabel(parent, name), mTextTypeFixed(false), mShortText(shortlabel), +KOAlternateLabel::KOAlternateLabel(const TQString &shortlabel, const TQString &longlabel, + const TQString &extensivelabel, TQWidget *parent, const char *name ) + : TQLabel(parent, name), mTextTypeFixed(false), mShortText(shortlabel), mLongText(longlabel), mExtensiveText(extensivelabel) { - setSizePolicy(QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed )); + setSizePolicy(TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed )); if (mExtensiveText.isEmpty()) mExtensiveText = mLongText; squeezeTextToLabel(); } @@ -149,25 +149,25 @@ KOAlternateLabel::~KOAlternateLabel() void KOAlternateLabel::useShortText() { mTextTypeFixed = true; - QLabel::setText( mShortText ); - QToolTip::remove( this ); - QToolTip::add( this, mExtensiveText ); + TQLabel::setText( mShortText ); + TQToolTip::remove( this ); + TQToolTip::add( this, mExtensiveText ); } void KOAlternateLabel::useLongText() { mTextTypeFixed = true; - QLabel::setText( mLongText ); - QToolTip::remove( this ); - QToolTip::add( this, mExtensiveText ); + TQLabel::setText( mLongText ); + TQToolTip::remove( this ); + TQToolTip::add( this, mExtensiveText ); } void KOAlternateLabel::useExtensiveText() { mTextTypeFixed = true; - QLabel::setText( mExtensiveText ); - QToolTip::remove( this ); - QToolTip::hide(); + TQLabel::setText( mExtensiveText ); + TQToolTip::remove( this ); + TQToolTip::hide(); } void KOAlternateLabel::useDefaultText() @@ -180,38 +180,38 @@ void KOAlternateLabel::squeezeTextToLabel() { if (mTextTypeFixed) return; - QFontMetrics fm(fontMetrics()); + TQFontMetrics fm(fontMetrics()); int labelWidth = size().width(); int textWidth = fm.width(mLongText); int longTextWidth = fm.width(mExtensiveText); if (longTextWidth <= labelWidth) { - QLabel::setText( mExtensiveText ); - QToolTip::remove( this ); - QToolTip::hide(); + TQLabel::setText( mExtensiveText ); + TQToolTip::remove( this ); + TQToolTip::hide(); } else if (textWidth <= labelWidth) { - QLabel::setText( mLongText ); - QToolTip::remove( this ); - QToolTip::add( this, mExtensiveText ); + TQLabel::setText( mLongText ); + TQToolTip::remove( this ); + TQToolTip::add( this, mExtensiveText ); } else { - QLabel::setText( mShortText ); - QToolTip::remove( this ); - QToolTip::add( this, mExtensiveText ); + TQLabel::setText( mShortText ); + TQToolTip::remove( this ); + TQToolTip::add( this, mExtensiveText ); } } -void KOAlternateLabel::resizeEvent( QResizeEvent * ) +void KOAlternateLabel::resizeEvent( TQResizeEvent * ) { squeezeTextToLabel(); } -QSize KOAlternateLabel::minimumSizeHint() const +TQSize KOAlternateLabel::minimumSizeHint() const { - QSize sh = QLabel::minimumSizeHint(); + TQSize sh = TQLabel::minimumSizeHint(); sh.setWidth(-1); return sh; } -void KOAlternateLabel::setText( const QString &text ) { +void KOAlternateLabel::setText( const TQString &text ) { mLongText = text; squeezeTextToLabel(); } @@ -221,14 +221,14 @@ void KOAlternateLabel::setText( const QString &text ) { //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// -KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name, bool isSideBySide ) : +KOAgendaView::KOAgendaView(Calendar *cal,TQWidget *parent,const char *name, bool isSideBySide ) : KOrg::AgendaView (cal,parent,name), mExpandButton( 0 ), mAllowAgendaUpdate( true ), mUpdateItem( 0 ), mResource( 0 ), mIsSideBySide( isSideBySide ), mPendingChanges( true ) { - mSelectedDates.append(QDate::currentDate()); + mSelectedDates.append(TQDate::currentDate()); mLayoutDayLabels = 0; mDayLabelsFrame = 0; @@ -246,15 +246,15 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name, bool } } - QBoxLayout *topLayout = new QVBoxLayout(this); + TQBoxLayout *topLayout = new TQVBoxLayout(this); // Create day name labels for agenda columns - mDayLabelsFrame = new QHBox(this); + mDayLabelsFrame = new TQHBox(this); topLayout->addWidget(mDayLabelsFrame); // Create agenda splitter #ifndef KORG_NOSPLITTER - mSplitterAgenda = new QSplitter(Vertical,this); + mSplitterAgenda = new TQSplitter(Vertical,this); topLayout->addWidget(mSplitterAgenda); #if KDE_IS_VERSION( 3, 1, 93 ) @@ -263,40 +263,40 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name, bool mSplitterAgenda->setOpaqueResize(); #endif - mAllDayFrame = new QHBox(mSplitterAgenda); + mAllDayFrame = new TQHBox(mSplitterAgenda); - QWidget *agendaFrame = new QWidget(mSplitterAgenda); + TQWidget *agendaFrame = new TQWidget(mSplitterAgenda); #else - QVBox *mainBox = new QVBox( this ); + TQVBox *mainBox = new TQVBox( this ); topLayout->addWidget( mainBox ); - mAllDayFrame = new QHBox(mainBox); + mAllDayFrame = new TQHBox(mainBox); - QWidget *agendaFrame = new QWidget(mainBox); + TQWidget *agendaFrame = new TQWidget(mainBox); #endif // Create all-day agenda widget - mDummyAllDayLeft = new QVBox( mAllDayFrame ); + mDummyAllDayLeft = new TQVBox( mAllDayFrame ); if ( isSideBySide ) mDummyAllDayLeft->hide(); if ( KOPrefs::instance()->compactDialogs() ) { - mExpandButton = new QPushButton(mDummyAllDayLeft); + mExpandButton = new TQPushButton(mDummyAllDayLeft); mExpandButton->setPixmap( mNotExpandedPixmap ); - mExpandButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, - QSizePolicy::Fixed ) ); - connect( mExpandButton, SIGNAL( clicked() ), SIGNAL( toggleExpand() ) ); + mExpandButton->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, + TQSizePolicy::Fixed ) ); + connect( mExpandButton, TQT_SIGNAL( clicked() ), TQT_SIGNAL( toggleExpand() ) ); } else { - QLabel *label = new QLabel( i18n("All Day"), mDummyAllDayLeft ); + TQLabel *label = new TQLabel( i18n("All Day"), mDummyAllDayLeft ); label->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::WordBreak ); } mAllDayAgenda = new KOAgenda(1,mAllDayFrame); - QWidget *dummyAllDayRight = new QWidget(mAllDayFrame); + TQWidget *dummyAllDayRight = new TQWidget(mAllDayFrame); // Create agenda frame - QGridLayout *agendaLayout = new QGridLayout(agendaFrame,3,3); -// QHBox *agendaFrame = new QHBox(splitterAgenda); + TQGridLayout *agendaLayout = new TQGridLayout(agendaFrame,3,3); +// TQHBox *agendaFrame = new TQHBox(splitterAgenda); // create event indicator bars mEventIndicatorTop = new EventIndicator(EventIndicator::Top,agendaFrame); @@ -304,7 +304,7 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name, bool mEventIndicatorBottom = new EventIndicator(EventIndicator::Bottom, agendaFrame); agendaLayout->addWidget(mEventIndicatorBottom,2,1); - QWidget *dummyAgendaRight = new QWidget(agendaFrame); + TQWidget *dummyAgendaRight = new TQWidget(agendaFrame); agendaLayout->addWidget(dummyAgendaRight,0,2); // Create time labels @@ -341,27 +341,27 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name, bool updateTimeBarWidth(); // Scrolling - connect(mAgenda->verticalScrollBar(),SIGNAL(valueChanged(int)), - mTimeLabels, SLOT(positionChanged())); + connect(mAgenda->verticalScrollBar(),TQT_SIGNAL(valueChanged(int)), + mTimeLabels, TQT_SLOT(positionChanged())); connect( mAgenda, - SIGNAL( zoomView( const int, const QPoint & ,const Qt::Orientation ) ), - SLOT( zoomView( const int, const QPoint &, const Qt::Orientation ) ) ); + TQT_SIGNAL( zoomView( const int, const TQPoint & ,const Qt::Orientation ) ), + TQT_SLOT( zoomView( const int, const TQPoint &, const Qt::Orientation ) ) ); - connect(mTimeLabels->verticalScrollBar(),SIGNAL(valueChanged(int)), - SLOT(setContentsPos(int))); + connect(mTimeLabels->verticalScrollBar(),TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(setContentsPos(int))); // Create Events, depends on type of agenda - connect( mAgenda, SIGNAL(newTimeSpanSignal(const QPoint &, const QPoint &)), - SLOT(newTimeSpanSelected(const QPoint &, const QPoint &))); - connect( mAllDayAgenda, SIGNAL(newTimeSpanSignal(const QPoint &, const QPoint &)), - SLOT(newTimeSpanSelectedAllDay(const QPoint &, const QPoint &))); + connect( mAgenda, TQT_SIGNAL(newTimeSpanSignal(const TQPoint &, const TQPoint &)), + TQT_SLOT(newTimeSpanSelected(const TQPoint &, const TQPoint &))); + connect( mAllDayAgenda, TQT_SIGNAL(newTimeSpanSignal(const TQPoint &, const TQPoint &)), + TQT_SLOT(newTimeSpanSelectedAllDay(const TQPoint &, const TQPoint &))); // event indicator update - connect( mAgenda, SIGNAL(lowerYChanged(int)), - SLOT(updateEventIndicatorTop(int))); - connect( mAgenda, SIGNAL(upperYChanged(int)), - SLOT(updateEventIndicatorBottom(int))); + connect( mAgenda, TQT_SIGNAL(lowerYChanged(int)), + TQT_SLOT(updateEventIndicatorTop(int))); + connect( mAgenda, TQT_SIGNAL(upperYChanged(int)), + TQT_SLOT(updateEventIndicatorBottom(int))); connectAgenda( mAgenda, mAgendaPopup, mAllDayAgenda ); connectAgenda( mAllDayAgenda, mAllDayAgendaPopup, mAgenda); @@ -371,9 +371,9 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name, bool CalendarResources *calres = dynamic_cast<CalendarResources*>( cal ); if ( calres ) { - connect( calres, SIGNAL(signalResourceAdded(ResourceCalendar *)), SLOT(resourcesChanged()) ); - connect( calres, SIGNAL(signalResourceModified( ResourceCalendar *)), SLOT(resourcesChanged()) ); - connect( calres, SIGNAL(signalResourceDeleted(ResourceCalendar *)), SLOT(resourcesChanged()) ); + connect( calres, TQT_SIGNAL(signalResourceAdded(ResourceCalendar *)), TQT_SLOT(resourcesChanged()) ); + connect( calres, TQT_SIGNAL(signalResourceModified( ResourceCalendar *)), TQT_SLOT(resourcesChanged()) ); + connect( calres, TQT_SIGNAL(signalResourceDeleted(ResourceCalendar *)), TQT_SLOT(resourcesChanged()) ); } } @@ -386,55 +386,55 @@ KOAgendaView::~KOAgendaView() delete mAllDayAgendaPopup; } -void KOAgendaView::connectAgenda( KOAgenda *agenda, QPopupMenu *popup, +void KOAgendaView::connectAgenda( KOAgenda *agenda, TQPopupMenu *popup, KOAgenda *otherAgenda ) { - connect( agenda, SIGNAL( showIncidencePopupSignal( Incidence *, const QDate & ) ), - popup, SLOT( showIncidencePopup( Incidence *, const QDate & ) ) ); + connect( agenda, TQT_SIGNAL( showIncidencePopupSignal( Incidence *, const TQDate & ) ), + popup, TQT_SLOT( showIncidencePopup( Incidence *, const TQDate & ) ) ); - connect( agenda, SIGNAL( showNewEventPopupSignal() ), - SLOT( showNewEventPopup() ) ); + connect( agenda, TQT_SIGNAL( showNewEventPopupSignal() ), + TQT_SLOT( showNewEventPopup() ) ); agenda->setCalendar( calendar() ); // Create/Show/Edit/Delete Event - connect( agenda, SIGNAL( newEventSignal() ), SIGNAL( newEventSignal() ) ); - - connect( agenda, SIGNAL( newStartSelectSignal() ), - otherAgenda, SLOT( clearSelection() ) ); - connect( agenda, SIGNAL( newStartSelectSignal() ), - SIGNAL( timeSpanSelectionChanged()) ); - - connect( agenda, SIGNAL( editIncidenceSignal( Incidence * ) ), - SIGNAL( editIncidenceSignal( Incidence * ) ) ); - connect( agenda, SIGNAL( showIncidenceSignal( Incidence * ) ), - SIGNAL( showIncidenceSignal( Incidence * ) ) ); - connect( agenda, SIGNAL( deleteIncidenceSignal( Incidence * ) ), - SIGNAL( deleteIncidenceSignal( Incidence * ) ) ); - - connect( agenda, SIGNAL( startMultiModify( const QString & ) ), - SIGNAL( startMultiModify( const QString & ) ) ); - connect( agenda, SIGNAL( endMultiModify() ), - SIGNAL( endMultiModify() ) ); - - connect( agenda, SIGNAL( itemModified( KOAgendaItem * ) ), - SLOT( updateEventDates( KOAgendaItem * ) ) ); - connect( agenda, SIGNAL( enableAgendaUpdate( bool ) ), - SLOT( enableAgendaUpdate( bool ) ) ); + connect( agenda, TQT_SIGNAL( newEventSignal() ), TQT_SIGNAL( newEventSignal() ) ); + + connect( agenda, TQT_SIGNAL( newStartSelectSignal() ), + otherAgenda, TQT_SLOT( clearSelection() ) ); + connect( agenda, TQT_SIGNAL( newStartSelectSignal() ), + TQT_SIGNAL( timeSpanSelectionChanged()) ); + + connect( agenda, TQT_SIGNAL( editIncidenceSignal( Incidence * ) ), + TQT_SIGNAL( editIncidenceSignal( Incidence * ) ) ); + connect( agenda, TQT_SIGNAL( showIncidenceSignal( Incidence * ) ), + TQT_SIGNAL( showIncidenceSignal( Incidence * ) ) ); + connect( agenda, TQT_SIGNAL( deleteIncidenceSignal( Incidence * ) ), + TQT_SIGNAL( deleteIncidenceSignal( Incidence * ) ) ); + + connect( agenda, TQT_SIGNAL( startMultiModify( const TQString & ) ), + TQT_SIGNAL( startMultiModify( const TQString & ) ) ); + connect( agenda, TQT_SIGNAL( endMultiModify() ), + TQT_SIGNAL( endMultiModify() ) ); + + connect( agenda, TQT_SIGNAL( itemModified( KOAgendaItem * ) ), + TQT_SLOT( updateEventDates( KOAgendaItem * ) ) ); + connect( agenda, TQT_SIGNAL( enableAgendaUpdate( bool ) ), + TQT_SLOT( enableAgendaUpdate( bool ) ) ); // drag signals - connect( agenda, SIGNAL( startDragSignal( Incidence * ) ), - SLOT( startDrag( Incidence * ) ) ); + connect( agenda, TQT_SIGNAL( startDragSignal( Incidence * ) ), + TQT_SLOT( startDrag( Incidence * ) ) ); // synchronize selections - connect( agenda, SIGNAL( incidenceSelected( Incidence * ) ), - otherAgenda, SLOT( deselectItem() ) ); - connect( agenda, SIGNAL( incidenceSelected( Incidence * ) ), - SIGNAL( incidenceSelected( Incidence * ) ) ); + connect( agenda, TQT_SIGNAL( incidenceSelected( Incidence * ) ), + otherAgenda, TQT_SLOT( deselectItem() ) ); + connect( agenda, TQT_SIGNAL( incidenceSelected( Incidence * ) ), + TQT_SIGNAL( incidenceSelected( Incidence * ) ) ); // rescheduling of todos by d'n'd - connect( agenda, SIGNAL( droppedToDo( Todo *, const QPoint &, bool ) ), - SLOT( slotTodoDropped( Todo *, const QPoint &, bool ) ) ); + connect( agenda, TQT_SIGNAL( droppedToDo( Todo *, const TQPoint &, bool ) ), + TQT_SLOT( slotTodoDropped( Todo *, const TQPoint &, bool ) ) ); } @@ -470,11 +470,11 @@ void KOAgendaView::zoomOutVertically( ) } } -void KOAgendaView::zoomInHorizontally( const QDate &date) +void KOAgendaView::zoomInHorizontally( const TQDate &date) { - QDate begin; - QDate newBegin; - QDate dateToZoom = date; + TQDate begin; + TQDate newBegin; + TQDate dateToZoom = date; int ndays,count; begin = mSelectedDates.first(); @@ -502,11 +502,11 @@ void KOAgendaView::zoomInHorizontally( const QDate &date) } } -void KOAgendaView::zoomOutHorizontally( const QDate &date ) +void KOAgendaView::zoomOutHorizontally( const TQDate &date ) { - QDate begin; - QDate newBegin; - QDate dateToZoom = date; + TQDate begin; + TQDate newBegin; + TQDate dateToZoom = date; int ndays,count; begin = mSelectedDates.first(); @@ -531,17 +531,17 @@ void KOAgendaView::zoomOutHorizontally( const QDate &date ) emit zoomViewHorizontally( newBegin, count ); } -void KOAgendaView::zoomView( const int delta, const QPoint &pos, +void KOAgendaView::zoomView( const int delta, const TQPoint &pos, const Qt::Orientation orient ) { - static QDate zoomDate; - static QTimer *t = new QTimer( this ); + static TQDate zoomDate; + static TQTimer *t = new TQTimer( this ); //Zoom to the selected incidence, on the other way // zoom to the date on screen after the first mousewheel move. if ( orient == Qt::Horizontal ) { - QDate date=mAgenda->selectedIncidenceDate(); + TQDate date=mAgenda->selectedIncidenceDate(); if ( date.isValid() ) zoomDate=date; else{ @@ -556,13 +556,13 @@ void KOAgendaView::zoomView( const int delta, const QPoint &pos, zoomInHorizontally( zoomDate ); } else { // Vertical zoom - QPoint posConstentsOld = mAgenda->gridToContents(pos); + TQPoint posConstentsOld = mAgenda->gridToContents(pos); if ( delta > 0 ) { zoomOutVertically(); } else { zoomInVertically(); } - QPoint posConstentsNew = mAgenda->gridToContents(pos); + TQPoint posConstentsNew = mAgenda->gridToContents(pos); mAgenda->scrollBy( 0, posConstentsNew.y() - posConstentsOld.y() ); } } @@ -576,8 +576,8 @@ void KOAgendaView::createDayLabels() // each updateView() call) delete mDayLabels; - mDayLabels = new QFrame (mDayLabelsFrame); - mLayoutDayLabels = new QHBoxLayout(mDayLabels); + mDayLabels = new TQFrame (mDayLabelsFrame); + mLayoutDayLabels = new TQHBoxLayout(mDayLabels); if ( !mIsSideBySide ) mLayoutDayLabels->addSpacing(mTimeLabels->width()); @@ -585,35 +585,35 @@ void KOAgendaView::createDayLabels() DateList::ConstIterator dit; for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) { - QDate date = *dit; - QBoxLayout *dayLayout = new QVBoxLayout(mLayoutDayLabels); + TQDate date = *dit; + TQBoxLayout *dayLayout = new TQVBoxLayout(mLayoutDayLabels); mLayoutDayLabels->setStretchFactor(dayLayout, 1); // dayLayout->setMinimumWidth(1); int dW = calsys->dayOfWeek(date); - QString veryLongStr = KGlobal::locale()->formatDate( date ); - QString longstr = i18n( "short_weekday date (e.g. Mon 13)","%1 %2" ) + TQString veryLongStr = KGlobal::locale()->formatDate( date ); + TQString longstr = i18n( "short_weekday date (e.g. Mon 13)","%1 %2" ) .arg( calsys->weekDayName( dW, true ) ) .arg( calsys->day(date) ); - QString shortstr = QString::number(calsys->day(date)); + TQString shortstr = TQString::number(calsys->day(date)); KOAlternateLabel *dayLabel = new KOAlternateLabel(shortstr, longstr, veryLongStr, mDayLabels); dayLabel->setMinimumWidth(1); - dayLabel->setAlignment(QLabel::AlignHCenter); - if (date == QDate::currentDate()) { - QFont font = dayLabel->font(); + dayLabel->setAlignment(TQLabel::AlignHCenter); + if (date == TQDate::currentDate()) { + TQFont font = dayLabel->font(); font.setBold(true); dayLabel->setFont(font); } dayLayout->addWidget(dayLabel); // if a holiday region is selected, show the holiday name - QStringList texts = KOGlobals::self()->holiday( date ); - QStringList::ConstIterator textit = texts.begin(); + TQStringList texts = KOGlobals::self()->holiday( date ); + TQStringList::ConstIterator textit = texts.begin(); for ( ; textit != texts.end(); ++textit ) { // use a KOAlternateLabel so when the text doesn't fit any more a tooltip is used - KOAlternateLabel*label = new KOAlternateLabel( (*textit), (*textit), QString::null, mDayLabels ); + KOAlternateLabel*label = new KOAlternateLabel( (*textit), (*textit), TQString::null, mDayLabels ); label->setMinimumWidth(1); label->setAlignment(AlignCenter); dayLayout->addWidget(label); @@ -623,10 +623,10 @@ void KOAgendaView::createDayLabels() CalendarDecoration::List cds = KOCore::self()->calendarDecorations(); CalendarDecoration *it; for(it = cds.first(); it; it = cds.next()) { - QString text = it->shortText( date ); + TQString text = it->shortText( date ); if ( !text.isEmpty() ) { // use a KOAlternateLabel so when the text doesn't fit any more a tooltip is used - KOAlternateLabel*label = new KOAlternateLabel( text, text, QString::null, mDayLabels ); + KOAlternateLabel*label = new KOAlternateLabel( text, text, TQString::null, mDayLabels ); label->setMinimumWidth(1); label->setAlignment(AlignCenter); dayLayout->addWidget(label); @@ -634,7 +634,7 @@ void KOAgendaView::createDayLabels() } for(it = cds.first(); it; it = cds.next()) { - QWidget *wid = it->smallWidget(mDayLabels,date); + TQWidget *wid = it->smallWidget(mDayLabels,date); if ( wid ) { // wid->setHeight(20); dayLayout->addWidget(wid); @@ -681,7 +681,7 @@ Incidence::List KOAgendaView::selectedIncidences() DateList KOAgendaView::selectedDates() { DateList selected; - QDate qd; + TQDate qd; qd = mAgenda->selectedIncidenceDate(); if (qd.isValid()) selected.append(qd); @@ -692,17 +692,17 @@ DateList KOAgendaView::selectedDates() return selected; } -bool KOAgendaView::eventDurationHint( QDateTime &startDt, QDateTime &endDt, +bool KOAgendaView::eventDurationHint( TQDateTime &startDt, TQDateTime &endDt, bool &allDay ) { if ( selectionStart().isValid() ) { - QDateTime start = selectionStart(); - QDateTime end = selectionEnd(); + TQDateTime start = selectionStart(); + TQDateTime end = selectionEnd(); if ( start.secsTo( end ) == 15*60 ) { // One cell in the agenda view selected, e.g. // because of a double-click, => Use the default duration - QTime defaultDuration( KOPrefs::instance()->mDefaultDuration.time() ); + TQTime defaultDuration( KOPrefs::instance()->mDefaultDuration.time() ); int addSecs = ( defaultDuration.hour()*3600 ) + ( defaultDuration.minute()*60 ); end = start.addSecs( addSecs ); @@ -787,19 +787,19 @@ void KOAgendaView::updateEventDates( KOAgendaItem *item ) { kdDebug(5850) << "KOAgendaView::updateEventDates(): " << item->text() << endl; - QDateTime startDt,endDt; + TQDateTime startDt,endDt; // Start date of this incidence, calculate the offset from it (so recurring and // non-recurring items can be treated exactly the same, we never need to check // for doesRecur(), because we only move the start day by the number of days the // agenda item was really moved. Smart, isn't it?) - QDate thisDate; + TQDate thisDate; if ( item->cellXLeft() < 0 ) { thisDate = ( mSelectedDates.first() ).addDays( item->cellXLeft() ); } else { thisDate = mSelectedDates[ item->cellXLeft() ]; } - QDate oldThisDate( item->itemDate() ); + TQDate oldThisDate( item->itemDate() ); int daysOffset = oldThisDate.daysTo( thisDate ); int daysLength = 0; @@ -810,7 +810,7 @@ void KOAgendaView::updateEventDates( KOAgendaItem *item ) if ( !mChanger || !mChanger->beginChange(incidence) ) return; Incidence *oldIncidence = incidence->clone(); - QTime startTime(0,0,0), endTime(0,0,0); + TQTime startTime(0,0,0), endTime(0,0,0); if ( incidence->doesFloat() ) { daysLength = item->cellWidth() - 1; } else { @@ -863,14 +863,14 @@ void KOAgendaView::updateEventDates( KOAgendaItem *item ) case Recurrence::rYearlyPos: { int freq = recur->frequency(); int duration = recur->duration(); - QDate endDt( recur->endDate() ); + TQDate endDt( recur->endDate() ); bool negative = false; - QPtrList<Recurrence::rMonthPos> monthPos( recur->yearMonthPositions() ); + TQPtrList<Recurrence::rMonthPos> monthPos( recur->yearMonthPositions() ); if ( monthPos.first() ) { negative = monthPos.first()->negative; } - QBitArray days( 7 ); + TQBitArray days( 7 ); int pos = 0; days.fill( false ); days.setBit( thisDate.dayOfWeek() - 1 ); @@ -893,7 +893,7 @@ void KOAgendaView::updateEventDates( KOAgendaItem *item ) case Recurrence::rYearlyDay: { int freq = recur->frequency(); int duration = recur->duration(); - QDate endDt( recur->endDate() ); + TQDate endDt( recur->endDate() ); // Terrible hack: to change the month days, I have to unset the recurrence, and set all days manually again recur->unsetRecurs(); if ( duration == 0 ) { // end by date @@ -906,7 +906,7 @@ void KOAgendaView::updateEventDates( KOAgendaItem *item ) case Recurrence::rYearlyMonth: { int freq = recur->frequency(); int duration = recur->duration(); - QDate endDt( recur->endDate() ); + TQDate endDt( recur->endDate() ); // Terrible hack: to change the month days, I have to unset the recurrence, and set all days manually again recur->unsetRecurs(); if ( duration != 0 ) { @@ -919,13 +919,13 @@ void KOAgendaView::updateEventDates( KOAgendaItem *item ) case Recurrence::rMonthlyPos: { int freq = recur->frequency(); int duration = recur->duration(); - QDate endDt( recur->endDate() ); - QPtrList<Recurrence::rMonthPos> monthPos( recur->monthPositions() ); + TQDate endDt( recur->endDate() ); + TQPtrList<Recurrence::rMonthPos> monthPos( recur->monthPositions() ); if ( !monthPos.isEmpty() ) { // FIXME: How shall I adapt the day x of week Y if we move the date across month borders??? // for now, just use the date of the moved item and assume the recurrence only occurs on that day. // That's fine for korganizer, but might mess up other organizers. - QBitArray rDays( 7 ); + TQBitArray rDays( 7 ); rDays = monthPos.first()->rDays; bool negative = monthPos.first()->negative; int newPos; @@ -950,8 +950,8 @@ void KOAgendaView::updateEventDates( KOAgendaItem *item ) case Recurrence::rMonthlyDay: { int freq = recur->frequency(); int duration = recur->duration(); - QDate endDt( recur->endDate() ); - QPtrList<int> monthDays( recur->monthDays() ); + TQDate endDt( recur->endDate() ); + TQPtrList<int> monthDays( recur->monthDays() ); // Terrible hack: to change the month days, I have to unset the recurrence, and set all days manually again recur->unsetRecurs(); if ( duration == 0 ) { // end by date @@ -966,7 +966,7 @@ void KOAgendaView::updateEventDates( KOAgendaItem *item ) break;} case Recurrence::rWeekly: { - QBitArray days(7), oldDays( recur->days() ); + TQBitArray days(7), oldDays( recur->days() ); int offset = daysOffset % 7; if ( offset<0 ) offset = (offset+7) % 7; // rotate the days @@ -1028,7 +1028,7 @@ void KOAgendaView::updateEventDates( KOAgendaItem *item ) // recreated. All others have to!!! if ( incidence->doesRecur() ) { mUpdateItem = incidence; - QTimer::singleShot( 0, this, SLOT( doUpdateItem() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( doUpdateItem() ) ); } enableAgendaUpdate( true ); @@ -1046,7 +1046,7 @@ void KOAgendaView::doUpdateItem() -void KOAgendaView::showDates( const QDate &start, const QDate &end ) +void KOAgendaView::showDates( const TQDate &start, const TQDate &end ) { // kdDebug(5850) << "KOAgendaView::selectDates" << endl; if ( !mSelectedDates.isEmpty() && mSelectedDates.first() == start @@ -1055,7 +1055,7 @@ void KOAgendaView::showDates( const QDate &start, const QDate &end ) mSelectedDates.clear(); - QDate d = start; + TQDate d = start; while (d <= end) { mSelectedDates.append(d); d = d.addDays( 1 ); @@ -1071,7 +1071,7 @@ void KOAgendaView::showIncidences( const Incidence::List & ) kdDebug(5850) << "KOAgendaView::showIncidences( const Incidence::List & ) is not yet implemented" << endl; } -void KOAgendaView::insertIncidence( Incidence *incidence, const QDate &curDate, +void KOAgendaView::insertIncidence( Incidence *incidence, const TQDate &curDate, int curCol ) { if ( !filterByResource( incidence ) ) @@ -1116,32 +1116,32 @@ void KOAgendaView::insertIncidence( Incidence *incidence, const QDate &curDate, } } else if ( event && event->isMultiDay() ) { int startY = mAgenda->timeToY( event->dtStart().time() ); - QTime endtime( event->dtEnd().time() ); - if ( endtime == QTime( 0, 0, 0 ) ) endtime = QTime( 23, 59, 59 ); + TQTime endtime( event->dtEnd().time() ); + if ( endtime == TQTime( 0, 0, 0 ) ) endtime = TQTime( 23, 59, 59 ); int endY = mAgenda->timeToY( endtime ) - 1; if ( (beginX <= 0 && curCol == 0) || beginX == curCol ) { mAgenda->insertMultiItem( event, curDate, beginX, endX, startY, endY ); } if ( beginX == curCol ) { - mMaxY[curCol] = mAgenda->timeToY( QTime(23,59) ); + mMaxY[curCol] = mAgenda->timeToY( TQTime(23,59) ); if ( startY < mMinY[curCol] ) mMinY[curCol] = startY; } else if ( endX == curCol ) { - mMinY[curCol] = mAgenda->timeToY( QTime(0,0) ); + mMinY[curCol] = mAgenda->timeToY( TQTime(0,0) ); if ( endY > mMaxY[curCol] ) mMaxY[curCol] = endY; } else { - mMinY[curCol] = mAgenda->timeToY( QTime(0,0) ); - mMaxY[curCol] = mAgenda->timeToY( QTime(23,59) ); + mMinY[curCol] = mAgenda->timeToY( TQTime(0,0) ); + mMaxY[curCol] = mAgenda->timeToY( TQTime(23,59) ); } } else { int startY = 0, endY = 0; if ( event ) { startY = mAgenda->timeToY( incidence->dtStart().time() ); - QTime endtime( event->dtEnd().time() ); - if ( endtime == QTime( 0, 0, 0 ) ) endtime = QTime( 23, 59, 59 ); + TQTime endtime( event->dtEnd().time() ); + if ( endtime == TQTime( 0, 0, 0 ) ) endtime = TQTime( 23, 59, 59 ); endY = mAgenda->timeToY( endtime ) - 1; } if ( todo ) { - QTime t = todo->dtDue().time(); + TQTime t = todo->dtDue().time(); endY = mAgenda->timeToY( t ) - 1; startY = mAgenda->timeToY( t.addSecs( -1800 ) ); } @@ -1160,13 +1160,13 @@ void KOAgendaView::changeIncidenceDisplayAdded( Incidence *incidence ) ( todo && !KOPrefs::instance()->showAllDayTodo() ) ) return; - QDate f = mSelectedDates.first(); - QDate l = mSelectedDates.last(); - QDate startDt = incidence->dtStart().date(); + TQDate f = mSelectedDates.first(); + TQDate l = mSelectedDates.last(); + TQDate startDt = incidence->dtStart().date(); if ( incidence->doesRecur() ) { DateList::ConstIterator dit; - QDate curDate; + TQDate curDate; for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) { curDate = *dit; // FIXME: This breaks with recurring multi-day events! @@ -1177,11 +1177,11 @@ void KOAgendaView::changeIncidenceDisplayAdded( Incidence *incidence ) return; } - QDate endDt; + TQDate endDt; if ( incidence->type() == "Event" ) endDt = (static_cast<Event *>(incidence))->dateEnd(); if ( todo ) { - endDt = todo->isOverdue() ? QDate::currentDate() + endDt = todo->isOverdue() ? TQDate::currentDate() : todo->dtDue().date(); if ( endDt >= f && endDt <= l ) { @@ -1228,7 +1228,7 @@ void KOAgendaView::changeIncidenceDisplay( Incidence *incidence, int mode ) } } -void KOAgendaView::fillAgenda( const QDate & ) +void KOAgendaView::fillAgenda( const TQDate & ) { fillAgenda(); } @@ -1239,8 +1239,8 @@ void KOAgendaView::fillAgenda() /* Remember the uids of the selected items. In case one of the * items was deleted and re-added, we want to reselect it. */ - const QString &selectedAgendaUid = mAgenda->lastSelectedUid(); - const QString &selectedAllDayAgendaUid = mAllDayAgenda->lastSelectedUid(); + const TQString &selectedAgendaUid = mAgenda->lastSelectedUid(); + const TQString &selectedAllDayAgendaUid = mAllDayAgenda->lastSelectedUid(); enableAgendaUpdate( true ); clearView(); @@ -1264,13 +1264,13 @@ void KOAgendaView::fillAgenda() mAgenda->setDateList(mSelectedDates); - QDate today = QDate::currentDate(); + TQDate today = TQDate::currentDate(); bool somethingReselected = false; DateList::ConstIterator dit; int curCol = 0; for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) { - QDate currentDate = *dit; + TQDate currentDate = *dit; // kdDebug(5850) << "KOAgendaView::fillAgenda(): " << currentDate.toString() // << endl; @@ -1279,8 +1279,8 @@ void KOAgendaView::fillAgenda() SortDirectionAscending); // Default values, which can never be reached - mMinY[curCol] = mAgenda->timeToY(QTime(23,59)) + 1; - mMaxY[curCol] = mAgenda->timeToY(QTime(0,0)) - 1; + mMinY[curCol] = mAgenda->timeToY(TQTime(23,59)) + 1; + mMaxY[curCol] = mAgenda->timeToY(TQTime(0,0)) - 1; unsigned int numEvent; for(numEvent=0;numEvent<dayEvents.count();++numEvent) { @@ -1387,12 +1387,12 @@ void KOAgendaView::updateEventIndicatorBottom( int newY ) mEventIndicatorBottom->update(); } -void KOAgendaView::slotTodoDropped( Todo *todo, const QPoint &gpos, bool allDay ) +void KOAgendaView::slotTodoDropped( Todo *todo, const TQPoint &gpos, bool allDay ) { if ( gpos.x()<0 || gpos.y()<0 ) return; - QDate day = mSelectedDates[gpos.x()]; - QTime time = mAgenda->gyToTime( gpos.y() ); - QDateTime newTime( day, time ); + TQDate day = mSelectedDates[gpos.x()]; + TQTime time = mAgenda->gyToTime( gpos.y() ); + TQDateTime newTime( day, time ); if ( todo ) { Todo *existingTodo = calendar()->todo( todo->uid() ); @@ -1445,7 +1445,7 @@ void KOAgendaView::readSettings(KConfig *config) config->setGroup("Views"); #ifndef KORG_NOSPLITTER - QValueList<int> sizes = config->readIntListEntry("Separator AgendaView"); + TQValueList<int> sizes = config->readIntListEntry("Separator AgendaView"); if (sizes.count() == 2) { mSplitterAgenda->setSizes(sizes); } @@ -1461,7 +1461,7 @@ void KOAgendaView::writeSettings(KConfig *config) config->setGroup("Views"); #ifndef KORG_NOSPLITTER - QValueList<int> list = mSplitterAgenda->sizes(); + TQValueList<int> list = mSplitterAgenda->sizes(); config->writeEntry("Separator AgendaView",list); #endif } @@ -1505,26 +1505,26 @@ void KOAgendaView::clearSelection() mAllDayAgenda->deselectItem(); } -void KOAgendaView::newTimeSpanSelectedAllDay( const QPoint &start, const QPoint &end ) +void KOAgendaView::newTimeSpanSelectedAllDay( const TQPoint &start, const TQPoint &end ) { newTimeSpanSelected( start, end ); mTimeSpanInAllDay = true; } -void KOAgendaView::newTimeSpanSelected( const QPoint &start, const QPoint &end ) +void KOAgendaView::newTimeSpanSelected( const TQPoint &start, const TQPoint &end ) { if (!mSelectedDates.count()) return; mTimeSpanInAllDay = false; - QDate dayStart = mSelectedDates[ kClamp( start.x(), 0, (int)mSelectedDates.size() - 1 ) ]; - QDate dayEnd = mSelectedDates[ kClamp( end.x(), 0, (int)mSelectedDates.size() - 1 ) ]; + TQDate dayStart = mSelectedDates[ kClamp( start.x(), 0, (int)mSelectedDates.size() - 1 ) ]; + TQDate dayEnd = mSelectedDates[ kClamp( end.x(), 0, (int)mSelectedDates.size() - 1 ) ]; - QTime timeStart = mAgenda->gyToTime(start.y()); - QTime timeEnd = mAgenda->gyToTime( end.y() + 1 ); + TQTime timeStart = mAgenda->gyToTime(start.y()); + TQTime timeEnd = mAgenda->gyToTime( end.y() + 1 ); - QDateTime dtStart(dayStart,timeStart); - QDateTime dtEnd(dayEnd,timeEnd); + TQDateTime dtStart(dayStart,timeStart); + TQDateTime dtEnd(dayEnd,timeEnd); mTimeSpanBegin = dtStart; mTimeSpanEnd = dtEnd; @@ -1532,12 +1532,12 @@ void KOAgendaView::newTimeSpanSelected( const QPoint &start, const QPoint &end ) void KOAgendaView::deleteSelectedDateTime() { - mTimeSpanBegin.setDate(QDate()); - mTimeSpanEnd.setDate(QDate()); + mTimeSpanBegin.setDate(TQDate()); + mTimeSpanEnd.setDate(TQDate()); mTimeSpanInAllDay = false; } -void KOAgendaView::setTypeAheadReceiver( QObject *o ) +void KOAgendaView::setTypeAheadReceiver( TQObject *o ) { mAgenda->setTypeAheadReceiver( o ); mAllDayAgenda->setTypeAheadReceiver( o ); @@ -1579,7 +1579,7 @@ void KOAgendaView::clearTimeSpanSelection() deleteSelectedDateTime(); } -void KOAgendaView::setResource(KCal::ResourceCalendar * res, const QString & subResource) +void KOAgendaView::setResource(KCal::ResourceCalendar * res, const TQString & subResource) { mResource = res; mSubResource = subResource; diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h index 6fc673307..c1434dc1d 100644 --- a/korganizer/koagendaview.h +++ b/korganizer/koagendaview.h @@ -25,8 +25,8 @@ #ifndef KOAGENDAVIEW_H #define KOAGENDAVIEW_H -#include <qscrollview.h> -#include <qlabel.h> +#include <tqscrollview.h> +#include <tqlabel.h> #include <libkcal/calendar.h> @@ -56,7 +56,7 @@ class EventIndicator : public QFrame Q_OBJECT public: enum Location { Top, Bottom }; - EventIndicator( Location loc = Top, QWidget *parent = 0, + EventIndicator( Location loc = Top, TQWidget *parent = 0, const char *name = 0 ); virtual ~EventIndicator(); @@ -65,38 +65,38 @@ class EventIndicator : public QFrame void enableColumn( int column, bool enable ); protected: - void drawContents( QPainter * ); + void drawContents( TQPainter * ); private: int mColumns; Location mLocation; - QPixmap mPixmap; - QMemArray<bool> mEnabled; + TQPixmap mPixmap; + TQMemArray<bool> mEnabled; }; class KOAlternateLabel : public QLabel { Q_OBJECT public: - KOAlternateLabel( const QString &shortlabel, const QString &longlabel, - const QString &extensivelabel = QString::null, - QWidget *parent = 0, const char *name = 0 ); + KOAlternateLabel( const TQString &shortlabel, const TQString &longlabel, + const TQString &extensivelabel = TQString::null, + TQWidget *parent = 0, const char *name = 0 ); ~KOAlternateLabel(); - virtual QSize minimumSizeHint() const; + virtual TQSize minimumSizeHint() const; public slots: - void setText( const QString & ); + void setText( const TQString & ); void useShortText(); void useLongText(); void useExtensiveText(); void useDefaultText(); protected: - virtual void resizeEvent( QResizeEvent * ); + virtual void resizeEvent( TQResizeEvent * ); virtual void squeezeTextToLabel(); bool mTextTypeFixed; - QString mShortText, mLongText, mExtensiveText; + TQString mShortText, mLongText, mExtensiveText; }; /** @@ -107,7 +107,7 @@ class KOAgendaView : public KOrg::AgendaView, public KCal::Calendar::Observer { Q_OBJECT public: - KOAgendaView( Calendar *cal, QWidget *parent = 0, const char *name = 0, bool isSideBySide = false ); + KOAgendaView( Calendar *cal, TQWidget *parent = 0, const char *name = 0, bool isSideBySide = false ); virtual ~KOAgendaView(); @@ -125,7 +125,7 @@ class KOAgendaView : public KOrg::AgendaView, public KCal::Calendar::Observer virtual DateList selectedDates(); /** return the default start/end date/time for new events */ - virtual bool eventDurationHint(QDateTime &startDt, QDateTime &endDt, bool &allDay); + virtual bool eventDurationHint(TQDateTime &startDt, TQDateTime &endDt, bool &allDay); /** Remove all events from view */ void clearView(); @@ -133,9 +133,9 @@ class KOAgendaView : public KOrg::AgendaView, public KCal::Calendar::Observer KOrg::CalPrinterBase::PrintType printType(); /** start-datetime of selection */ - QDateTime selectionStart() { return mTimeSpanBegin; } + TQDateTime selectionStart() { return mTimeSpanBegin; } /** end-datetime of selection */ - QDateTime selectionEnd() { return mTimeSpanEnd; } + TQDateTime selectionEnd() { return mTimeSpanEnd; } /** returns true if selection is for whole day */ bool selectedIsAllDay() { return mTimeSpanInAllDay; } /** make selected start/end invalid */ @@ -143,13 +143,13 @@ class KOAgendaView : public KOrg::AgendaView, public KCal::Calendar::Observer /** returns if only a single cell is selected, or a range of cells */ bool selectedIsSingleCell(); - void setTypeAheadReceiver( QObject * ); + void setTypeAheadReceiver( TQObject * ); /** Show only incidences from the given resource. */ - void setResource( KCal::ResourceCalendar *res, const QString &subResource = QString::null ); + void setResource( KCal::ResourceCalendar *res, const TQString &subResource = TQString::null ); KOAgenda* agenda() const { return mAgenda; } - QSplitter* splitter() const { return mSplitterAgenda; } + TQSplitter* splitter() const { return mSplitterAgenda; } /* reimplmented from KCal::Calendar::Observer */ void calendarIncidenceAdded( Incidence *incidence ); @@ -159,10 +159,10 @@ class KOAgendaView : public KOrg::AgendaView, public KCal::Calendar::Observer public slots: virtual void updateView(); virtual void updateConfig(); - virtual void showDates( const QDate &start, const QDate &end ); + virtual void showDates( const TQDate &start, const TQDate &end ); virtual void showIncidences( const Incidence::List &incidenceList ); - void insertIncidence( Incidence *incidence, const QDate &curDate, int curCol = -1 ); + void insertIncidence( Incidence *incidence, const TQDate &curDate, int curCol = -1 ); void changeIncidenceDisplayAdded( Incidence *incidence ); void changeIncidenceDisplay( Incidence *incidence, int mode ); @@ -181,18 +181,18 @@ class KOAgendaView : public KOrg::AgendaView, public KCal::Calendar::Observer void finishTypeAhead(); /** reschedule the todo to the given x- and y- coordinates. Third parameter determines all-day (no time specified) */ - void slotTodoDropped( Todo *, const QPoint &, bool ); + void slotTodoDropped( Todo *, const TQPoint &, bool ); void enableAgendaUpdate( bool enable ); void setIncidenceChanger( KOrg::IncidenceChangerBase *changer ); - void zoomInHorizontally( const QDate& date=QDate() ); - void zoomOutHorizontally( const QDate& date=QDate() ); + void zoomInHorizontally( const TQDate& date=TQDate() ); + void zoomOutHorizontally( const TQDate& date=TQDate() ); void zoomInVertically( ); void zoomOutVertically( ); - void zoomView( const int delta, const QPoint &pos, + void zoomView( const int delta, const TQPoint &pos, const Qt::Orientation orient=Qt::Horizontal ); void clearTimeSpanSelection(); @@ -201,18 +201,18 @@ class KOAgendaView : public KOrg::AgendaView, public KCal::Calendar::Observer signals: void toggleExpand(); - void zoomViewHorizontally(const QDate &, int count ); + void zoomViewHorizontally(const TQDate &, int count ); void timeSpanSelectionChanged(); protected: /** Fill agenda beginning with date startDate */ - void fillAgenda( const QDate &startDate ); + void fillAgenda( const TQDate &startDate ); /** Fill agenda using the current set value for the start date */ void fillAgenda(); - void connectAgenda( KOAgenda*agenda, QPopupMenu*popup, KOAgenda* otherAgenda ); + void connectAgenda( KOAgenda*agenda, TQPopupMenu*popup, KOAgenda* otherAgenda ); /** Create labels for the selected dates. */ void createDayLabels(); @@ -241,25 +241,25 @@ class KOAgendaView : public KOrg::AgendaView, public KCal::Calendar::Observer void updateEventIndicatorBottom( int newY ); /** Updates data for selected timespan */ - void newTimeSpanSelected( const QPoint &start, const QPoint &end ); + void newTimeSpanSelected( const TQPoint &start, const TQPoint &end ); /** Updates data for selected timespan for all day event*/ - void newTimeSpanSelectedAllDay( const QPoint &start, const QPoint &end ); + void newTimeSpanSelectedAllDay( const TQPoint &start, const TQPoint &end ); private: bool filterByResource( Incidence *incidence ); private: // view widgets - QFrame *mDayLabels; - QHBox *mDayLabelsFrame; - QBoxLayout *mLayoutDayLabels; - QFrame *mAllDayFrame; + TQFrame *mDayLabels; + TQHBox *mDayLabelsFrame; + TQBoxLayout *mLayoutDayLabels; + TQFrame *mAllDayFrame; KOAgenda *mAllDayAgenda; KOAgenda *mAgenda; TimeLabels *mTimeLabels; - QWidget *mDummyAllDayLeft; - QSplitter *mSplitterAgenda; - QPushButton *mExpandButton; + TQWidget *mDummyAllDayLeft; + TQSplitter *mSplitterAgenda; + TQPushButton *mExpandButton; DateList mSelectedDates; // List of dates to be displayed int mViewType; @@ -270,23 +270,23 @@ class KOAgendaView : public KOrg::AgendaView, public KCal::Calendar::Observer EventIndicator *mEventIndicatorTop; EventIndicator *mEventIndicatorBottom; - QMemArray<int> mMinY; - QMemArray<int> mMaxY; + TQMemArray<int> mMinY; + TQMemArray<int> mMaxY; - QMemArray<bool> mHolidayMask; + TQMemArray<bool> mHolidayMask; - QPixmap mExpandedPixmap; - QPixmap mNotExpandedPixmap; + TQPixmap mExpandedPixmap; + TQPixmap mNotExpandedPixmap; - QDateTime mTimeSpanBegin; - QDateTime mTimeSpanEnd; + TQDateTime mTimeSpanBegin; + TQDateTime mTimeSpanEnd; bool mTimeSpanInAllDay; bool mAllowAgendaUpdate; Incidence *mUpdateItem; KCal::ResourceCalendar *mResource; - QString mSubResource; + TQString mSubResource; bool mIsSideBySide; bool mPendingChanges; diff --git a/korganizer/koapp.cpp b/korganizer/koapp.cpp index 66bb39556..3fa1f28d8 100644 --- a/korganizer/koapp.cpp +++ b/korganizer/koapp.cpp @@ -56,7 +56,7 @@ using namespace std; KOrganizerApp::KOrganizerApp() : KUniqueApplication() { - QString prodId = "-//K Desktop Environment//NONSGML KOrganizer %1//EN"; + TQString prodId = "-//K Desktop Environment//NONSGML KOrganizer %1//EN"; CalFormat::setApplication( "KOrganizer", prodId.arg( korgVersion ) ); } diff --git a/korganizer/koattendeeeditor.cpp b/korganizer/koattendeeeditor.cpp index c6a255e9c..370ac3b32 100644 --- a/korganizer/koattendeeeditor.cpp +++ b/korganizer/koattendeeeditor.cpp @@ -35,32 +35,32 @@ #include <kiconloader.h> #include <klocale.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qwhatsthis.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqwhatsthis.h> using namespace KCal; -KOAttendeeEditor::KOAttendeeEditor( QWidget * parent, const char *name ) : - QWidget( parent, name ), +KOAttendeeEditor::KOAttendeeEditor( TQWidget * parent, const char *name ) : + TQWidget( parent, name ), mDisableItemUpdate( true ) { } -void KOAttendeeEditor::initOrganizerWidgets(QWidget * parent, QBoxLayout * layout) +void KOAttendeeEditor::initOrganizerWidgets(TQWidget * parent, TQBoxLayout * layout) { - mOrganizerHBox = new QHBox( parent ); + mOrganizerHBox = new TQHBox( parent ); layout->addWidget( mOrganizerHBox ); // If creating a new event, then the user is the organizer -> show the // identity combo // readEvent will delete it and set another label text instead, if the user // isn't the organizer. // Note that the i18n text below is duplicated in readEvent - QString whatsThis = i18n("Sets the identity corresponding to " + TQString whatsThis = i18n("Sets the identity corresponding to " "the organizer of this to-do or event. " "Identities can be set in the 'Personal' " "section of the KOrganizer configuration, or in the " @@ -72,64 +72,64 @@ void KOAttendeeEditor::initOrganizerWidgets(QWidget * parent, QBoxLayout * layou "be sure to check 'Use email settings from " "Control Center' in the 'Personal' section of the " "KOrganizer configuration."); - mOrganizerLabel = new QLabel( i18n( "Identity as organizer:" ), + mOrganizerLabel = new TQLabel( i18n( "Identity as organizer:" ), mOrganizerHBox ); - mOrganizerCombo = new QComboBox( mOrganizerHBox ); - QWhatsThis::add( mOrganizerLabel, whatsThis ); - QWhatsThis::add( mOrganizerCombo, whatsThis ); + mOrganizerCombo = new TQComboBox( mOrganizerHBox ); + TQWhatsThis::add( mOrganizerLabel, whatsThis ); + TQWhatsThis::add( mOrganizerCombo, whatsThis ); fillOrganizerCombo(); mOrganizerHBox->setStretchFactor( mOrganizerCombo, 100 ); } -void KOAttendeeEditor::initEditWidgets(QWidget * parent, QBoxLayout * layout) +void KOAttendeeEditor::initEditWidgets(TQWidget * parent, TQBoxLayout * layout) { - QGridLayout *topLayout = new QGridLayout(); + TQGridLayout *topLayout = new TQGridLayout(); layout->addLayout( topLayout ); - QString whatsThis = i18n("Edits the name of the attendee selected in the list " + TQString whatsThis = i18n("Edits the name of the attendee selected in the list " "above, or adds a new attendee if there are no attendees" "in the list."); - QLabel *attendeeLabel = new QLabel( parent ); - QWhatsThis::add( attendeeLabel, whatsThis ); + TQLabel *attendeeLabel = new TQLabel( parent ); + TQWhatsThis::add( attendeeLabel, whatsThis ); attendeeLabel->setText( i18n("Na&me:") ); topLayout->addWidget( attendeeLabel, 0, 0 ); mNameEdit = new KPIM::AddresseeLineEdit( parent ); - QWhatsThis::add( mNameEdit, whatsThis ); + TQWhatsThis::add( mNameEdit, whatsThis ); mNameEdit->setClickMessage( i18n("Click to add a new attendee") ); attendeeLabel->setBuddy( mNameEdit ); mNameEdit->installEventFilter( this ); - connect( mNameEdit, SIGNAL( textChanged( const QString & ) ), - SLOT( updateAttendee() ) ); + connect( mNameEdit, TQT_SIGNAL( textChanged( const TQString & ) ), + TQT_SLOT( updateAttendee() ) ); topLayout->addMultiCellWidget( mNameEdit, 0, 0, 1, 2 ); whatsThis = i18n("Edits the role of the attendee selected " "in the list above."); - QLabel *attendeeRoleLabel = new QLabel( parent ); - QWhatsThis::add( attendeeRoleLabel, whatsThis ); + TQLabel *attendeeRoleLabel = new TQLabel( parent ); + TQWhatsThis::add( attendeeRoleLabel, whatsThis ); attendeeRoleLabel->setText( i18n("Ro&le:") ); topLayout->addWidget( attendeeRoleLabel, 1, 0 ); - mRoleCombo = new QComboBox( false, parent ); - QWhatsThis::add( mRoleCombo, whatsThis ); + mRoleCombo = new TQComboBox( false, parent ); + TQWhatsThis::add( mRoleCombo, whatsThis ); mRoleCombo->insertStringList( Attendee::roleList() ); attendeeRoleLabel->setBuddy( mRoleCombo ); - connect( mRoleCombo, SIGNAL( activated( int ) ), - SLOT( updateAttendee() ) ); + connect( mRoleCombo, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( updateAttendee() ) ); topLayout->addWidget( mRoleCombo, 1, 1 ); - mDelegateLabel = new QLabel( parent ); + mDelegateLabel = new TQLabel( parent ); topLayout->addWidget( mDelegateLabel, 1, 2 ); whatsThis = i18n("Edits the current attendance status of the attendee " "selected in the list above."); - QLabel *statusLabel = new QLabel( parent ); - QWhatsThis::add( statusLabel, whatsThis ); + TQLabel *statusLabel = new TQLabel( parent ); + TQWhatsThis::add( statusLabel, whatsThis ); statusLabel->setText( i18n("Stat&us:") ); topLayout->addWidget( statusLabel, 2, 0 ); - mStatusCombo = new QComboBox( false, parent ); - QWhatsThis::add( mStatusCombo, whatsThis ); + mStatusCombo = new TQComboBox( false, parent ); + TQWhatsThis::add( mStatusCombo, whatsThis ); // mStatusCombo->insertStringList( Attendee::statusList() ); mStatusCombo->insertItem( SmallIcon( "help" ), Attendee::statusName( Attendee::NeedsAction ) ); mStatusCombo->insertItem( KOGlobals::self()->smallIcon( "ok" ), Attendee::statusName( Attendee::Accepted ) ); @@ -140,26 +140,26 @@ void KOAttendeeEditor::initEditWidgets(QWidget * parent, QBoxLayout * layout) mStatusCombo->insertItem( KOGlobals::self()->smallIcon( "help" ), Attendee::statusName( Attendee::InProcess ) ); statusLabel->setBuddy( mStatusCombo ); - connect( mStatusCombo, SIGNAL( activated( int ) ), - SLOT( updateAttendee() ) ); + connect( mStatusCombo, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( updateAttendee() ) ); topLayout->addWidget( mStatusCombo, 2, 1 ); topLayout->setColStretch( 2, 1 ); - mRsvpButton = new QCheckBox( parent ); - QWhatsThis::add( mRsvpButton, + mRsvpButton = new TQCheckBox( parent ); + TQWhatsThis::add( mRsvpButton, i18n("Edits whether to send an email to the attendee " "selected in the list above to request " "a response concerning attendance.") ); mRsvpButton->setText( i18n("Re&quest response") ); - connect( mRsvpButton, SIGNAL( clicked() ), SLOT( updateAttendee() ) ); + connect( mRsvpButton, TQT_SIGNAL( clicked() ), TQT_SLOT( updateAttendee() ) ); topLayout->addWidget( mRsvpButton, 2, 2 ); - QWidget *buttonBox = new QWidget( parent ); - QVBoxLayout *buttonLayout = new QVBoxLayout( buttonBox ); + TQWidget *buttonBox = new TQWidget( parent ); + TQVBoxLayout *buttonLayout = new TQVBoxLayout( buttonBox ); - mAddButton = new QPushButton( i18n("&New"), buttonBox ); - QWhatsThis::add( mAddButton, + mAddButton = new TQPushButton( i18n("&New"), buttonBox ); + TQWhatsThis::add( mAddButton, i18n("Adds a new attendee to the list. Once the " "attendee is added, you will be able to " "edit the attendee's name, role, attendance " @@ -168,21 +168,21 @@ void KOAttendeeEditor::initEditWidgets(QWidget * parent, QBoxLayout * layout) "from your addressbook, click the 'Select Addressee' " "button instead.") ); buttonLayout->addWidget( mAddButton ); - connect( mAddButton, SIGNAL( clicked() ), SLOT( addNewAttendee() ) ); + connect( mAddButton, TQT_SIGNAL( clicked() ), TQT_SLOT( addNewAttendee() ) ); - mRemoveButton = new QPushButton( i18n("&Remove"), buttonBox ); - QWhatsThis::add( mRemoveButton, + mRemoveButton = new TQPushButton( i18n("&Remove"), buttonBox ); + TQWhatsThis::add( mRemoveButton, i18n("Removes the attendee selected in " "the list above.") ); buttonLayout->addWidget( mRemoveButton ); - mAddressBookButton = new QPushButton( i18n("Select Addressee..."), + mAddressBookButton = new TQPushButton( i18n("Select Addressee..."), buttonBox ); - QWhatsThis::add( mAddressBookButton, + TQWhatsThis::add( mAddressBookButton, i18n("Opens your address book, allowing you to select " "new attendees from it.") ); buttonLayout->addWidget( mAddressBookButton ); - connect( mAddressBookButton, SIGNAL( clicked() ), SLOT( openAddressBook() ) ); + connect( mAddressBookButton, TQT_SIGNAL( clicked() ), TQT_SLOT( openAddressBook() ) ); topLayout->addMultiCellWidget( buttonBox, 0, 3, 3, 3 ); @@ -249,9 +249,9 @@ void KOAttendeeEditor::fillOrganizerCombo() Q_ASSERT( mOrganizerCombo ); // Get all emails from KOPrefs (coming from various places), // and insert them - removing duplicates - const QStringList lst = KOPrefs::instance()->fullEmails(); - QStringList uniqueList; - for( QStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) { + const TQStringList lst = KOPrefs::instance()->fullEmails(); + TQStringList uniqueList; + for( TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) { if ( uniqueList.find( *it ) == uniqueList.end() ) uniqueList << *it; } @@ -268,7 +268,7 @@ void KOAttendeeEditor::addNewAttendee() // We don't want the hint again mNameEdit->setClickMessage( "" ); mNameEdit->setFocus(); - QTimer::singleShot( 0, mNameEdit, SLOT( selectAll() ) ); + TQTimer::singleShot( 0, mNameEdit, TQT_SLOT( selectAll() ) ); } void KOAttendeeEditor::readEvent(KCal::Incidence * incidence) @@ -277,13 +277,13 @@ void KOAttendeeEditor::readEvent(KCal::Incidence * incidence) mnewAttendees.clear(); if ( KOPrefs::instance()->thatIsMe( incidence->organizer().email() ) ) { if ( !mOrganizerCombo ) { - mOrganizerCombo = new QComboBox( mOrganizerHBox ); + mOrganizerCombo = new TQComboBox( mOrganizerHBox ); fillOrganizerCombo(); } mOrganizerLabel->setText( i18n( "Identity as organizer:" ) ); int found = -1; - QString fullOrganizer = incidence->organizer().fullName(); + TQString fullOrganizer = incidence->organizer().fullName(); for ( int i = 0 ; i < mOrganizerCombo->count(); ++i ) { if ( mOrganizerCombo->text( i ) == fullOrganizer ) { found = i; @@ -330,12 +330,12 @@ void KOAttendeeEditor::setEnableAttendeeInput(bool enabled) void KOAttendeeEditor::clearAttendeeInput() { mNameEdit->setText(""); - mUid = QString::null; + mUid = TQString::null; mRoleCombo->setCurrentItem(0); mStatusCombo->setCurrentItem(0); mRsvpButton->setChecked(true); setEnableAttendeeInput( false ); - mDelegateLabel->setText( QString() ); + mDelegateLabel->setText( TQString() ); } void KOAttendeeEditor::updateAttendee() @@ -344,8 +344,8 @@ void KOAttendeeEditor::updateAttendee() if ( !a || mDisableItemUpdate ) return; - QString name; - QString email; + TQString name; + TQString email; KPIM::getNameAndMail(mNameEdit->text(), name, email); bool iAmTheOrganizer = mOrganizerCombo && @@ -380,7 +380,7 @@ void KOAttendeeEditor::fillAttendeeInput( KCal::Attendee *a ) { mDisableItemUpdate = true; - QString name = a->name(); + TQString name = a->name(); if (!a->email().isEmpty()) { name = KPIM::quoteNameIfNecessary( name ); name += " <" + a->email() + ">"; @@ -444,14 +444,14 @@ void KOAttendeeEditor::declineForMe() changeStatusForMe( Attendee::Declined ); } -bool KOAttendeeEditor::eventFilter(QObject *watched, QEvent *ev) +bool KOAttendeeEditor::eventFilter(TQObject *watched, TQEvent *ev) { - if ( watched && watched == mNameEdit && ev->type() == QEvent::FocusIn && + if ( watched && watched == mNameEdit && ev->type() == TQEvent::FocusIn && currentAttendee() == 0 ) { addNewAttendee(); } - return QWidget::eventFilter( watched, ev ); + return TQWidget::eventFilter( watched, ev ); } #include "koattendeeeditor.moc" diff --git a/korganizer/koattendeeeditor.h b/korganizer/koattendeeeditor.h index d7eb8cbdc..0641748f6 100644 --- a/korganizer/koattendeeeditor.h +++ b/korganizer/koattendeeeditor.h @@ -21,7 +21,7 @@ #ifndef KOATTENDEEEDITOR_H #define KOATTENDEEEDITOR_H -#include <qwidget.h> +#include <tqwidget.h> #include <libkcal/attendee.h> class QBoxLayout; @@ -50,7 +50,7 @@ class KOAttendeeEditor : public QWidget { Q_OBJECT public: - KOAttendeeEditor( QWidget *parent, const char *name = 0 ); + KOAttendeeEditor( TQWidget *parent, const char *name = 0 ); virtual void insertAttendee( KCal::Attendee* attendee, bool fetchFB = true ) = 0; @@ -68,8 +68,8 @@ class KOAttendeeEditor : public QWidget void updateAttendeeSummary( int count ); protected: - void initOrganizerWidgets( QWidget *parent, QBoxLayout *layout ); - void initEditWidgets( QWidget *parent, QBoxLayout *layout ); + void initOrganizerWidgets( TQWidget *parent, TQBoxLayout *layout ); + void initEditWidgets( TQWidget *parent, TQBoxLayout *layout ); /** Reads values from a KABC::Addressee and inserts a new Attendee * item into the listview with those items. Used when adding attendees @@ -85,7 +85,7 @@ class KOAttendeeEditor : public QWidget virtual void changeStatusForMe( KCal::Attendee::PartStat status ) = 0; - virtual bool eventFilter( QObject *, QEvent *); + virtual bool eventFilter( TQObject *, TQEvent *); protected slots: void addNewAttendee(); @@ -99,23 +99,23 @@ class KOAttendeeEditor : public QWidget protected: KPIM::AddresseeLineEdit *mNameEdit; - QString mUid; - QComboBox* mRoleCombo; - QCheckBox* mRsvpButton; - QComboBox* mStatusCombo; + TQString mUid; + TQComboBox* mRoleCombo; + TQCheckBox* mRsvpButton; + TQComboBox* mStatusCombo; - QHBox* mOrganizerHBox; - QComboBox *mOrganizerCombo; // either we organize it (combo shown) - QLabel *mOrganizerLabel; // or someone else does (just a label is shown) + TQHBox* mOrganizerHBox; + TQComboBox *mOrganizerCombo; // either we organize it (combo shown) + TQLabel *mOrganizerLabel; // or someone else does (just a label is shown) - QLabel* mDelegateLabel; + TQLabel* mDelegateLabel; - QPushButton* mAddButton; - QPushButton* mRemoveButton; - QPushButton* mAddressBookButton; + TQPushButton* mAddButton; + TQPushButton* mRemoveButton; + TQPushButton* mAddressBookButton; - QPtrList<KCal::Attendee> mdelAttendees; - QPtrList<KCal::Attendee> mnewAttendees; + TQPtrList<KCal::Attendee> mdelAttendees; + TQPtrList<KCal::Attendee> mnewAttendees; private: bool mDisableItemUpdate; diff --git a/korganizer/kocore.cpp b/korganizer/kocore.cpp index 6aca769b5..b9d404e70 100644 --- a/korganizer/kocore.cpp +++ b/korganizer/kocore.cpp @@ -39,7 +39,7 @@ #include <kstandarddirs.h> #include <klocale.h> -#include <qwidget.h> +#include <tqwidget.h> KOCore *KOCore::mSelf = 0; @@ -62,12 +62,12 @@ KOCore::~KOCore() mSelf = 0; } -KTrader::OfferList KOCore::availablePlugins( const QString &type, int version ) +KTrader::OfferList KOCore::availablePlugins( const TQString &type, int version ) { - QString constraint; + TQString constraint; if ( version >= 0 ) { - constraint = QString("[X-KDE-PluginInterfaceVersion] == %1") - .arg( QString::number( version ) ); + constraint = TQString("[X-KDE-PluginInterfaceVersion] == %1") + .arg( TQString::number( version ) ); } return KTrader::self()->query( type, constraint ); @@ -124,7 +124,7 @@ KOrg::Plugin *KOCore::loadPlugin( KService::Ptr service ) return pluginFactory->create(); } -KOrg::Plugin *KOCore::loadPlugin( const QString &name ) +KOrg::Plugin *KOCore::loadPlugin( const TQString &name ) { KTrader::OfferList list = availablePlugins(); KTrader::OfferList::ConstIterator it; @@ -158,7 +158,7 @@ KOrg::CalendarDecoration *KOCore::loadCalendarDecoration(KService::Ptr service) return pluginFactory->create(); } -KOrg::CalendarDecoration *KOCore::loadCalendarDecoration( const QString &name ) +KOrg::CalendarDecoration *KOCore::loadCalendarDecoration( const TQString &name ) { KTrader::OfferList list = availableCalendarDecorations(); KTrader::OfferList::ConstIterator it; @@ -224,27 +224,27 @@ KOrg::PrintPlugin *KOCore::loadPrintPlugin( KService::Ptr service ) return pluginFactory->create(); } -void KOCore::addXMLGUIClient( QWidget *wdg, KXMLGUIClient *guiclient ) +void KOCore::addXMLGUIClient( TQWidget *wdg, KXMLGUIClient *guiclient ) { mXMLGUIClients.insert( wdg, guiclient ); } -void KOCore::removeXMLGUIClient( QWidget *wdg ) +void KOCore::removeXMLGUIClient( TQWidget *wdg ) { mXMLGUIClients.remove( wdg ); } -KXMLGUIClient* KOCore::xmlguiClient( QWidget *wdg ) const +KXMLGUIClient* KOCore::xmlguiClient( TQWidget *wdg ) const { - QWidget *topLevel = wdg->topLevelWidget(); - QMap<QWidget*, KXMLGUIClient*>::ConstIterator it = mXMLGUIClients.find( topLevel ); + TQWidget *topLevel = wdg->topLevelWidget(); + TQMap<TQWidget*, KXMLGUIClient*>::ConstIterator it = mXMLGUIClients.find( topLevel ); if ( it != mXMLGUIClients.end() ) return it.data(); return 0; } -KOrg::Part *KOCore::loadPart( const QString &name, KOrg::MainWindow *parent ) +KOrg::Part *KOCore::loadPart( const TQString &name, KOrg::MainWindow *parent ) { KTrader::OfferList list = availableParts(); KTrader::OfferList::ConstIterator it; @@ -256,7 +256,7 @@ KOrg::Part *KOCore::loadPart( const QString &name, KOrg::MainWindow *parent ) return 0; } -KOrg::PrintPlugin *KOCore::loadPrintPlugin( const QString &name ) +KOrg::PrintPlugin *KOCore::loadPrintPlugin( const TQString &name ) { KTrader::OfferList list = availablePrintPlugins(); KTrader::OfferList::ConstIterator it; @@ -271,14 +271,14 @@ KOrg::PrintPlugin *KOCore::loadPrintPlugin( const QString &name ) KOrg::CalendarDecoration::List KOCore::calendarDecorations() { if ( !mCalendarDecorationsLoaded ) { - QStringList selectedPlugins = KOPrefs::instance()->mSelectedPlugins; + TQStringList selectedPlugins = KOPrefs::instance()->mSelectedPlugins; mCalendarDecorations.clear(); KTrader::OfferList plugins = availableCalendarDecorations(); KTrader::OfferList::ConstIterator it; for( it = plugins.begin(); it != plugins.end(); ++it ) { if ( (*it)->hasServiceType("Calendar/Decoration") ) { - QString name = (*it)->desktopEntryName(); + TQString name = (*it)->desktopEntryName(); if ( selectedPlugins.find( name ) != selectedPlugins.end() ) { KOrg::CalendarDecoration *d = loadCalendarDecoration(*it); mCalendarDecorations.append( d ); @@ -295,7 +295,7 @@ KOrg::Part::List KOCore::loadParts( KOrg::MainWindow *parent ) { KOrg::Part::List parts; - QStringList selectedPlugins = KOPrefs::instance()->mSelectedPlugins; + TQStringList selectedPlugins = KOPrefs::instance()->mSelectedPlugins; KTrader::OfferList plugins = availableParts(); KTrader::OfferList::ConstIterator it; @@ -321,7 +321,7 @@ KOrg::PrintPlugin::List KOCore::loadPrintPlugins() { KOrg::PrintPlugin::List loadedPlugins; - QStringList selectedPlugins = KOPrefs::instance()->mSelectedPlugins; + TQStringList selectedPlugins = KOPrefs::instance()->mSelectedPlugins; KTrader::OfferList plugins = availablePrintPlugins(); KTrader::OfferList::ConstIterator it; diff --git a/korganizer/kocore.h b/korganizer/kocore.h index 0cfa7011e..f28382635 100644 --- a/korganizer/kocore.h +++ b/korganizer/kocore.h @@ -47,24 +47,24 @@ class KDE_EXPORT KOCore KTrader::OfferList availablePrintPlugins(); KOrg::Plugin *loadPlugin( KService::Ptr service ); - KOrg::Plugin *loadPlugin( const QString & ); + KOrg::Plugin *loadPlugin( const TQString & ); KOrg::CalendarDecoration *loadCalendarDecoration( KService::Ptr service ); - KOrg::CalendarDecoration *loadCalendarDecoration( const QString & ); + KOrg::CalendarDecoration *loadCalendarDecoration( const TQString & ); KOrg::Part *loadPart( KService::Ptr, KOrg::MainWindow *parent ); - KOrg::Part *loadPart( const QString &, KOrg::MainWindow *parent ); + KOrg::Part *loadPart( const TQString &, KOrg::MainWindow *parent ); KOrg::PrintPlugin *loadPrintPlugin( KService::Ptr service ); - KOrg::PrintPlugin *loadPrintPlugin( const QString & ); + KOrg::PrintPlugin *loadPrintPlugin( const TQString & ); KOrg::CalendarDecoration::List calendarDecorations(); KOrg::PrintPlugin::List loadPrintPlugins(); KOrg::Part::List loadParts( KOrg::MainWindow *parent ); - void addXMLGUIClient( QWidget*, KXMLGUIClient *guiclient ); - void removeXMLGUIClient( QWidget* ); - KXMLGUIClient *xmlguiClient( QWidget* ) const; + void addXMLGUIClient( TQWidget*, KXMLGUIClient *guiclient ); + void removeXMLGUIClient( TQWidget* ); + KXMLGUIClient *xmlguiClient( TQWidget* ) const; /** Unload the parts in &p parts for this main window. Clears @@ -87,7 +87,7 @@ class KDE_EXPORT KOCore protected: KOCore(); - KTrader::OfferList availablePlugins( const QString &type, + KTrader::OfferList availablePlugins( const TQString &type, int pluginInterfaceVersion = -1 ); private: @@ -96,7 +96,7 @@ class KDE_EXPORT KOCore KOrg::CalendarDecoration::List mCalendarDecorations; bool mCalendarDecorationsLoaded; - QMap<QWidget*, KXMLGUIClient*> mXMLGUIClients; + TQMap<TQWidget*, KXMLGUIClient*> mXMLGUIClients; KPIM::IdentityManager *mIdentityManager; }; diff --git a/korganizer/kocorehelper.cpp b/korganizer/kocorehelper.cpp index 40f557263..374c7107b 100644 --- a/korganizer/kocorehelper.cpp +++ b/korganizer/kocorehelper.cpp @@ -26,11 +26,11 @@ #include "koglobals.h" -QColor KOCoreHelper::categoryColor( const QStringList &categories ) +TQColor KOCoreHelper::categoryColor( const TQStringList &categories ) { // FIXME: Correctly treat events with multiple categories - QString cat = categories.first(); - QColor bgColor; + TQString cat = categories.first(); + TQColor bgColor; if (cat.isEmpty()) bgColor = defaultEventColor(); else @@ -38,7 +38,7 @@ QColor KOCoreHelper::categoryColor( const QStringList &categories ) return bgColor; } -QString KOCoreHelper::holidayString( const QDate &dt ) +TQString KOCoreHelper::holidayString( const TQDate &dt ) { return KOGlobals::self()->holiday( dt ).join( i18n("delimiter for joining holiday names", ", " ) ); } diff --git a/korganizer/kocorehelper.h b/korganizer/kocorehelper.h index 62a7d8a49..609278563 100644 --- a/korganizer/kocorehelper.h +++ b/korganizer/kocorehelper.h @@ -40,14 +40,14 @@ class KOCoreHelper : public KOrg::CoreHelper KOCoreHelper() {} virtual ~KOCoreHelper() {} - virtual QColor defaultEventColor() { return KOPrefs::instance()->mEventColor; } - virtual QColor textColor( const QColor &bgColor ) { return getTextColor( bgColor ); } - virtual QColor categoryColor( const QStringList &cats ); - virtual QString holidayString( const QDate &dt ); - virtual QTime dayStart() { return KOPrefs::instance()->mDayBegins.time(); } + virtual TQColor defaultEventColor() { return KOPrefs::instance()->mEventColor; } + virtual TQColor textColor( const TQColor &bgColor ) { return getTextColor( bgColor ); } + virtual TQColor categoryColor( const TQStringList &cats ); + virtual TQString holidayString( const TQDate &dt ); + virtual TQTime dayStart() { return KOPrefs::instance()->mDayBegins.time(); } virtual const KCalendarSystem *calendarSystem() { return KOGlobals::self()->calendarSystem(); } virtual KOrg::PrintPlugin::List loadPrintPlugins() { return KOCore::self()->loadPrintPlugins(); } - virtual bool isWorkingDay( const QDate &dt ) { return KOGlobals::self()->isWorkDay( dt ); } + virtual bool isWorkingDay( const TQDate &dt ) { return KOGlobals::self()->isWorkDay( dt ); } }; #endif diff --git a/korganizer/kocounterdialog.cpp b/korganizer/kocounterdialog.cpp index f3c0a2e4f..bf3f736ff 100644 --- a/korganizer/kocounterdialog.cpp +++ b/korganizer/kocounterdialog.cpp @@ -32,15 +32,15 @@ #include "kocounterdialog.h" #include "kocounterdialog.moc" -KOCounterDialog::KOCounterDialog( QWidget *parent, const char *name ) +KOCounterDialog::KOCounterDialog( TQWidget *parent, const char *name ) : KDialogBase( parent, name, false, i18n("Counter-Event Viewer"), User1 | User2, User1, false, i18n("Decline"), i18n("Accept") ) { mEventViewer = new KOEventViewer( this ); setMainWidget( mEventViewer ); - connect( this, SIGNAL( user1Clicked() ), SLOT( slotCancel() ) ); - connect( this, SIGNAL( user2Clicked() ), SLOT( slotOk( ) ) ); + connect( this, TQT_SIGNAL( user1Clicked() ), TQT_SLOT( slotCancel() ) ); + connect( this, TQT_SIGNAL( user2Clicked() ), TQT_SLOT( slotOk( ) ) ); // FIXME: Set a sensible size (based on the content?). setMinimumSize( 300, 200 ); @@ -61,7 +61,7 @@ void KOCounterDialog::addIncidence( Incidence *incidence ) mEventViewer->appendIncidence( incidence ); } -void KOCounterDialog::addText( const QString &text ) +void KOCounterDialog::addText( const TQString &text ) { mEventViewer->addText( text ); } diff --git a/korganizer/kocounterdialog.h b/korganizer/kocounterdialog.h index 9bc5d28d3..cedb9dabb 100644 --- a/korganizer/kocounterdialog.h +++ b/korganizer/kocounterdialog.h @@ -41,12 +41,12 @@ class KOCounterDialog : public KDialogBase { Q_OBJECT public: - KOCounterDialog(QWidget *parent = 0, const char *name = 0 ); + KOCounterDialog(TQWidget *parent = 0, const char *name = 0 ); virtual ~KOCounterDialog(); void setIncidence( Incidence *incidence ); void addIncidence( Incidence *incidence ); - void addText( const QString &text ); + void addText( const TQString &text ); private: KOEventViewer *mEventViewer; diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp index b749b2227..ff82ada9c 100644 --- a/korganizer/kodaymatrix.cpp +++ b/korganizer/kodaymatrix.cpp @@ -26,9 +26,9 @@ without including the source code for Qt in the source distribution. */ -#include <qevent.h> -#include <qpainter.h> -#include <qptrlist.h> +#include <tqevent.h> +#include <tqpainter.h> +#include <tqptrlist.h> #include <kglobal.h> #include <kdebug.h> @@ -51,7 +51,7 @@ #include "kodaymatrix.moc" #ifndef NODND -#include <qcursor.h> +#include <tqcursor.h> #include <kpopupmenu.h> #include <X11/Xlib.h> #undef FocusIn @@ -64,29 +64,29 @@ // D Y N A M I C T I P // ============================================================================ -DynamicTip::DynamicTip( QWidget * parent ) - : QToolTip( parent ) +DynamicTip::DynamicTip( TQWidget * parent ) + : TQToolTip( parent ) { mMatrix = static_cast<KODayMatrix *>( parent ); } -void DynamicTip::maybeTip( const QPoint &pos ) +void DynamicTip::maybeTip( const TQPoint &pos ) { //calculate which cell of the matrix the mouse is in - QRect sz = mMatrix->frameRect(); + TQRect sz = mMatrix->frameRect(); int dheight = sz.height() * 7 / 42; int dwidth = sz.width() / 7; int row = pos.y() / dheight; int col = pos.x() / dwidth; - QRect rct( col * dwidth, row * dheight, dwidth, dheight ); + TQRect rct( col * dwidth, row * dheight, dwidth, dheight ); // kdDebug(5850) << "DynamicTip::maybeTip matrix cell index [" << // col << "][" << row << "] => " <<(col+row*7) << endl; //show holiday names only - QString str = mMatrix->getHolidayLabel( col + row * 7 ); + TQString str = mMatrix->getHolidayLabel( col + row * 7 ); if ( str.isEmpty() ) return; tip( rct, str ); } @@ -99,8 +99,8 @@ void DynamicTip::maybeTip( const QPoint &pos ) const int KODayMatrix::NOSELECTION = -1000; const int KODayMatrix::NUMDAYS = 42; -KODayMatrix::KODayMatrix( QWidget *parent, const char *name ) - : QFrame( parent, name ), mCalendar( 0 ), mStartDate(), mPendingChanges( false ) +KODayMatrix::KODayMatrix( TQWidget *parent, const char *name ) + : TQFrame( parent, name ), mCalendar( 0 ), mStartDate(), mPendingChanges( false ) { // initialize dynamic arrays mDays = new QDate[ NUMDAYS ]; @@ -125,9 +125,9 @@ void KODayMatrix::setCalendar( Calendar *cal ) mCalendar->registerObserver( this ); CalendarResources *calres = dynamic_cast<CalendarResources*>( cal ); if ( calres ) { - connect( calres, SIGNAL(signalResourceAdded(ResourceCalendar *)), SLOT(resourcesChanged()) ); - connect( calres, SIGNAL(signalResourceModified( ResourceCalendar *)), SLOT(resourcesChanged()) ); - connect( calres, SIGNAL(signalResourceDeleted(ResourceCalendar *)), SLOT(resourcesChanged()) ); + connect( calres, TQT_SIGNAL(signalResourceAdded(ResourceCalendar *)), TQT_SLOT(resourcesChanged()) ); + connect( calres, TQT_SIGNAL(signalResourceModified( ResourceCalendar *)), TQT_SLOT(resourcesChanged()) ); + connect( calres, TQT_SIGNAL(signalResourceDeleted(ResourceCalendar *)), TQT_SLOT(resourcesChanged()) ); } setAcceptDrops( mCalendar ); @@ -135,9 +135,9 @@ void KODayMatrix::setCalendar( Calendar *cal ) updateEvents(); } -QColor KODayMatrix::getShadedColor( const QColor &color ) +TQColor KODayMatrix::getShadedColor( const TQColor &color ) { - QColor shaded; + TQColor shaded; int h = 0; int s = 0; int v = 0; @@ -192,7 +192,7 @@ void KODayMatrix::addSelectedDaysTo( DateList &selDays ) } } -void KODayMatrix::setSelectedDaysFrom( const QDate &start, const QDate &end ) +void KODayMatrix::setSelectedDaysFrom( const TQDate &start, const TQDate &end ) { if ( mStartDate.isValid() ) { mSelStart = mStartDate.daysTo( start ); @@ -211,12 +211,12 @@ void KODayMatrix::recalculateToday() mToday = -1; for ( int i = 0; i < NUMDAYS; i++ ) { mDays[ i ] = mStartDate.addDays( i ); - mDayLabels[ i ] = QString::number( KOGlobals::self()->calendarSystem()->day( mDays[i] )); + mDayLabels[ i ] = TQString::number( KOGlobals::self()->calendarSystem()->day( mDays[i] )); // if today is in the currently displayed month, hilight today - if ( mDays[ i ].year() == QDate::currentDate().year() && - mDays[ i ].month() == QDate::currentDate().month() && - mDays[ i ].day() == QDate::currentDate().day() ) { + if ( mDays[ i ].year() == TQDate::currentDate().year() && + mDays[ i ].month() == TQDate::currentDate().month() && + mDays[ i ].day() == TQDate::currentDate().day() ) { mToday = i; } } @@ -228,7 +228,7 @@ void KODayMatrix::recalculateToday() updateView( mStartDate ); } -void KODayMatrix::updateView( const QDate &actdate ) +void KODayMatrix::updateView( const TQDate &actdate ) { kdDebug(5850) << "KODayMatrix::updateView() " << actdate << ", day start="<<mStartDate<< endl; if ( !actdate.isValid() ) return; @@ -274,8 +274,8 @@ void KODayMatrix::updateView( const QDate &actdate ) updateEvents(); for( int i = 0; i < NUMDAYS; i++ ) { //if it is a holy day then draw it red. Sundays are consider holidays, too - QStringList holidays = KOGlobals::self()->holiday( mDays[ i ] ); - QString holiStr = QString::null; + TQStringList holidays = KOGlobals::self()->holiday( mDays[ i ] ); + TQString holiStr = TQString::null; if ( ( KOGlobals::self()->calendarSystem()->dayOfWeek( mDays[ i ] ) == KOGlobals::self()->calendarSystem()->weekDayOfPray() ) || @@ -313,7 +313,7 @@ void KODayMatrix::updateEvents() mPendingChanges = false; } -const QDate& KODayMatrix::getDate( int offset ) +const TQDate& KODayMatrix::getDate( int offset ) { if ( offset < 0 || offset > NUMDAYS - 1 ) { kdDebug(5850) << "Wrong offset (" << offset << ") in KODayMatrix::getDate(int)" << endl; @@ -322,7 +322,7 @@ const QDate& KODayMatrix::getDate( int offset ) return mDays[ offset ]; } -QString KODayMatrix::getHolidayLabel( int offset ) +TQString KODayMatrix::getHolidayLabel( int offset ) { if ( offset < 0 || offset > NUMDAYS - 1 ) { kdDebug(5850) << "Wrong offset (" << offset << ") in KODayMatrix::getHolidayLabel(int)" << endl; @@ -363,14 +363,14 @@ void KODayMatrix::resourcesChanged() // M O U S E E V E N T H A N D L I N G // ---------------------------------------------------------------------------- -void KODayMatrix::mousePressEvent( QMouseEvent *e ) +void KODayMatrix::mousePressEvent( TQMouseEvent *e ) { mSelStart = getDayIndexFrom(e->x(), e->y()); if (mSelStart > NUMDAYS-1) mSelStart=NUMDAYS-1; mSelInit = mSelStart; } -void KODayMatrix::mouseReleaseEvent( QMouseEvent *e ) +void KODayMatrix::mouseReleaseEvent( TQMouseEvent *e ) { int tmp = getDayIndexFrom(e->x(), e->y()); if (tmp > NUMDAYS-1) tmp=NUMDAYS-1; @@ -399,7 +399,7 @@ void KODayMatrix::mouseReleaseEvent( QMouseEvent *e ) emit selected((const DateList)daylist); } -void KODayMatrix::mouseMoveEvent( QMouseEvent *e ) +void KODayMatrix::mouseMoveEvent( TQMouseEvent *e ) { int tmp = getDayIndexFrom(e->x(), e->y()); if (tmp > NUMDAYS-1) tmp=NUMDAYS-1; @@ -434,7 +434,7 @@ enum { DRAG_CANCEL = 2 }; -void KODayMatrix::dragEnterEvent( QDragEnterEvent *e ) +void KODayMatrix::dragEnterEvent( TQDragEnterEvent *e ) { #ifndef KORG_NODND if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) ) { @@ -449,7 +449,7 @@ void KODayMatrix::dragEnterEvent( QDragEnterEvent *e ) #endif } -void KODayMatrix::dragMoveEvent( QDragMoveEvent *e ) +void KODayMatrix::dragMoveEvent( TQDragMoveEvent *e ) { #ifndef KORG_NODND if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) ) { @@ -461,7 +461,7 @@ void KODayMatrix::dragMoveEvent( QDragMoveEvent *e ) #endif } -void KODayMatrix::dragLeaveEvent( QDragLeaveEvent * /*dl*/ ) +void KODayMatrix::dragLeaveEvent( TQDragLeaveEvent * /*dl*/ ) { #ifndef KORG_NODND // setPalette(oldPalette); @@ -469,7 +469,7 @@ void KODayMatrix::dragLeaveEvent( QDragLeaveEvent * /*dl*/ ) #endif } -void KODayMatrix::dropEvent( QDropEvent *e ) +void KODayMatrix::dropEvent( TQDropEvent *e ) { #ifndef KORG_NODND kdDebug(5850) << "KODayMatrix::dropEvent(e) begin" << endl; @@ -518,7 +518,7 @@ void KODayMatrix::dropEvent( QDropEvent *e ) } menu->insertSeparator(); menu->insertItem( KOGlobals::self()->smallIcon("cancel"), i18n("Cancel"), DRAG_CANCEL, 3 ); - action = menu->exec( QCursor::pos(), 0 ); + action = menu->exec( TQCursor::pos(), 0 ); } if ( action == DRAG_COPY || action == DRAG_MOVE ) { @@ -542,20 +542,20 @@ void KODayMatrix::dropEvent( QDropEvent *e ) // P A I N T E V E N T H A N D L I N G // ---------------------------------------------------------------------------- -void KODayMatrix::paintEvent( QPaintEvent * ) +void KODayMatrix::paintEvent( TQPaintEvent * ) { // kdDebug(5850) << "KODayMatrix::paintEvent() BEGIN" << endl; - QPainter p; - QRect sz = frameRect(); - QPixmap pm( sz.size() ); + TQPainter p; + TQRect sz = frameRect(); + TQPixmap pm( sz.size() ); int dheight = mDaySize.height(); int dwidth = mDaySize.width(); int row,col; int selw, selh; bool isRTL = KOGlobals::self()->reverseLayout(); - QColorGroup cg = palette().active(); + TQColorGroup cg = palette().active(); p.begin( &pm, this ); pm.fill( cg.base() ); @@ -573,7 +573,7 @@ void KODayMatrix::paintEvent( QPaintEvent * ) // fix larger selections starting in the previous month if ( row < 0 && mSelEnd > 0 ) row = 0; col = mSelStart -row*7; - QColor selcol = KOPrefs::instance()->mHighlightColor; + TQColor selcol = KOPrefs::instance()->mHighlightColor; if ( row < 6 && row >= 0 ) { if (row == mSelEnd/7) { @@ -601,11 +601,11 @@ void KODayMatrix::paintEvent( QPaintEvent * ) } // iterate over all days in the matrix and draw the day label in appropriate colors - QColor textColor = cg.text(); - QColor textColorShaded = getShadedColor( textColor ); - QColor actcol = textColorShaded; + TQColor textColor = cg.text(); + TQColor textColorShaded = getShadedColor( textColor ); + TQColor actcol = textColorShaded; p.setPen(actcol); - QPen tmppen; + TQPen tmppen; for ( int i = 0; i < NUMDAYS; ++i ) { row = i/7; col = isRTL ? 6-(i-row*7) : i-row*7; @@ -627,11 +627,11 @@ void KODayMatrix::paintEvent( QPaintEvent * ) bool holiday = ! KOGlobals::self()->isWorkDay( mDays[ i ] ); - QColor holidayColorShaded = getShadedColor( KOPrefs::instance()->mHolidayColor ); + TQColor holidayColorShaded = getShadedColor( KOPrefs::instance()->mHolidayColor ); // if today then draw rectangle around day if (mToday == i) { tmppen = p.pen(); - QPen mTodayPen(p.pen()); + TQPen mTodayPen(p.pen()); mTodayPen.setWidth(mTodayMarginWidth); //draw red rectangle for holidays @@ -644,7 +644,7 @@ void KODayMatrix::paintEvent( QPaintEvent * ) } //draw gray rectangle for today if in selection if (i >= mSelStart && i <= mSelEnd) { - QColor grey("grey"); + TQColor grey("grey"); mTodayPen.setColor(grey); } p.setPen(mTodayPen); @@ -654,7 +654,7 @@ void KODayMatrix::paintEvent( QPaintEvent * ) // if any events are on that day then draw it using a bold font if (mEvents[i] > 0) { - QFont myFont = font(); + TQFont myFont = font(); myFont.setBold(true); p.setFont(myFont); } @@ -671,7 +671,7 @@ void KODayMatrix::paintEvent( QPaintEvent * ) // draw selected days with special color // DO NOT specially highlight holidays in selection ! if (i >= mSelStart && i <= mSelEnd) { - p.setPen( QColor( "white" ) ); + p.setPen( TQColor( "white" ) ); } p.drawText(col*dwidth, row*dheight, dwidth, dheight, @@ -683,7 +683,7 @@ void KODayMatrix::paintEvent( QPaintEvent * ) } // reset bold font to plain font if (mEvents[i] > 0) { - QFont myFont = font(); + TQFont myFont = font(); myFont.setBold(false); p.setFont(myFont); } @@ -696,9 +696,9 @@ void KODayMatrix::paintEvent( QPaintEvent * ) // R E SI Z E E V E N T H A N D L I N G // ---------------------------------------------------------------------------- -void KODayMatrix::resizeEvent( QResizeEvent * ) +void KODayMatrix::resizeEvent( TQResizeEvent * ) { - QRect sz = frameRect(); + TQRect sz = frameRect(); mDaySize.setHeight( sz.height() * 7 / NUMDAYS ); mDaySize.setWidth( sz.width() / 7 ); } diff --git a/korganizer/kodaymatrix.h b/korganizer/kodaymatrix.h index a76e61874..60c2e3ced 100644 --- a/korganizer/kodaymatrix.h +++ b/korganizer/kodaymatrix.h @@ -29,10 +29,10 @@ #include <libkcal/incidencebase.h> #include <libkcal/calendar.h> -#include <qframe.h> -#include <qcolor.h> -#include <qtooltip.h> -#include <qmap.h> +#include <tqframe.h> +#include <tqcolor.h> +#include <tqtooltip.h> +#include <tqmap.h> class QDragEnterEvent; class QDragMoveEvent; @@ -61,7 +61,7 @@ class DynamicTip : public QToolTip * * @param parent the parent KODayMatrix control. */ - DynamicTip( QWidget *parent ); + DynamicTip( TQWidget *parent ); protected: /** @@ -70,7 +70,7 @@ class DynamicTip : public QToolTip * * @param pos coordinates of the mouse. */ - void maybeTip( const QPoint &pos ); + void maybeTip( const TQPoint &pos ); private: /** the parent control this tooltip is designed for. */ @@ -102,7 +102,7 @@ class DynamicTip : public QToolTip * * @author Eitzenberger Thomas */ -class KODayMatrix: public QFrame, public KCal::Calendar::Observer +class KODayMatrix: public TQFrame, public KCal::Calendar::Observer { Q_OBJECT public: @@ -112,7 +112,7 @@ class KODayMatrix: public QFrame, public KCal::Calendar::Observer * Normally this should be a KDateNavigator * @param name name of the widget */ - KODayMatrix( QWidget *parent, const char *name ); + KODayMatrix( TQWidget *parent, const char *name ); /** destructor that deallocates all dynamically allocated private members. */ @@ -131,7 +131,7 @@ class KODayMatrix: public QFrame, public KCal::Calendar::Observer * @param actdate recalculates the day matrix to show NUMDAYS starting from this * date. */ - void updateView( const QDate &actdate ); + void updateView( const TQDate &actdate ); /** Update event states of dates. Depending of the preferences days with @@ -139,15 +139,15 @@ class KODayMatrix: public QFrame, public KCal::Calendar::Observer */ void updateEvents(); - /** returns the QDate object associated with day indexed by the + /** returns the TQDate object associated with day indexed by the * supplied offset. */ - const QDate& getDate( int offset ); + const TQDate& getDate( int offset ); /** returns the official name of this holy day or 0 if there is no label * for this day. */ - QString getHolidayLabel( int offset ); + TQString getHolidayLabel( int offset ); /** adds all actual selected days from mSelStart to mSelEnd to the supplied * DateList. @@ -158,7 +158,7 @@ class KODayMatrix: public QFrame, public KCal::Calendar::Observer * start and ending with end. Theview must be manually updated by calling * repaint. (?) */ - void setSelectedDaysFrom( const QDate &start, const QDate &end ); + void setSelectedDaysFrom( const TQDate &start, const TQDate &end ); /** Clear all selections. @@ -212,34 +212,34 @@ class KODayMatrix: public QFrame, public KCal::Calendar::Observer /** emitted if the user has dropped an incidence (event or todo) inside the matrix * * @param incidence the dropped calendar incidence - * @param dt QDate that has been selected + * @param dt TQDate that has been selected */ - void incidenceDropped( Incidence *incidence, const QDate &dt ); + void incidenceDropped( Incidence *incidence, const TQDate &dt ); /** emitted if the user has dropped an event inside the matrix and chose to move it instead of copy * * @param oldincidence the new calendar incidence - * @param dt QDate that has been selected + * @param dt TQDate that has been selected */ - void incidenceDroppedMove( Incidence *oldincidence, const QDate &dt ); + void incidenceDroppedMove( Incidence *oldincidence, const TQDate &dt ); protected: - void paintEvent( QPaintEvent *ev ); + void paintEvent( TQPaintEvent *ev ); - void mousePressEvent( QMouseEvent *e ); + void mousePressEvent( TQMouseEvent *e ); - void mouseReleaseEvent( QMouseEvent *e ); + void mouseReleaseEvent( TQMouseEvent *e ); - void mouseMoveEvent( QMouseEvent *e ); + void mouseMoveEvent( TQMouseEvent *e ); - void dragEnterEvent( QDragEnterEvent * ); + void dragEnterEvent( TQDragEnterEvent * ); - void dragMoveEvent( QDragMoveEvent * ); + void dragMoveEvent( TQDragMoveEvent * ); - void dragLeaveEvent( QDragLeaveEvent * ); + void dragLeaveEvent( TQDragLeaveEvent * ); - void dropEvent( QDropEvent * ); + void dropEvent( TQDropEvent * ); - void resizeEvent( QResizeEvent * ); + void resizeEvent( TQResizeEvent * ); private: /** returns the index of the day located at the matrix's widget (x,y) position. @@ -254,7 +254,7 @@ class KODayMatrix: public QFrame, public KCal::Calendar::Observer * * @param color source based on which a shaded color should be calculated. */ - QColor getShadedColor( const QColor &color ); + TQColor getShadedColor( const TQColor &color ); /** number of days to be displayed. For now there is no support for any other number then 42. so change it at your own risk :o) */ @@ -264,14 +264,14 @@ class KODayMatrix: public QFrame, public KCal::Calendar::Observer Calendar *mCalendar; /** starting date of the matrix */ - QDate mStartDate; + TQDate mStartDate; /** array of day labels to optimeize drawing performance. */ - QString *mDayLabels; + TQString *mDayLabels; /** array of days displayed to reduce memory consumption by - subsequently calling QDate::addDays(). */ - QDate *mDays; + subsequently calling TQDate::addDays(). */ + TQDate *mDays; /** array of storing the number of events on a given day. * used for drawing a bold font if there is at least one event on that day. @@ -279,7 +279,7 @@ class KODayMatrix: public QFrame, public KCal::Calendar::Observer int *mEvents; /** stores holiday names of the days shown in the matrix. */ - QMap<int,QString> mHolidays; + TQMap<int,TQString> mHolidays; /** index of today or -1 if today is not visible in the matrix. */ int mToday; @@ -307,7 +307,7 @@ class KODayMatrix: public QFrame, public KCal::Calendar::Observer /** stores actual size of each day in the widget so that I don't need to ask this data * on every repaint. */ - QRect mDaySize; + TQRect mDaySize; /** * Indicate pending calendar changes. diff --git a/korganizer/kodialogmanager.cpp b/korganizer/kodialogmanager.cpp index 908b74913..e17f03409 100644 --- a/korganizer/kodialogmanager.cpp +++ b/korganizer/kodialogmanager.cpp @@ -82,7 +82,7 @@ class KODialogManager::EditorDialogVisitor : KODialogManager::KODialogManager( CalendarView *mainView ) : - QObject(), mMainView( mainView ) + TQObject(), mMainView( mainView ) { mOptionsDialog = 0; mSearchDialog = 0; @@ -93,8 +93,8 @@ KODialogManager::KODialogManager( CalendarView *mainView ) : // don't set any specific parent for the dialog, as its kept around and reused // in different cases where it should have different parents KWin::setMainWindow( mCategoryEditDialog, 0 ); - connect( mainView, SIGNAL( categoriesChanged() ), - mCategoryEditDialog, SLOT( reload() ) ); + connect( mainView, TQT_SIGNAL( categoriesChanged() ), + mCategoryEditDialog, TQT_SLOT( reload() ) ); KOGlobals::fitDialogToScreen( mCategoryEditDialog ); } @@ -108,7 +108,7 @@ KODialogManager::~KODialogManager() delete mFilterEditDialog; } -void KODialogManager::errorSaveIncidence( QWidget *parent, Incidence *incidence ) +void KODialogManager::errorSaveIncidence( TQWidget *parent, Incidence *incidence ) { KMessageBox::sorry( parent, i18n("Unable to save %1 \"%2\".") .arg( i18n( incidence->type() ) ) @@ -123,23 +123,23 @@ void KODialogManager::showOptionsDialog() // mOptionsDialog = new KConfigureDialog( KConfigureDialog::Configurable ); // mOptionsDialog = new KConfigureDialog( mMainView ); connect( mOptionsDialog->dialog(), - SIGNAL( configCommitted( const QCString & ) ), - mMainView, SLOT( updateConfig() ) ); + TQT_SIGNAL( configCommitted( const TQCString & ) ), + mMainView, TQT_SLOT( updateConfig() ) ); #else mOptionsDialog = new KCMultiDialog( mMainView, "KorganizerPreferences" ); - connect( mOptionsDialog, SIGNAL( configCommitted( const QCString & ) ), - mMainView, SLOT( updateConfig( const QCString& ) ) ); + connect( mOptionsDialog, TQT_SIGNAL( configCommitted( const TQCString & ) ), + mMainView, TQT_SLOT( updateConfig( const TQCString& ) ) ); #if 0 - connect( mOptionsDialog, SIGNAL( applyClicked() ), - mMainView, SLOT( updateConfig() ) ); - connect( mOptionsDialog, SIGNAL( okClicked() ), - mMainView, SLOT( updateConfig() ) ); + connect( mOptionsDialog, TQT_SIGNAL( applyClicked() ), + mMainView, TQT_SLOT( updateConfig() ) ); + connect( mOptionsDialog, TQT_SIGNAL( okClicked() ), + mMainView, TQT_SLOT( updateConfig() ) ); // @TODO Find a way to do this with KCMultiDialog - connect(mCategoryEditDialog,SIGNAL(categoryConfigChanged()), - mOptionsDialog,SLOT(updateCategories())); + connect(mCategoryEditDialog,TQT_SIGNAL(categoryConfigChanged()), + mOptionsDialog,TQT_SLOT(updateCategories())); #endif - QStringList modules; + TQStringList modules; modules.append( "korganizer_configmain.desktop" ); modules.append( "korganizer_configtime.desktop" ); @@ -153,7 +153,7 @@ void KODialogManager::showOptionsDialog() modules.append( "korganizer_configdesignerfields.desktop" ); // add them all - QStringList::iterator mit; + TQStringList::iterator mit; for ( mit = modules.begin(); mit != modules.end(); ++mit ) mOptionsDialog->addModule( *mit ); #endif @@ -172,13 +172,13 @@ void KODialogManager::showSearchDialog() { if (!mSearchDialog) { mSearchDialog = new SearchDialog(mMainView->calendar(),mMainView); - connect(mSearchDialog,SIGNAL(showIncidenceSignal(Incidence *)), - mMainView,SLOT(showIncidence(Incidence *))); - connect(mSearchDialog,SIGNAL(editIncidenceSignal(Incidence *)), - mMainView,SLOT(editIncidence(Incidence *))); - connect(mSearchDialog,SIGNAL(deleteIncidenceSignal(Incidence *)), - mMainView, SLOT(deleteIncidence(Incidence *))); - connect(mMainView,SIGNAL(closingDown()),mSearchDialog,SLOT(reject())); + connect(mSearchDialog,TQT_SIGNAL(showIncidenceSignal(Incidence *)), + mMainView,TQT_SLOT(showIncidence(Incidence *))); + connect(mSearchDialog,TQT_SIGNAL(editIncidenceSignal(Incidence *)), + mMainView,TQT_SLOT(editIncidence(Incidence *))); + connect(mSearchDialog,TQT_SIGNAL(deleteIncidenceSignal(Incidence *)), + mMainView, TQT_SLOT(deleteIncidence(Incidence *))); + connect(mMainView,TQT_SIGNAL(closingDown()),mSearchDialog,TQT_SLOT(reject())); } // make sure the widget is on top again mSearchDialog->show(); @@ -190,29 +190,29 @@ void KODialogManager::showArchiveDialog() #ifndef KORG_NOARCHIVE if (!mArchiveDialog) { mArchiveDialog = new ArchiveDialog(mMainView->calendar(),mMainView); - connect(mArchiveDialog,SIGNAL(eventsDeleted()), - mMainView,SLOT(updateView())); - connect(mArchiveDialog,SIGNAL(autoArchivingSettingsModified()), - mMainView,SLOT(slotAutoArchivingSettingsModified())); + connect(mArchiveDialog,TQT_SIGNAL(eventsDeleted()), + mMainView,TQT_SLOT(updateView())); + connect(mArchiveDialog,TQT_SIGNAL(autoArchivingSettingsModified()), + mMainView,TQT_SLOT(slotAutoArchivingSettingsModified())); } mArchiveDialog->show(); mArchiveDialog->raise(); // Workaround. - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); #endif } -void KODialogManager::showFilterEditDialog( QPtrList<CalFilter> *filters ) +void KODialogManager::showFilterEditDialog( TQPtrList<CalFilter> *filters ) { if ( !mFilterEditDialog ) { mFilterEditDialog = new FilterEditDialog( filters, mMainView ); - connect( mFilterEditDialog, SIGNAL( filterChanged() ), - mMainView, SLOT( updateFilter() ) ); - connect( mFilterEditDialog, SIGNAL( editCategories() ), - mCategoryEditDialog, SLOT( show() ) ); - connect( mCategoryEditDialog, SIGNAL( categoryConfigChanged() ), - mFilterEditDialog, SLOT( updateCategoryConfig() ) ); + connect( mFilterEditDialog, TQT_SIGNAL( filterChanged() ), + mMainView, TQT_SLOT( updateFilter() ) ); + connect( mFilterEditDialog, TQT_SIGNAL( editCategories() ), + mCategoryEditDialog, TQT_SLOT( show() ) ); + connect( mCategoryEditDialog, TQT_SIGNAL( categoryConfigChanged() ), + mFilterEditDialog, TQT_SLOT( updateCategoryConfig() ) ); } mFilterEditDialog->show(); mFilterEditDialog->raise(); @@ -241,29 +241,29 @@ void KODialogManager::connectTypeAhead( KOEventEditor *editor, { if ( editor && agenda ) { agenda->setTypeAheadReceiver( editor->typeAheadReceiver() ); - connect( editor, SIGNAL( focusReceivedSignal() ), - agenda, SLOT( finishTypeAhead() ) ); + connect( editor, TQT_SIGNAL( focusReceivedSignal() ), + agenda, TQT_SLOT( finishTypeAhead() ) ); } } void KODialogManager::connectEditor( KOIncidenceEditor*editor ) { - connect( editor, SIGNAL( deleteIncidenceSignal( Incidence * ) ), - mMainView, SLOT( deleteIncidence( Incidence * ) ) ); - - connect( mCategoryEditDialog, SIGNAL( categoryConfigChanged() ), - editor, SIGNAL( updateCategoryConfig() ) ); - connect( editor, SIGNAL( editCategories() ), - mCategoryEditDialog, SLOT( show() ) ); - - connect( editor, SIGNAL( dialogClose( Incidence * ) ), - mMainView, SLOT( dialogClosing( Incidence * ) ) ); - connect( editor, SIGNAL( editCanceled( Incidence * ) ), - mMainView, SLOT( editCanceled( Incidence * ) ) ); - connect( mMainView, SIGNAL( closingDown() ), editor, SLOT( reject() ) ); - - connect( editor, SIGNAL( deleteAttendee( Incidence * ) ), - mMainView, SIGNAL( cancelAttendees( Incidence * ) ) ); + connect( editor, TQT_SIGNAL( deleteIncidenceSignal( Incidence * ) ), + mMainView, TQT_SLOT( deleteIncidence( Incidence * ) ) ); + + connect( mCategoryEditDialog, TQT_SIGNAL( categoryConfigChanged() ), + editor, TQT_SIGNAL( updateCategoryConfig() ) ); + connect( editor, TQT_SIGNAL( editCategories() ), + mCategoryEditDialog, TQT_SLOT( show() ) ); + + connect( editor, TQT_SIGNAL( dialogClose( Incidence * ) ), + mMainView, TQT_SLOT( dialogClosing( Incidence * ) ) ); + connect( editor, TQT_SIGNAL( editCanceled( Incidence * ) ), + mMainView, TQT_SLOT( editCanceled( Incidence * ) ) ); + connect( mMainView, TQT_SIGNAL( closingDown() ), editor, TQT_SLOT( reject() ) ); + + connect( editor, TQT_SIGNAL( deleteAttendee( Incidence * ) ), + mMainView, TQT_SIGNAL( cancelAttendees( Incidence * ) ) ); } KOTodoEditor *KODialogManager::getTodoEditor() diff --git a/korganizer/kodialogmanager.h b/korganizer/kodialogmanager.h index 50c52412f..63fee901e 100644 --- a/korganizer/kodialogmanager.h +++ b/korganizer/kodialogmanager.h @@ -25,8 +25,8 @@ #ifndef KODIALOGMANAGER_H #define KODIALOGMANAGER_H -#include <qobject.h> -#include <qptrlist.h> +#include <tqobject.h> +#include <tqptrlist.h> namespace KCal{class CalFilter; } class CalendarView; @@ -69,14 +69,14 @@ class KODialogManager : public QObject void connectTypeAhead( KOEventEditor *editor, KOrg::AgendaView *agenda ); - static void errorSaveIncidence( QWidget *parent, Incidence *incidence ); + static void errorSaveIncidence( TQWidget *parent, Incidence *incidence ); public slots: void showOptionsDialog(); void showCategoryEditDialog(); void showSearchDialog(); void showArchiveDialog(); - void showFilterEditDialog(QPtrList<CalFilter> *filters); + void showFilterEditDialog(TQPtrList<CalFilter> *filters); private: class DialogManagerVisitor; diff --git a/korganizer/koeditoralarms.cpp b/korganizer/koeditoralarms.cpp index e14581e4d..0a2c7399a 100644 --- a/korganizer/koeditoralarms.cpp +++ b/korganizer/koeditoralarms.cpp @@ -26,15 +26,15 @@ #include "koeditoralarms_base.h" #include "koeditoralarms.h" -#include <qlayout.h> -#include <qlistview.h> -#include <qpushbutton.h> -#include <qspinbox.h> -#include <qcombobox.h> -#include <qcheckbox.h> -#include <qbuttongroup.h> -#include <qtextedit.h> -#include <qwidgetstack.h> +#include <tqlayout.h> +#include <tqlistview.h> +#include <tqpushbutton.h> +#include <tqspinbox.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> +#include <tqbuttongroup.h> +#include <tqtextedit.h> +#include <tqwidgetstack.h> #include <kurlrequester.h> #include <klocale.h> @@ -48,7 +48,7 @@ class AlarmListViewItem : public QListViewItem { public: - AlarmListViewItem( QListView *parent, KCal::Alarm *alarm ); + AlarmListViewItem( TQListView *parent, KCal::Alarm *alarm ); virtual ~AlarmListViewItem(); KCal::Alarm *alarm() const { return mAlarm; } void construct(); @@ -57,8 +57,8 @@ class AlarmListViewItem : public QListViewItem KCal::Alarm *mAlarm; }; -AlarmListViewItem::AlarmListViewItem( QListView *parent, KCal::Alarm *alarm ) - : QListViewItem( parent ) +AlarmListViewItem::AlarmListViewItem( TQListView *parent, KCal::Alarm *alarm ) + : TQListViewItem( parent ) { if ( alarm ) { mAlarm = new KCal::Alarm( *alarm ); @@ -77,7 +77,7 @@ void AlarmListViewItem::construct() { if ( mAlarm ) { // Alarm type: - QString type; + TQString type; switch ( mAlarm->type() ) { case KCal::Alarm::Display: type = i18n("Reminder Dialog"); @@ -98,7 +98,7 @@ void AlarmListViewItem::construct() setText( ColAlarmType, type ); // Alarm offset: - QString offsetstr; + TQString offsetstr; int offset = 0; if ( mAlarm->hasStartOffset() ) { offset = mAlarm->startOffset().asSeconds(); @@ -143,32 +143,32 @@ void AlarmListViewItem::construct() } -KOEditorAlarms::KOEditorAlarms( KCal::Alarm::List *alarms, QWidget *parent, +KOEditorAlarms::KOEditorAlarms( KCal::Alarm::List *alarms, TQWidget *parent, const char *name ) : KDialogBase( parent, name, true, i18n("Edit Reminders"), Ok | Cancel ), mAlarms( alarms ),mCurrentItem(0L) { setMainWidget( mWidget = new KOEditorAlarms_base( this ) ); - mWidget->mAlarmList->setColumnWidthMode( 0, QListView::Maximum ); - mWidget->mAlarmList->setColumnWidthMode( 1, QListView::Maximum ); - connect( mWidget->mAlarmList, SIGNAL( selectionChanged( QListViewItem * ) ), - SLOT( selectionChanged( QListViewItem * ) ) ); - connect( mWidget->mAddButton, SIGNAL( clicked() ), SLOT( slotAdd() ) ); - connect( mWidget->mRemoveButton, SIGNAL( clicked() ), SLOT( slotRemove() ) ); - connect( mWidget->mDuplicateButton, SIGNAL( clicked() ), SLOT( slotDuplicate() ) ); - - connect( mWidget->mAlarmOffset, SIGNAL( valueChanged( int ) ), SLOT( changed() ) ); - connect( mWidget->mOffsetUnit, SIGNAL( activated( int ) ), SLOT( changed() ) ); - connect( mWidget->mBeforeAfter, SIGNAL( activated( int ) ), SLOT( changed() ) ); - connect( mWidget->mRepeats, SIGNAL( toggled( bool ) ), SLOT( changed() ) ); - connect( mWidget->mRepeatCount, SIGNAL( valueChanged( int ) ), SLOT( changed() ) ); - connect( mWidget->mRepeatInterval, SIGNAL( valueChanged( int ) ), SLOT( changed() ) ); - connect( mWidget->mAlarmType, SIGNAL(clicked(int)), SLOT( changed() ) ); - connect( mWidget->mDisplayText, SIGNAL( textChanged() ), SLOT( changed() ) ); - connect( mWidget->mSoundFile, SIGNAL( textChanged( const QString & ) ), SLOT( changed() ) ); - connect( mWidget->mApplication, SIGNAL( textChanged( const QString & ) ), SLOT( changed() ) ); - connect( mWidget->mAppArguments, SIGNAL( textChanged( const QString & ) ), SLOT( changed() ) ); - connect( mWidget->mEmailAddress, SIGNAL( textChanged( const QString & ) ), SLOT( changed() ) ); - connect( mWidget->mEmailText, SIGNAL( textChanged() ), SLOT( changed() ) ); + mWidget->mAlarmList->setColumnWidthMode( 0, TQListView::Maximum ); + mWidget->mAlarmList->setColumnWidthMode( 1, TQListView::Maximum ); + connect( mWidget->mAlarmList, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ), + TQT_SLOT( selectionChanged( TQListViewItem * ) ) ); + connect( mWidget->mAddButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotAdd() ) ); + connect( mWidget->mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotRemove() ) ); + connect( mWidget->mDuplicateButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotDuplicate() ) ); + + connect( mWidget->mAlarmOffset, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( changed() ) ); + connect( mWidget->mOffsetUnit, TQT_SIGNAL( activated( int ) ), TQT_SLOT( changed() ) ); + connect( mWidget->mBeforeAfter, TQT_SIGNAL( activated( int ) ), TQT_SLOT( changed() ) ); + connect( mWidget->mRepeats, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( changed() ) ); + connect( mWidget->mRepeatCount, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( changed() ) ); + connect( mWidget->mRepeatInterval, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( changed() ) ); + connect( mWidget->mAlarmType, TQT_SIGNAL(clicked(int)), TQT_SLOT( changed() ) ); + connect( mWidget->mDisplayText, TQT_SIGNAL( textChanged() ), TQT_SLOT( changed() ) ); + connect( mWidget->mSoundFile, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( changed() ) ); + connect( mWidget->mApplication, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( changed() ) ); + connect( mWidget->mAppArguments, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( changed() ) ); + connect( mWidget->mEmailAddress, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( changed() ) ); + connect( mWidget->mEmailText, TQT_SIGNAL( textChanged() ), TQT_SLOT( changed() ) ); init(); } @@ -244,9 +244,9 @@ void KOEditorAlarms::readAlarm( KCal::Alarm *alarm ) break; case KCal::Alarm::Email: { mWidget->mAlarmType->setButton( 3 ); - QValueList<KCal::Person> addresses = alarm->mailAddresses(); - QStringList add; - for ( QValueList<KCal::Person>::ConstIterator it = addresses.begin(); + TQValueList<KCal::Person> addresses = alarm->mailAddresses(); + TQStringList add; + for ( TQValueList<KCal::Person>::ConstIterator it = addresses.begin(); it != addresses.end(); ++it ) { add << (*it).fullName(); } @@ -303,14 +303,14 @@ void KOEditorAlarms::writeAlarm( KCal::Alarm *alarm ) alarm->setProcedureAlarm( mWidget->mApplication->url(), mWidget->mAppArguments->text() ); break; case 3: { // Email - QStringList addresses = KPIM::splitEmailAddrList( mWidget->mEmailAddress->text() ); - QValueList<KCal::Person> add; - for ( QStringList::Iterator it = addresses.begin(); it != addresses.end(); + TQStringList addresses = KPIM::splitEmailAddrList( mWidget->mEmailAddress->text() ); + TQValueList<KCal::Person> add; + for ( TQStringList::Iterator it = addresses.begin(); it != addresses.end(); ++it ) { add << KCal::Person( *it ); } // TODO: Add a subject line and possibilities for attachments - alarm->setEmailAlarm( QString::null, mWidget->mEmailText->text(), + alarm->setEmailAlarm( TQString::null, mWidget->mEmailText->text(), add ); break; } case 0: // Display @@ -320,7 +320,7 @@ void KOEditorAlarms::writeAlarm( KCal::Alarm *alarm ) } } -void KOEditorAlarms::selectionChanged( QListViewItem *listviewitem ) +void KOEditorAlarms::selectionChanged( TQListViewItem *listviewitem ) { AlarmListViewItem *item = dynamic_cast<AlarmListViewItem*>(listviewitem); mCurrentItem = item; @@ -336,7 +336,7 @@ void KOEditorAlarms::slotOk() // copy the mAlarms list if ( mAlarms ) { mAlarms->clear(); - QListViewItemIterator it( mWidget->mAlarmList ); + TQListViewItemIterator it( mWidget->mAlarmList ); while ( it.current() ) { AlarmListViewItem *item = dynamic_cast<AlarmListViewItem*>(*it); if ( item ) { diff --git a/korganizer/koeditoralarms.h b/korganizer/koeditoralarms.h index 04af51b48..ed01d656b 100644 --- a/korganizer/koeditoralarms.h +++ b/korganizer/koeditoralarms.h @@ -35,7 +35,7 @@ class KOEditorAlarms : public KDialogBase { Q_OBJECT public: - KOEditorAlarms( KCal::Alarm::List *alarms, QWidget *parent = 0, + KOEditorAlarms( KCal::Alarm::List *alarms, TQWidget *parent = 0, const char *name = 0 ); ~KOEditorAlarms(); @@ -45,7 +45,7 @@ class KOEditorAlarms : public KDialogBase void slotDuplicate(); void slotRemove(); void changed(); - void selectionChanged( QListViewItem *listviewitem ); + void selectionChanged( TQListViewItem *listviewitem ); protected: void init(); void readAlarm( KCal::Alarm *alarm ); diff --git a/korganizer/koeditorattachments.cpp b/korganizer/koeditorattachments.cpp index 51dd63044..adcd871e6 100644 --- a/korganizer/koeditorattachments.cpp +++ b/korganizer/koeditorattachments.cpp @@ -46,16 +46,16 @@ #include <kactioncollection.h> #include <kpopupmenu.h> -#include <qfile.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlistview.h> -#include <qpushbutton.h> -#include <qdragobject.h> -#include <qtooltip.h> -#include <qwhatsthis.h> -#include <qapplication.h> -#include <qclipboard.h> +#include <tqfile.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlistview.h> +#include <tqpushbutton.h> +#include <tqdragobject.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> +#include <tqapplication.h> +#include <tqclipboard.h> #include <cassert> #include <set> @@ -63,13 +63,13 @@ class AttachmentListItem : public KIconViewItem { public: - AttachmentListItem( KCal::Attachment*att, QIconView *parent ) : + AttachmentListItem( KCal::Attachment*att, TQIconView *parent ) : KIconViewItem( parent ) { if ( att ) { mAttachment = new KCal::Attachment( *att ); } else { - mAttachment = new KCal::Attachment( QString::null ); + mAttachment = new KCal::Attachment( TQString::null ); } readAttachment(); setDragEnabled( true ); @@ -77,7 +77,7 @@ class AttachmentListItem : public KIconViewItem ~AttachmentListItem() { delete mAttachment; } KCal::Attachment *attachment() const { return mAttachment; } - void setUri( const QString &uri ) + void setUri( const TQString &uri ) { mAttachment->setUri( uri ); readAttachment(); @@ -87,12 +87,12 @@ class AttachmentListItem : public KIconViewItem mAttachment->setData( base64 ); readAttachment(); } - void setMimeType( const QString &mime ) + void setMimeType( const TQString &mime ) { mAttachment->setMimeType( mime ); readAttachment(); } - void setLabel( const QString &label ) + void setLabel( const TQString &label ) { mAttachment->setLabel( label ); readAttachment(); @@ -110,8 +110,8 @@ class AttachmentListItem : public KIconViewItem } KMimeType::Ptr mt = KMimeType::mimeType( mAttachment->mimeType() ); if ( mt ) { - const QString iconName( mt->icon( QString(), false ) ); - QPixmap pix = KGlobal::iconLoader( )->loadIcon( iconName, KIcon::Small ); + const TQString iconName( mt->icon( TQString(), false ) ); + TQPixmap pix = KGlobal::iconLoader( )->loadIcon( iconName, KIcon::Small ); if ( pix.isNull() ) pix = KGlobal::iconLoader( )->loadIcon( "unknown", KIcon::Small ); if ( !pix.isNull() ) @@ -132,10 +132,10 @@ class AttachmentIconView : public KIconView mParent( parent ) { setAcceptDrops( true ); - setSelectionMode( QIconView::Extended ); + setSelectionMode( TQIconView::Extended ); setMode( KIconView::Select ); - setItemTextPos( QIconView::Right ); - setArrangement( QIconView::LeftToRight ); + setItemTextPos( TQIconView::Right ); + setArrangement( TQIconView::LeftToRight ); setMaxItemWidth( QMAX(maxItemWidth(), 250) ); setMinimumHeight( QMAX(fontMetrics().height(), 16) + 12 ); } @@ -146,10 +146,10 @@ class AttachmentIconView : public KIconView } } protected: - QDragObject * dragObject() + TQDragObject * dragObject() { KURL::List urls; - for ( QIconViewItem *it = firstItem( ); it; it = it->nextItem( ) ) { + for ( TQIconViewItem *it = firstItem( ); it; it = it->nextItem( ) ) { if ( !it->isSelected() ) continue; AttachmentListItem * item = dynamic_cast<AttachmentListItem*>( it ); if ( !item ) return 0; @@ -162,11 +162,11 @@ class AttachmentIconView : public KIconView KTempDir * tempDir = new KTempDir(); // will be deleted on editor close tempDir->setAutoDelete( true ); mTempDirs.insert( tempDir ); - QByteArray encoded; + TQByteArray encoded; encoded.duplicate( att->data(), strlen(att->data()) ); - QByteArray decoded; + TQByteArray decoded; KCodecs::base64Decode( encoded, decoded ); - const QString fileName = tempDir->name( ) + "/" + att->label(); + const TQString fileName = tempDir->name( ) + "/" + att->label(); KPIM::kByteArrayToFile( decoded, fileName, false, false, false ); url.setPath( fileName ); } @@ -175,7 +175,7 @@ class AttachmentIconView : public KIconView KURLDrag *drag = new KURLDrag( urls, this ); return drag; } - void contentsDropEvent( QDropEvent* event ) + void contentsDropEvent( TQDropEvent* event ) { mParent->handlePasteOrDrop( event ); } @@ -184,66 +184,66 @@ class AttachmentIconView : public KIconView KOEditorAttachments* mParent; }; -KOEditorAttachments::KOEditorAttachments( int spacing, QWidget *parent, +KOEditorAttachments::KOEditorAttachments( int spacing, TQWidget *parent, const char *name ) - : QWidget( parent, name ) + : TQWidget( parent, name ) { - QBoxLayout *topLayout = new QHBoxLayout( this ); + TQBoxLayout *topLayout = new TQHBoxLayout( this ); topLayout->setSpacing( spacing ); - QLabel *label = new QLabel( i18n("Attachments:"), this ); + TQLabel *label = new TQLabel( i18n("Attachments:"), this ); topLayout->addWidget( label ); mAttachments = new AttachmentIconView( this ); - QWhatsThis::add( mAttachments, + TQWhatsThis::add( mAttachments, i18n("Displays a list of current items (files, mail, etc.) " "that have been associated with this event or to-do. ") ); topLayout->addWidget( mAttachments ); - connect( mAttachments, SIGNAL( doubleClicked( QIconViewItem * ) ), - SLOT( showAttachment( QIconViewItem * ) ) ); - connect( mAttachments, SIGNAL(selectionChanged()), - SLOT(selectionChanged()) ); - connect( mAttachments, SIGNAL(contextMenuRequested(QIconViewItem*,const QPoint&)), - SLOT(contextMenu(QIconViewItem*,const QPoint&)) ); + connect( mAttachments, TQT_SIGNAL( doubleClicked( TQIconViewItem * ) ), + TQT_SLOT( showAttachment( TQIconViewItem * ) ) ); + connect( mAttachments, TQT_SIGNAL(selectionChanged()), + TQT_SLOT(selectionChanged()) ); + connect( mAttachments, TQT_SIGNAL(contextMenuRequested(TQIconViewItem*,const TQPoint&)), + TQT_SLOT(contextMenu(TQIconViewItem*,const TQPoint&)) ); mAddMenu = new KPopupMenu( this ); mContextMenu = new KPopupMenu( this ); KActionCollection* ac = new KActionCollection( this, this ); - mOpenAction = new KAction( i18n("View"), 0, this, SLOT(slotShow()), ac ); + mOpenAction = new KAction( i18n("View"), 0, this, TQT_SLOT(slotShow()), ac ); mOpenAction->plug( mContextMenu ); mContextMenu->insertSeparator(); - mCopyAction = KStdAction::copy(this, SLOT(slotCopy( ) ), ac ); + mCopyAction = KStdAction::copy(this, TQT_SLOT(slotCopy( ) ), ac ); mCopyAction->plug( mContextMenu ); - mCutAction = KStdAction::cut(this, SLOT(slotCut( ) ), ac ); + mCutAction = KStdAction::cut(this, TQT_SLOT(slotCut( ) ), ac ); mCutAction->plug( mContextMenu ); - KAction *action = KStdAction::paste(this, SLOT(slotPaste( ) ), ac ); + KAction *action = KStdAction::paste(this, TQT_SLOT(slotPaste( ) ), ac ); action->plug( mContextMenu ); - action = new KAction( i18n("&Attach File..."), 0, this, SLOT(slotAddData()), ac ); + action = new KAction( i18n("&Attach File..."), 0, this, TQT_SLOT(slotAddData()), ac ); action->setWhatsThis( i18n("Shows a dialog used to select an attachment " "to add to this event or to-do as link as inline data.") ); action->plug( mAddMenu ); - action = new KAction( i18n("Attach &Link..."), 0, this, SLOT(slotAdd()), ac ); + action = new KAction( i18n("Attach &Link..."), 0, this, TQT_SLOT(slotAdd()), ac ); action->setWhatsThis( i18n("Shows a dialog used to select an attachment " "to add to this event or to-do as link.") ); action->plug( mAddMenu ); - QPushButton *addButton = new QPushButton( this ); + TQPushButton *addButton = new TQPushButton( this ); addButton->setIconSet( SmallIconSet( "add" ) ); addButton->setPopup( mAddMenu ); topLayout->addWidget( addButton ); - mRemoveBtn = new QPushButton( this ); + mRemoveBtn = new TQPushButton( this ); mRemoveBtn->setIconSet( SmallIconSet( "remove" ) ); - QToolTip::add( mRemoveBtn, i18n("&Remove") ); - QWhatsThis::add( mRemoveBtn, + TQToolTip::add( mRemoveBtn, i18n("&Remove") ); + TQWhatsThis::add( mRemoveBtn, i18n("Removes the attachment selected in the list above " "from this event or to-do.") ); topLayout->addWidget( mRemoveBtn ); - connect( mRemoveBtn, SIGNAL( clicked() ), SLOT( slotRemove() ) ); + connect( mRemoveBtn, TQT_SIGNAL( clicked() ), TQT_SLOT( slotRemove() ) ); selectionChanged(); setAcceptDrops( true ); @@ -258,36 +258,36 @@ bool KOEditorAttachments::hasAttachments() return mAttachments->count() != 0; } -void KOEditorAttachments::dragEnterEvent( QDragEnterEvent* event ) +void KOEditorAttachments::dragEnterEvent( TQDragEnterEvent* event ) { - event->accept( KURLDrag::canDecode( event ) | QTextDrag::canDecode( event ) ); + event->accept( KURLDrag::canDecode( event ) | TQTextDrag::canDecode( event ) ); } -void KOEditorAttachments::handlePasteOrDrop( QMimeSource* source ) +void KOEditorAttachments::handlePasteOrDrop( TQMimeSource* source ) { KURL::List urls; - QString text; + TQString text; if ( KURLDrag::decode( source, urls ) ) { const bool asUri = KMessageBox::questionYesNo( this, i18n("Do you want to link to the attachments, or include them in the event?"), i18n("Attach as link?"), i18n("As Link"), i18n("As File") ) == KMessageBox::Yes; for ( KURL::List::ConstIterator it = urls.begin(); it != urls.end(); ++it ) { - addAttachment( (*it).url(), QString::null, asUri ); + addAttachment( (*it).url(), TQString::null, asUri ); } - } else if ( QTextDrag::decode( source, text ) ) { - QStringList lst = QStringList::split( '\n', text ); - for ( QStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) { + } else if ( TQTextDrag::decode( source, text ) ) { + TQStringList lst = TQStringList::split( '\n', text ); + for ( TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) { addAttachment( (*it) ); } } } -void KOEditorAttachments::dropEvent( QDropEvent* event ) +void KOEditorAttachments::dropEvent( TQDropEvent* event ) { handlePasteOrDrop( event ); } -void KOEditorAttachments::showAttachment( QIconViewItem *item ) +void KOEditorAttachments::showAttachment( TQIconViewItem *item ) { AttachmentListItem *attitem = static_cast<AttachmentListItem*>(item); if ( !attitem || !attitem->attachment() ) return; @@ -299,9 +299,9 @@ void KOEditorAttachments::showAttachment( QIconViewItem *item ) KTempFile f; if ( !f.file() ) return; - QByteArray encoded; + TQByteArray encoded; encoded.duplicate( att->data(), strlen(att->data()) ); - QByteArray decoded; + TQByteArray decoded; KCodecs::base64Decode( encoded, decoded ); f.file()->writeBlock( decoded ); f.file()->close(); @@ -311,7 +311,7 @@ void KOEditorAttachments::showAttachment( QIconViewItem *item ) void KOEditorAttachments::slotAdd() { - KURL uri = KPimURLRequesterDlg::getURL( QString::null, i18n( + KURL uri = KPimURLRequesterDlg::getURL( TQString::null, i18n( "URL (e.g. a web page) or file to be attached (only " "the link will be attached, not the file itself):"), this, i18n("Add Attachment") ); @@ -322,15 +322,15 @@ void KOEditorAttachments::slotAdd() void KOEditorAttachments::slotAddData() { - KURL uri = KFileDialog::getOpenFileName( QString(), QString(), this, i18n("Add Attachment") ); + KURL uri = KFileDialog::getOpenFileName( TQString(), TQString(), this, i18n("Add Attachment") ); if ( !uri.isEmpty() ) { - addAttachment( uri, QString::null, false ); + addAttachment( uri, TQString::null, false ); } } void KOEditorAttachments::slotEdit() { - QIconViewItem *item = mAttachments->currentItem(); + TQIconViewItem *item = mAttachments->currentItem(); AttachmentListItem *attitem = static_cast<AttachmentListItem*>(item); if ( !attitem || !attitem->attachment() ) return; @@ -344,19 +344,19 @@ void KOEditorAttachments::slotEdit() if ( !uri.isEmpty() ) attitem->setUri( uri.url() ); } else { - KURL uri = KPimURLRequesterDlg::getURL( QString::null, i18n( + KURL uri = KPimURLRequesterDlg::getURL( TQString::null, i18n( "File to be attached:"), this, i18n("Add Attachment") ); if ( !uri.isEmpty() ) { - QString tmpFile; + TQString tmpFile; if ( KIO::NetAccess::download( uri, tmpFile, this ) ) { - QFile f( tmpFile ); + TQFile f( tmpFile ); if ( !f.open( IO_ReadOnly ) ) return; - QByteArray data = f.readAll(); + TQByteArray data = f.readAll(); f.close(); attitem->setData( KCodecs::base64Encode( data ) ); attitem->setMimeType( KIO::NetAccess::mimetype( uri, this ) ); - QString label = uri.fileName(); + TQString label = uri.fileName(); if ( label.isEmpty() ) label = uri.prettyURL(); attitem->setLabel( label ); @@ -368,8 +368,8 @@ void KOEditorAttachments::slotEdit() void KOEditorAttachments::slotRemove() { - QValueList<QIconViewItem*> selected; - for ( QIconViewItem *it = mAttachments->firstItem( ); it; it = it->nextItem( ) ) { + TQValueList<TQIconViewItem*> selected; + for ( TQIconViewItem *it = mAttachments->firstItem( ); it; it = it->nextItem( ) ) { if ( !it->isSelected() ) continue; selected << it; } @@ -379,14 +379,14 @@ void KOEditorAttachments::slotRemove() i18n("KOrganizer Confirmation"),KStdGuiItem::del()) != KMessageBox::Continue ) return; - for ( QValueList<QIconViewItem*>::iterator it( selected.begin() ), end( selected.end() ); it != end ; ++it ) { + for ( TQValueList<TQIconViewItem*>::iterator it( selected.begin() ), end( selected.end() ); it != end ; ++it ) { delete *it; } } void KOEditorAttachments::slotShow() { - for ( QIconViewItem *it = mAttachments->firstItem(); it; it = it->nextItem() ) { + for ( TQIconViewItem *it = mAttachments->firstItem(); it; it = it->nextItem() ) { if ( !it->isSelected() ) continue; showAttachment( it ); @@ -399,26 +399,26 @@ void KOEditorAttachments::setDefaults() } void KOEditorAttachments::addAttachment( const KURL &uri, - const QString &mimeType, bool asUri ) + const TQString &mimeType, bool asUri ) { AttachmentListItem *item = new AttachmentListItem( 0, mAttachments ); if ( asUri ) { item->setUri( uri.url() ); if ( !mimeType.isEmpty() ) item->setMimeType( mimeType ); } else { - QString tmpFile; + TQString tmpFile; if ( KIO::NetAccess::download( uri, tmpFile, this ) ) { - QFile f( tmpFile ); + TQFile f( tmpFile ); if ( !f.open( IO_ReadOnly ) ) return; - QByteArray data = f.readAll(); + TQByteArray data = f.readAll(); f.close(); item->setData( KCodecs::base64Encode( data ) ); if ( !mimeType.isEmpty() ) item->setMimeType( mimeType ); else item->setMimeType( KIO::NetAccess::mimetype( uri, this ) ); - QString label = uri.fileName(); + TQString label = uri.fileName(); if ( label.isEmpty() ) label = uri.prettyURL(); item->setLabel( label ); @@ -443,7 +443,7 @@ void KOEditorAttachments::readIncidence( KCal::Incidence *i ) addAttachment( (*it) ); } if ( mAttachments->count() > 0 ) { - QTimer::singleShot( 0, mAttachments, SLOT(arrangeItemsInGrid()) ); + TQTimer::singleShot( 0, mAttachments, TQT_SLOT(arrangeItemsInGrid()) ); } } @@ -451,7 +451,7 @@ void KOEditorAttachments::writeIncidence( KCal::Incidence *i ) { i->clearAttachments(); - QIconViewItem *item; + TQIconViewItem *item; AttachmentListItem *attitem; for( item = mAttachments->firstItem(); item; item = item->nextItem() ) { attitem = static_cast<AttachmentListItem*>(item); @@ -463,7 +463,7 @@ void KOEditorAttachments::writeIncidence( KCal::Incidence *i ) void KOEditorAttachments::slotCopy() { - QApplication::clipboard()->setData( mAttachments->dragObject(), QClipboard::Clipboard ); + TQApplication::clipboard()->setData( mAttachments->dragObject(), QClipboard::Clipboard ); } void KOEditorAttachments::slotCut() @@ -474,13 +474,13 @@ void KOEditorAttachments::slotCut() void KOEditorAttachments::slotPaste() { - handlePasteOrDrop( QApplication::clipboard()->data() ); + handlePasteOrDrop( TQApplication::clipboard()->data() ); } void KOEditorAttachments::selectionChanged() { bool selected = false; - for ( QIconViewItem *item = mAttachments->firstItem(); item; item = item->nextItem() ) { + for ( TQIconViewItem *item = mAttachments->firstItem(); item; item = item->nextItem() ) { if ( item->isSelected() ) { selected = true; break; @@ -489,7 +489,7 @@ void KOEditorAttachments::selectionChanged() mRemoveBtn->setEnabled( selected ); } -void KOEditorAttachments::contextMenu(QIconViewItem * item, const QPoint & pos) +void KOEditorAttachments::contextMenu(TQIconViewItem * item, const TQPoint & pos) { const bool enable = item != 0; mOpenAction->setEnabled( enable ); diff --git a/korganizer/koeditorattachments.h b/korganizer/koeditorattachments.h index 813124a22..11dd7e8d4 100644 --- a/korganizer/koeditorattachments.h +++ b/korganizer/koeditorattachments.h @@ -25,7 +25,7 @@ #ifndef KOEDITORATTACHMENTS_H #define KOEDITORATTACHMENTS_H -#include <qwidget.h> +#include <tqwidget.h> #include <kurl.h> namespace KCal { @@ -44,12 +44,12 @@ class KOEditorAttachments : public QWidget { Q_OBJECT public: - KOEditorAttachments( int spacing = 8, QWidget *parent = 0, + KOEditorAttachments( int spacing = 8, TQWidget *parent = 0, const char *name = 0 ); ~KOEditorAttachments(); void addAttachment( const KURL &uri, - const QString &mimeType = QString::null, bool asUri = true ); + const TQString &mimeType = TQString::null, bool asUri = true ); void addAttachment( KCal::Attachment *attachment ); /** Set widgets to default values */ @@ -62,29 +62,29 @@ class KOEditorAttachments : public QWidget bool hasAttachments(); protected slots: - void showAttachment( QIconViewItem *item ); + void showAttachment( TQIconViewItem *item ); void slotAdd(); void slotAddData(); void slotEdit(); void slotRemove(); void slotShow(); - void dragEnterEvent( QDragEnterEvent *event ); - void dropEvent( QDropEvent *event ); + void dragEnterEvent( TQDragEnterEvent *event ); + void dropEvent( TQDropEvent *event ); void slotCopy(); void slotCut(); void slotPaste(); void selectionChanged(); - void contextMenu( QIconViewItem* item, const QPoint &pos ); + void contextMenu( TQIconViewItem* item, const TQPoint &pos ); signals: void openURL( const KURL &url ); private: friend class AttachmentIconView; - void handlePasteOrDrop( QMimeSource* source ); + void handlePasteOrDrop( TQMimeSource* source ); AttachmentIconView *mAttachments; - QPushButton *mRemoveBtn; - QPopupMenu *mContextMenu, *mAddMenu; + TQPushButton *mRemoveBtn; + TQPopupMenu *mContextMenu, *mAddMenu; KAction *mOpenAction, *mCopyAction, *mCutAction; }; diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp index 2485fc96a..0b8c6159f 100644 --- a/korganizer/koeditordetails.cpp +++ b/korganizer/koeditordetails.cpp @@ -25,25 +25,25 @@ #include "koeditordetails.h" -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qdatetime.h> -#include <qdragobject.h> -#include <qfiledialog.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qregexp.h> -#include <qtooltip.h> -#include <qvbox.h> -#include <qvgroupbox.h> -#include <qwhatsthis.h> -#include <qwidgetstack.h> -#include <qvaluevector.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqdatetime.h> +#include <tqdragobject.h> +#include <tqfiledialog.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqregexp.h> +#include <tqtooltip.h> +#include <tqvbox.h> +#include <tqvgroupbox.h> +#include <tqwhatsthis.h> +#include <tqwidgetstack.h> +#include <tqvaluevector.h> #include <kdebug.h> #include <klocale.h> @@ -90,7 +90,7 @@ void CustomListViewItem<KCal::Attendee *>::updateItem() setText(6, mData->delegator()); } -KOAttendeeListView::KOAttendeeListView ( QWidget *parent, const char *name ) +KOAttendeeListView::KOAttendeeListView ( TQWidget *parent, const char *name ) : KListView(parent, name) { setAcceptDrops( true ); @@ -101,21 +101,21 @@ KOAttendeeListView::KOAttendeeListView ( QWidget *parent, const char *name ) /** KOAttendeeListView is a child class of KListView which supports * dropping of attendees (e.g. from kaddressbook) onto it. If an attendeee * was dropped, the signal dropped(Attendee*) is emitted. Valid drop classes - * are KVCardDrag and QTextDrag. + * are KVCardDrag and TQTextDrag. */ KOAttendeeListView::~KOAttendeeListView() { } -void KOAttendeeListView::contentsDragEnterEvent( QDragEnterEvent *e ) +void KOAttendeeListView::contentsDragEnterEvent( TQDragEnterEvent *e ) { dragEnterEvent(e); } -void KOAttendeeListView::contentsDragMoveEvent( QDragMoveEvent *e ) +void KOAttendeeListView::contentsDragMoveEvent( TQDragMoveEvent *e ) { #ifndef KORG_NODND - if ( KVCardDrag::canDecode( e ) || QTextDrag::canDecode( e ) ) { + if ( KVCardDrag::canDecode( e ) || TQTextDrag::canDecode( e ) ) { e->accept(); } else { e->ignore(); @@ -123,10 +123,10 @@ void KOAttendeeListView::contentsDragMoveEvent( QDragMoveEvent *e ) #endif } -void KOAttendeeListView::dragEnterEvent( QDragEnterEvent *e ) +void KOAttendeeListView::dragEnterEvent( TQDragEnterEvent *e ) { #ifndef KORG_NODND - if ( KVCardDrag::canDecode( e ) || QTextDrag::canDecode( e ) ) { + if ( KVCardDrag::canDecode( e ) || TQTextDrag::canDecode( e ) ) { e->accept(); } else { e->ignore(); @@ -134,25 +134,25 @@ void KOAttendeeListView::dragEnterEvent( QDragEnterEvent *e ) #endif } -void KOAttendeeListView::addAttendee( const QString &newAttendee ) +void KOAttendeeListView::addAttendee( const TQString &newAttendee ) { kdDebug(5850) << " Email: " << newAttendee << endl; - QString name; - QString email; + TQString name; + TQString email; KPIM::getNameAndMail( newAttendee, name, email ); emit dropped( new Attendee( name, email, true ) ); } -void KOAttendeeListView::contentsDropEvent( QDropEvent *e ) +void KOAttendeeListView::contentsDropEvent( TQDropEvent *e ) { dropEvent(e); } -void KOAttendeeListView::dropEvent( QDropEvent *e ) +void KOAttendeeListView::dropEvent( TQDropEvent *e ) { #ifndef KORG_NODND - QString text; - QString vcards; + TQString text; + TQString vcards; #ifndef KORG_NOKABC if ( KVCardDrag::decode( e, vcards ) ) { @@ -161,7 +161,7 @@ void KOAttendeeListView::dropEvent( QDropEvent *e ) KABC::Addressee::List list = converter.parseVCards( vcards ); KABC::Addressee::List::Iterator it; for ( it = list.begin(); it != list.end(); ++it ) { - QString em( (*it).fullEmail() ); + TQString em( (*it).fullEmail() ); if (em.isEmpty()) { em=(*it).realName(); } @@ -169,10 +169,10 @@ void KOAttendeeListView::dropEvent( QDropEvent *e ) } } else #endif // KORG_NOKABC - if (QTextDrag::decode(e,text)) { + if (TQTextDrag::decode(e,text)) { kdDebug(5850) << "Dropped : " << text << endl; - QStringList emails = QStringList::split(",",text); - for(QStringList::ConstIterator it = emails.begin();it!=emails.end();++it) { + TQStringList emails = TQStringList::split(",",text); + for(TQStringList::ConstIterator it = emails.begin();it!=emails.end();++it) { addAttendee(*it); } } @@ -180,17 +180,17 @@ void KOAttendeeListView::dropEvent( QDropEvent *e ) } -KOEditorDetails::KOEditorDetails( int spacing, QWidget *parent, +KOEditorDetails::KOEditorDetails( int spacing, TQWidget *parent, const char *name ) : KOAttendeeEditor( parent, name), mDisableItemUpdate( false ) { - QBoxLayout *topLayout = new QVBoxLayout( this ); + TQBoxLayout *topLayout = new TQVBoxLayout( this ); topLayout->setSpacing( spacing ); initOrganizerWidgets( this, topLayout ); mListView = new KOAttendeeListView( this, "mListView" ); - QWhatsThis::add( mListView, + TQWhatsThis::add( mListView, i18n("Displays information about current attendees. " "To edit an attendee, select it in this list " "and modify the values in the area below. " @@ -205,22 +205,22 @@ KOEditorDetails::KOEditorDetails( int spacing, QWidget *parent, mListView->addColumn( i18n("RSVP"), 55 ); mListView->addColumn( i18n("Delegated to"), 120 ); mListView->addColumn( i18n("Delegated from" ), 120 ); - mListView->setResizeMode( QListView::LastColumn ); + mListView->setResizeMode( TQListView::LastColumn ); if ( KOPrefs::instance()->mCompactDialogs ) { mListView->setFixedHeight( 78 ); } - connect( mListView, SIGNAL( selectionChanged( QListViewItem * ) ), - SLOT( updateAttendeeInput() ) ); + connect( mListView, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ), + TQT_SLOT( updateAttendeeInput() ) ); #ifndef KORG_NODND - connect( mListView, SIGNAL( dropped( Attendee * ) ), - SLOT( slotInsertAttendee( Attendee * ) ) ); + connect( mListView, TQT_SIGNAL( dropped( Attendee * ) ), + TQT_SLOT( slotInsertAttendee( Attendee * ) ) ); #endif topLayout->addWidget( mListView ); initEditWidgets( this, topLayout ); - connect( mRemoveButton, SIGNAL(clicked()), SLOT(removeAttendee()) ); + connect( mRemoveButton, TQT_SIGNAL(clicked()), TQT_SLOT(removeAttendee()) ); updateAttendeeInput(); } @@ -281,8 +281,8 @@ void KOEditorDetails::readEvent( Incidence *event ) void KOEditorDetails::writeEvent(Incidence *event) { event->clearAttendees(); - QValueVector<QListViewItem*> toBeDeleted; - QListViewItem *item; + TQValueVector<TQListViewItem*> toBeDeleted; + TQListViewItem *item; AttendeeListItem *a; for (item = mListView->firstChild(); item; item = item->nextSibling()) { @@ -323,7 +323,7 @@ void KOEditorDetails::writeEvent(Incidence *event) KOAttendeeEditor::writeEvent( event ); // cleanup - QValueVector<QListViewItem*>::iterator it; + TQValueVector<TQListViewItem*>::iterator it; for( it = toBeDeleted.begin(); it != toBeDeleted.end(); ++it ) { delete *it; } @@ -336,7 +336,7 @@ bool KOEditorDetails::validateInput() KCal::Attendee * KOEditorDetails::currentAttendee() const { - QListViewItem *item = mListView->selectedItem(); + TQListViewItem *item = mListView->selectedItem(); AttendeeListItem *aItem = static_cast<AttendeeListItem *>( item ); if ( !aItem ) return 0; @@ -357,10 +357,10 @@ void KOEditorDetails::slotInsertAttendee(Attendee * a) void KOEditorDetails::changeStatusForMe(Attendee::PartStat status) { - const QStringList myEmails = KOPrefs::instance()->allEmails(); - for ( QListViewItemIterator it( mListView ); it.current(); ++it ) { + const TQStringList myEmails = KOPrefs::instance()->allEmails(); + for ( TQListViewItemIterator it( mListView ); it.current(); ++it ) { AttendeeListItem *item = static_cast<AttendeeListItem*>( it.current() ); - for ( QStringList::ConstIterator it2( myEmails.begin() ), end( myEmails.end() ); it2 != end; ++it2 ) { + for ( TQStringList::ConstIterator it2( myEmails.begin() ), end( myEmails.end() ); it2 != end; ++it2 ) { if ( item->data()->email() == *it2 ) { item->data()->setStatus( status ); item->updateItem(); diff --git a/korganizer/koeditordetails.h b/korganizer/koeditordetails.h index 1929a49ab..7d122244b 100644 --- a/korganizer/koeditordetails.h +++ b/korganizer/koeditordetails.h @@ -55,21 +55,21 @@ typedef CustomListViewItem<KCal::Attendee *> AttendeeListItem; /** KOAttendeeListView is a child class of KListView which supports * dropping of attendees (e.g. from kaddressbook) onto it. If an attendeee * was dropped, the signal dropped(Attendee*) is emitted. Valid drop classes - * are KVCardDrag and QTextDrag. + * are KVCardDrag and TQTextDrag. */ class KOAttendeeListView : public KListView { Q_OBJECT public: - KOAttendeeListView (QWidget *parent=0, const char *name=0); + KOAttendeeListView (TQWidget *parent=0, const char *name=0); virtual ~KOAttendeeListView(); - virtual void addAttendee( const QString& newAttendee ); + virtual void addAttendee( const TQString& newAttendee ); public slots: - virtual void contentsDragEnterEvent( QDragEnterEvent *e ); - virtual void dragEnterEvent( QDragEnterEvent *e ); - virtual void contentsDropEvent( QDropEvent *e ); - virtual void dropEvent( QDropEvent *e ); - virtual void contentsDragMoveEvent(QDragMoveEvent *e); + virtual void contentsDragEnterEvent( TQDragEnterEvent *e ); + virtual void dragEnterEvent( TQDragEnterEvent *e ); + virtual void contentsDropEvent( TQDropEvent *e ); + virtual void dropEvent( TQDropEvent *e ); + virtual void contentsDragMoveEvent(TQDragMoveEvent *e); signals: void dropped(Attendee*); }; @@ -79,7 +79,7 @@ class KOEditorDetails : public KOAttendeeEditor { Q_OBJECT public: - KOEditorDetails (int spacing = 8,QWidget* parent = 0, const char* name = 0); + KOEditorDetails (int spacing = 8,TQWidget* parent = 0, const char* name = 0); virtual ~KOEditorDetails(); /** Set widgets to default values */ diff --git a/korganizer/koeditorfreebusy.cpp b/korganizer/koeditorfreebusy.cpp index 3849bc5d0..19691e807 100644 --- a/korganizer/koeditorfreebusy.cpp +++ b/korganizer/koeditorfreebusy.cpp @@ -22,13 +22,13 @@ without including the source code for Qt in the source distribution. */ -#include <qtooltip.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qpushbutton.h> -#include <qvaluevector.h> -#include <qwhatsthis.h> +#include <tqtooltip.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqpushbutton.h> +#include <tqvaluevector.h> +#include <tqwhatsthis.h> #include <kdebug.h> #include <klocale.h> @@ -90,19 +90,19 @@ class FreeBusyItem : public KDGanttViewTaskItem void setFreeBusyPeriods( FreeBusy *fb ); - QString key( int column, bool ) const + TQString key( int column, bool ) const { - QMap<int,QString>::ConstIterator it = mKeyMap.find( column ); + TQMap<int,TQString>::ConstIterator it = mKeyMap.find( column ); if ( it == mKeyMap.end() ) return listViewText( column ); else return *it; } - void setSortKey( int column, const QString &key ) + void setSortKey( int column, const TQString &key ) { mKeyMap.insert( column, key ); } - QString email() const { return mAttendee->email(); } + TQString email() const { return mAttendee->email(); } void setUpdateTimerID( int id ) { mTimerID = id; } int updateTimerID() const { return mTimerID; } @@ -119,7 +119,7 @@ class FreeBusyItem : public KDGanttViewTaskItem Attendee *mAttendee; KCal::FreeBusy *mFreeBusy; - QMap<int,QString> mKeyMap; + TQMap<int,TQString> mKeyMap; // This is used for the update timer int mTimerID; @@ -149,7 +149,7 @@ void FreeBusyItem::updateItem() setPixmap( 0, KOGlobals::self()->smallIcon( "mail_forward" ) ); break; default: - setPixmap( 0, QPixmap() ); + setPixmap( 0, TQPixmap() ); } } @@ -163,14 +163,14 @@ void FreeBusyItem::setFreeBusyPeriods( FreeBusy* fb ) delete it; // Evaluate free/busy information - QValueList<KCal::Period> busyPeriods = fb->busyPeriods(); - for( QValueList<KCal::Period>::Iterator it = busyPeriods.begin(); + TQValueList<KCal::Period> busyPeriods = fb->busyPeriods(); + for( TQValueList<KCal::Period>::Iterator it = busyPeriods.begin(); it != busyPeriods.end(); ++it ) { KDGanttViewTaskItem* newSubItem = new KDGanttViewTaskItem( this ); newSubItem->setStartTime( (*it).start() ); newSubItem->setEndTime( (*it).end() ); newSubItem->setColors( Qt::red, Qt::red, Qt::red ); - QString toolTip; + TQString toolTip; if ( !(*it).summary().isEmpty() ) toolTip += "<b>" + (*it).summary() + "</b><br/>"; if ( !(*it).location().isEmpty() ) @@ -184,7 +184,7 @@ void FreeBusyItem::setFreeBusyPeriods( FreeBusy* fb ) // No free/busy information //debug only start // int ii ; - // QDateTime cur = QDateTime::currentDateTime(); + // TQDateTime cur = TQDateTime::currentDateTime(); // for( ii = 0; ii < 10 ;++ii ) { // KDGanttViewTaskItem* newSubItem = new KDGanttViewTaskItem( this ); // cur = cur.addSecs( 7200 ); @@ -204,11 +204,11 @@ void FreeBusyItem::setFreeBusyPeriods( FreeBusy* fb ) //// -KOEditorFreeBusy::KOEditorFreeBusy( int spacing, QWidget *parent, +KOEditorFreeBusy::KOEditorFreeBusy( int spacing, TQWidget *parent, const char *name ) : KOAttendeeEditor( parent, name ) { - QVBoxLayout *topLayout = new QVBoxLayout( this ); + TQVBoxLayout *topLayout = new TQVBoxLayout( this ); topLayout->setSpacing( spacing ); initOrganizerWidgets( this, topLayout ); @@ -216,66 +216,66 @@ KOEditorFreeBusy::KOEditorFreeBusy( int spacing, QWidget *parent, // Label for status summary information // Uses the tooltip palette to highlight it mIsOrganizer = false; // Will be set later. This is just valgrind silencing - mStatusSummaryLabel = new QLabel( this ); - mStatusSummaryLabel->setPalette( QToolTip::palette() ); - mStatusSummaryLabel->setFrameStyle( QFrame::Plain | QFrame::Box ); + mStatusSummaryLabel = new TQLabel( this ); + mStatusSummaryLabel->setPalette( TQToolTip::palette() ); + mStatusSummaryLabel->setFrameStyle( TQFrame::Plain | TQFrame::Box ); mStatusSummaryLabel->setLineWidth( 1 ); mStatusSummaryLabel->hide(); // Will be unhidden later if you are organizer topLayout->addWidget( mStatusSummaryLabel ); // The control panel for the gantt widget - QBoxLayout *controlLayout = new QHBoxLayout( topLayout ); + TQBoxLayout *controlLayout = new TQHBoxLayout( topLayout ); - QString whatsThis = i18n("Sets the zoom level on the Gantt chart. " + TQString whatsThis = i18n("Sets the zoom level on the Gantt chart. " "'Hour' shows a range of several hours, " "'Day' shows a range of a few days, " "'Week' shows a range of a few months, " "and 'Month' shows a range of a few years, " "while 'Automatic' selects the range most " "appropriate for the current event or to-do."); - QLabel *label = new QLabel( i18n( "Scale: " ), this ); - QWhatsThis::add( label, whatsThis ); + TQLabel *label = new TQLabel( i18n( "Scale: " ), this ); + TQWhatsThis::add( label, whatsThis ); controlLayout->addWidget( label ); - scaleCombo = new QComboBox( this ); - QWhatsThis::add( scaleCombo, whatsThis ); + scaleCombo = new TQComboBox( this ); + TQWhatsThis::add( scaleCombo, whatsThis ); scaleCombo->insertItem( i18n( "Hour" ) ); scaleCombo->insertItem( i18n( "Day" ) ); scaleCombo->insertItem( i18n( "Week" ) ); scaleCombo->insertItem( i18n( "Month" ) ); scaleCombo->insertItem( i18n( "Automatic" ) ); scaleCombo->setCurrentItem( 0 ); // start with "hour" - connect( scaleCombo, SIGNAL( activated( int ) ), - SLOT( slotScaleChanged( int ) ) ); + connect( scaleCombo, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( slotScaleChanged( int ) ) ); controlLayout->addWidget( scaleCombo ); - QPushButton *button = new QPushButton( i18n( "Center on Start" ), this ); - QWhatsThis::add( button, + TQPushButton *button = new TQPushButton( i18n( "Center on Start" ), this ); + TQWhatsThis::add( button, i18n("Centers the Gantt chart on the start time " "and day of this event.") ); - connect( button, SIGNAL( clicked() ), SLOT( slotCenterOnStart() ) ); + connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( slotCenterOnStart() ) ); controlLayout->addWidget( button ); controlLayout->addStretch( 1 ); - button = new QPushButton( i18n( "Pick Date" ), this ); - QWhatsThis::add( button, + button = new TQPushButton( i18n( "Pick Date" ), this ); + TQWhatsThis::add( button, i18n("Moves the event to a date and time when all the " "attendees are free.") ); - connect( button, SIGNAL( clicked() ), SLOT( slotPickDate() ) ); + connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( slotPickDate() ) ); controlLayout->addWidget( button ); controlLayout->addStretch( 1 ); - button = new QPushButton( i18n("Reload"), this ); - QWhatsThis::add( button, + button = new TQPushButton( i18n("Reload"), this ); + TQWhatsThis::add( button, i18n("Reloads Free/Busy data for all attendees from " "the corresponding servers.") ); controlLayout->addWidget( button ); - connect( button, SIGNAL( clicked() ), SLOT( manualReload() ) ); + connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( manualReload() ) ); mGanttView = new KDGanttView( this, "mGanttView" ); - QWhatsThis::add( mGanttView, + TQWhatsThis::add( mGanttView, i18n("Shows the free/busy status of all attendees. " "Double-clicking on an attendees entry in the " "list will allow you to enter the location of their " @@ -292,16 +292,16 @@ KOEditorFreeBusy::KOEditorFreeBusy( int spacing, QWidget *parent, mGanttView->setShowHeaderPopupMenu( false, false, false, false, false, false ); // Initially, show 15 days back and forth // set start to even hours, i.e. to 12:AM 0 Min 0 Sec - QDateTime horizonStart = QDateTime( QDateTime::currentDateTime() + TQDateTime horizonStart = TQDateTime( TQDateTime::currentDateTime() .addDays( -15 ).date() ); - QDateTime horizonEnd = QDateTime::currentDateTime().addDays( 15 ); + TQDateTime horizonEnd = TQDateTime::currentDateTime().addDays( 15 ); mGanttView->setHorizonStart( horizonStart ); mGanttView->setHorizonEnd( horizonEnd ); mGanttView->setCalendarMode( true ); //mGanttView->setDisplaySubitemsAsGroup( true ); mGanttView->setShowLegendButton( false ); // Initially, center to current date - mGanttView->centerTimelineAfterShow( QDateTime::currentDateTime() ); + mGanttView->centerTimelineAfterShow( TQDateTime::currentDateTime() ); if ( KGlobal::locale()->use12Clock() ) mGanttView->setHourFormat( KDGanttView::Hour_12 ); else @@ -312,37 +312,37 @@ KOEditorFreeBusy::KOEditorFreeBusy( int spacing, QWidget *parent, mEventRectangle->setColor( Qt::magenta ); mGanttView->addIntervalBackgroundColor( mEventRectangle ); - connect( mGanttView, SIGNAL ( timeIntervalSelected( const QDateTime &, - const QDateTime & ) ), - mGanttView, SLOT( zoomToSelection( const QDateTime &, - const QDateTime & ) ) ); - connect( mGanttView, SIGNAL( lvItemDoubleClicked( KDGanttViewItem * ) ), - SLOT( editFreeBusyUrl( KDGanttViewItem * ) ) ); - connect( mGanttView, SIGNAL( intervalColorRectangleMoved( const QDateTime&, const QDateTime& ) ), - this, SLOT( slotIntervalColorRectangleMoved( const QDateTime&, const QDateTime& ) ) ); - - connect( mGanttView, SIGNAL(lvSelectionChanged(KDGanttViewItem*)), - this, SLOT(updateAttendeeInput()) ); - connect( mGanttView, SIGNAL(lvItemLeftClicked(KDGanttViewItem*)), - this, SLOT(showAttendeeStatusMenu()) ); - connect( mGanttView, SIGNAL(lvItemRightClicked(KDGanttViewItem*)), - this, SLOT(showAttendeeStatusMenu()) ); - connect( mGanttView, SIGNAL(lvMouseButtonClicked(int, KDGanttViewItem*, const QPoint&, int)), - this, SLOT(listViewClicked(int, KDGanttViewItem*)) ); + connect( mGanttView, TQT_SIGNAL ( timeIntervalSelected( const TQDateTime &, + const TQDateTime & ) ), + mGanttView, TQT_SLOT( zoomToSelection( const TQDateTime &, + const TQDateTime & ) ) ); + connect( mGanttView, TQT_SIGNAL( lvItemDoubleClicked( KDGanttViewItem * ) ), + TQT_SLOT( editFreeBusyUrl( KDGanttViewItem * ) ) ); + connect( mGanttView, TQT_SIGNAL( intervalColorRectangleMoved( const TQDateTime&, const TQDateTime& ) ), + this, TQT_SLOT( slotIntervalColorRectangleMoved( const TQDateTime&, const TQDateTime& ) ) ); + + connect( mGanttView, TQT_SIGNAL(lvSelectionChanged(KDGanttViewItem*)), + this, TQT_SLOT(updateAttendeeInput()) ); + connect( mGanttView, TQT_SIGNAL(lvItemLeftClicked(KDGanttViewItem*)), + this, TQT_SLOT(showAttendeeStatusMenu()) ); + connect( mGanttView, TQT_SIGNAL(lvItemRightClicked(KDGanttViewItem*)), + this, TQT_SLOT(showAttendeeStatusMenu()) ); + connect( mGanttView, TQT_SIGNAL(lvMouseButtonClicked(int, KDGanttViewItem*, const TQPoint&, int)), + this, TQT_SLOT(listViewClicked(int, KDGanttViewItem*)) ); FreeBusyManager *m = KOGroupware::instance()->freeBusyManager(); - connect( m, SIGNAL( freeBusyRetrieved( KCal::FreeBusy *, const QString & ) ), - SLOT( slotInsertFreeBusy( KCal::FreeBusy *, const QString & ) ) ); + connect( m, TQT_SIGNAL( freeBusyRetrieved( KCal::FreeBusy *, const TQString & ) ), + TQT_SLOT( slotInsertFreeBusy( KCal::FreeBusy *, const TQString & ) ) ); - connect( &mReloadTimer, SIGNAL( timeout() ), SLOT( autoReload() ) ); + connect( &mReloadTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( autoReload() ) ); initEditWidgets( this, topLayout ); - connect( mRemoveButton, SIGNAL(clicked()), - SLOT(removeAttendee()) ); + connect( mRemoveButton, TQT_SIGNAL(clicked()), + TQT_SLOT(removeAttendee()) ); slotOrganizerChanged( mOrganizerCombo->currentText() ); - connect( mOrganizerCombo, SIGNAL( activated(const QString&) ), - this, SLOT( slotOrganizerChanged(const QString&) ) ); + connect( mOrganizerCombo, TQT_SIGNAL( activated(const TQString&) ), + this, TQT_SLOT( slotOrganizerChanged(const TQString&) ) ); //suppress the buggy consequences of clicks on the time header widget mGanttView->timeHeaderWidget()->installEventFilter( this ); @@ -414,7 +414,7 @@ void KOEditorFreeBusy::readEvent( Event *event ) emit updateAttendeeSummary( mGanttView->childCount() ); } -void KOEditorFreeBusy::slotIntervalColorRectangleMoved( const QDateTime& start, const QDateTime& end ) +void KOEditorFreeBusy::slotIntervalColorRectangleMoved( const TQDateTime& start, const TQDateTime& end ) { kdDebug() << k_funcinfo << "slotIntervalColorRectangleMoved " << start << "," << end << endl; mDtStart = start; @@ -422,7 +422,7 @@ void KOEditorFreeBusy::slotIntervalColorRectangleMoved( const QDateTime& start, emit dateTimesChanged( start, end ); } -void KOEditorFreeBusy::setDateTimes( const QDateTime &start, const QDateTime &end ) +void KOEditorFreeBusy::setDateTimes( const TQDateTime &start, const TQDateTime &end ) { slotUpdateGanttView( start, end ); } @@ -460,7 +460,7 @@ void KOEditorFreeBusy::updateFreeBusyData( FreeBusyItem* item ) item->setUpdateTimerID( startTimer( 5000 ) ); } -void KOEditorFreeBusy::timerEvent( QTimerEvent* event ) +void KOEditorFreeBusy::timerEvent( TQTimerEvent* event ) { killTimer( event->timerId() ); FreeBusyItem *item = static_cast<FreeBusyItem *>( mGanttView->firstChild() ); @@ -477,7 +477,7 @@ void KOEditorFreeBusy::timerEvent( QTimerEvent* event ) // Set the Free Busy list for everyone having this email address // If fb == 0, this disabled the free busy list for them void KOEditorFreeBusy::slotInsertFreeBusy( KCal::FreeBusy *fb, - const QString &email ) + const TQString &email ) { kdDebug(5850) << "KOEditorFreeBusy::slotInsertFreeBusy() " << email << endl; @@ -499,13 +499,13 @@ void KOEditorFreeBusy::slotInsertFreeBusy( KCal::FreeBusy *fb, Centers the Gantt view to the date/time passed in. */ -void KOEditorFreeBusy::slotUpdateGanttView( const QDateTime &dtFrom, const QDateTime &dtTo ) +void KOEditorFreeBusy::slotUpdateGanttView( const TQDateTime &dtFrom, const TQDateTime &dtTo ) { mDtStart = dtFrom; mDtEnd = dtTo; bool block = mGanttView->getUpdateEnabled( ); mGanttView->setUpdateEnabled( false ); - QDateTime horizonStart = QDateTime( dtFrom.addDays( -15 ).date() ); + TQDateTime horizonStart = TQDateTime( dtFrom.addDays( -15 ).date() ); mGanttView->setHorizonStart( horizonStart ); mGanttView->setHorizonEnd( dtTo.addDays( 15 ) ); mEventRectangle->setDateTimes( dtFrom, dtTo ); @@ -519,21 +519,21 @@ void KOEditorFreeBusy::slotUpdateGanttView( const QDateTime &dtFrom, const QDate */ void KOEditorFreeBusy::slotPickDate() { - QDateTime start = mDtStart; - QDateTime end = mDtEnd; + TQDateTime start = mDtStart; + TQDateTime end = mDtEnd; bool success = findFreeSlot( start, end ); if( success ) { if ( start == mDtStart && end == mDtEnd ) { KMessageBox::information( this, - i18n( "The meeting already has suitable start/end times." ), QString::null, + i18n( "The meeting already has suitable start/end times." ), TQString::null, "MeetingTimeOKFreeBusy" ); } else { emit dateTimesChanged( start, end ); slotUpdateGanttView( start, end ); KMessageBox::information( this, i18n( "The meeting has been moved to\nStart: %1\nEnd: %2." ) - .arg( start.toString() ).arg( end.toString() ), QString::null, + .arg( start.toString() ).arg( end.toString() ), TQString::null, "MeetingMovedFreeBusy" ); } } else @@ -545,21 +545,21 @@ void KOEditorFreeBusy::slotPickDate() Finds a free slot in the future which has at least the same size as the initial slot. */ -bool KOEditorFreeBusy::findFreeSlot( QDateTime &dtFrom, QDateTime &dtTo ) +bool KOEditorFreeBusy::findFreeSlot( TQDateTime &dtFrom, TQDateTime &dtTo ) { if( tryDate( dtFrom, dtTo ) ) // Current time is acceptable return true; - QDateTime tryFrom = dtFrom; - QDateTime tryTo = dtTo; + TQDateTime tryFrom = dtFrom; + TQDateTime tryTo = dtTo; // Make sure that we never suggest a date in the past, even if the // user originally scheduled the meeting to be in the past. - if( tryFrom < QDateTime::currentDateTime() ) { + if( tryFrom < TQDateTime::currentDateTime() ) { // The slot to look for is at least partially in the past. int secs = tryFrom.secsTo( tryTo ); - tryFrom = QDateTime::currentDateTime(); + tryFrom = TQDateTime::currentDateTime(); tryTo = tryFrom.addSecs( secs ); } @@ -586,7 +586,7 @@ bool KOEditorFreeBusy::findFreeSlot( QDateTime &dtFrom, QDateTime &dtTo ) that participant. In other words, the returned slot does not have to be free for everybody else. */ -bool KOEditorFreeBusy::tryDate( QDateTime& tryFrom, QDateTime& tryTo ) +bool KOEditorFreeBusy::tryDate( TQDateTime& tryFrom, TQDateTime& tryTo ) { FreeBusyItem* currentItem = static_cast<FreeBusyItem*>( mGanttView->firstChild() ); while( currentItem ) { @@ -609,7 +609,7 @@ bool KOEditorFreeBusy::tryDate( QDateTime& tryFrom, QDateTime& tryTo ) available for all participants). */ bool KOEditorFreeBusy::tryDate( FreeBusyItem *attendee, - QDateTime &tryFrom, QDateTime &tryTo ) + TQDateTime &tryFrom, TQDateTime &tryTo ) { // If we don't have any free/busy information, assume the // participant is free. Otherwise a participant without available @@ -618,8 +618,8 @@ bool KOEditorFreeBusy::tryDate( FreeBusyItem *attendee, if( !fb ) return true; - QValueList<KCal::Period> busyPeriods = fb->busyPeriods(); - for( QValueList<KCal::Period>::Iterator it = busyPeriods.begin(); + TQValueList<KCal::Period> busyPeriods = fb->busyPeriods(); + for( TQValueList<KCal::Period>::Iterator it = busyPeriods.begin(); it != busyPeriods.end(); ++it ) { if( (*it).end() <= tryFrom || // busy period ends before try period (*it).start() >= tryTo ) // busy period starts after try period @@ -732,7 +732,7 @@ void KOEditorFreeBusy::editFreeBusyUrl( KDGanttViewItem *i ) void KOEditorFreeBusy::writeEvent(KCal::Event * event) { event->clearAttendees(); - QValueVector<FreeBusyItem*> toBeDeleted; + TQValueVector<FreeBusyItem*> toBeDeleted; for ( FreeBusyItem *item = static_cast<FreeBusyItem *>( mGanttView->firstChild() ); item; item = static_cast<FreeBusyItem*>( item->nextSibling() ) ) { @@ -772,7 +772,7 @@ void KOEditorFreeBusy::writeEvent(KCal::Event * event) KOAttendeeEditor::writeEvent( event ); // cleanup - QValueVector<FreeBusyItem*>::iterator it; + TQValueVector<FreeBusyItem*>::iterator it; for( it = toBeDeleted.begin(); it != toBeDeleted.end(); ++it ) { delete *it; } @@ -825,11 +825,11 @@ void KOEditorFreeBusy::clearSelection() const void KOEditorFreeBusy::changeStatusForMe(KCal::Attendee::PartStat status) { - const QStringList myEmails = KOPrefs::instance()->allEmails(); + const TQStringList myEmails = KOPrefs::instance()->allEmails(); for ( FreeBusyItem *item = static_cast<FreeBusyItem *>( mGanttView->firstChild() ); item; item = static_cast<FreeBusyItem*>( item->nextSibling() ) ) { - for ( QStringList::ConstIterator it2( myEmails.begin() ), end( myEmails.end() ); it2 != end; ++it2 ) { + for ( TQStringList::ConstIterator it2( myEmails.begin() ), end( myEmails.end() ); it2 != end; ++it2 ) { if ( item->attendee()->email() == *it2 ) { item->attendee()->setStatus( status ); item->updateItem(); @@ -840,9 +840,9 @@ void KOEditorFreeBusy::changeStatusForMe(KCal::Attendee::PartStat status) void KOEditorFreeBusy::showAttendeeStatusMenu() { - if ( mGanttView->mapFromGlobal( QCursor::pos() ).x() > 22 ) + if ( mGanttView->mapFromGlobal( TQCursor::pos() ).x() > 22 ) return; - QPopupMenu popup; + TQPopupMenu popup; popup.insertItem( SmallIcon( "help" ), Attendee::statusName( Attendee::NeedsAction ), Attendee::NeedsAction ); popup.insertItem( KOGlobals::self()->smallIcon( "ok" ), Attendee::statusName( Attendee::Accepted ), Attendee::Accepted ); popup.insertItem( KOGlobals::self()->smallIcon( "no" ), Attendee::statusName( Attendee::Declined ), Attendee::Declined ); @@ -851,7 +851,7 @@ void KOEditorFreeBusy::showAttendeeStatusMenu() popup.insertItem( Attendee::statusName( Attendee::Completed ), Attendee::Completed ); popup.insertItem( KOGlobals::self()->smallIcon( "help" ), Attendee::statusName( Attendee::InProcess ), Attendee::InProcess ); popup.setItemChecked( currentAttendee()->status(), true ); - int status = popup.exec( QCursor::pos() ); + int status = popup.exec( TQCursor::pos() ); if ( status >= 0 ) { currentAttendee()->setStatus( (Attendee::PartStat)status ); updateCurrentItem(); @@ -865,12 +865,12 @@ void KOEditorFreeBusy::listViewClicked(int button, KDGanttViewItem * item) addNewAttendee(); } -void KOEditorFreeBusy::slotOrganizerChanged(const QString & newOrganizer) +void KOEditorFreeBusy::slotOrganizerChanged(const TQString & newOrganizer) { if (newOrganizer==mCurrentOrganizer) return; - QString name; - QString email; + TQString name; + TQString email; bool success = KPIM::getNameAndMail( newOrganizer, name, email ); if (!success) return; @@ -918,10 +918,10 @@ void KOEditorFreeBusy::slotOrganizerChanged(const QString & newOrganizer) mCurrentOrganizer = newOrganizer; } -bool KOEditorFreeBusy::eventFilter( QObject *watched, QEvent *event ) +bool KOEditorFreeBusy::eventFilter( TQObject *watched, TQEvent *event ) { if ( watched == mGanttView->timeHeaderWidget() && - event->type() >= QEvent::MouseButtonPress && event->type() <= QEvent::MouseMove ) { + event->type() >= TQEvent::MouseButtonPress && event->type() <= TQEvent::MouseMove ) { return true; } else { return KOAttendeeEditor::eventFilter( watched, event ); diff --git a/korganizer/koeditorfreebusy.h b/korganizer/koeditorfreebusy.h index 9ff3af21c..854bc1126 100644 --- a/korganizer/koeditorfreebusy.h +++ b/korganizer/koeditorfreebusy.h @@ -26,9 +26,9 @@ #include "koattendeeeditor.h" -#include <qwidget.h> -#include <qdatetime.h> -#include <qtimer.h> +#include <tqwidget.h> +#include <tqdatetime.h> +#include <tqtimer.h> class KDIntervalColorRectangle; class QLabel; @@ -46,7 +46,7 @@ class KOEditorFreeBusy : public KOAttendeeEditor { Q_OBJECT public: - KOEditorFreeBusy( int spacing = 8, QWidget *parent = 0, + KOEditorFreeBusy( int spacing = 8, TQWidget *parent = 0, const char *name = 0 ); virtual ~KOEditorFreeBusy(); @@ -64,17 +64,17 @@ class KOEditorFreeBusy : public KOAttendeeEditor void cancelReload(); signals: - void dateTimesChanged( const QDateTime &, const QDateTime & ); + void dateTimesChanged( const TQDateTime &, const TQDateTime & ); public slots: - void slotInsertFreeBusy( KCal::FreeBusy *fb, const QString &email ); + void slotInsertFreeBusy( KCal::FreeBusy *fb, const TQString &email ); - void setDateTimes( const QDateTime &, const QDateTime & ); + void setDateTimes( const TQDateTime &, const TQDateTime & ); void editFreeBusyUrl( KDGanttViewItem *item ); protected slots: - void slotUpdateGanttView( const QDateTime &, const QDateTime & ); + void slotUpdateGanttView( const TQDateTime &, const TQDateTime & ); void slotScaleChanged( int ); void slotCenterOnStart() ; void slotZoomToTime(); @@ -85,43 +85,43 @@ class KOEditorFreeBusy : public KOAttendeeEditor void manualReload(); // Only download FB if the auto-download option is set in config void autoReload(); - void slotIntervalColorRectangleMoved( const QDateTime& start, const QDateTime& end ); + void slotIntervalColorRectangleMoved( const TQDateTime& start, const TQDateTime& end ); void removeAttendee(); void listViewClicked( int button, KDGanttViewItem* item ); protected: - void timerEvent( QTimerEvent* ); + void timerEvent( TQTimerEvent* ); KCal::Attendee* currentAttendee() const; void updateCurrentItem(); void clearSelection() const; void changeStatusForMe( KCal::Attendee::PartStat status ); - virtual bool eventFilter( QObject *watched, QEvent *event ); + virtual bool eventFilter( TQObject *watched, TQEvent *event ); private slots: - void slotOrganizerChanged( const QString &newOrganizer ); + void slotOrganizerChanged( const TQString &newOrganizer ); private: void updateFreeBusyData( FreeBusyItem * ); - bool findFreeSlot( QDateTime &dtFrom, QDateTime &dtTo ); - bool tryDate( QDateTime &tryFrom, QDateTime &tryTo ); + bool findFreeSlot( TQDateTime &dtFrom, TQDateTime &dtTo ); + bool tryDate( TQDateTime &tryFrom, TQDateTime &tryTo ); bool tryDate( FreeBusyItem *attendee, - QDateTime &tryFrom, QDateTime &tryTo ); + TQDateTime &tryFrom, TQDateTime &tryTo ); void updateStatusSummary(); void reload(); KDGanttView *mGanttView; KDIntervalColorRectangle* mEventRectangle; - QLabel *mStatusSummaryLabel; + TQLabel *mStatusSummaryLabel; bool mIsOrganizer; - QComboBox *scaleCombo; + TQComboBox *scaleCombo; - QDateTime mDtStart, mDtEnd; + TQDateTime mDtStart, mDtEnd; - QTimer mReloadTimer; + TQTimer mReloadTimer; bool mForceDownload; - QString mCurrentOrganizer; + TQString mCurrentOrganizer; }; #endif diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp index 3a9c20071..adaea1252 100644 --- a/korganizer/koeditorgeneral.cpp +++ b/korganizer/koeditorgeneral.cpp @@ -23,22 +23,22 @@ */ -#include <qwidget.h> -#include <qtooltip.h> -#include <qlayout.h> -#include <qvbox.h> -#include <qhbox.h> -#include <qbuttongroup.h> -#include <qvgroupbox.h> -#include <qwidgetstack.h> -#include <qdatetime.h> -#include <qlineedit.h> -#include <qlabel.h> -#include <qcheckbox.h> -#include <qpushbutton.h> -#include <qcombobox.h> -#include <qspinbox.h> -#include <qwhatsthis.h> +#include <tqwidget.h> +#include <tqtooltip.h> +#include <tqlayout.h> +#include <tqvbox.h> +#include <tqhbox.h> +#include <tqbuttongroup.h> +#include <tqvgroupbox.h> +#include <tqwidgetstack.h> +#include <tqdatetime.h> +#include <tqlineedit.h> +#include <tqlabel.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> +#include <tqcombobox.h> +#include <tqspinbox.h> +#include <tqwhatsthis.h> #include <kglobal.h> #include <kdialog.h> @@ -67,8 +67,8 @@ #include "koeditorgeneral.moc" #include "kohelper.h" -KOEditorGeneral::KOEditorGeneral(QObject* parent, const char* name) : - QObject( parent, name ), mAttachments(0) +KOEditorGeneral::KOEditorGeneral(TQObject* parent, const char* name) : + TQObject( parent, name ), mAttachments(0) { mAlarmList.setAutoDelete( true ); } @@ -78,111 +78,111 @@ KOEditorGeneral::~KOEditorGeneral() } -FocusLineEdit::FocusLineEdit( QWidget *parent ) - : QLineEdit( parent ), mSkipFirst( true ) +FocusLineEdit::FocusLineEdit( TQWidget *parent ) + : TQLineEdit( parent ), mSkipFirst( true ) { } -void FocusLineEdit::focusInEvent ( QFocusEvent *e ) +void FocusLineEdit::focusInEvent ( TQFocusEvent *e ) { if ( !mSkipFirst ) { emit focusReceivedSignal(); } else { mSkipFirst = false; } - QLineEdit::focusInEvent( e ); + TQLineEdit::focusInEvent( e ); } -void KOEditorGeneral::initHeader( QWidget *parent,QBoxLayout *topLayout) +void KOEditorGeneral::initHeader( TQWidget *parent,TQBoxLayout *topLayout) { - QGridLayout *headerLayout = new QGridLayout(); + TQGridLayout *headerLayout = new TQGridLayout(); headerLayout->setSpacing( topLayout->spacing() ); topLayout->addLayout( headerLayout ); #if 0 - mOwnerLabel = new QLabel(i18n("Owner:"),parent); + mOwnerLabel = new TQLabel(i18n("Owner:"),parent); headerLayout->addMultiCellWidget(mOwnerLabel,0,0,0,1); #endif - QString whatsThis = i18n("Sets the Title of this event or to-do."); - QLabel *summaryLabel = new QLabel( i18n("T&itle:"), parent ); - QWhatsThis::add( summaryLabel, whatsThis ); - QFont f = summaryLabel->font(); + TQString whatsThis = i18n("Sets the Title of this event or to-do."); + TQLabel *summaryLabel = new TQLabel( i18n("T&itle:"), parent ); + TQWhatsThis::add( summaryLabel, whatsThis ); + TQFont f = summaryLabel->font(); f.setBold( true ); summaryLabel->setFont(f); headerLayout->addWidget(summaryLabel,1,0); mSummaryEdit = new FocusLineEdit( parent ); - QWhatsThis::add( mSummaryEdit, whatsThis ); - connect( mSummaryEdit, SIGNAL( focusReceivedSignal() ), - SIGNAL( focusReceivedSignal() ) ); + TQWhatsThis::add( mSummaryEdit, whatsThis ); + connect( mSummaryEdit, TQT_SIGNAL( focusReceivedSignal() ), + TQT_SIGNAL( focusReceivedSignal() ) ); headerLayout->addWidget(mSummaryEdit,1,1); summaryLabel->setBuddy( mSummaryEdit ); - mAttendeeSummaryLabel = new QLabel( parent ); + mAttendeeSummaryLabel = new TQLabel( parent ); updateAttendeeSummary( 0 ); headerLayout->addWidget( mAttendeeSummaryLabel, 1, 2 ); whatsThis = i18n("Sets where the event or to-do will take place."); - QLabel *locationLabel = new QLabel( i18n("&Location:"), parent ); - QWhatsThis::add( locationLabel, whatsThis ); + TQLabel *locationLabel = new TQLabel( i18n("&Location:"), parent ); + TQWhatsThis::add( locationLabel, whatsThis ); headerLayout->addWidget(locationLabel,2,0); - mLocationEdit = new QLineEdit( parent ); - QWhatsThis::add( mLocationEdit, whatsThis ); + mLocationEdit = new TQLineEdit( parent ); + TQWhatsThis::add( mLocationEdit, whatsThis ); headerLayout->addMultiCellWidget( mLocationEdit, 2, 2, 1, 2 ); locationLabel->setBuddy( mLocationEdit ); - QBoxLayout *thirdLineLayout = new QHBoxLayout(); + TQBoxLayout *thirdLineLayout = new TQHBoxLayout(); headerLayout->addMultiCellLayout( thirdLineLayout, 3, 3, 0, 2 ); - mResourceLabel = new QLabel( parent ); + mResourceLabel = new TQLabel( parent ); mResourceLabel->hide(); thirdLineLayout->addWidget( mResourceLabel ); whatsThis = i18n("Allows you to select the categories that this event or to-do belongs to."); - QLabel *categoriesLabel = new QLabel( i18n("Categories:"), parent ); - QWhatsThis::add( categoriesLabel, whatsThis ); + TQLabel *categoriesLabel = new TQLabel( i18n("Categories:"), parent ); + TQWhatsThis::add( categoriesLabel, whatsThis ); thirdLineLayout->addWidget( categoriesLabel ); mCategoriesLabel = new KSqueezedTextLabel( parent ); - QWhatsThis::add( mCategoriesLabel, whatsThis ); - mCategoriesLabel->setFrameStyle(QFrame::Panel|QFrame::Sunken); + TQWhatsThis::add( mCategoriesLabel, whatsThis ); + mCategoriesLabel->setFrameStyle(TQFrame::Panel|TQFrame::Sunken); thirdLineLayout->addWidget( mCategoriesLabel ); - mCategoriesButton = new QPushButton( parent ); + mCategoriesButton = new TQPushButton( parent ); mCategoriesButton->setText(i18n("&Select...")); - QWhatsThis::add( mCategoriesButton, whatsThis ); - connect(mCategoriesButton,SIGNAL(clicked()),SLOT(selectCategories())); + TQWhatsThis::add( mCategoriesButton, whatsThis ); + connect(mCategoriesButton,TQT_SIGNAL(clicked()),TQT_SLOT(selectCategories())); thirdLineLayout->addWidget( mCategoriesButton ); } -void KOEditorGeneral::initSecrecy(QWidget *parent, QBoxLayout *topLayout) +void KOEditorGeneral::initSecrecy(TQWidget *parent, TQBoxLayout *topLayout) { - QBoxLayout *secrecyLayout = new QHBoxLayout( topLayout ); + TQBoxLayout *secrecyLayout = new TQHBoxLayout( topLayout ); - QLabel *secrecyLabel = new QLabel(i18n("Acc&ess:"),parent); - QString whatsThis = i18n("Sets whether the access to this event or to-do " + TQLabel *secrecyLabel = new TQLabel(i18n("Acc&ess:"),parent); + TQString whatsThis = i18n("Sets whether the access to this event or to-do " "is restricted. Please note that KOrganizer " "currently does not use this setting, so the " "implementation of the restrictions will depend " "on the groupware server. This means that events " "or to-dos marked as private or confidential may " "be visible to others."); - QWhatsThis::add( secrecyLabel, whatsThis ); + TQWhatsThis::add( secrecyLabel, whatsThis ); secrecyLayout->addWidget(secrecyLabel); - mSecrecyCombo = new QComboBox(parent); - QWhatsThis::add( mSecrecyCombo, whatsThis ); + mSecrecyCombo = new TQComboBox(parent); + TQWhatsThis::add( mSecrecyCombo, whatsThis ); mSecrecyCombo->insertStringList(Incidence::secrecyList()); secrecyLayout->addWidget(mSecrecyCombo); secrecyLabel->setBuddy( mSecrecyCombo ); } -void KOEditorGeneral::initDescription(QWidget *parent,QBoxLayout *topLayout) +void KOEditorGeneral::initDescription(TQWidget *parent,TQBoxLayout *topLayout) { mDescriptionEdit = new KTextEdit(parent); - QWhatsThis::add( mDescriptionEdit, + TQWhatsThis::add( mDescriptionEdit, i18n("Sets the description for this event or to-do. This " "will be displayed in a reminder if one is set, " "as well as in a tooltip when you hover over the " @@ -195,70 +195,70 @@ void KOEditorGeneral::initDescription(QWidget *parent,QBoxLayout *topLayout) topLayout->addWidget(mDescriptionEdit, 4); } -void KOEditorGeneral::initAlarm(QWidget *parent,QBoxLayout *topLayout) +void KOEditorGeneral::initAlarm(TQWidget *parent,TQBoxLayout *topLayout) { - QBoxLayout *alarmLayout = new QHBoxLayout(topLayout); + TQBoxLayout *alarmLayout = new TQHBoxLayout(topLayout); - mAlarmBell = new QLabel(parent); + mAlarmBell = new TQLabel(parent); mAlarmBell->setPixmap(KOGlobals::self()->smallIcon("bell")); alarmLayout->addWidget( mAlarmBell ); - mAlarmStack = new QWidgetStack( parent ); + mAlarmStack = new TQWidgetStack( parent ); alarmLayout->addWidget( mAlarmStack ); - mAlarmInfoLabel = new QLabel( i18n("No reminders configured"), mAlarmStack ); + mAlarmInfoLabel = new TQLabel( i18n("No reminders configured"), mAlarmStack ); mAlarmStack->addWidget( mAlarmInfoLabel, AdvancedAlarmLabel ); - QHBox *simpleAlarmBox = new QHBox( mAlarmStack ); + TQHBox *simpleAlarmBox = new TQHBox( mAlarmStack ); mAlarmStack->addWidget( simpleAlarmBox, SimpleAlarmPage ); - mAlarmButton = new QCheckBox(i18n("&Reminder:"), simpleAlarmBox ); - QWhatsThis::add( mAlarmButton, + mAlarmButton = new TQCheckBox(i18n("&Reminder:"), simpleAlarmBox ); + TQWhatsThis::add( mAlarmButton, i18n("Activates a reminder for this event or to-do.") ); - QString whatsThis = i18n("Sets how long before the event occurs " + TQString whatsThis = i18n("Sets how long before the event occurs " "the reminder will be triggered."); - mAlarmTimeEdit = new QSpinBox( 0, 99999, 1, simpleAlarmBox, "alarmTimeEdit" ); + mAlarmTimeEdit = new TQSpinBox( 0, 99999, 1, simpleAlarmBox, "alarmTimeEdit" ); mAlarmTimeEdit->setValue( 0 ); - QWhatsThis::add( mAlarmTimeEdit, whatsThis ); + TQWhatsThis::add( mAlarmTimeEdit, whatsThis ); - mAlarmIncrCombo = new QComboBox( false, simpleAlarmBox ); - QWhatsThis::add( mAlarmIncrCombo, whatsThis ); + mAlarmIncrCombo = new TQComboBox( false, simpleAlarmBox ); + TQWhatsThis::add( mAlarmIncrCombo, whatsThis ); mAlarmIncrCombo->insertItem( i18n("minute(s)") ); mAlarmIncrCombo->insertItem( i18n("hour(s)") ); mAlarmIncrCombo->insertItem( i18n("day(s)") ); // mAlarmIncrCombo->setMinimumHeight(20); - connect(mAlarmButton, SIGNAL(toggled(bool)), mAlarmTimeEdit, SLOT(setEnabled(bool))); - connect(mAlarmButton, SIGNAL(toggled(bool)), mAlarmIncrCombo, SLOT(setEnabled(bool))); + connect(mAlarmButton, TQT_SIGNAL(toggled(bool)), mAlarmTimeEdit, TQT_SLOT(setEnabled(bool))); + connect(mAlarmButton, TQT_SIGNAL(toggled(bool)), mAlarmIncrCombo, TQT_SLOT(setEnabled(bool))); mAlarmTimeEdit->setEnabled( false ); mAlarmIncrCombo->setEnabled( false ); - mAlarmEditButton = new QPushButton( i18n("Advanced"), parent ); + mAlarmEditButton = new TQPushButton( i18n("Advanced"), parent ); mAlarmEditButton->setEnabled( false ); alarmLayout->addWidget( mAlarmEditButton ); - connect( mAlarmButton, SIGNAL(toggled(bool)), mAlarmEditButton, SLOT(setEnabled( bool))); - connect( mAlarmEditButton, SIGNAL( clicked() ), - SLOT( editAlarms() ) ); + connect( mAlarmButton, TQT_SIGNAL(toggled(bool)), mAlarmEditButton, TQT_SLOT(setEnabled( bool))); + connect( mAlarmEditButton, TQT_SIGNAL( clicked() ), + TQT_SLOT( editAlarms() ) ); } -void KOEditorGeneral::initAttachments(QWidget *parent,QBoxLayout *topLayout) +void KOEditorGeneral::initAttachments(TQWidget *parent,TQBoxLayout *topLayout) { mAttachments = new KOEditorAttachments( KDialog::spacingHint(), parent ); - connect( mAttachments, SIGNAL( openURL( const KURL & ) ) , - this, SIGNAL( openURL( const KURL & ) ) ); + connect( mAttachments, TQT_SIGNAL( openURL( const KURL & ) ) , + this, TQT_SIGNAL( openURL( const KURL & ) ) ); topLayout->addWidget( mAttachments, 1 ); } -void KOEditorGeneral::addAttachments( const QStringList &attachments, - const QStringList &mimeTypes, +void KOEditorGeneral::addAttachments( const TQStringList &attachments, + const TQStringList &mimeTypes, bool inlineAttachments ) { - QStringList::ConstIterator it; + TQStringList::ConstIterator it; uint i = 0; for ( it = attachments.begin(); it != attachments.end(); ++it, ++i ) { - QString mimeType; + TQString mimeType; if ( mimeTypes.count() > i ) mimeType = mimeTypes[ i ]; mAttachments->addAttachment( *it, mimeType, !inlineAttachments ); @@ -271,8 +271,8 @@ void KOEditorGeneral::selectCategories() KOGlobals::fitDialogToScreen( categoryDialog ); categoryDialog->setSelected( mCategories ); - connect(categoryDialog, SIGNAL(editCategories()), this, SIGNAL(openCategoryDialog())); - connect(this, SIGNAL(updateCategoryConfig()), categoryDialog, SLOT(updateCategoryConfig())); + connect(categoryDialog, TQT_SIGNAL(editCategories()), this, TQT_SIGNAL(openCategoryDialog())); + connect(this, TQT_SIGNAL(updateCategoryConfig()), categoryDialog, TQT_SLOT(updateCategoryConfig())); if ( categoryDialog->exec() ) { setCategories( categoryDialog->selectedCategories() ); @@ -310,7 +310,7 @@ void KOEditorGeneral::toggleAlarm( bool on ) mAlarmButton->setChecked( on ); } -void KOEditorGeneral::setCategories( const QStringList &categories ) +void KOEditorGeneral::setCategories( const TQStringList &categories ) { mCategoriesLabel->setText( categories.join(",") ); mCategories = categories; @@ -422,7 +422,7 @@ void KOEditorGeneral::readIncidence(Incidence *event, Calendar *calendar) mAttachments->readIncidence( event ); - QString resLabel = KOHelper::resourceLabel( calendar, event ); + TQString resLabel = KOHelper::resourceLabel( calendar, event ); if ( !resLabel.isEmpty() ) { mResourceLabel->setText( i18n( "Calendar: %1" ).arg( resLabel ) ); mResourceLabel->show(); @@ -435,7 +435,7 @@ Alarm *KOEditorGeneral::alarmFromSimplePage() const Alarm *alarm = new Alarm( 0 ); alarm->setDisplayAlarm(""); alarm->setEnabled(true); - QString tmpStr = mAlarmTimeEdit->text(); + TQString tmpStr = mAlarmTimeEdit->text(); int j = mAlarmTimeEdit->value() * -60; if (mAlarmIncrCombo->currentItem() == 1) j = j * 60; @@ -478,17 +478,17 @@ void KOEditorGeneral::writeIncidence(Incidence *event) mAttachments->writeIncidence( event ); } -void KOEditorGeneral::setSummary( const QString &text ) +void KOEditorGeneral::setSummary( const TQString &text ) { mSummaryEdit->setText( text ); } -void KOEditorGeneral::setDescription( const QString &text ) +void KOEditorGeneral::setDescription( const TQString &text ) { mDescriptionEdit->setText( text ); } -QObject *KOEditorGeneral::typeAheadReceiver() const +TQObject *KOEditorGeneral::typeAheadReceiver() const { return mSummaryEdit; } diff --git a/korganizer/koeditorgeneral.h b/korganizer/koeditorgeneral.h index b369c2389..c2d1867b9 100644 --- a/korganizer/koeditorgeneral.h +++ b/korganizer/koeditorgeneral.h @@ -24,7 +24,7 @@ #define KOEDITORGENERAL_H #include <libkcal/alarm.h> -#include <qlineedit.h> +#include <tqlineedit.h> class QWidget; class QBoxLayout; @@ -50,13 +50,13 @@ class FocusLineEdit : public QLineEdit { Q_OBJECT public: - FocusLineEdit( QWidget *parent ); + FocusLineEdit( TQWidget *parent ); signals: void focusReceivedSignal(); protected: - void focusInEvent ( QFocusEvent *e ); + void focusInEvent ( TQFocusEvent *e ); private: bool mSkipFirst; @@ -66,14 +66,14 @@ class KOEditorGeneral : public QObject { Q_OBJECT public: - KOEditorGeneral (QObject* parent=0,const char* name=0); + KOEditorGeneral (TQObject* parent=0,const char* name=0); virtual ~KOEditorGeneral(); - void initHeader( QWidget *parent,QBoxLayout *topLayout ); - void initDescription(QWidget *,QBoxLayout *); - void initSecrecy(QWidget *,QBoxLayout *); - void initAlarm(QWidget *,QBoxLayout *); - void initAttachments(QWidget *,QBoxLayout *); + void initHeader( TQWidget *parent,TQBoxLayout *topLayout ); + void initDescription(TQWidget *,TQBoxLayout *); + void initSecrecy(TQWidget *,TQBoxLayout *); + void initAlarm(TQWidget *,TQBoxLayout *); + void initAttachments(TQWidget *,TQBoxLayout *); /** Set widgets to default values */ void setDefaults(bool allDay); @@ -88,16 +88,16 @@ class KOEditorGeneral : public QObject void enableAlarm( bool enable ); void toggleAlarm( bool on ); - void setSummary( const QString & ); - void setDescription( const QString & ); + void setSummary( const TQString & ); + void setDescription( const TQString & ); - QObject *typeAheadReceiver() const; + TQObject *typeAheadReceiver() const; public slots: - void setCategories(const QStringList &categories); + void setCategories(const TQStringList &categories); void selectCategories(); - void addAttachments( const QStringList &attachments, - const QStringList& mimeTypes = QStringList(), + void addAttachments( const TQStringList &attachments, + const TQStringList& mimeTypes = TQStringList(), bool inlineAttachment = false ); @@ -115,28 +115,28 @@ class KOEditorGeneral : public QObject protected: Alarm *alarmFromSimplePage() const; - QLineEdit *mSummaryEdit; - QLineEdit *mLocationEdit; - QLabel *mAttendeeSummaryLabel; - QLabel *mAlarmBell; - QWidgetStack *mAlarmStack; - QLabel *mAlarmInfoLabel; - QCheckBox *mAlarmButton; - QSpinBox *mAlarmTimeEdit; - QComboBox *mAlarmIncrCombo; - QPushButton *mAlarmEditButton; + TQLineEdit *mSummaryEdit; + TQLineEdit *mLocationEdit; + TQLabel *mAttendeeSummaryLabel; + TQLabel *mAlarmBell; + TQWidgetStack *mAlarmStack; + TQLabel *mAlarmInfoLabel; + TQCheckBox *mAlarmButton; + TQSpinBox *mAlarmTimeEdit; + TQComboBox *mAlarmIncrCombo; + TQPushButton *mAlarmEditButton; KTextEdit *mDescriptionEdit; - QLabel *mOwnerLabel; - QComboBox *mSecrecyCombo; - QPushButton *mCategoriesButton; + TQLabel *mOwnerLabel; + TQComboBox *mSecrecyCombo; + TQPushButton *mCategoriesButton; KSqueezedTextLabel *mCategoriesLabel; KOEditorAttachments *mAttachments; - QLabel *mResourceLabel; + TQLabel *mResourceLabel; enum AlarmStackPages { SimpleAlarmPage, AdvancedAlarmLabel }; private: - QStringList mCategories; + TQStringList mCategories; KCal::Alarm::List mAlarmList; }; diff --git a/korganizer/koeditorgeneralevent.cpp b/korganizer/koeditorgeneralevent.cpp index e9bc44d6d..24e8b4ca2 100644 --- a/korganizer/koeditorgeneralevent.cpp +++ b/korganizer/koeditorgeneralevent.cpp @@ -22,19 +22,19 @@ without including the source code for Qt in the source distribution. */ -#include <qtooltip.h> -#include <qlayout.h> -#include <qvbox.h> -#include <qbuttongroup.h> -#include <qvgroupbox.h> -#include <qwidgetstack.h> -#include <qspinbox.h> -#include <qdatetime.h> -#include <qlabel.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qpushbutton.h> -#include <qwhatsthis.h> +#include <tqtooltip.h> +#include <tqlayout.h> +#include <tqvbox.h> +#include <tqbuttongroup.h> +#include <tqvgroupbox.h> +#include <tqwidgetstack.h> +#include <tqspinbox.h> +#include <tqdatetime.h> +#include <tqlabel.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqpushbutton.h> +#include <tqwhatsthis.h> #include <kdebug.h> #include <kglobal.h> @@ -56,14 +56,14 @@ #include "koeditorgeneralevent.h" #include "koeditorgeneralevent.moc" -KOEditorGeneralEvent::KOEditorGeneralEvent(QObject* parent, +KOEditorGeneralEvent::KOEditorGeneralEvent(TQObject* parent, const char* name) : KOEditorGeneral( parent, name) { - connect( this, SIGNAL( dateTimesChanged( const QDateTime &, const QDateTime & )), - SLOT( setDuration() ) ); - connect( this, SIGNAL( dateTimesChanged( const QDateTime &, const QDateTime & )), - SLOT( emitDateTimeStr() )); + connect( this, TQT_SIGNAL( dateTimesChanged( const TQDateTime &, const TQDateTime & )), + TQT_SLOT( setDuration() ) ); + connect( this, TQT_SIGNAL( dateTimesChanged( const TQDateTime &, const TQDateTime & )), + TQT_SLOT( emitDateTimeStr() )); } KOEditorGeneralEvent::~KOEditorGeneralEvent() @@ -72,46 +72,46 @@ KOEditorGeneralEvent::~KOEditorGeneralEvent() void KOEditorGeneralEvent::finishSetup() { - QWidget::setTabOrder( mSummaryEdit, mLocationEdit ); - QWidget::setTabOrder( mLocationEdit, mStartDateEdit ); - QWidget::setTabOrder( mStartDateEdit, mStartTimeEdit ); - QWidget::setTabOrder( mStartTimeEdit, mEndDateEdit ); - QWidget::setTabOrder( mEndDateEdit, mEndTimeEdit ); - QWidget::setTabOrder( mEndTimeEdit, mAlldayEventCheckbox ); - QWidget::setTabOrder( mAlldayEventCheckbox, mAlarmButton ); - QWidget::setTabOrder( mAlarmButton, mAlarmTimeEdit ); - QWidget::setTabOrder( mAlarmTimeEdit, mAlarmIncrCombo ); -// QWidget::setTabOrder( mAlarmIncrCombo, mAlarmSoundButton ); - QWidget::setTabOrder( mAlarmIncrCombo, mAlarmEditButton ); -// QWidget::setTabOrder( mAlarmSoundButton, mAlarmProgramButton ); -// QWidget::setTabOrder( mAlarmProgramButton, mFreeTimeCombo ); - QWidget::setTabOrder( mAlarmEditButton, mFreeTimeCombo ); - QWidget::setTabOrder( mFreeTimeCombo, mDescriptionEdit ); - QWidget::setTabOrder( mDescriptionEdit, mCategoriesButton ); - QWidget::setTabOrder( mCategoriesButton, mSecrecyCombo ); -// QWidget::setTabOrder( mSecrecyCombo, mDescriptionEdit ); + TQWidget::setTabOrder( mSummaryEdit, mLocationEdit ); + TQWidget::setTabOrder( mLocationEdit, mStartDateEdit ); + TQWidget::setTabOrder( mStartDateEdit, mStartTimeEdit ); + TQWidget::setTabOrder( mStartTimeEdit, mEndDateEdit ); + TQWidget::setTabOrder( mEndDateEdit, mEndTimeEdit ); + TQWidget::setTabOrder( mEndTimeEdit, mAlldayEventCheckbox ); + TQWidget::setTabOrder( mAlldayEventCheckbox, mAlarmButton ); + TQWidget::setTabOrder( mAlarmButton, mAlarmTimeEdit ); + TQWidget::setTabOrder( mAlarmTimeEdit, mAlarmIncrCombo ); +// TQWidget::setTabOrder( mAlarmIncrCombo, mAlarmSoundButton ); + TQWidget::setTabOrder( mAlarmIncrCombo, mAlarmEditButton ); +// TQWidget::setTabOrder( mAlarmSoundButton, mAlarmProgramButton ); +// TQWidget::setTabOrder( mAlarmProgramButton, mFreeTimeCombo ); + TQWidget::setTabOrder( mAlarmEditButton, mFreeTimeCombo ); + TQWidget::setTabOrder( mFreeTimeCombo, mDescriptionEdit ); + TQWidget::setTabOrder( mDescriptionEdit, mCategoriesButton ); + TQWidget::setTabOrder( mCategoriesButton, mSecrecyCombo ); +// TQWidget::setTabOrder( mSecrecyCombo, mDescriptionEdit ); mSummaryEdit->setFocus(); } -void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout) +void KOEditorGeneralEvent::initTime(TQWidget *parent,TQBoxLayout *topLayout) { - QBoxLayout *timeLayout = new QVBoxLayout(topLayout); + TQBoxLayout *timeLayout = new TQVBoxLayout(topLayout); - QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal, + TQGroupBox *timeGroupBox = new TQGroupBox(1,TQGroupBox::Horizontal, i18n("Date && Time"),parent); - QWhatsThis::add( timeGroupBox, + TQWhatsThis::add( timeGroupBox, i18n("Sets options related to the date and time of the " "event or to-do.") ); timeLayout->addWidget(timeGroupBox); - QFrame *timeBoxFrame = new QFrame(timeGroupBox); + TQFrame *timeBoxFrame = new TQFrame(timeGroupBox); - QGridLayout *layoutTimeBox = new QGridLayout( timeBoxFrame ); + TQGridLayout *layoutTimeBox = new TQGridLayout( timeBoxFrame ); layoutTimeBox->setSpacing(topLayout->spacing()); layoutTimeBox->setColStretch( 3, 1 ); - mStartDateLabel = new QLabel(i18n("&Start:"),timeBoxFrame); + mStartDateLabel = new TQLabel(i18n("&Start:"),timeBoxFrame); layoutTimeBox->addWidget(mStartDateLabel,0,0); mStartDateEdit = new KDateEdit(timeBoxFrame); @@ -122,7 +122,7 @@ void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout) layoutTimeBox->addWidget(mStartTimeEdit,0,2); - mEndDateLabel = new QLabel(i18n("&End:"),timeBoxFrame); + mEndDateLabel = new TQLabel(i18n("&End:"),timeBoxFrame); layoutTimeBox->addWidget(mEndDateLabel,1,0); mEndDateEdit = new KDateEdit(timeBoxFrame); @@ -132,87 +132,87 @@ void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout) mEndTimeEdit = new KTimeEdit(timeBoxFrame); layoutTimeBox->addWidget(mEndTimeEdit,1,2); - mAlldayEventCheckbox = new QCheckBox(i18n("All-&day"),timeBoxFrame); + mAlldayEventCheckbox = new TQCheckBox(i18n("All-&day"),timeBoxFrame); layoutTimeBox->addWidget( mAlldayEventCheckbox, 0, 3 ); - connect(mAlldayEventCheckbox, SIGNAL(toggled(bool)),SLOT(associateTime(bool))); + connect(mAlldayEventCheckbox, TQT_SIGNAL(toggled(bool)),TQT_SLOT(associateTime(bool))); - mDurationLabel = new QLabel( timeBoxFrame ); + mDurationLabel = new TQLabel( timeBoxFrame ); layoutTimeBox->addWidget( mDurationLabel, 1, 3 ); // time widgets are checked if they contain a valid time - connect(mStartTimeEdit, SIGNAL(timeChanged(QTime)), - this, SLOT(startTimeChanged(QTime))); - connect(mEndTimeEdit, SIGNAL(timeChanged(QTime)), - this, SLOT(endTimeChanged(QTime))); + connect(mStartTimeEdit, TQT_SIGNAL(timeChanged(TQTime)), + this, TQT_SLOT(startTimeChanged(TQTime))); + connect(mEndTimeEdit, TQT_SIGNAL(timeChanged(TQTime)), + this, TQT_SLOT(endTimeChanged(TQTime))); // date widgets are checked if they contain a valid date - connect(mStartDateEdit, SIGNAL(dateChanged(const QDate&)), - this, SLOT(startDateChanged(const QDate&))); - connect(mEndDateEdit, SIGNAL(dateChanged(const QDate&)), - this, SLOT(endDateChanged(const QDate&))); + connect(mStartDateEdit, TQT_SIGNAL(dateChanged(const TQDate&)), + this, TQT_SLOT(startDateChanged(const TQDate&))); + connect(mEndDateEdit, TQT_SIGNAL(dateChanged(const TQDate&)), + this, TQT_SLOT(endDateChanged(const TQDate&))); - QBoxLayout *recLayout = new QHBoxLayout(); + TQBoxLayout *recLayout = new TQHBoxLayout(); layoutTimeBox->addMultiCellLayout( recLayout, 2, 2, 1, 4 ); - mRecurrenceSummary = new QLabel( QString(), timeBoxFrame ); + mRecurrenceSummary = new TQLabel( TQString(), timeBoxFrame ); recLayout->addWidget( mRecurrenceSummary ); - QPushButton *recEditButton = new QPushButton( i18n("Edit..."), timeBoxFrame ); + TQPushButton *recEditButton = new TQPushButton( i18n("Edit..."), timeBoxFrame ); recLayout->addWidget( recEditButton ); - connect( recEditButton, SIGNAL(clicked()), SIGNAL(editRecurrence()) ); + connect( recEditButton, TQT_SIGNAL(clicked()), TQT_SIGNAL(editRecurrence()) ); recLayout->addStretch( 1 ); - QLabel *label = new QLabel( i18n("Reminder:"), timeBoxFrame ); + TQLabel *label = new TQLabel( i18n("Reminder:"), timeBoxFrame ); layoutTimeBox->addWidget( label, 3, 0 ); - QBoxLayout *alarmLineLayout = new QHBoxLayout(); + TQBoxLayout *alarmLineLayout = new TQHBoxLayout(); layoutTimeBox->addMultiCellLayout( alarmLineLayout, 3, 3, 1, 4 ); initAlarm( timeBoxFrame, alarmLineLayout ); alarmLineLayout->addStretch( 1 ); - QBoxLayout *secLayout = new QHBoxLayout(); + TQBoxLayout *secLayout = new TQHBoxLayout(); layoutTimeBox->addLayout( secLayout, 0, 4 ); initSecrecy( timeBoxFrame, secLayout ); - QBoxLayout *classLayout = new QHBoxLayout(); + TQBoxLayout *classLayout = new TQHBoxLayout(); layoutTimeBox->addLayout( classLayout, 1, 4 ); initClass( timeBoxFrame, classLayout ); } -void KOEditorGeneralEvent::initClass(QWidget *parent,QBoxLayout *topLayout) +void KOEditorGeneralEvent::initClass(TQWidget *parent,TQBoxLayout *topLayout) { - QBoxLayout *classLayout = new QHBoxLayout(topLayout); + TQBoxLayout *classLayout = new TQHBoxLayout(topLayout); - QLabel *freeTimeLabel = new QLabel(i18n("S&how time as:"),parent); - QString whatsThis = i18n("Sets how this time will appear on your Free/Busy " + TQLabel *freeTimeLabel = new TQLabel(i18n("S&how time as:"),parent); + TQString whatsThis = i18n("Sets how this time will appear on your Free/Busy " "information."); - QWhatsThis::add( freeTimeLabel, whatsThis ); + TQWhatsThis::add( freeTimeLabel, whatsThis ); classLayout->addWidget(freeTimeLabel); - mFreeTimeCombo = new QComboBox(false, parent); - QWhatsThis::add( mFreeTimeCombo, whatsThis ); + mFreeTimeCombo = new TQComboBox(false, parent); + TQWhatsThis::add( mFreeTimeCombo, whatsThis ); mFreeTimeCombo->insertItem(i18n("Busy")); mFreeTimeCombo->insertItem(i18n("Free")); classLayout->addWidget(mFreeTimeCombo); freeTimeLabel->setBuddy( mFreeTimeCombo ); } -void KOEditorGeneralEvent::initInvitationBar(QWidget * parent, QBoxLayout * layout) +void KOEditorGeneralEvent::initInvitationBar(TQWidget * parent, TQBoxLayout * layout) { - QBoxLayout *topLayout = new QHBoxLayout( layout ); - mInvitationBar = new QFrame( parent ); + TQBoxLayout *topLayout = new TQHBoxLayout( layout ); + mInvitationBar = new TQFrame( parent ); mInvitationBar->setPaletteBackgroundColor( KGlobalSettings::alternateBackgroundColor() ); topLayout->addWidget( mInvitationBar ); - QBoxLayout *barLayout = new QHBoxLayout( mInvitationBar ); + TQBoxLayout *barLayout = new TQHBoxLayout( mInvitationBar ); barLayout->setSpacing( layout->spacing() ); - QLabel *label = new QLabel( i18n("You have not yet definitely responded to this invitation." ), mInvitationBar ); + TQLabel *label = new TQLabel( i18n("You have not yet definitely responded to this invitation." ), mInvitationBar ); barLayout->addWidget( label ); barLayout->addStretch( 1 ); - QPushButton *button = new QPushButton( i18n("Accept"), mInvitationBar ); - connect( button, SIGNAL(clicked()), SIGNAL(acceptInvitation()) ); - connect( button, SIGNAL(clicked()), mInvitationBar, SLOT(hide()) ); + TQPushButton *button = new TQPushButton( i18n("Accept"), mInvitationBar ); + connect( button, TQT_SIGNAL(clicked()), TQT_SIGNAL(acceptInvitation()) ); + connect( button, TQT_SIGNAL(clicked()), mInvitationBar, TQT_SLOT(hide()) ); barLayout->addWidget( button ); - button = new QPushButton( i18n("Decline"), mInvitationBar ); - connect( button, SIGNAL(clicked()), SIGNAL(declineInvitation()) ); - connect( button, SIGNAL(clicked()), mInvitationBar, SLOT(hide()) ); + button = new TQPushButton( i18n("Decline"), mInvitationBar ); + connect( button, TQT_SIGNAL(clicked()), TQT_SIGNAL(declineInvitation()) ); + connect( button, TQT_SIGNAL(clicked()), mInvitationBar, TQT_SLOT(hide()) ); barLayout->addWidget( button ); mInvitationBar->hide(); @@ -234,7 +234,7 @@ void KOEditorGeneralEvent::associateTime(bool time) allDayChanged(time); } -void KOEditorGeneralEvent::setDateTimes( const QDateTime &start, const QDateTime &end ) +void KOEditorGeneralEvent::setDateTimes( const TQDateTime &start, const TQDateTime &end ) { // kdDebug(5850) << "KOEditorGeneralEvent::setDateTimes(): Start DateTime: " << start.toString() << endl; @@ -253,7 +253,7 @@ void KOEditorGeneralEvent::setDateTimes( const QDateTime &start, const QDateTime emitDateTimeStr(); } -void KOEditorGeneralEvent::startTimeChanged( QTime newtime ) +void KOEditorGeneralEvent::startTimeChanged( TQTime newtime ) { kdDebug(5850) << "KOEditorGeneralEvent::startTimeChanged() " << newtime.toString() << endl; @@ -269,17 +269,17 @@ void KOEditorGeneralEvent::startTimeChanged( QTime newtime ) emit dateTimesChanged(mCurrStartDateTime,mCurrEndDateTime); } -void KOEditorGeneralEvent::endTimeChanged( QTime newtime ) +void KOEditorGeneralEvent::endTimeChanged( TQTime newtime ) { // kdDebug(5850) << "KOEditorGeneralEvent::endTimeChanged " << newtime.toString() << endl; - QDateTime newdt(mCurrEndDateTime.date(), newtime); + TQDateTime newdt(mCurrEndDateTime.date(), newtime); mCurrEndDateTime = newdt; emit dateTimesChanged(mCurrStartDateTime,mCurrEndDateTime); } -void KOEditorGeneralEvent::startDateChanged( const QDate &newdate ) +void KOEditorGeneralEvent::startDateChanged( const TQDate &newdate ) { if ( !newdate.isValid() ) return; @@ -295,19 +295,19 @@ void KOEditorGeneralEvent::startDateChanged( const QDate &newdate ) emit dateTimesChanged(mCurrStartDateTime,mCurrEndDateTime); } -void KOEditorGeneralEvent::endDateChanged( const QDate &newdate ) +void KOEditorGeneralEvent::endDateChanged( const TQDate &newdate ) { if ( !newdate.isValid() ) return; - QDateTime newdt(newdate, mCurrEndDateTime.time()); + TQDateTime newdt(newdate, mCurrEndDateTime.time()); mCurrEndDateTime = newdt; emit dateTimesChanged(mCurrStartDateTime,mCurrEndDateTime); } -void KOEditorGeneralEvent::setDefaults( const QDateTime &from, - const QDateTime &to, bool allDay) +void KOEditorGeneralEvent::setDefaults( const TQDateTime &from, + const TQDateTime &to, bool allDay) { KOEditorGeneral::setDefaults(allDay); @@ -319,7 +319,7 @@ void KOEditorGeneralEvent::setDefaults( const QDateTime &from, void KOEditorGeneralEvent::readEvent( Event *event, Calendar *calendar, bool tmpl ) { - QString tmpStr; + TQString tmpStr; mAlldayEventCheckbox->setChecked(event->doesFloat()); timeStuffDisable(event->doesFloat()); @@ -357,12 +357,12 @@ void KOEditorGeneralEvent::writeEvent(Event *event) writeIncidence(event); - QDate tmpDate; - QTime tmpTime; - QDateTime tmpDT; + TQDate tmpDate; + TQTime tmpTime; + TQDateTime tmpDT; // temp. until something better happens. - QString tmpStr; + TQString tmpStr; if (mAlldayEventCheckbox->isChecked()) { event->setFloats(true); @@ -405,7 +405,7 @@ void KOEditorGeneralEvent::writeEvent(Event *event) void KOEditorGeneralEvent::setDuration() { - QString tmpStr, catStr; + TQString tmpStr, catStr; int hourdiff, minutediff; // end<date is an accepted temporary state while typing, but don't show // any duration if this happens @@ -443,7 +443,7 @@ void KOEditorGeneralEvent::setDuration() } } mDurationLabel->setText(tmpStr); - QWhatsThis::add( mDurationLabel, + TQWhatsThis::add( mDurationLabel, i18n("Shows the duration of the event or to-do with the " "current start and end dates and times.") ); } @@ -452,7 +452,7 @@ void KOEditorGeneralEvent::emitDateTimeStr() { KLocale *l = KGlobal::locale(); - QString from,to; + TQString from,to; if (mAlldayEventCheckbox->isChecked()) { from = l->formatDate(mCurrStartDateTime.date()); to = l->formatDate(mCurrEndDateTime.date()); @@ -461,7 +461,7 @@ void KOEditorGeneralEvent::emitDateTimeStr() to = l->formatDateTime(mCurrEndDateTime); } - QString str = i18n("From: %1 To: %2 %3").arg(from).arg(to) + TQString str = i18n("From: %1 To: %2 %3").arg(from).arg(to) .arg(mDurationLabel->text()); emit dateTimeStrChanged(str); @@ -475,14 +475,14 @@ bool KOEditorGeneralEvent::validateInput() if (!mStartTimeEdit->inputIsValid()) { KMessageBox::sorry( 0, i18n("Please specify a valid start time, for example '%1'.") - .arg( KGlobal::locale()->formatTime( QTime::currentTime() ) ) ); + .arg( KGlobal::locale()->formatTime( TQTime::currentTime() ) ) ); return false; } if (!mEndTimeEdit->inputIsValid()) { KMessageBox::sorry( 0, i18n("Please specify a valid end time, for example '%1'.") - .arg( KGlobal::locale()->formatTime( QTime::currentTime() ) ) ); + .arg( KGlobal::locale()->formatTime( TQTime::currentTime() ) ) ); return false; } } @@ -490,18 +490,18 @@ bool KOEditorGeneralEvent::validateInput() if (!mStartDateEdit->date().isValid()) { KMessageBox::sorry( 0, i18n("Please specify a valid start date, for example '%1'.") - .arg( KGlobal::locale()->formatDate( QDate::currentDate() ) ) ); + .arg( KGlobal::locale()->formatDate( TQDate::currentDate() ) ) ); return false; } if (!mEndDateEdit->date().isValid()) { KMessageBox::sorry( 0, i18n("Please specify a valid end date, for example '%1'.") - .arg( KGlobal::locale()->formatDate( QDate::currentDate() ) ) ); + .arg( KGlobal::locale()->formatDate( TQDate::currentDate() ) ) ); return false; } - QDateTime startDt,endDt; + TQDateTime startDt,endDt; startDt.setDate(mStartDateEdit->date()); endDt.setDate(mEndDateEdit->date()); if (!mAlldayEventCheckbox->isChecked()) { @@ -518,7 +518,7 @@ bool KOEditorGeneralEvent::validateInput() return KOEditorGeneral::validateInput(); } -void KOEditorGeneralEvent::updateRecurrenceSummary(const QString & summary) +void KOEditorGeneralEvent::updateRecurrenceSummary(const TQString & summary) { mRecurrenceSummary->setText( summary ); } diff --git a/korganizer/koeditorgeneralevent.h b/korganizer/koeditorgeneralevent.h index 67fc51e4d..21a7dfc4d 100644 --- a/korganizer/koeditorgeneralevent.h +++ b/korganizer/koeditorgeneralevent.h @@ -25,7 +25,7 @@ #define _KOEDITORGENERALEVENT_H #include "koeditorgeneral.h" -#include <qdatetime.h> +#include <tqdatetime.h> class QLabel; class KDateEdit; @@ -43,17 +43,17 @@ class KOEditorGeneralEvent : public KOEditorGeneral { Q_OBJECT public: - KOEditorGeneralEvent (QObject* parent=0,const char* name=0); + KOEditorGeneralEvent (TQObject* parent=0,const char* name=0); virtual ~KOEditorGeneralEvent(); - void initTime(QWidget *,QBoxLayout *); - void initClass(QWidget *,QBoxLayout *); - void initInvitationBar( QWidget* parent, QBoxLayout *layout ); + void initTime(TQWidget *,TQBoxLayout *); + void initClass(TQWidget *,TQBoxLayout *); + void initInvitationBar( TQWidget* parent, TQBoxLayout *layout ); void finishSetup(); /** Set widgets to default values */ - void setDefaults( const QDateTime &from, const QDateTime &to, bool allDay ); + void setDefaults( const TQDateTime &from, const TQDateTime &to, bool allDay ); /** Read event object and setup widgets accordingly. If templ is true, the event is read as template, i.e. the time and date information isn't set. @@ -65,49 +65,49 @@ class KOEditorGeneralEvent : public KOEditorGeneral /** Check if the input is valid. */ bool validateInput(); - void updateRecurrenceSummary( const QString &summary ); + void updateRecurrenceSummary( const TQString &summary ); - QFrame* invitationBar() const { return mInvitationBar; } + TQFrame* invitationBar() const { return mInvitationBar; } public slots: - void setDateTimes( const QDateTime &start, const QDateTime &end ); + void setDateTimes( const TQDateTime &start, const TQDateTime &end ); void setDuration(); protected slots: void timeStuffDisable( bool disable ); void associateTime( bool time ); - void startTimeChanged( QTime ); - void startDateChanged( const QDate& ); - void endTimeChanged( QTime ); - void endDateChanged( const QDate& ); + void startTimeChanged( TQTime ); + void startDateChanged( const TQDate& ); + void endTimeChanged( TQTime ); + void endDateChanged( const TQDate& ); void emitDateTimeStr(); signals: void allDayChanged(bool); - void dateTimeStrChanged( const QString & ); - void dateTimesChanged( const QDateTime &start, const QDateTime &end ); + void dateTimeStrChanged( const TQString & ); + void dateTimesChanged( const TQDateTime &start, const TQDateTime &end ); void editRecurrence(); void acceptInvitation(); void declineInvitation(); private: - QLabel *mStartDateLabel; - QLabel *mEndDateLabel; + TQLabel *mStartDateLabel; + TQLabel *mEndDateLabel; KDateEdit *mStartDateEdit; KDateEdit *mEndDateEdit; KTimeEdit *mStartTimeEdit; KTimeEdit *mEndTimeEdit; - QLabel *mDurationLabel; - QCheckBox *mAlldayEventCheckbox; - QComboBox *mFreeTimeCombo; - QLabel *mRecurrenceSummary; - QFrame *mInvitationBar; + TQLabel *mDurationLabel; + TQCheckBox *mAlldayEventCheckbox; + TQComboBox *mFreeTimeCombo; + TQLabel *mRecurrenceSummary; + TQFrame *mInvitationBar; // current start and end date and time - QDateTime mCurrStartDateTime; - QDateTime mCurrEndDateTime; + TQDateTime mCurrStartDateTime; + TQDateTime mCurrEndDateTime; }; #endif diff --git a/korganizer/koeditorgeneraljournal.cpp b/korganizer/koeditorgeneraljournal.cpp index 500c389bd..620417194 100644 --- a/korganizer/koeditorgeneraljournal.cpp +++ b/korganizer/koeditorgeneraljournal.cpp @@ -37,17 +37,17 @@ #include <kmessagebox.h> #include <kdebug.h> -#include <qgroupbox.h> -#include <qdatetime.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qwhatsthis.h> +#include <tqgroupbox.h> +#include <tqdatetime.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqwhatsthis.h> -KOEditorGeneralJournal::KOEditorGeneralJournal( QObject *parent, +KOEditorGeneralJournal::KOEditorGeneralJournal( TQObject *parent, const char *name ) - : QObject( parent, name ) + : TQObject( parent, name ) { } @@ -55,31 +55,31 @@ KOEditorGeneralJournal::~KOEditorGeneralJournal() { } -void KOEditorGeneralJournal::initTitle( QWidget *parent, QBoxLayout *topLayout ) +void KOEditorGeneralJournal::initTitle( TQWidget *parent, TQBoxLayout *topLayout ) { - QHBoxLayout *hbox = new QHBoxLayout( topLayout ); + TQHBoxLayout *hbox = new TQHBoxLayout( topLayout ); - QString whatsThis = i18n("Sets the title of this journal."); - QLabel *summaryLabel = new QLabel( i18n("T&itle:"), parent ); - QWhatsThis::add( summaryLabel, whatsThis ); - QFont f = summaryLabel->font(); + TQString whatsThis = i18n("Sets the title of this journal."); + TQLabel *summaryLabel = new TQLabel( i18n("T&itle:"), parent ); + TQWhatsThis::add( summaryLabel, whatsThis ); + TQFont f = summaryLabel->font(); f.setBold( true ); summaryLabel->setFont( f ); hbox->addWidget( summaryLabel ); mSummaryEdit = new FocusLineEdit( parent ); - QWhatsThis::add( mSummaryEdit, whatsThis ); + TQWhatsThis::add( mSummaryEdit, whatsThis ); summaryLabel->setBuddy( mSummaryEdit ); hbox->addWidget( mSummaryEdit ); } -void KOEditorGeneralJournal::initDate( QWidget *parent, QBoxLayout *topLayout ) +void KOEditorGeneralJournal::initDate( TQWidget *parent, TQBoxLayout *topLayout ) { -// QBoxLayout *dateLayout = new QVBoxLayout(topLayout); - QBoxLayout *dateLayout = new QHBoxLayout( topLayout ); +// TQBoxLayout *dateLayout = new TQVBoxLayout(topLayout); + TQBoxLayout *dateLayout = new TQHBoxLayout( topLayout ); - mDateLabel = new QLabel( i18n("&Date:"), parent); + mDateLabel = new TQLabel( i18n("&Date:"), parent); dateLayout->addWidget( mDateLabel ); mDateEdit = new KDateEdit( parent ); @@ -88,26 +88,26 @@ void KOEditorGeneralJournal::initDate( QWidget *parent, QBoxLayout *topLayout ) dateLayout->addStretch(); - mTimeCheckBox = new QCheckBox( i18n("&Time: "), parent ); + mTimeCheckBox = new TQCheckBox( i18n("&Time: "), parent ); dateLayout->addWidget( mTimeCheckBox ); mTimeEdit = new KTimeEdit( parent ); dateLayout->addWidget( mTimeEdit ); - connect( mTimeCheckBox, SIGNAL(toggled(bool)), - mTimeEdit, SLOT(setEnabled(bool)) ); + connect( mTimeCheckBox, TQT_SIGNAL(toggled(bool)), + mTimeEdit, TQT_SLOT(setEnabled(bool)) ); dateLayout->addStretch(); - setTime( QTime( -1, -1, -1 ) ); + setTime( TQTime( -1, -1, -1 ) ); } -void KOEditorGeneralJournal::setDate( const QDate &date ) +void KOEditorGeneralJournal::setDate( const TQDate &date ) { // kdDebug(5850) << "KOEditorGeneralJournal::setDate(): Date: " << date.toString() << endl; mDateEdit->setDate( date ); } -void KOEditorGeneralJournal::setTime( const QTime &time ) +void KOEditorGeneralJournal::setTime( const TQTime &time ) { kdDebug()<<"KOEditorGeneralJournal::setTime, time="<<time.toString()<<endl; bool validTime = time.isValid(); @@ -119,7 +119,7 @@ kdDebug()<<"KOEditorGeneralJournal::setTime, time is valid"<<endl; } } -void KOEditorGeneralJournal::initDescription( QWidget *parent, QBoxLayout *topLayout ) +void KOEditorGeneralJournal::initDescription( TQWidget *parent, TQBoxLayout *topLayout ) { mDescriptionEdit = new KTextEdit( parent ); mDescriptionEdit->append(""); @@ -130,7 +130,7 @@ void KOEditorGeneralJournal::initDescription( QWidget *parent, QBoxLayout *topLa topLayout->addWidget( mDescriptionEdit ); } -void KOEditorGeneralJournal::setDefaults( const QDate &date ) +void KOEditorGeneralJournal::setDefaults( const TQDate &date ) { setDate( date ); } @@ -145,7 +145,7 @@ kdDebug()<<"KOEditorGeneralJournal::readJournal, does not float, time="<<(journa setTime( journal->dtStart().time() ); } else { kdDebug()<<"KOEditorGeneralJournal::readJournal, does float"<<endl; - setTime( QTime( -1, -1, -1 ) ); + setTime( TQTime( -1, -1, -1 ) ); } } setDescription( journal->description() ); @@ -157,7 +157,7 @@ void KOEditorGeneralJournal::writeJournal( Journal *journal ) journal->setSummary( mSummaryEdit->text() ); journal->setDescription( mDescriptionEdit->text() ); - QDateTime tmpDT( mDateEdit->date(), QTime(0,0,0) ); + TQDateTime tmpDT( mDateEdit->date(), TQTime(0,0,0) ); bool hasTime = mTimeCheckBox->isChecked(); journal->setFloats( !hasTime ); if ( hasTime ) { @@ -169,22 +169,22 @@ void KOEditorGeneralJournal::writeJournal( Journal *journal ) } -void KOEditorGeneralJournal::setDescription( const QString &text ) +void KOEditorGeneralJournal::setDescription( const TQString &text ) { mDescriptionEdit->setText( text ); } -void KOEditorGeneralJournal::setSummary( const QString &text ) +void KOEditorGeneralJournal::setSummary( const TQString &text ) { mSummaryEdit->setText( text ); } void KOEditorGeneralJournal::finishSetup() { - QWidget::setTabOrder( mSummaryEdit, mDateEdit ); - QWidget::setTabOrder( mDateEdit, mTimeCheckBox ); - QWidget::setTabOrder( mTimeCheckBox, mTimeEdit ); - QWidget::setTabOrder( mTimeEdit, mDescriptionEdit ); + TQWidget::setTabOrder( mSummaryEdit, mDateEdit ); + TQWidget::setTabOrder( mDateEdit, mTimeCheckBox ); + TQWidget::setTabOrder( mTimeCheckBox, mTimeEdit ); + TQWidget::setTabOrder( mTimeEdit, mDescriptionEdit ); mSummaryEdit->setFocus(); } @@ -195,7 +195,7 @@ bool KOEditorGeneralJournal::validateInput() if (!mDateEdit->date().isValid()) { KMessageBox::sorry( 0, i18n("Please specify a valid date, for example '%1'.") - .arg( KGlobal::locale()->formatDate( QDate::currentDate() ) ) ); + .arg( KGlobal::locale()->formatDate( TQDate::currentDate() ) ) ); return false; } diff --git a/korganizer/koeditorgeneraljournal.h b/korganizer/koeditorgeneraljournal.h index 38fe4e525..a2645c221 100644 --- a/korganizer/koeditorgeneraljournal.h +++ b/korganizer/koeditorgeneraljournal.h @@ -25,8 +25,8 @@ #ifndef KOEDITORGENERALJOURNAL_H #define KOEDITORGENERALJOURNAL_H -#include <qobject.h> -#include <qdatetime.h> +#include <tqobject.h> +#include <tqdatetime.h> class KDateEdit; class KTimeEdit; @@ -47,17 +47,17 @@ class KOEditorGeneralJournal : public QObject { Q_OBJECT public: - KOEditorGeneralJournal ( QObject* parent=0, const char* name=0 ); + KOEditorGeneralJournal ( TQObject* parent=0, const char* name=0 ); virtual ~KOEditorGeneralJournal(); - void initDate( QWidget *, QBoxLayout * ); - void initDescription( QWidget *, QBoxLayout * ); - void initTitle( QWidget *parent, QBoxLayout *topLayout ); + void initDate( TQWidget *, TQBoxLayout * ); + void initDescription( TQWidget *, TQBoxLayout * ); + void initTitle( TQWidget *parent, TQBoxLayout *topLayout ); /** Set widgets to default values */ - void setDefaults( const QDate &date ); - void setDate( const QDate &date ); - void setTime( const QTime &time ); + void setDefaults( const TQDate &date ); + void setDate( const TQDate &date ); + void setTime( const TQTime &time ); /** Read journal object and setup widgets accordingly */ void readJournal( Journal *, bool tmpl = false ); /** Write journal settings to event object */ @@ -66,17 +66,17 @@ class KOEditorGeneralJournal : public QObject /** Check if the input is valid. */ bool validateInput(); - void setDescription( const QString &text ); - void setSummary( const QString &text ); + void setDescription( const TQString &text ); + void setSummary( const TQString &text ); void finishSetup(); protected: - QLineEdit *mSummaryEdit; - QLabel *mSummaryLabel; + TQLineEdit *mSummaryEdit; + TQLabel *mSummaryLabel; KTextEdit *mDescriptionEdit; - QLabel *mDateLabel; + TQLabel *mDateLabel; KDateEdit *mDateEdit; - QCheckBox *mTimeCheckBox; + TQCheckBox *mTimeCheckBox; KTimeEdit *mTimeEdit; }; diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp index 89deed4f2..dd2a77b5c 100644 --- a/korganizer/koeditorgeneraltodo.cpp +++ b/korganizer/koeditorgeneraltodo.cpp @@ -22,19 +22,19 @@ without including the source code for Qt in the source distribution. */ -#include <qtooltip.h> -#include <qfiledialog.h> -#include <qlayout.h> -#include <qvbox.h> -#include <qbuttongroup.h> -#include <qvgroupbox.h> -#include <qwidgetstack.h> -#include <qdatetime.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qspinbox.h> -#include <qpushbutton.h> -#include <qwhatsthis.h> +#include <tqtooltip.h> +#include <tqfiledialog.h> +#include <tqlayout.h> +#include <tqvbox.h> +#include <tqbuttongroup.h> +#include <tqvgroupbox.h> +#include <tqwidgetstack.h> +#include <tqdatetime.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqspinbox.h> +#include <tqpushbutton.h> +#include <tqwhatsthis.h> #include <kglobal.h> #include <klocale.h> @@ -56,7 +56,7 @@ #include "koeditorgeneraltodo.h" #include "koeditorgeneraltodo.moc" -KOEditorGeneralTodo::KOEditorGeneralTodo(QObject* parent, +KOEditorGeneralTodo::KOEditorGeneralTodo(TQObject* parent, const char* name) : KOEditorGeneral( parent, name) { @@ -68,142 +68,142 @@ KOEditorGeneralTodo::~KOEditorGeneralTodo() void KOEditorGeneralTodo::finishSetup() { - QWidget::setTabOrder( mSummaryEdit, mLocationEdit ); - QWidget::setTabOrder( mLocationEdit, mStartCheck ); - QWidget::setTabOrder( mStartCheck, mStartDateEdit ); - QWidget::setTabOrder( mStartDateEdit, mStartTimeEdit ); - QWidget::setTabOrder( mStartTimeEdit, mDueCheck ); - QWidget::setTabOrder( mDueCheck, mDueDateEdit ); - QWidget::setTabOrder( mDueDateEdit, mDueTimeEdit ); - QWidget::setTabOrder( mDueTimeEdit, mTimeButton ); - QWidget::setTabOrder( mTimeButton, mCompletedCombo ); - QWidget::setTabOrder( mCompletedCombo, mPriorityCombo ); - QWidget::setTabOrder( mPriorityCombo, mAlarmButton ); - QWidget::setTabOrder( mAlarmButton, mAlarmTimeEdit ); - QWidget::setTabOrder( mAlarmTimeEdit, mAlarmIncrCombo ); -// QWidget::setTabOrder( mAlarmIncrCombo, mAlarmSoundButton ); - QWidget::setTabOrder( mAlarmIncrCombo, mAlarmEditButton ); -// QWidget::setTabOrder( mAlarmSoundButton, mAlarmProgramButton ); -// QWidget::setTabOrder( mAlarmProgramButton, mDescriptionEdit ); - QWidget::setTabOrder( mAlarmEditButton, mDescriptionEdit ); - QWidget::setTabOrder( mDescriptionEdit, mCategoriesButton ); - QWidget::setTabOrder( mCategoriesButton, mSecrecyCombo ); -// QWidget::setTabOrder( mSecrecyCombo, mDescriptionEdit ); + TQWidget::setTabOrder( mSummaryEdit, mLocationEdit ); + TQWidget::setTabOrder( mLocationEdit, mStartCheck ); + TQWidget::setTabOrder( mStartCheck, mStartDateEdit ); + TQWidget::setTabOrder( mStartDateEdit, mStartTimeEdit ); + TQWidget::setTabOrder( mStartTimeEdit, mDueCheck ); + TQWidget::setTabOrder( mDueCheck, mDueDateEdit ); + TQWidget::setTabOrder( mDueDateEdit, mDueTimeEdit ); + TQWidget::setTabOrder( mDueTimeEdit, mTimeButton ); + TQWidget::setTabOrder( mTimeButton, mCompletedCombo ); + TQWidget::setTabOrder( mCompletedCombo, mPriorityCombo ); + TQWidget::setTabOrder( mPriorityCombo, mAlarmButton ); + TQWidget::setTabOrder( mAlarmButton, mAlarmTimeEdit ); + TQWidget::setTabOrder( mAlarmTimeEdit, mAlarmIncrCombo ); +// TQWidget::setTabOrder( mAlarmIncrCombo, mAlarmSoundButton ); + TQWidget::setTabOrder( mAlarmIncrCombo, mAlarmEditButton ); +// TQWidget::setTabOrder( mAlarmSoundButton, mAlarmProgramButton ); +// TQWidget::setTabOrder( mAlarmProgramButton, mDescriptionEdit ); + TQWidget::setTabOrder( mAlarmEditButton, mDescriptionEdit ); + TQWidget::setTabOrder( mDescriptionEdit, mCategoriesButton ); + TQWidget::setTabOrder( mCategoriesButton, mSecrecyCombo ); +// TQWidget::setTabOrder( mSecrecyCombo, mDescriptionEdit ); mSummaryEdit->setFocus(); } -void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout) +void KOEditorGeneralTodo::initTime(TQWidget *parent,TQBoxLayout *topLayout) { kdDebug(5850) << k_funcinfo << endl; - QBoxLayout *timeLayout = new QVBoxLayout(topLayout); + TQBoxLayout *timeLayout = new TQVBoxLayout(topLayout); - QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal, + TQGroupBox *timeGroupBox = new TQGroupBox(1,TQGroupBox::Horizontal, i18n("Date && Time"),parent); timeLayout->addWidget(timeGroupBox); - QFrame *timeBoxFrame = new QFrame(timeGroupBox); - QWhatsThis::add( timeBoxFrame, + TQFrame *timeBoxFrame = new TQFrame(timeGroupBox); + TQWhatsThis::add( timeBoxFrame, i18n("Sets options for due and start dates and times " "for this to-do.") ); - QGridLayout *layoutTimeBox = new QGridLayout(timeBoxFrame,1,1); + TQGridLayout *layoutTimeBox = new TQGridLayout(timeBoxFrame,1,1); layoutTimeBox->setSpacing(topLayout->spacing()); - QString whatsThis = i18n("Sets the start date for this to-do"); - mStartCheck = new QCheckBox(i18n("Sta&rt:"),timeBoxFrame); - QWhatsThis::add( mStartCheck, whatsThis ); + TQString whatsThis = i18n("Sets the start date for this to-do"); + mStartCheck = new TQCheckBox(i18n("Sta&rt:"),timeBoxFrame); + TQWhatsThis::add( mStartCheck, whatsThis ); layoutTimeBox->addWidget(mStartCheck,0,0); - connect(mStartCheck,SIGNAL(toggled(bool)),SLOT(enableStartEdit(bool))); - connect(mStartCheck,SIGNAL(toggled(bool)),SLOT(startDateModified())); + connect(mStartCheck,TQT_SIGNAL(toggled(bool)),TQT_SLOT(enableStartEdit(bool))); + connect(mStartCheck,TQT_SIGNAL(toggled(bool)),TQT_SLOT(startDateModified())); mStartDateEdit = new KDateEdit(timeBoxFrame); - QWhatsThis::add( mStartDateEdit, whatsThis ); + TQWhatsThis::add( mStartDateEdit, whatsThis ); layoutTimeBox->addWidget(mStartDateEdit,0,1); - connect(mStartDateEdit,SIGNAL(dateChanged(const QDate&)),SLOT(startDateModified())); + connect(mStartDateEdit,TQT_SIGNAL(dateChanged(const TQDate&)),TQT_SLOT(startDateModified())); mStartTimeEdit = new KTimeEdit(timeBoxFrame); - QWhatsThis::add( mStartTimeEdit, + TQWhatsThis::add( mStartTimeEdit, i18n("Sets the start time for this to-do.") ); layoutTimeBox->addWidget(mStartTimeEdit,0,2); - connect(mStartTimeEdit,SIGNAL(timeChanged(QTime)),SLOT(startDateModified())); + connect(mStartTimeEdit,TQT_SIGNAL(timeChanged(TQTime)),TQT_SLOT(startDateModified())); whatsThis = i18n("Sets the due date for this to-do."); - mDueCheck = new QCheckBox(i18n("&Due:"),timeBoxFrame); - QWhatsThis::add( mDueCheck, whatsThis ); + mDueCheck = new TQCheckBox(i18n("&Due:"),timeBoxFrame); + TQWhatsThis::add( mDueCheck, whatsThis ); layoutTimeBox->addWidget(mDueCheck,1,0); - connect(mDueCheck,SIGNAL(toggled(bool)),SLOT(enableDueEdit(bool))); - connect(mDueCheck,SIGNAL(toggled(bool)),SLOT(showAlarm())); - connect(mDueCheck,SIGNAL(toggled(bool)),SIGNAL(dueDateEditToggle(bool))); - connect(mDueCheck,SIGNAL(toggled(bool)),SLOT(dateChanged())); + connect(mDueCheck,TQT_SIGNAL(toggled(bool)),TQT_SLOT(enableDueEdit(bool))); + connect(mDueCheck,TQT_SIGNAL(toggled(bool)),TQT_SLOT(showAlarm())); + connect(mDueCheck,TQT_SIGNAL(toggled(bool)),TQT_SIGNAL(dueDateEditToggle(bool))); + connect(mDueCheck,TQT_SIGNAL(toggled(bool)),TQT_SLOT(dateChanged())); mDueDateEdit = new KDateEdit(timeBoxFrame); - QWhatsThis::add( mDueDateEdit, whatsThis ); + TQWhatsThis::add( mDueDateEdit, whatsThis ); layoutTimeBox->addWidget(mDueDateEdit,1,1); - connect(mDueDateEdit,SIGNAL(dateChanged(const QDate&)),SLOT(dateChanged())); + connect(mDueDateEdit,TQT_SIGNAL(dateChanged(const TQDate&)),TQT_SLOT(dateChanged())); mDueTimeEdit = new KTimeEdit(timeBoxFrame); - QWhatsThis::add( mDueTimeEdit, + TQWhatsThis::add( mDueTimeEdit, i18n("Sets the due time for this to-do.") ); layoutTimeBox->addWidget(mDueTimeEdit,1,2); - connect(mDueTimeEdit,SIGNAL(timeChanged( QTime )),SLOT(dateChanged())); + connect(mDueTimeEdit,TQT_SIGNAL(timeChanged( TQTime )),TQT_SLOT(dateChanged())); - mTimeButton = new QCheckBox(i18n("Ti&me associated"),timeBoxFrame); - QWhatsThis::add( mTimeButton, + mTimeButton = new TQCheckBox(i18n("Ti&me associated"),timeBoxFrame); + TQWhatsThis::add( mTimeButton, i18n("Sets whether or not this to-do's start and due dates " "have times associated with them.") ); layoutTimeBox->addMultiCellWidget(mTimeButton,2,2,0,2); - connect(mTimeButton,SIGNAL(toggled(bool)),SLOT(enableTimeEdits(bool))); - connect(mTimeButton,SIGNAL(toggled(bool)),SLOT(dateChanged())); + connect(mTimeButton,TQT_SIGNAL(toggled(bool)),TQT_SLOT(enableTimeEdits(bool))); + connect(mTimeButton,TQT_SIGNAL(toggled(bool)),TQT_SLOT(dateChanged())); // some more layouting layoutTimeBox->setColStretch(3,1); - QBoxLayout *secLayout = new QHBoxLayout(); + TQBoxLayout *secLayout = new TQHBoxLayout(); layoutTimeBox->addLayout( secLayout, 0, 4 ); initSecrecy( timeBoxFrame, secLayout ); } -void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout) +void KOEditorGeneralTodo::initCompletion(TQWidget *parent, TQBoxLayout *topLayout) { - QString whatsThis = i18n("Sets the current completion status of this to-do " + TQString whatsThis = i18n("Sets the current completion status of this to-do " "as a percentage."); - mCompletedCombo = new QComboBox(parent); - QWhatsThis::add( mCompletedCombo, whatsThis ); + mCompletedCombo = new TQComboBox(parent); + TQWhatsThis::add( mCompletedCombo, whatsThis ); for (int i = 0; i <= 100; i+=10) { // xgettext:no-c-format - QString label = i18n("Percent complete", "%1 %").arg (i); + TQString label = i18n("Percent complete", "%1 %").arg (i); mCompletedCombo->insertItem(label); } - connect(mCompletedCombo,SIGNAL(activated(int)),SLOT(completedChanged(int))); + connect(mCompletedCombo,TQT_SIGNAL(activated(int)),TQT_SLOT(completedChanged(int))); topLayout->addWidget(mCompletedCombo); - mCompletedLabel = new QLabel(i18n("co&mpleted"),parent); + mCompletedLabel = new TQLabel(i18n("co&mpleted"),parent); topLayout->addWidget(mCompletedLabel); mCompletedLabel->setBuddy( mCompletedCombo ); mCompletionDateEdit = new KDateEdit( parent ); mCompletionDateEdit->hide(); topLayout->addWidget( mCompletionDateEdit ); - mCompletionTimeEdit = new KTimeEdit( parent, QTime() ); + mCompletionTimeEdit = new KTimeEdit( parent, TQTime() ); mCompletionTimeEdit->hide(); topLayout->addWidget( mCompletionTimeEdit ); } -void KOEditorGeneralTodo::initPriority(QWidget *parent, QBoxLayout *topLayout) +void KOEditorGeneralTodo::initPriority(TQWidget *parent, TQBoxLayout *topLayout) { - QString whatsThis = i18n("Sets the priority of this to-do on a scale " + TQString whatsThis = i18n("Sets the priority of this to-do on a scale " "from one to nine, with one being the highest " "priority, five being a medium priority, and " "nine being the lowest. In programs that have a " "different scale, the numbers will be adjusted " "to match the appropriate scale."); - QLabel *priorityLabel = new QLabel(i18n("&Priority:"),parent); + TQLabel *priorityLabel = new TQLabel(i18n("&Priority:"),parent); topLayout->addWidget(priorityLabel); - mPriorityCombo = new QComboBox(parent); + mPriorityCombo = new TQComboBox(parent); mPriorityCombo->insertItem(i18n("unspecified")); mPriorityCombo->insertItem(i18n("1 (highest)")); mPriorityCombo->insertItem(i18n("2")); @@ -218,9 +218,9 @@ void KOEditorGeneralTodo::initPriority(QWidget *parent, QBoxLayout *topLayout) priorityLabel->setBuddy( mPriorityCombo ); } -void KOEditorGeneralTodo::initStatus(QWidget *parent,QBoxLayout *topLayout) +void KOEditorGeneralTodo::initStatus(TQWidget *parent,TQBoxLayout *topLayout) { - QBoxLayout *statusLayout = new QHBoxLayout(topLayout); + TQBoxLayout *statusLayout = new TQHBoxLayout(topLayout); initCompletion( parent, statusLayout ); @@ -229,7 +229,7 @@ void KOEditorGeneralTodo::initStatus(QWidget *parent,QBoxLayout *topLayout) initPriority( parent, statusLayout ); } -void KOEditorGeneralTodo::setDefaults( const QDateTime &due, bool allDay ) +void KOEditorGeneralTodo::setDefaults( const TQDateTime &due, bool allDay ) { kdDebug(5850) << k_funcinfo << due <<endl; KOEditorGeneral::setDefaults(allDay); @@ -250,13 +250,13 @@ void KOEditorGeneralTodo::setDefaults( const QDateTime &due, bool allDay ) mDueTimeEdit->setTime( due.time() ); } else { // Make it due tomorrow. - mDueDateEdit->setDate( QDate::currentDate().addDays(1) ); - mDueTimeEdit->setTime( QTime::currentTime() ); + mDueDateEdit->setDate( TQDate::currentDate().addDays(1) ); + mDueTimeEdit->setTime( TQTime::currentTime() ); } - if ( !due.isValid() || (QDateTime::currentDateTime() < due) ) { - mStartDateEdit->setDate( QDate::currentDate() ); - mStartTimeEdit->setTime( QTime::currentTime() ); + if ( !due.isValid() || (TQDateTime::currentDateTime() < due) ) { + mStartDateEdit->setDate( TQDate::currentDate() ); + mStartTimeEdit->setTime( TQTime::currentTime() ); } else { mStartDateEdit->setDate( due.date().addDays( -1 ) ); mStartTimeEdit->setTime( due.time() ); @@ -272,7 +272,7 @@ void KOEditorGeneralTodo::readTodo(Todo *todo, Calendar *calendar) { KOEditorGeneral::readIncidence(todo, calendar); - QDateTime dueDT; + TQDateTime dueDT; if (todo->hasDueDate()) { enableAlarm( true ); @@ -284,8 +284,8 @@ void KOEditorGeneralTodo::readTodo(Todo *todo, Calendar *calendar) enableAlarm( false ); mDueDateEdit->setEnabled(false); mDueTimeEdit->setEnabled(false); - mDueDateEdit->setDate(QDate::currentDate()); - mDueTimeEdit->setTime(QTime::currentTime()); + mDueDateEdit->setDate(TQDate::currentDate()); + mDueTimeEdit->setTime(TQTime::currentTime()); mDueCheck->setChecked(false); } @@ -296,8 +296,8 @@ void KOEditorGeneralTodo::readTodo(Todo *todo, Calendar *calendar) } else { mStartDateEdit->setEnabled(false); mStartTimeEdit->setEnabled(false); - mStartDateEdit->setDate(QDate::currentDate()); - mStartTimeEdit->setTime(QTime::currentTime()); + mStartDateEdit->setDate(TQDate::currentDate()); + mStartTimeEdit->setTime(TQTime::currentTime()); mStartCheck->setChecked(false); } @@ -320,14 +320,14 @@ void KOEditorGeneralTodo::writeTodo(Todo *todo) KOEditorGeneral::writeIncidence(todo); // temp. until something better happens. - QString tmpStr; + TQString tmpStr; todo->setHasDueDate(mDueCheck->isChecked()); todo->setHasStartDate(mStartCheck->isChecked()); - QDate tmpSDate, tmpDDate; - QTime tmpSTime, tmpDTime; - QDateTime tmpStartDT, tmpDueDT; + TQDate tmpSDate, tmpDDate; + TQTime tmpSTime, tmpDTime; + TQDateTime tmpStartDT, tmpDueDT; if ( mTimeButton->isChecked() ) { todo->setFloats(false); @@ -380,7 +380,7 @@ void KOEditorGeneralTodo::writeTodo(Todo *todo) todo->setPercentComplete(mCompletedCombo->currentItem() * 10); if (mCompletedCombo->currentItem() == 10 && mCompleted.isValid()) { - QDateTime completed( mCompletionDateEdit->date(), + TQDateTime completed( mCompletionDateEdit->date(), mCompletionTimeEdit->getTime() ); int difference = mCompleted.secsTo( completed ); if ( (difference < 60) && (difference > -60) && @@ -473,8 +473,8 @@ bool KOEditorGeneralTodo::validateInput() } if (mStartCheck->isChecked() && mDueCheck->isChecked()) { - QDateTime startDate; - QDateTime dueDate; + TQDateTime startDate; + TQDateTime dueDate; startDate.setDate(mStartDateEdit->date()); dueDate.setDate(mDueDateEdit->date()); if (mTimeButton->isChecked()) { @@ -494,7 +494,7 @@ bool KOEditorGeneralTodo::validateInput() void KOEditorGeneralTodo::completedChanged(int index) { if (index == 10) { - mCompleted = QDateTime::currentDateTime(); + mCompleted = TQDateTime::currentDateTime(); } setCompletedDate(); } @@ -502,13 +502,13 @@ void KOEditorGeneralTodo::completedChanged(int index) void KOEditorGeneralTodo::dateChanged() { KLocale *l = KGlobal::locale(); - QString dateTimeStr = ""; + TQString dateTimeStr = ""; if ( mStartCheck->isChecked() ) { dateTimeStr += i18n("Start: %1").arg( l->formatDate( mStartDateEdit->date() ) ); if ( mTimeButton->isChecked() ) - dateTimeStr += QString(" %1").arg( + dateTimeStr += TQString(" %1").arg( l->formatTime( mStartTimeEdit->getTime() ) ); } @@ -516,12 +516,12 @@ void KOEditorGeneralTodo::dateChanged() dateTimeStr += i18n(" Due: %1").arg( l->formatDate( mDueDateEdit->date() ) ); if ( mTimeButton->isChecked() ) - dateTimeStr += QString(" %1").arg( + dateTimeStr += TQString(" %1").arg( l->formatTime( mDueTimeEdit->getTime() ) ); } emit dateTimeStrChanged( dateTimeStr ); - QDateTime endDt( mDueDateEdit->date(), mDueTimeEdit->getTime() ); + TQDateTime endDt( mDueDateEdit->date(), mDueTimeEdit->getTime() ); emit signalDateTimeChanged( endDt, endDt ); } diff --git a/korganizer/koeditorgeneraltodo.h b/korganizer/koeditorgeneraltodo.h index d3e051866..7ebc1f7ef 100644 --- a/korganizer/koeditorgeneraltodo.h +++ b/korganizer/koeditorgeneraltodo.h @@ -25,7 +25,7 @@ #define _KOEDITORGENERALTODO_H #include "koeditorgeneral.h" -#include <qdatetime.h> +#include <tqdatetime.h> class KRestrictedLine; @@ -41,18 +41,18 @@ class KOEditorGeneralTodo : public KOEditorGeneral { Q_OBJECT public: - KOEditorGeneralTodo (QObject* parent=0,const char* name=0); + KOEditorGeneralTodo (TQObject* parent=0,const char* name=0); virtual ~KOEditorGeneralTodo(); - void initTime(QWidget *, QBoxLayout *); - void initStatus(QWidget *, QBoxLayout *); - void initCompletion(QWidget *, QBoxLayout *); - void initPriority(QWidget *, QBoxLayout *); + void initTime(TQWidget *, TQBoxLayout *); + void initStatus(TQWidget *, TQBoxLayout *); + void initCompletion(TQWidget *, TQBoxLayout *); + void initPriority(TQWidget *, TQBoxLayout *); void finishSetup(); /** Set widgets to default values */ - void setDefaults( const QDateTime &due, bool allDay ); + void setDefaults( const TQDateTime &due, bool allDay ); /** Read todo object and setup widgets accordingly */ void readTodo(Todo *todo, Calendar *calendar); /** Write todo settings to event object */ @@ -66,8 +66,8 @@ class KOEditorGeneralTodo : public KOEditorGeneral signals: void dueDateEditToggle( bool ); - void dateTimeStrChanged( const QString & ); - void signalDateTimeChanged( const QDateTime &, const QDateTime & ); + void dateTimeStrChanged( const TQString & ); + void signalDateTimeChanged( const TQDateTime &, const TQDateTime & ); protected slots: void completedChanged(int); @@ -88,21 +88,21 @@ class KOEditorGeneralTodo : public KOEditorGeneral KDateEdit *mStartDateEdit; KTimeEdit *mStartTimeEdit; - QCheckBox *mTimeButton; - QCheckBox *mDueCheck; + TQCheckBox *mTimeButton; + TQCheckBox *mDueCheck; KDateEdit *mDueDateEdit; KTimeEdit *mDueTimeEdit; - QComboBox *mCompletedCombo; - QLabel *mCompletedLabel; - QLabel *mPriorityLabel; - QComboBox *mPriorityCombo; + TQComboBox *mCompletedCombo; + TQLabel *mCompletedLabel; + TQLabel *mPriorityLabel; + TQComboBox *mPriorityCombo; KDateEdit *mCompletionDateEdit; KTimeEdit *mCompletionTimeEdit; - QCheckBox *mStartCheck; + TQCheckBox *mStartCheck; - QDateTime mCompleted; + TQDateTime mCompleted; }; diff --git a/korganizer/koeditorrecurrence.cpp b/korganizer/koeditorrecurrence.cpp index 48471c421..6f24446c2 100644 --- a/korganizer/koeditorrecurrence.cpp +++ b/korganizer/koeditorrecurrence.cpp @@ -22,23 +22,23 @@ without including the source code for Qt in the source distribution. */ -#include <qtooltip.h> -#include <qfiledialog.h> -#include <qlayout.h> -#include <qvbox.h> -#include <qbuttongroup.h> -#include <qvgroupbox.h> -#include <qwidgetstack.h> -#include <qdatetime.h> -#include <qlistbox.h> -#include <qspinbox.h> -#include <qcheckbox.h> -#include <qgroupbox.h> -#include <qwidgetstack.h> -#include <qradiobutton.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qwhatsthis.h> +#include <tqtooltip.h> +#include <tqfiledialog.h> +#include <tqlayout.h> +#include <tqvbox.h> +#include <tqbuttongroup.h> +#include <tqvgroupbox.h> +#include <tqwidgetstack.h> +#include <tqdatetime.h> +#include <tqlistbox.h> +#include <tqspinbox.h> +#include <tqcheckbox.h> +#include <tqgroupbox.h> +#include <tqwidgetstack.h> +#include <tqradiobutton.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqwhatsthis.h> #include <kdialog.h> #include <kglobal.h> @@ -60,14 +60,14 @@ /////////////////////////// RecurBase /////////////////////////////// -RecurBase::RecurBase( QWidget *parent, const char *name ) : - QWidget( parent, name ) +RecurBase::RecurBase( TQWidget *parent, const char *name ) : + TQWidget( parent, name ) { - mFrequencyEdit = new QSpinBox( 1, 9999, 1, this ); + mFrequencyEdit = new TQSpinBox( 1, 9999, 1, this ); mFrequencyEdit->setValue( 1 ); } -QWidget *RecurBase::frequencyEdit() +TQWidget *RecurBase::frequencyEdit() { return mFrequencyEdit; } @@ -84,10 +84,10 @@ int RecurBase::frequency() return mFrequencyEdit->value(); } -QComboBox *RecurBase::createWeekCountCombo( QWidget *parent, const char *name ) +TQComboBox *RecurBase::createWeekCountCombo( TQWidget *parent, const char *name ) { - QComboBox *combo = new QComboBox( parent, name ); - QWhatsThis::add( combo, + TQComboBox *combo = new TQComboBox( parent, name ); + TQWhatsThis::add( combo, i18n("The number of the week from the beginning " "of the month on which this event or to-do " "should recur.") ); @@ -105,10 +105,10 @@ QComboBox *RecurBase::createWeekCountCombo( QWidget *parent, const char *name ) return combo; } -QComboBox *RecurBase::createWeekdayCombo( QWidget *parent, const char *name ) +TQComboBox *RecurBase::createWeekdayCombo( TQWidget *parent, const char *name ) { - QComboBox *combo = new QComboBox( parent, name ); - QWhatsThis::add( combo, + TQComboBox *combo = new TQComboBox( parent, name ); + TQWhatsThis::add( combo, i18n("The weekday on which this event or to-do " "should recur.") ); if ( !combo ) return 0; @@ -119,38 +119,38 @@ QComboBox *RecurBase::createWeekdayCombo( QWidget *parent, const char *name ) return combo; } -QComboBox *RecurBase::createMonthNameCombo( QWidget *parent, const char *name ) +TQComboBox *RecurBase::createMonthNameCombo( TQWidget *parent, const char *name ) { - QComboBox *combo = new QComboBox( parent, name ); - QWhatsThis::add( combo, + TQComboBox *combo = new TQComboBox( parent, name ); + TQWhatsThis::add( combo, i18n("The month during which this event or to-do " "should recur.") ); if ( !combo ) return 0; const KCalendarSystem *calSys = KOGlobals::self()->calendarSystem(); for( int i = 1; i <= 12; ++i ) { // use an arbitrary year, we just need the month name... - QDate dt( 2005, i, 1 ); + TQDate dt( 2005, i, 1 ); combo->insertItem( calSys->monthName( dt ) ); } return combo; } -QBoxLayout *RecurBase::createFrequencySpinBar( QWidget *parent, QLayout *layout, - QString everyText, QString unitText ) +TQBoxLayout *RecurBase::createFrequencySpinBar( TQWidget *parent, TQLayout *layout, + TQString everyText, TQString unitText ) { - QBoxLayout *freqLayout = new QHBoxLayout( layout ); + TQBoxLayout *freqLayout = new TQHBoxLayout( layout ); - QString whatsThis = i18n("Sets how often this event or to-do should recur."); - QLabel *preLabel = new QLabel( everyText, parent ); - QWhatsThis::add( preLabel, whatsThis ); + TQString whatsThis = i18n("Sets how often this event or to-do should recur."); + TQLabel *preLabel = new TQLabel( everyText, parent ); + TQWhatsThis::add( preLabel, whatsThis ); freqLayout->addWidget( preLabel ); freqLayout->addWidget( frequencyEdit() ); preLabel->setBuddy( frequencyEdit() ); - QWhatsThis::add( preLabel->buddy(), whatsThis ); + TQWhatsThis::add( preLabel->buddy(), whatsThis ); - QLabel *postLabel = new QLabel( unitText, parent ); - QWhatsThis::add( postLabel, whatsThis ); + TQLabel *postLabel = new TQLabel( unitText, parent ); + TQWhatsThis::add( postLabel, whatsThis ); freqLayout->addWidget( postLabel ); freqLayout->addStretch(); return freqLayout; @@ -158,10 +158,10 @@ QBoxLayout *RecurBase::createFrequencySpinBar( QWidget *parent, QLayout *layout, /////////////////////////// RecurDaily /////////////////////////////// -RecurDaily::RecurDaily( QWidget *parent, const char *name ) : +RecurDaily::RecurDaily( TQWidget *parent, const char *name ) : RecurBase( parent, name ) { - QBoxLayout *topLayout = new QVBoxLayout( this ); + TQBoxLayout *topLayout = new TQVBoxLayout( this ); topLayout->setSpacing( KDialog::spacingHint() ); createFrequencySpinBar( this, topLayout, i18n("&Recur every"), i18n("day(s)") ); @@ -170,17 +170,17 @@ RecurDaily::RecurDaily( QWidget *parent, const char *name ) : /////////////////////////// RecurWeekly /////////////////////////////// -RecurWeekly::RecurWeekly( QWidget *parent, const char *name ) : +RecurWeekly::RecurWeekly( TQWidget *parent, const char *name ) : RecurBase( parent, name ) { - QBoxLayout *topLayout = new QVBoxLayout( this ); + TQBoxLayout *topLayout = new TQVBoxLayout( this ); topLayout->setSpacing( KDialog::spacingHint() ); // topLayout->addStretch( 1 ); createFrequencySpinBar( this, topLayout, i18n("&Recur every"), i18n("week(s) on:") ); - QHBox *dayBox = new QHBox( this ); + TQHBox *dayBox = new TQHBox( this ); topLayout->addWidget( dayBox, 1, AlignVCenter ); // Respect start of week setting int weekStart=KGlobal::locale()->weekStartDay(); @@ -189,13 +189,13 @@ RecurWeekly::RecurWeekly( QWidget *parent, const char *name ) : // label=(i+weekStart+6)%7 + 1; // index in CheckBox array(=day): label-1 const KCalendarSystem *calSys = KOGlobals::self()->calendarSystem(); - QString weekDayName = calSys->weekDayName( + TQString weekDayName = calSys->weekDayName( (i + weekStart + 6)%7 + 1, true ); if ( KOPrefs::instance()->mCompactDialogs ) { weekDayName = weekDayName.left( 1 ); } - mDayBoxes[ (i + weekStart + 6)%7 ] = new QCheckBox( weekDayName, dayBox ); - QWhatsThis::add( mDayBoxes[ (i + weekStart + 6)%7 ], + mDayBoxes[ (i + weekStart + 6)%7 ] = new TQCheckBox( weekDayName, dayBox ); + TQWhatsThis::add( mDayBoxes[ (i + weekStart + 6)%7 ], i18n("Day of the week on which this event or to-do " "should recur.") ); } @@ -203,16 +203,16 @@ RecurWeekly::RecurWeekly( QWidget *parent, const char *name ) : topLayout->addStretch( 1 ); } -void RecurWeekly::setDays( const QBitArray &days ) +void RecurWeekly::setDays( const TQBitArray &days ) { for ( int i = 0; i < 7; ++i ) { mDayBoxes[ i ]->setChecked( days.testBit( i ) ); } } -QBitArray RecurWeekly::days() +TQBitArray RecurWeekly::days() { - QBitArray days( 7 ); + TQBitArray days( 7 ); for ( int i = 0; i < 7; ++i ) { days.setBit( i, mDayBoxes[ i ]->isChecked() ); @@ -223,38 +223,38 @@ QBitArray RecurWeekly::days() /////////////////////////// RecurMonthly /////////////////////////////// -RecurMonthly::RecurMonthly( QWidget *parent, const char *name ) : +RecurMonthly::RecurMonthly( TQWidget *parent, const char *name ) : RecurBase( parent, name ) { - QBoxLayout *topLayout = new QVBoxLayout( this ); + TQBoxLayout *topLayout = new TQVBoxLayout( this ); topLayout->setSpacing( KDialog::spacingHint() ); createFrequencySpinBar( this, topLayout, i18n("&Recur every"), i18n("month(s)") ); - QButtonGroup *buttonGroup = new QButtonGroup( this ); - buttonGroup->setFrameStyle( QFrame::NoFrame ); + TQButtonGroup *buttonGroup = new TQButtonGroup( this ); + buttonGroup->setFrameStyle( TQFrame::NoFrame ); topLayout->addWidget( buttonGroup, 1, AlignVCenter ); - QGridLayout *buttonLayout = new QGridLayout( buttonGroup, 3, 2 ); + TQGridLayout *buttonLayout = new TQGridLayout( buttonGroup, 3, 2 ); buttonLayout->setSpacing( KDialog::spacingHint() ); - QString recurOnText; + TQString recurOnText; if ( !KOPrefs::instance()->mCompactDialogs ) { recurOnText = i18n("&Recur on the"); } - mByDayRadio = new QRadioButton( recurOnText, buttonGroup ); - QWhatsThis::add( mByDayRadio, + mByDayRadio = new TQRadioButton( recurOnText, buttonGroup ); + TQWhatsThis::add( mByDayRadio, i18n("Sets a specific day of the month on which " "this event or to-do should recur.") ); buttonLayout->addWidget( mByDayRadio, 0, 0 ); - QString whatsThis = i18n("The day of the month on which this event or to-do " + TQString whatsThis = i18n("The day of the month on which this event or to-do " "should recur."); - mByDayCombo = new QComboBox( buttonGroup ); - QWhatsThis::add( mByDayCombo, whatsThis ); + mByDayCombo = new TQComboBox( buttonGroup ); + TQWhatsThis::add( mByDayCombo, whatsThis ); mByDayCombo->setSizeLimit( 7 ); mByDayCombo->insertItem( i18n("1st") ); mByDayCombo->insertItem( i18n("2nd") ); @@ -322,13 +322,13 @@ RecurMonthly::RecurMonthly( QWidget *parent, const char *name ) : mByDayCombo->insertItem( i18n("31st Last") );*/ buttonLayout->addWidget( mByDayCombo, 0, 1 ); - QLabel *byDayLabel = new QLabel( i18n("day"), buttonGroup ); - QWhatsThis::add( byDayLabel, whatsThis ); + TQLabel *byDayLabel = new TQLabel( i18n("day"), buttonGroup ); + TQWhatsThis::add( byDayLabel, whatsThis ); buttonLayout->addWidget( byDayLabel, 0, 2 ); - mByPosRadio = new QRadioButton( recurOnText, buttonGroup); - QWhatsThis::add( mByPosRadio, + mByPosRadio = new TQRadioButton( recurOnText, buttonGroup); + TQWhatsThis::add( mByPosRadio, i18n("Sets a weekday and specific week in the month " "on which this event or to-do should recur") ); buttonLayout->addWidget( mByPosRadio, 1, 0 ); @@ -396,41 +396,41 @@ int RecurMonthly::weekday() /////////////////////////// RecurYearly /////////////////////////////// -RecurYearly::RecurYearly( QWidget *parent, const char *name ) : +RecurYearly::RecurYearly( TQWidget *parent, const char *name ) : RecurBase( parent, name ) { - QBoxLayout *topLayout = new QVBoxLayout( this ); + TQBoxLayout *topLayout = new TQVBoxLayout( this ); topLayout->setSpacing( KDialog::spacingHint() ); createFrequencySpinBar( this, topLayout, i18n("&Recur every"), i18n("year(s)") ); - QButtonGroup *buttonGroup = new QButtonGroup( this ); - buttonGroup->setFrameStyle( QFrame::NoFrame ); + TQButtonGroup *buttonGroup = new TQButtonGroup( this ); + buttonGroup->setFrameStyle( TQFrame::NoFrame ); topLayout->addWidget( buttonGroup, 1, AlignVCenter ); - QBoxLayout *buttonLayout = new QVBoxLayout( buttonGroup ); + TQBoxLayout *buttonLayout = new TQVBoxLayout( buttonGroup ); /* YearlyMonth (day n of Month Y) */ - QBoxLayout *monthLayout = new QHBoxLayout( buttonLayout ); - QString recurInMonthText( + TQBoxLayout *monthLayout = new TQHBoxLayout( buttonLayout ); + TQString recurInMonthText( i18n("part before XXX of 'Recur on day XXX of month YYY'", "&Recur on day ")); if ( KOPrefs::instance()->mCompactDialogs ) { recurInMonthText = i18n("&Day "); } - mByMonthRadio = new QRadioButton( recurInMonthText, buttonGroup ); - QWhatsThis::add( mByMonthRadio, + mByMonthRadio = new TQRadioButton( recurInMonthText, buttonGroup ); + TQWhatsThis::add( mByMonthRadio, i18n("Sets a specific day in a specific month on which " "this event or to-do should recur.") ); monthLayout->addWidget( mByMonthRadio ); - mByMonthSpin = new QSpinBox( 1, 31, 1, buttonGroup ); - QWhatsThis::add( mByMonthSpin, + mByMonthSpin = new TQSpinBox( 1, 31, 1, buttonGroup ); + TQWhatsThis::add( mByMonthSpin, i18n("The day of the month on which this event or to-do " "should recur.") ); monthLayout->addWidget( mByMonthSpin ); - QLabel *ofLabel = new QLabel( + TQLabel *ofLabel = new TQLabel( i18n("part between XXX and YYY of 'Recur on day XXX of month YYY'", " &of "), buttonGroup ); //What do I do here? I'm not sure if this label should have What's This in it... - Antonio @@ -444,13 +444,13 @@ RecurYearly::RecurYearly( QWidget *parent, const char *name ) : /* YearlyPos (weekday X of week N of month Y) */ - QBoxLayout *posLayout = new QHBoxLayout( buttonLayout ); - QString recurOnPosText( i18n("Part before XXX in 'Recur on NNN. WEEKDAY of MONTH', short version", "&On" ) ); + TQBoxLayout *posLayout = new TQHBoxLayout( buttonLayout ); + TQString recurOnPosText( i18n("Part before XXX in 'Recur on NNN. WEEKDAY of MONTH', short version", "&On" ) ); if ( !KOPrefs::instance()->mCompactDialogs ) { recurOnPosText = i18n("Part before XXX in 'Recur on NNN. WEEKDAY of MONTH'", "&On the" ); } - mByPosRadio = new QRadioButton( recurOnPosText, buttonGroup ); - QWhatsThis::add( mByPosRadio, + mByPosRadio = new TQRadioButton( recurOnPosText, buttonGroup ); + TQWhatsThis::add( mByPosRadio, i18n("Sets a specific day in a specific week of a specific " "month on which this event or to-do should recur.") ); posLayout->addWidget( mByPosRadio ); @@ -461,7 +461,7 @@ RecurYearly::RecurYearly( QWidget *parent, const char *name ) : mByPosWeekdayCombo = createWeekdayCombo( buttonGroup ); posLayout->addWidget( mByPosWeekdayCombo ); - ofLabel = new QLabel( + ofLabel = new TQLabel( i18n("part between WEEKDAY and MONTH in 'Recur on NNN. WEEKDAY of MONTH'", " o&f "), buttonGroup ); posLayout->addWidget( ofLabel ); @@ -474,31 +474,31 @@ RecurYearly::RecurYearly( QWidget *parent, const char *name ) : /* YearlyDay (day N of the year) */ - QBoxLayout *dayLayout = new QHBoxLayout( buttonLayout ); - QString recurOnDayText; + TQBoxLayout *dayLayout = new TQHBoxLayout( buttonLayout ); + TQString recurOnDayText; if ( KOPrefs::instance()->mCompactDialogs ) { recurOnDayText = i18n("Day #"); } else { recurOnDayText = i18n("Recur on &day #"); } - QString whatsThis = i18n("Sets a specific day within the year on which this " + TQString whatsThis = i18n("Sets a specific day within the year on which this " "event or to-do should recur."); - mByDayRadio = new QRadioButton( recurOnDayText, buttonGroup ); - QWhatsThis::add( mByDayRadio, whatsThis ); + mByDayRadio = new TQRadioButton( recurOnDayText, buttonGroup ); + TQWhatsThis::add( mByDayRadio, whatsThis ); dayLayout->addWidget( mByDayRadio ); - mByDaySpin = new QSpinBox( 1, 366, 1, buttonGroup ); - QWhatsThis::add( mByDaySpin, whatsThis ); + mByDaySpin = new TQSpinBox( 1, 366, 1, buttonGroup ); + TQWhatsThis::add( mByDaySpin, whatsThis ); dayLayout->addWidget( mByDaySpin ); - QString ofTheYear( i18n("part after NNN of 'Recur on day #NNN of the year'", " of the &year")); + TQString ofTheYear( i18n("part after NNN of 'Recur on day #NNN of the year'", " of the &year")); if ( KOPrefs::instance()->mCompactDialogs ) { ofTheYear = i18n("part after NNN of 'Recur on day #NNN of the year', short version", " of the year"); } - ofLabel = new QLabel( ofTheYear, buttonGroup ); - QWhatsThis::add( ofLabel, whatsThis ); + ofLabel = new TQLabel( ofTheYear, buttonGroup ); + TQWhatsThis::add( ofLabel, whatsThis ); dayLayout->addWidget( ofLabel ); ofLabel->setBuddy( mByDaySpin ); @@ -573,44 +573,44 @@ int RecurYearly::day() //////////////////////////// ExceptionsWidget ////////////////////////// -ExceptionsWidget::ExceptionsWidget( QWidget *parent, const char *name ) : - QWidget( parent, name ) +ExceptionsWidget::ExceptionsWidget( TQWidget *parent, const char *name ) : + TQWidget( parent, name ) { - QBoxLayout *topLayout = new QVBoxLayout( this ); + TQBoxLayout *topLayout = new TQVBoxLayout( this ); - QGroupBox *groupBox = new QGroupBox( 1, Horizontal, i18n("E&xceptions"), + TQGroupBox *groupBox = new TQGroupBox( 1, Horizontal, i18n("E&xceptions"), this ); topLayout->addWidget( groupBox ); - QWidget *box = new QWidget( groupBox ); + TQWidget *box = new TQWidget( groupBox ); - QGridLayout *boxLayout = new QGridLayout( box ); + TQGridLayout *boxLayout = new TQGridLayout( box ); mExceptionDateEdit = new KDateEdit( box ); - QWhatsThis::add( mExceptionDateEdit, + TQWhatsThis::add( mExceptionDateEdit, i18n("A date that should be considered an exception " "to the recurrence rules for this event or to-do.") ); - mExceptionDateEdit->setDate( QDate::currentDate() ); + mExceptionDateEdit->setDate( TQDate::currentDate() ); boxLayout->addWidget( mExceptionDateEdit, 0, 0 ); - QPushButton *addExceptionButton = new QPushButton( i18n("&Add"), box ); - QWhatsThis::add( addExceptionButton, + TQPushButton *addExceptionButton = new TQPushButton( i18n("&Add"), box ); + TQWhatsThis::add( addExceptionButton, i18n("Add this date as an exception " "to the recurrence rules for this event or to-do.") ); boxLayout->addWidget( addExceptionButton, 1, 0 ); - QPushButton *changeExceptionButton = new QPushButton( i18n("&Change"), box ); - QWhatsThis::add( changeExceptionButton, + TQPushButton *changeExceptionButton = new TQPushButton( i18n("&Change"), box ); + TQWhatsThis::add( changeExceptionButton, i18n("Replace the currently selected date with this date.") ); boxLayout->addWidget( changeExceptionButton, 2, 0 ); - QPushButton *deleteExceptionButton = new QPushButton( i18n("&Delete"), box ); - QWhatsThis::add( deleteExceptionButton, + TQPushButton *deleteExceptionButton = new TQPushButton( i18n("&Delete"), box ); + TQWhatsThis::add( deleteExceptionButton, i18n("Delete the currently selected date from the list of dates " "that should be considered exceptions to the recurrence rules " "for this event or to-do.") ); boxLayout->addWidget( deleteExceptionButton, 3, 0 ); - mExceptionList = new QListBox( box ); - QWhatsThis::add( mExceptionList, + mExceptionList = new TQListBox( box ); + TQWhatsThis::add( mExceptionList, i18n("Displays current dates that are being considered " "exceptions to the recurrence rules for this event " "or to-do.") ); @@ -619,18 +619,18 @@ ExceptionsWidget::ExceptionsWidget( QWidget *parent, const char *name ) : boxLayout->setRowStretch( 4, 1 ); boxLayout->setColStretch( 1, 3 ); - connect( addExceptionButton, SIGNAL( clicked() ), - SLOT( addException() ) ); - connect( changeExceptionButton, SIGNAL( clicked() ), - SLOT( changeException() ) ); - connect( deleteExceptionButton, SIGNAL( clicked() ), - SLOT( deleteException() ) ); + connect( addExceptionButton, TQT_SIGNAL( clicked() ), + TQT_SLOT( addException() ) ); + connect( changeExceptionButton, TQT_SIGNAL( clicked() ), + TQT_SLOT( changeException() ) ); + connect( deleteExceptionButton, TQT_SIGNAL( clicked() ), + TQT_SLOT( deleteException() ) ); } void ExceptionsWidget::addException() { - QDate date = mExceptionDateEdit->date(); - QString dateStr = KGlobal::locale()->formatDate( date ); + TQDate date = mExceptionDateEdit->date(); + TQString dateStr = KGlobal::locale()->formatDate( date ); if( !mExceptionList->findItem( dateStr ) ) { mExceptionDates.append( date ); mExceptionList->insertItem( dateStr ); @@ -642,7 +642,7 @@ void ExceptionsWidget::changeException() int pos = mExceptionList->currentItem(); if ( pos < 0 ) return; - QDate date = mExceptionDateEdit->date(); + TQDate date = mExceptionDateEdit->date(); mExceptionDates[ pos ] = date; mExceptionList->changeItem( KGlobal::locale()->formatDate( date ), pos ); } @@ -674,7 +674,7 @@ DateList ExceptionsWidget::dates() ///////////////////////// ExceptionsDialog /////////////////////////// -ExceptionsDialog::ExceptionsDialog( QWidget *parent, const char *name ) : +ExceptionsDialog::ExceptionsDialog( TQWidget *parent, const char *name ) : KDialogBase( parent, name, true, i18n("Edit Exceptions"), Ok|Cancel ) { mExceptions = new ExceptionsWidget( this ); @@ -693,86 +693,86 @@ DateList ExceptionsDialog::dates() ///////////////////////// RecurrenceRangeWidget /////////////////////////// -RecurrenceRangeWidget::RecurrenceRangeWidget( QWidget *parent, +RecurrenceRangeWidget::RecurrenceRangeWidget( TQWidget *parent, const char *name ) - : QWidget( parent, name ) + : TQWidget( parent, name ) { - QBoxLayout *topLayout = new QVBoxLayout( this ); + TQBoxLayout *topLayout = new TQVBoxLayout( this ); - mRangeGroupBox = new QGroupBox( 1, Horizontal, i18n("Recurrence Range"), + mRangeGroupBox = new TQGroupBox( 1, Horizontal, i18n("Recurrence Range"), this ); - QWhatsThis::add( mRangeGroupBox, + TQWhatsThis::add( mRangeGroupBox, i18n("Sets a range for which these recurrence rules will " "apply to this event or to-do.") ); topLayout->addWidget( mRangeGroupBox ); - QWidget *rangeBox = new QWidget( mRangeGroupBox ); - QVBoxLayout *rangeLayout = new QVBoxLayout( rangeBox ); + TQWidget *rangeBox = new TQWidget( mRangeGroupBox ); + TQVBoxLayout *rangeLayout = new TQVBoxLayout( rangeBox ); rangeLayout->setSpacing( KDialog::spacingHint() ); - mStartDateLabel = new QLabel( i18n("Begin on:"), rangeBox ); - QWhatsThis::add( mStartDateLabel, + mStartDateLabel = new TQLabel( i18n("Begin on:"), rangeBox ); + TQWhatsThis::add( mStartDateLabel, i18n("The date on which the recurrences for this event or to-do " "should begin.") ); rangeLayout->addWidget( mStartDateLabel ); - QButtonGroup *rangeButtonGroup = new QButtonGroup( this ); + TQButtonGroup *rangeButtonGroup = new TQButtonGroup( this ); rangeButtonGroup->hide(); - mNoEndDateButton = new QRadioButton( i18n("&No ending date"), rangeBox ); - QWhatsThis::add( mNoEndDateButton, + mNoEndDateButton = new TQRadioButton( i18n("&No ending date"), rangeBox ); + TQWhatsThis::add( mNoEndDateButton, i18n("Sets the event or to-do to recur forever.") ); rangeButtonGroup->insert( mNoEndDateButton ); rangeLayout->addWidget( mNoEndDateButton ); - QBoxLayout *durationLayout = new QHBoxLayout( rangeLayout ); + TQBoxLayout *durationLayout = new TQHBoxLayout( rangeLayout ); durationLayout->setSpacing( KDialog::spacingHint() ); - mEndDurationButton = new QRadioButton( i18n("End &after"), rangeBox ); - QWhatsThis::add( mEndDurationButton, + mEndDurationButton = new TQRadioButton( i18n("End &after"), rangeBox ); + TQWhatsThis::add( mEndDurationButton, i18n("Sets the event or to-do to stop recurring after a " "certain number of occurrences.") ); rangeButtonGroup->insert( mEndDurationButton ); durationLayout->addWidget( mEndDurationButton ); - QString whatsThis = i18n("Number of times the event or to-do should recur " + TQString whatsThis = i18n("Number of times the event or to-do should recur " "before stopping."); - mEndDurationEdit = new QSpinBox( 1, 9999, 1, rangeBox ); - QWhatsThis::add( mEndDurationEdit, whatsThis ); + mEndDurationEdit = new TQSpinBox( 1, 9999, 1, rangeBox ); + TQWhatsThis::add( mEndDurationEdit, whatsThis ); durationLayout->addWidget( mEndDurationEdit ); - QLabel *endDurationLabel = new QLabel( i18n("&occurrence(s)"), rangeBox ); - QWhatsThis::add( endDurationLabel, whatsThis ); + TQLabel *endDurationLabel = new TQLabel( i18n("&occurrence(s)"), rangeBox ); + TQWhatsThis::add( endDurationLabel, whatsThis ); durationLayout ->addWidget( endDurationLabel ); endDurationLabel->setBuddy( mEndDurationEdit ); - QBoxLayout *endDateLayout = new QHBoxLayout( rangeLayout ); + TQBoxLayout *endDateLayout = new TQHBoxLayout( rangeLayout ); endDateLayout->setSpacing( KDialog::spacingHint() ); - mEndDateButton = new QRadioButton( i18n("End &on:"), rangeBox ); - QWhatsThis::add( mEndDateButton, + mEndDateButton = new TQRadioButton( i18n("End &on:"), rangeBox ); + TQWhatsThis::add( mEndDateButton, i18n("Sets the event or to-do to stop recurring on " "a certain date.") ); rangeButtonGroup->insert( mEndDateButton ); endDateLayout->addWidget( mEndDateButton ); mEndDateEdit = new KDateEdit( rangeBox ); - QWhatsThis::add( mEndDateEdit, + TQWhatsThis::add( mEndDateEdit, i18n("Date after which the event or to-do should stop " "recurring") ); endDateLayout->addWidget( mEndDateEdit ); endDateLayout->addStretch( 1 ); - connect( mNoEndDateButton, SIGNAL( toggled( bool ) ), - SLOT( showCurrentRange() ) ); - connect( mEndDurationButton, SIGNAL( toggled( bool ) ), - SLOT( showCurrentRange() ) ); - connect( mEndDateButton, SIGNAL( toggled( bool ) ), - SLOT( showCurrentRange() ) ); + connect( mNoEndDateButton, TQT_SIGNAL( toggled( bool ) ), + TQT_SLOT( showCurrentRange() ) ); + connect( mEndDurationButton, TQT_SIGNAL( toggled( bool ) ), + TQT_SLOT( showCurrentRange() ) ); + connect( mEndDateButton, TQT_SIGNAL( toggled( bool ) ), + TQT_SLOT( showCurrentRange() ) ); } -void RecurrenceRangeWidget::setDefaults( const QDateTime &from ) +void RecurrenceRangeWidget::setDefaults( const TQDateTime &from ) { mNoEndDateButton->setChecked( true ); @@ -803,12 +803,12 @@ int RecurrenceRangeWidget::duration() } } -void RecurrenceRangeWidget::setEndDate( const QDate &date ) +void RecurrenceRangeWidget::setEndDate( const TQDate &date ) { mEndDateEdit->setDate( date ); } -QDate RecurrenceRangeWidget::endDate() +TQDate RecurrenceRangeWidget::endDate() { return mEndDateEdit->date(); } @@ -819,8 +819,8 @@ void RecurrenceRangeWidget::showCurrentRange() mEndDateEdit->setEnabled( mEndDateButton->isChecked() ); } -void RecurrenceRangeWidget::setDateTimes( const QDateTime &start, - const QDateTime & ) +void RecurrenceRangeWidget::setDateTimes( const TQDateTime &start, + const TQDateTime & ) { mStartDateLabel->setText( i18n("Begins on: %1") .arg( KGlobal::locale()->formatDate( start.date() ) ) ); @@ -828,7 +828,7 @@ void RecurrenceRangeWidget::setDateTimes( const QDateTime &start, ///////////////////////// RecurrenceRangeDialog /////////////////////////// -RecurrenceRangeDialog::RecurrenceRangeDialog( QWidget *parent, +RecurrenceRangeDialog::RecurrenceRangeDialog( TQWidget *parent, const char *name ) : KDialogBase( parent, name, true, i18n("Edit Recurrence Range"), Ok|Cancel ) { @@ -836,7 +836,7 @@ RecurrenceRangeDialog::RecurrenceRangeDialog( QWidget *parent, setMainWidget( mRecurrenceRangeWidget ); } -void RecurrenceRangeDialog::setDefaults( const QDateTime &from ) +void RecurrenceRangeDialog::setDefaults( const TQDateTime &from ) { mRecurrenceRangeWidget->setDefaults( from ); } @@ -851,32 +851,32 @@ int RecurrenceRangeDialog::duration() return mRecurrenceRangeWidget->duration(); } -void RecurrenceRangeDialog::setEndDate( const QDate &date ) +void RecurrenceRangeDialog::setEndDate( const TQDate &date ) { mRecurrenceRangeWidget->setEndDate( date ); } -QDate RecurrenceRangeDialog::endDate() +TQDate RecurrenceRangeDialog::endDate() { return mRecurrenceRangeWidget->endDate(); } -void RecurrenceRangeDialog::setDateTimes( const QDateTime &start, - const QDateTime &end ) +void RecurrenceRangeDialog::setDateTimes( const TQDateTime &start, + const TQDateTime &end ) { mRecurrenceRangeWidget->setDateTimes( start, end ); } //////////////////////////// RecurrenceChooser //////////////////////// -RecurrenceChooser::RecurrenceChooser( QWidget *parent, const char *name ) : - QWidget( parent, name ) +RecurrenceChooser::RecurrenceChooser( TQWidget *parent, const char *name ) : + TQWidget( parent, name ) { - QBoxLayout *topLayout = new QVBoxLayout( this ); + TQBoxLayout *topLayout = new TQVBoxLayout( this ); if ( KOPrefs::instance()->mCompactDialogs ) { - mTypeCombo = new QComboBox( this ); - QWhatsThis::add( mTypeCombo, + mTypeCombo = new TQComboBox( this ); + TQWhatsThis::add( mTypeCombo, i18n("Sets the type of recurrence this event or to-do " "should have.") ); mTypeCombo->insertItem( i18n("Daily") ); @@ -886,39 +886,39 @@ RecurrenceChooser::RecurrenceChooser( QWidget *parent, const char *name ) : topLayout->addWidget( mTypeCombo ); - connect( mTypeCombo, SIGNAL( activated( int ) ), SLOT( emitChoice() ) ); + connect( mTypeCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( emitChoice() ) ); } else { mTypeCombo = 0; - QButtonGroup *ruleButtonGroup = new QButtonGroup( 1, Horizontal, this ); - ruleButtonGroup->setFrameStyle( QFrame::NoFrame ); + TQButtonGroup *ruleButtonGroup = new TQButtonGroup( 1, Horizontal, this ); + ruleButtonGroup->setFrameStyle( TQFrame::NoFrame ); topLayout->addWidget( ruleButtonGroup ); - mDailyButton = new QRadioButton( i18n("&Daily"), ruleButtonGroup ); - QWhatsThis::add( mDailyButton, + mDailyButton = new TQRadioButton( i18n("&Daily"), ruleButtonGroup ); + TQWhatsThis::add( mDailyButton, i18n("Sets the event or to-do to recur daily according " "to the specified rules.") ); - mWeeklyButton = new QRadioButton( i18n("&Weekly"), ruleButtonGroup ); - QWhatsThis::add( mWeeklyButton, + mWeeklyButton = new TQRadioButton( i18n("&Weekly"), ruleButtonGroup ); + TQWhatsThis::add( mWeeklyButton, i18n("Sets the event or to-do to recur weekly according " "to the specified rules.") ); - mMonthlyButton = new QRadioButton( i18n("&Monthly"), ruleButtonGroup ); - QWhatsThis::add( mMonthlyButton, + mMonthlyButton = new TQRadioButton( i18n("&Monthly"), ruleButtonGroup ); + TQWhatsThis::add( mMonthlyButton, i18n("Sets the event or to-do to recur monthly according " "to the specified rules.") ); - mYearlyButton = new QRadioButton( i18n("&Yearly"), ruleButtonGroup ); - QWhatsThis::add( mYearlyButton, + mYearlyButton = new TQRadioButton( i18n("&Yearly"), ruleButtonGroup ); + TQWhatsThis::add( mYearlyButton, i18n("Sets the event or to-do to recur yearly according " "to the specified rules.") ); - connect( mDailyButton, SIGNAL( toggled( bool ) ), - SLOT( emitChoice() ) ); - connect( mWeeklyButton, SIGNAL( toggled( bool ) ), - SLOT( emitChoice() ) ); - connect( mMonthlyButton, SIGNAL( toggled( bool ) ), - SLOT( emitChoice() ) ); - connect( mYearlyButton, SIGNAL( toggled( bool ) ), - SLOT( emitChoice() ) ); + connect( mDailyButton, TQT_SIGNAL( toggled( bool ) ), + TQT_SLOT( emitChoice() ) ); + connect( mWeeklyButton, TQT_SIGNAL( toggled( bool ) ), + TQT_SLOT( emitChoice() ) ); + connect( mMonthlyButton, TQT_SIGNAL( toggled( bool ) ), + TQT_SLOT( emitChoice() ) ); + connect( mYearlyButton, TQT_SIGNAL( toggled( bool ) ), + TQT_SLOT( emitChoice() ) ); } } @@ -964,24 +964,24 @@ void RecurrenceChooser::emitChoice() /////////////////////////////// Main Widget ///////////////////////////// -KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) : - QWidget( parent, name ) +KOEditorRecurrence::KOEditorRecurrence( TQWidget* parent, const char *name ) : + TQWidget( parent, name ) { - QGridLayout *topLayout = new QGridLayout( this ); + TQGridLayout *topLayout = new TQGridLayout( this ); topLayout->setSpacing( KDialog::spacingHint() ); - mEnabledCheck = new QCheckBox( i18n("&Enable recurrence"), this ); - QWhatsThis::add( mEnabledCheck, + mEnabledCheck = new TQCheckBox( i18n("&Enable recurrence"), this ); + TQWhatsThis::add( mEnabledCheck, i18n("Enables recurrence for this event or to-do according " "to the specified rules.") ); - connect( mEnabledCheck, SIGNAL( toggled( bool ) ), - SLOT( setRecurrenceEnabled( bool ) ) ); + connect( mEnabledCheck, TQT_SIGNAL( toggled( bool ) ), + TQT_SLOT( setRecurrenceEnabled( bool ) ) ); topLayout->addMultiCellWidget( mEnabledCheck, 0, 0, 0, 1 ); - mTimeGroupBox = new QGroupBox( 1, Horizontal, i18n("Appointment Time "), + mTimeGroupBox = new TQGroupBox( 1, Horizontal, i18n("Appointment Time "), this ); - QWhatsThis::add( mTimeGroupBox, + TQWhatsThis::add( mTimeGroupBox, i18n("Displays appointment time information.") ); topLayout->addMultiCellWidget( mTimeGroupBox, 1, 1 , 0 , 1 ); @@ -989,20 +989,20 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) : mTimeGroupBox->hide(); } -// QFrame *timeFrame = new QFrame( mTimeGroupBox ); -// QBoxLayout *layoutTimeFrame = new QHBoxLayout( timeFrame ); +// TQFrame *timeFrame = new TQFrame( mTimeGroupBox ); +// TQBoxLayout *layoutTimeFrame = new TQHBoxLayout( timeFrame ); // layoutTimeFrame->setSpacing( KDialog::spacingHint() ); - mDateTimeLabel = new QLabel( mTimeGroupBox ); -// mDateTimeLabel = new QLabel( timeFrame ); + mDateTimeLabel = new TQLabel( mTimeGroupBox ); +// mDateTimeLabel = new TQLabel( timeFrame ); // layoutTimeFrame->addWidget( mDateTimeLabel ); Qt::Orientation orientation; if ( KOPrefs::instance()->mCompactDialogs ) orientation = Horizontal; else orientation = Vertical; - mRuleBox = new QGroupBox( 1, orientation, i18n("Recurrence Rule"), this ); - QWhatsThis::add( mRuleBox, + mRuleBox = new TQGroupBox( 1, orientation, i18n("Recurrence Rule"), this ); + TQWhatsThis::add( mRuleBox, i18n("Options concerning the type of recurrence this event " "or to-do should have.") ); if ( KOPrefs::instance()->mCompactDialogs ) { @@ -1012,15 +1012,15 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) : } mRecurrenceChooser = new RecurrenceChooser( mRuleBox ); - connect( mRecurrenceChooser, SIGNAL( chosen( int ) ), - SLOT( showCurrentRule( int ) ) ); + connect( mRecurrenceChooser, TQT_SIGNAL( chosen( int ) ), + TQT_SLOT( showCurrentRule( int ) ) ); if ( !KOPrefs::instance()->mCompactDialogs ) { - QFrame *ruleSepFrame = new QFrame( mRuleBox ); - ruleSepFrame->setFrameStyle( QFrame::VLine | QFrame::Sunken ); + TQFrame *ruleSepFrame = new TQFrame( mRuleBox ); + ruleSepFrame->setFrameStyle( TQFrame::VLine | TQFrame::Sunken ); } - mRuleStack = new QWidgetStack( mRuleBox ); + mRuleStack = new TQWidgetStack( mRuleBox ); mDaily = new RecurDaily( mRuleStack ); mRuleStack->addWidget( mDaily, 0 ); @@ -1040,26 +1040,26 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) : mRecurrenceRangeWidget = 0; mRecurrenceRangeDialog = new RecurrenceRangeDialog( this ); mRecurrenceRange = mRecurrenceRangeDialog; - mRecurrenceRangeButton = new QPushButton( i18n("Recurrence Range..."), + mRecurrenceRangeButton = new TQPushButton( i18n("Recurrence Range..."), this ); - QWhatsThis::add( mRecurrenceRangeButton, + TQWhatsThis::add( mRecurrenceRangeButton, i18n("Options concerning the time range during which " "this event or to-do should recur.") ); topLayout->addWidget( mRecurrenceRangeButton, 3, 0 ); - connect( mRecurrenceRangeButton, SIGNAL( clicked() ), - SLOT( showRecurrenceRangeDialog() ) ); + connect( mRecurrenceRangeButton, TQT_SIGNAL( clicked() ), + TQT_SLOT( showRecurrenceRangeDialog() ) ); mExceptionsWidget = 0; mExceptionsDialog = new ExceptionsDialog( this ); mExceptions = mExceptionsDialog; - mExceptionsButton = new QPushButton( i18n("Exceptions..."), this ); + mExceptionsButton = new TQPushButton( i18n("Exceptions..."), this ); topLayout->addWidget( mExceptionsButton, 4, 0 ); - connect( mExceptionsButton, SIGNAL( clicked() ), - SLOT( showExceptionsDialog() ) ); + connect( mExceptionsButton, TQT_SIGNAL( clicked() ), + TQT_SLOT( showExceptionsDialog() ) ); } else { mRecurrenceRangeWidget = new RecurrenceRangeWidget( this ); - QWhatsThis::add( mRecurrenceRangeWidget, + TQWhatsThis::add( mRecurrenceRangeWidget, i18n("Options concerning the time range during which " "this event or to-do should recur.") ); mRecurrenceRangeDialog = 0; @@ -1110,7 +1110,7 @@ void KOEditorRecurrence::showCurrentRule( int current ) } } -void KOEditorRecurrence::setDateTimes( const QDateTime &start, const QDateTime &end ) +void KOEditorRecurrence::setDateTimes( const TQDateTime &start, const TQDateTime &end ) { // kdDebug(5850) << "KOEditorRecurrence::setDateTimes" << endl; @@ -1126,7 +1126,7 @@ void KOEditorRecurrence::setDateTimes( const QDateTime &start, const QDateTime & int type = mRecurrenceChooser->type(); if ( !enabled || type != RecurrenceChooser::Weekly ) { - QBitArray days( 7 ); + TQBitArray days( 7 ); days.fill( 0 ); days.setBit( (start.date().dayOfWeek()+6) % 7 ); mWeekly->setDays( days ); @@ -1143,7 +1143,7 @@ void KOEditorRecurrence::setDateTimes( const QDateTime &start, const QDateTime & } } -void KOEditorRecurrence::setDefaults( const QDateTime &from, const QDateTime &to, bool ) +void KOEditorRecurrence::setDefaults( const TQDateTime &from, const TQDateTime &to, bool ) { setDateTimes( from, to ); @@ -1159,7 +1159,7 @@ void KOEditorRecurrence::setDefaults( const QDateTime &from, const QDateTime &to mDaily->setFrequency( 1 ); mWeekly->setFrequency( 1 ); - QBitArray days( 7 ); + TQBitArray days( 7 ); days.fill( 0 ); days.setBit( (from.date().dayOfWeek()+6) % 7 ); mWeekly->setDays( days ); @@ -1179,7 +1179,7 @@ void KOEditorRecurrence::readIncidence(Incidence *incidence) { if (!incidence) return; - QBitArray rDays( 7 ); + TQBitArray rDays( 7 ); int day = 0; int count = 0; int month = 0; @@ -1224,7 +1224,7 @@ void KOEditorRecurrence::readIncidence(Incidence *incidence) // more extended, this can be changed. recurrenceType = RecurrenceChooser::Monthly; - QValueList<RecurrenceRule::WDayPos> rmp = r->monthPositions(); + TQValueList<RecurrenceRule::WDayPos> rmp = r->monthPositions(); if ( !rmp.isEmpty() ) { mMonthly->setByPos( rmp.first().pos(), rmp.first().day() ); } @@ -1235,7 +1235,7 @@ void KOEditorRecurrence::readIncidence(Incidence *incidence) case Recurrence::rMonthlyDay: { recurrenceType = RecurrenceChooser::Monthly; - QValueList<int> rmd = r->monthDays(); + TQValueList<int> rmd = r->monthDays(); // check if we have any setting for which day (vcs import is broken and // does not set any day, thus we need to check) if ( rmd.isEmpty() ) { @@ -1250,7 +1250,7 @@ void KOEditorRecurrence::readIncidence(Incidence *incidence) break; } case Recurrence::rYearlyMonth: { recurrenceType = RecurrenceChooser::Yearly; - QValueList<int> rmd = r->yearDates(); + TQValueList<int> rmd = r->yearDates(); if ( rmd.isEmpty() ) { day = incidence->dtStart().date().day(); } else { @@ -1266,14 +1266,14 @@ void KOEditorRecurrence::readIncidence(Incidence *incidence) case Recurrence::rYearlyPos: { recurrenceType = RecurrenceChooser::Yearly; - QValueList<int> months = r->yearMonths(); + TQValueList<int> months = r->yearMonths(); if ( months.isEmpty() ) { month = incidence->dtStart().date().month(); } else { month = months.first(); } - QValueList<RecurrenceRule::WDayPos> pos = r->yearPositions(); + TQValueList<RecurrenceRule::WDayPos> pos = r->yearPositions(); if ( pos.isEmpty() ) { // Use dtStart if nothing is given (shouldn't happen!) @@ -1288,7 +1288,7 @@ void KOEditorRecurrence::readIncidence(Incidence *incidence) break; } case Recurrence::rYearlyDay: { recurrenceType = RecurrenceChooser::Yearly; - QValueList<int> days = r->yearDays(); + TQValueList<int> days = r->yearDays(); if ( days.isEmpty() ) { day = incidence->dtStart().date().dayOfYear(); } else { @@ -1330,7 +1330,7 @@ void KOEditorRecurrence::writeIncidence( Incidence *incidence ) r->unsetRecurs(); int duration = mRecurrenceRange->duration(); - QDate endDate; + TQDate endDate; if ( duration == 0 ) endDate = mRecurrenceRange->endDate(); int recurrenceType = mRecurrenceChooser->type(); @@ -1344,7 +1344,7 @@ void KOEditorRecurrence::writeIncidence( Incidence *incidence ) if ( mMonthly->byPos() ) { int pos = mMonthly->count(); - QBitArray days( 7 ); + TQBitArray days( 7 ); days.fill( false ); days.setBit( mMonthly->weekday() - 1 ); r->addMonthlyPos( pos, days ); @@ -1362,7 +1362,7 @@ void KOEditorRecurrence::writeIncidence( Incidence *incidence ) break; case RecurYearly::byPos: { r->addYearlyMonth( mYearly->posMonth() ); - QBitArray days( 7 ); + TQBitArray days( 7 ); days.fill( false ); days.setBit( mYearly->posWeekday() - 1 ); r->addYearlyPos( mYearly->posCount(), days ); @@ -1380,7 +1380,7 @@ void KOEditorRecurrence::writeIncidence( Incidence *incidence ) incidence->recurrence()->setExDates( mExceptions->dates() ); } -void KOEditorRecurrence::setDateTimeStr( const QString &str ) +void KOEditorRecurrence::setDateTimeStr( const TQString &str ) { mDateTimeLabel->setText( str ); } @@ -1401,7 +1401,7 @@ bool KOEditorRecurrence::validateInput() // Check if a weekly recurrence has at least one day selected // TODO: Get rid of this, it's not really needed (by default the day should be taken from dtStart) if( mEnabledCheck->isChecked() && recurrenceType == RecurrenceChooser::Weekly ) { - const QBitArray &days = mWeekly->days(); + const TQBitArray &days = mWeekly->days(); bool valid = false; for ( int i=0; i<7; ++i ) valid = valid || days.testBit( i ); if ( !valid ) { @@ -1418,16 +1418,16 @@ void KOEditorRecurrence::showExceptionsDialog() { DateList dates = mExceptions->dates(); int result = mExceptionsDialog->exec(); - if ( result == QDialog::Rejected ) mExceptions->setDates( dates ); + if ( result == TQDialog::Rejected ) mExceptions->setDates( dates ); } void KOEditorRecurrence::showRecurrenceRangeDialog() { int duration = mRecurrenceRange->duration(); - QDate endDate = mRecurrenceRange->endDate(); + TQDate endDate = mRecurrenceRange->endDate(); int result = mRecurrenceRangeDialog->exec(); - if ( result == QDialog::Rejected ) { + if ( result == TQDialog::Rejected ) { mRecurrenceRange->setDuration( duration ); mRecurrenceRange->setEndDate( endDate ); } @@ -1439,7 +1439,7 @@ bool KOEditorRecurrence::doesRecur() } -KOEditorRecurrenceDialog::KOEditorRecurrenceDialog(QWidget * parent) : +KOEditorRecurrenceDialog::KOEditorRecurrenceDialog(TQWidget * parent) : KDialogBase( parent, 0, false, i18n("Recurrence"), Ok ) { mRecurrence = new KOEditorRecurrence( this ); diff --git a/korganizer/koeditorrecurrence.h b/korganizer/koeditorrecurrence.h index 2a0532a6e..5b900330d 100644 --- a/korganizer/koeditorrecurrence.h +++ b/korganizer/koeditorrecurrence.h @@ -24,9 +24,9 @@ #ifndef _KOEDITORRECURRENCE_H #define _KOEDITORRECURRENCE_H -#include <qdatetime.h> -#include <qwidget.h> -#include <qbitarray.h> +#include <tqdatetime.h> +#include <tqwidget.h> +#include <tqbitarray.h> #include <kdialogbase.h> @@ -47,49 +47,49 @@ using namespace KCal; class RecurBase : public QWidget { public: - RecurBase( QWidget *parent = 0, const char *name = 0 ); + RecurBase( TQWidget *parent = 0, const char *name = 0 ); void setFrequency( int ); int frequency(); // FIXME: If we want to adjust the recurrence when the start/due date change, // we need to reimplement this method in the derived classes! - void setDateTimes( const QDateTime &/*start*/, const QDateTime &/*end*/ ) {} + void setDateTimes( const TQDateTime &/*start*/, const TQDateTime &/*end*/ ) {} - QWidget *frequencyEdit(); + TQWidget *frequencyEdit(); protected: - static QComboBox *createWeekCountCombo( QWidget *parent=0, const char *name=0 ); - static QComboBox *createWeekdayCombo( QWidget *parent=0, const char *name=0 ); - static QComboBox *createMonthNameCombo( QWidget *parent=0, const char *name=0 ); - QBoxLayout *createFrequencySpinBar( QWidget *parent, QLayout *layout, - QString everyText, QString unitText ); + static TQComboBox *createWeekCountCombo( TQWidget *parent=0, const char *name=0 ); + static TQComboBox *createWeekdayCombo( TQWidget *parent=0, const char *name=0 ); + static TQComboBox *createMonthNameCombo( TQWidget *parent=0, const char *name=0 ); + TQBoxLayout *createFrequencySpinBar( TQWidget *parent, TQLayout *layout, + TQString everyText, TQString unitText ); private: - QSpinBox *mFrequencyEdit; + TQSpinBox *mFrequencyEdit; }; class RecurDaily : public RecurBase { public: - RecurDaily( QWidget *parent = 0, const char *name = 0 ); + RecurDaily( TQWidget *parent = 0, const char *name = 0 ); }; class RecurWeekly : public RecurBase { public: - RecurWeekly( QWidget *parent = 0, const char *name = 0 ); + RecurWeekly( TQWidget *parent = 0, const char *name = 0 ); - void setDays( const QBitArray & ); - QBitArray days(); + void setDays( const TQBitArray & ); + TQBitArray days(); private: - QCheckBox *mDayBoxes[7]; + TQCheckBox *mDayBoxes[7]; }; class RecurMonthly : public RecurBase { public: - RecurMonthly( QWidget *parent = 0, const char *name = 0 ); + RecurMonthly( TQWidget *parent = 0, const char *name = 0 ); void setByDay( int day ); void setByPos( int count, int weekday ); @@ -103,12 +103,12 @@ class RecurMonthly : public RecurBase int weekday(); private: - QRadioButton *mByDayRadio; - QComboBox *mByDayCombo; + TQRadioButton *mByDayRadio; + TQComboBox *mByDayCombo; - QRadioButton *mByPosRadio; - QComboBox *mByPosCountCombo; - QComboBox *mByPosWeekdayCombo; + TQRadioButton *mByPosRadio; + TQComboBox *mByPosCountCombo; + TQComboBox *mByPosWeekdayCombo; }; class RecurYearly : public RecurBase @@ -116,7 +116,7 @@ class RecurYearly : public RecurBase public: enum YearlyType { byDay, byPos, byMonth }; - RecurYearly( QWidget *parent = 0, const char *name = 0 ); + RecurYearly( TQWidget *parent = 0, const char *name = 0 ); void setByDay( int day ); void setByPos( int count, int weekday, int month ); @@ -132,25 +132,25 @@ class RecurYearly : public RecurBase int month(); private: - QRadioButton *mByMonthRadio; - QRadioButton *mByPosRadio; - QRadioButton *mByDayRadio; + TQRadioButton *mByMonthRadio; + TQRadioButton *mByPosRadio; + TQRadioButton *mByDayRadio; - QSpinBox *mByMonthSpin; - QComboBox *mByMonthCombo; + TQSpinBox *mByMonthSpin; + TQComboBox *mByMonthCombo; - QComboBox *mByPosDayCombo; - QComboBox *mByPosWeekdayCombo; - QComboBox *mByPosMonthCombo; + TQComboBox *mByPosDayCombo; + TQComboBox *mByPosWeekdayCombo; + TQComboBox *mByPosMonthCombo; - QSpinBox *mByDaySpin; + TQSpinBox *mByDaySpin; }; class RecurrenceChooser : public QWidget { Q_OBJECT public: - RecurrenceChooser( QWidget *parent = 0, const char *name = 0 ); + RecurrenceChooser( TQWidget *parent = 0, const char *name = 0 ); enum { Daily, Weekly, Monthly, Yearly }; @@ -164,12 +164,12 @@ class RecurrenceChooser : public QWidget void emitChoice(); private: - QComboBox *mTypeCombo; + TQComboBox *mTypeCombo; - QRadioButton *mDailyButton; - QRadioButton *mWeeklyButton; - QRadioButton *mMonthlyButton; - QRadioButton *mYearlyButton; + TQRadioButton *mDailyButton; + TQRadioButton *mWeeklyButton; + TQRadioButton *mMonthlyButton; + TQRadioButton *mYearlyButton; }; class ExceptionsBase @@ -179,11 +179,11 @@ class ExceptionsBase virtual DateList dates() = 0; }; -class ExceptionsWidget : public QWidget, public ExceptionsBase +class ExceptionsWidget : public TQWidget, public ExceptionsBase { Q_OBJECT public: - ExceptionsWidget( QWidget *parent = 0, const char *name = 0 ); + ExceptionsWidget( TQWidget *parent = 0, const char *name = 0 ); void setDates( const DateList & ); DateList dates(); @@ -195,14 +195,14 @@ class ExceptionsWidget : public QWidget, public ExceptionsBase private: KDateEdit *mExceptionDateEdit; - QListBox *mExceptionList; + TQListBox *mExceptionList; DateList mExceptionDates; }; class ExceptionsDialog : public KDialogBase, public ExceptionsBase { public: - ExceptionsDialog( QWidget *parent, const char *name = 0 ); + ExceptionsDialog( TQWidget *parent, const char *name = 0 ); void setDates( const DateList & ); DateList dates(); @@ -214,63 +214,63 @@ class ExceptionsDialog : public KDialogBase, public ExceptionsBase class RecurrenceRangeBase { public: - virtual void setDefaults( const QDateTime &from ) = 0; + virtual void setDefaults( const TQDateTime &from ) = 0; virtual void setDuration( int ) = 0; virtual int duration() = 0; - virtual void setEndDate( const QDate & ) = 0; - virtual QDate endDate() = 0; + virtual void setEndDate( const TQDate & ) = 0; + virtual TQDate endDate() = 0; - virtual void setDateTimes( const QDateTime &start, - const QDateTime &end = QDateTime() ) = 0; + virtual void setDateTimes( const TQDateTime &start, + const TQDateTime &end = TQDateTime() ) = 0; }; -class RecurrenceRangeWidget : public QWidget, public RecurrenceRangeBase +class RecurrenceRangeWidget : public TQWidget, public RecurrenceRangeBase { Q_OBJECT public: - RecurrenceRangeWidget( QWidget *parent = 0, const char *name = 0 ); + RecurrenceRangeWidget( TQWidget *parent = 0, const char *name = 0 ); - void setDefaults( const QDateTime &from ); + void setDefaults( const TQDateTime &from ); void setDuration( int ); int duration(); - void setEndDate( const QDate & ); - QDate endDate(); + void setEndDate( const TQDate & ); + TQDate endDate(); - void setDateTimes( const QDateTime &start, - const QDateTime &end = QDateTime() ); + void setDateTimes( const TQDateTime &start, + const TQDateTime &end = TQDateTime() ); protected slots: void showCurrentRange(); private: - QGroupBox *mRangeGroupBox; - QLabel *mStartDateLabel; - QRadioButton *mNoEndDateButton; - QRadioButton *mEndDurationButton; - QSpinBox *mEndDurationEdit; - QRadioButton *mEndDateButton; + TQGroupBox *mRangeGroupBox; + TQLabel *mStartDateLabel; + TQRadioButton *mNoEndDateButton; + TQRadioButton *mEndDurationButton; + TQSpinBox *mEndDurationEdit; + TQRadioButton *mEndDateButton; KDateEdit *mEndDateEdit; }; class RecurrenceRangeDialog : public KDialogBase, public RecurrenceRangeBase { public: - RecurrenceRangeDialog( QWidget *parent = 0, const char *name = 0 ); + RecurrenceRangeDialog( TQWidget *parent = 0, const char *name = 0 ); - void setDefaults( const QDateTime &from ); + void setDefaults( const TQDateTime &from ); void setDuration( int ); int duration(); - void setEndDate( const QDate & ); - QDate endDate(); + void setEndDate( const TQDate & ); + TQDate endDate(); - void setDateTimes( const QDateTime &start, - const QDateTime &end = QDateTime() ); + void setDateTimes( const TQDateTime &start, + const TQDateTime &end = TQDateTime() ); private: RecurrenceRangeWidget *mRecurrenceRangeWidget; @@ -280,13 +280,13 @@ class KOEditorRecurrence : public QWidget { Q_OBJECT public: - KOEditorRecurrence ( QWidget *parent = 0, const char *name = 0 ); + KOEditorRecurrence ( TQWidget *parent = 0, const char *name = 0 ); virtual ~KOEditorRecurrence(); enum { Daily, Weekly, Monthly, Yearly }; /** Set widgets to default values */ - void setDefaults( const QDateTime &from, const QDateTime &to, bool allday ); + void setDefaults( const TQDateTime &from, const TQDateTime &to, bool allday ); /** Read event object and setup widgets accordingly */ void readIncidence( Incidence * ); /** Write event settings to event object */ @@ -299,11 +299,11 @@ class KOEditorRecurrence : public QWidget public slots: void setRecurrenceEnabled( bool ); - void setDateTimes( const QDateTime &start, const QDateTime &end ); - void setDateTimeStr( const QString & ); + void setDateTimes( const TQDateTime &start, const TQDateTime &end ); + void setDateTimeStr( const TQString & ); signals: - void dateTimesChanged( const QDateTime &start, const QDateTime &end ); + void dateTimesChanged( const TQDateTime &start, const TQDateTime &end ); protected slots: void showCurrentRule( int ); @@ -311,13 +311,13 @@ class KOEditorRecurrence : public QWidget void showRecurrenceRangeDialog(); private: - QCheckBox *mEnabledCheck; + TQCheckBox *mEnabledCheck; - QGroupBox *mTimeGroupBox; - QLabel *mDateTimeLabel; + TQGroupBox *mTimeGroupBox; + TQLabel *mDateTimeLabel; - QGroupBox *mRuleBox; - QWidgetStack *mRuleStack; + TQGroupBox *mRuleBox; + TQWidgetStack *mRuleStack; RecurrenceChooser *mRecurrenceChooser; RecurDaily *mDaily; @@ -328,21 +328,21 @@ class KOEditorRecurrence : public QWidget RecurrenceRangeBase *mRecurrenceRange; RecurrenceRangeWidget *mRecurrenceRangeWidget; RecurrenceRangeDialog *mRecurrenceRangeDialog; - QPushButton *mRecurrenceRangeButton; + TQPushButton *mRecurrenceRangeButton; ExceptionsBase *mExceptions; ExceptionsDialog *mExceptionsDialog; ExceptionsWidget *mExceptionsWidget; - QPushButton *mExceptionsButton; + TQPushButton *mExceptionsButton; - QDateTime mEventStartDt; + TQDateTime mEventStartDt; }; class KOEditorRecurrenceDialog : public KDialogBase { Q_OBJECT public: - KOEditorRecurrenceDialog( QWidget *parent ); + KOEditorRecurrenceDialog( TQWidget *parent ); KOEditorRecurrence* editor() const { return mRecurrence; } private: diff --git a/korganizer/koeventeditor.cpp b/korganizer/koeventeditor.cpp index 31a909717..5cc7041ee 100644 --- a/korganizer/koeventeditor.cpp +++ b/korganizer/koeventeditor.cpp @@ -23,12 +23,12 @@ without including the source code for Qt in the source distribution. */ -#include <qtooltip.h> -#include <qframe.h> -#include <qpixmap.h> -#include <qlayout.h> -#include <qwidgetstack.h> -#include <qwhatsthis.h> +#include <tqtooltip.h> +#include <tqframe.h> +#include <tqpixmap.h> +#include <tqlayout.h> +#include <tqwidgetstack.h> +#include <tqwhatsthis.h> #include <kiconloader.h> #include <kdebug.h> @@ -51,8 +51,8 @@ #include "koeventeditor.h" -KOEventEditor::KOEventEditor( Calendar *calendar, QWidget *parent ) - : KOIncidenceEditor( QString::null, calendar, parent ), +KOEventEditor::KOEventEditor( Calendar *calendar, TQWidget *parent ) + : KOIncidenceEditor( TQString::null, calendar, parent ), mEvent( 0 ), mCalendar( 0 ), mGeneral( 0 ), mRecurrence( 0 ), mFreeBusy( 0 ) { } @@ -72,39 +72,39 @@ void KOEventEditor::init() setupDesignerTabs( "event" ); // Propagate date time settings to recurrence tab - connect( mGeneral, SIGNAL( dateTimesChanged( const QDateTime &, const QDateTime & ) ), - mRecurrence, SLOT( setDateTimes( const QDateTime &, const QDateTime &) ) ); - connect( mGeneral, SIGNAL( dateTimeStrChanged( const QString & ) ), - mRecurrence, SLOT( setDateTimeStr( const QString & ) ) ); - connect( mFreeBusy, SIGNAL( dateTimesChanged( const QDateTime &, const QDateTime & ) ), - mRecurrence, SLOT( setDateTimes( const QDateTime &, const QDateTime & ) ) ); + connect( mGeneral, TQT_SIGNAL( dateTimesChanged( const TQDateTime &, const TQDateTime & ) ), + mRecurrence, TQT_SLOT( setDateTimes( const TQDateTime &, const TQDateTime &) ) ); + connect( mGeneral, TQT_SIGNAL( dateTimeStrChanged( const TQString & ) ), + mRecurrence, TQT_SLOT( setDateTimeStr( const TQString & ) ) ); + connect( mFreeBusy, TQT_SIGNAL( dateTimesChanged( const TQDateTime &, const TQDateTime & ) ), + mRecurrence, TQT_SLOT( setDateTimes( const TQDateTime &, const TQDateTime & ) ) ); // Propagate date time settings to gantt tab and back - connect( mGeneral, SIGNAL( dateTimesChanged( const QDateTime &, const QDateTime & ) ), - mFreeBusy, SLOT( slotUpdateGanttView( const QDateTime &, const QDateTime & ) ) ); - connect( mFreeBusy, SIGNAL( dateTimesChanged( const QDateTime &, const QDateTime & ) ), - mGeneral, SLOT( setDateTimes( const QDateTime &, const QDateTime & ) ) ); - - connect( mGeneral, SIGNAL( focusReceivedSignal() ), - SIGNAL( focusReceivedSignal() ) ); - - connect( mGeneral, SIGNAL( openCategoryDialog() ), - SIGNAL( editCategories() ) ); - connect( this, SIGNAL( updateCategoryConfig() ), - mGeneral, SIGNAL( updateCategoryConfig() ) ); - - connect( mFreeBusy, SIGNAL(updateAttendeeSummary(int)), - mGeneral, SLOT(updateAttendeeSummary(int)) ); - - connect( mGeneral, SIGNAL(editRecurrence()), - mRecurrenceDialog, SLOT(show()) ); - connect( mRecurrenceDialog, SIGNAL(okClicked()), - SLOT(updateRecurrenceSummary()) ); - - connect( mGeneral, SIGNAL(acceptInvitation()), - mFreeBusy, SLOT(acceptForMe()) ); - connect( mGeneral, SIGNAL(declineInvitation()), - mFreeBusy, SLOT(declineForMe()) ); + connect( mGeneral, TQT_SIGNAL( dateTimesChanged( const TQDateTime &, const TQDateTime & ) ), + mFreeBusy, TQT_SLOT( slotUpdateGanttView( const TQDateTime &, const TQDateTime & ) ) ); + connect( mFreeBusy, TQT_SIGNAL( dateTimesChanged( const TQDateTime &, const TQDateTime & ) ), + mGeneral, TQT_SLOT( setDateTimes( const TQDateTime &, const TQDateTime & ) ) ); + + connect( mGeneral, TQT_SIGNAL( focusReceivedSignal() ), + TQT_SIGNAL( focusReceivedSignal() ) ); + + connect( mGeneral, TQT_SIGNAL( openCategoryDialog() ), + TQT_SIGNAL( editCategories() ) ); + connect( this, TQT_SIGNAL( updateCategoryConfig() ), + mGeneral, TQT_SIGNAL( updateCategoryConfig() ) ); + + connect( mFreeBusy, TQT_SIGNAL(updateAttendeeSummary(int)), + mGeneral, TQT_SLOT(updateAttendeeSummary(int)) ); + + connect( mGeneral, TQT_SIGNAL(editRecurrence()), + mRecurrenceDialog, TQT_SLOT(show()) ); + connect( mRecurrenceDialog, TQT_SIGNAL(okClicked()), + TQT_SLOT(updateRecurrenceSummary()) ); + + connect( mGeneral, TQT_SIGNAL(acceptInvitation()), + mFreeBusy, TQT_SLOT(acceptForMe()) ); + connect( mGeneral, TQT_SIGNAL(declineInvitation()), + mFreeBusy, TQT_SLOT(declineForMe()) ); } void KOEventEditor::reload() @@ -119,37 +119,37 @@ void KOEventEditor::setupGeneral() mGeneral = new KOEditorGeneralEvent( this ); if( KOPrefs::instance()->mCompactDialogs ) { - QFrame *topFrame = addPage(i18n("General")); - QWhatsThis::add( topFrame, + TQFrame *topFrame = addPage(i18n("General")); + TQWhatsThis::add( topFrame, i18n("The General tab allows you to set the most common " "options for the event.") ); - QBoxLayout *topLayout = new QVBoxLayout(topFrame); + TQBoxLayout *topLayout = new TQVBoxLayout(topFrame); topLayout->setSpacing(spacingHint()); mGeneral->initHeader( topFrame, topLayout ); mGeneral->initTime(topFrame,topLayout); -// QBoxLayout *alarmLineLayout = new QHBoxLayout(topLayout); +// TQBoxLayout *alarmLineLayout = new TQHBoxLayout(topLayout); mGeneral->initAlarm(topFrame,topLayout); mGeneral->enableAlarm( false ); topLayout->addStretch( 1 ); - QFrame *topFrame2 = addPage(i18n("Details")); + TQFrame *topFrame2 = addPage(i18n("Details")); - QBoxLayout *topLayout2 = new QVBoxLayout(topFrame2); + TQBoxLayout *topLayout2 = new TQVBoxLayout(topFrame2); topLayout2->setSpacing(spacingHint()); mGeneral->initClass(topFrame2,topLayout2); mGeneral->initSecrecy( topFrame2, topLayout2 ); mGeneral->initDescription(topFrame2,topLayout2); } else { - QFrame *topFrame = addPage(i18n("&General")); - QWhatsThis::add( topFrame, + TQFrame *topFrame = addPage(i18n("&General")); + TQWhatsThis::add( topFrame, i18n("The General tab allows you to set the most common " "options for the event.") ); - QBoxLayout *topLayout = new QVBoxLayout(topFrame); + TQBoxLayout *topLayout = new TQVBoxLayout(topFrame); topLayout->setSpacing(spacingHint()); mGeneral->initInvitationBar( topFrame, topLayout ); @@ -157,10 +157,10 @@ void KOEventEditor::setupGeneral() mGeneral->initTime(topFrame,topLayout); mGeneral->initDescription(topFrame,topLayout); mGeneral->initAttachments(topFrame,topLayout); - connect( mGeneral, SIGNAL( openURL( const KURL& ) ), - this, SLOT( openURL( const KURL& ) ) ); - connect( this, SIGNAL( signalAddAttachments( const QStringList&, const QStringList&, bool ) ), - mGeneral, SLOT( addAttachments( const QStringList&, const QStringList&, bool ) ) ); + connect( mGeneral, TQT_SIGNAL( openURL( const KURL& ) ), + this, TQT_SLOT( openURL( const KURL& ) ) ); + connect( this, TQT_SIGNAL( signalAddAttachments( const TQStringList&, const TQStringList&, bool ) ), + mGeneral, TQT_SLOT( addAttachments( const TQStringList&, const TQStringList&, bool ) ) ); } mGeneral->finishSetup(); @@ -176,13 +176,13 @@ void KOEventEditor::modified (int /*modification*/) void KOEventEditor::setupRecurrence() { #if 0 - QFrame *topFrame = addPage( i18n("Rec&urrence") ); + TQFrame *topFrame = addPage( i18n("Rec&urrence") ); - QWhatsThis::add( topFrame, + TQWhatsThis::add( topFrame, i18n("The Recurrence tab allows you to set options on " "how often this event recurs.") ); - QBoxLayout *topLayout = new QVBoxLayout( topFrame ); + TQBoxLayout *topLayout = new TQVBoxLayout( topFrame ); mRecurrence = new KOEditorRecurrence( topFrame ); topLayout->addWidget( mRecurrence ); @@ -194,12 +194,12 @@ void KOEventEditor::setupRecurrence() void KOEventEditor::setupFreeBusy() { - QFrame *freeBusyPage = addPage( i18n("&Attendees") ); - QWhatsThis::add( freeBusyPage, + TQFrame *freeBusyPage = addPage( i18n("&Attendees") ); + TQWhatsThis::add( freeBusyPage, i18n("The Free/Busy tab allows you to see whether " "other attendees are free or busy during your event.") ); - QBoxLayout *topLayout = new QVBoxLayout( freeBusyPage ); + TQBoxLayout *topLayout = new TQVBoxLayout( freeBusyPage ); mAttendeeEditor = mFreeBusy = new KOEditorFreeBusy( spacingHint(), freeBusyPage ); topLayout->addWidget( mFreeBusy ); @@ -227,7 +227,7 @@ void KOEventEditor::newEvent() setCaption( i18n("New Event") ); } -void KOEventEditor::setDates( const QDateTime &from, const QDateTime &to, bool allDay ) +void KOEventEditor::setDates( const TQDateTime &from, const TQDateTime &to, bool allDay ) { mGeneral->setDefaults( from, to, allDay ); mRecurrence->setDefaults( from, to, allDay ); @@ -239,7 +239,7 @@ void KOEventEditor::setDates( const QDateTime &from, const QDateTime &to, bool a } } -void KOEventEditor::setTexts( const QString &summary, const QString &description ) +void KOEventEditor::setTexts( const TQString &summary, const TQString &description ) { if ( description.isEmpty() && summary.contains("\n") ) { mGeneral->setDescription( summary ); @@ -253,10 +253,10 @@ void KOEventEditor::setTexts( const QString &summary, const QString &description void KOEventEditor::loadDefaults() { - QDateTime from( QDate::currentDate(), KOPrefs::instance()->mStartTime.time() ); + TQDateTime from( TQDate::currentDate(), KOPrefs::instance()->mStartTime.time() ); int addSecs = ( KOPrefs::instance()->mDefaultDuration.time().hour()*3600 ) + ( KOPrefs::instance()->mDefaultDuration.time().minute()*60 ); - QDateTime to( from.addSecs( addSecs ) ); + TQDateTime to( from.addSecs( addSecs ) ); setDates( from, to, false ); } @@ -267,7 +267,7 @@ bool KOEventEditor::processInput() if ( !validateInput() || !mChanger ) return false; - QGuardedPtr<KOEditorFreeBusy> freeBusy( mFreeBusy ); + TQGuardedPtr<KOEditorFreeBusy> freeBusy( mFreeBusy ); if ( mEvent ) { bool rc = true; @@ -394,12 +394,12 @@ void KOEventEditor::loadTemplate( /*const*/ CalendarLocal& cal ) } } -QStringList& KOEventEditor::templates() const +TQStringList& KOEventEditor::templates() const { return KOPrefs::instance()->mEventTemplates; } -void KOEventEditor::slotSaveTemplate( const QString &templateName ) +void KOEventEditor::slotSaveTemplate( const TQString &templateName ) { kdDebug(5006) << "SlotSaveTemplate" << endl; Event *event = new Event; @@ -407,7 +407,7 @@ void KOEventEditor::slotSaveTemplate( const QString &templateName ) saveAsTemplate( event, templateName ); } -QObject *KOEventEditor::typeAheadReceiver() const +TQObject *KOEventEditor::typeAheadReceiver() const { return mGeneral->typeAheadReceiver(); } diff --git a/korganizer/koeventeditor.h b/korganizer/koeventeditor.h index 6d06fe276..ba0974793 100644 --- a/korganizer/koeventeditor.h +++ b/korganizer/koeventeditor.h @@ -52,7 +52,7 @@ class KOEventEditor : public KOIncidenceEditor /** Construct new event editor. */ - KOEventEditor( Calendar *calendar, QWidget *parent ); + KOEventEditor( Calendar *calendar, TQWidget *parent ); virtual ~KOEventEditor(void); void init(); @@ -70,7 +70,7 @@ class KOEventEditor : public KOIncidenceEditor summary contains multiple lines, the summary will be used as description and only the first line of summary will be used as the summary. */ - void setTexts( const QString &summary, const QString &description = QString::null ); + void setTexts( const TQString &summary, const TQString &description = TQString::null ); /** Edit an existing event. */ @@ -79,7 +79,7 @@ class KOEventEditor : public KOIncidenceEditor /** Set widgets to the given date/time values */ - void setDates( const QDateTime &from, const QDateTime &to, bool allDay ); + void setDates( const TQDateTime &from, const TQDateTime &to, bool allDay ); /** Read event object and setup widgets accordingly. If tmpl is true, the @@ -91,7 +91,7 @@ class KOEventEditor : public KOIncidenceEditor */ void writeEvent( Event * ); - QObject *typeAheadReceiver() const; + TQObject *typeAheadReceiver() const; void selectInvitationCounterProposal( bool enable ); @@ -102,11 +102,11 @@ class KOEventEditor : public KOIncidenceEditor void loadDefaults(); void deleteEvent(); - void slotSaveTemplate( const QString & ); + void slotSaveTemplate( const TQString & ); void updateRecurrenceSummary(); protected: - QString type() { return "Event"; } + TQString type() { return "Event"; } void setupGeneral(); void setupRecurrence(); void setupFreeBusy(); @@ -119,7 +119,7 @@ class KOEventEditor : public KOIncidenceEditor void processCancel(); int msgItemDelete(); void loadTemplate( /*const*/ CalendarLocal& ); - QStringList& templates() const; + TQStringList& templates() const; private: Event *mEvent; diff --git a/korganizer/koeventpopupmenu.cpp b/korganizer/koeventpopupmenu.cpp index 54272fd54..75c96d205 100644 --- a/korganizer/koeventpopupmenu.cpp +++ b/korganizer/koeventpopupmenu.cpp @@ -22,7 +22,7 @@ without including the source code for Qt in the source distribution. */ -#include <qcursor.h> +#include <tqcursor.h> #include <kactioncollection.h> #include <klocale.h> @@ -46,71 +46,71 @@ KOEventPopupMenu::KOEventPopupMenu() { mCurrentIncidence = 0; - mCurrentDate = QDate(); + mCurrentDate = TQDate(); mHasAdditionalItems = false; - insertItem( i18n("&Show"), this, SLOT( popupShow() ) ); + insertItem( i18n("&Show"), this, TQT_SLOT( popupShow() ) ); mEditOnlyItems.append( - insertItem(i18n("&Edit..."), this, SLOT( popupEdit() ) ) ); + insertItem(i18n("&Edit..."), this, TQT_SLOT( popupEdit() ) ) ); #ifndef KORG_NOPRINTER insertItem( KOGlobals::self()->smallIcon("printer1"), i18n("&Print..."), - this, SLOT( print() ) ); + this, TQT_SLOT( print() ) ); #endif //------------------------------------------------------------------------ mEditOnlyItems.append( insertSeparator() ); mEditOnlyItems.append( insertItem( KOGlobals::self()->smallIcon("editcut"), i18n("&Cut"), - this, SLOT( popupCut() ) ) ); + this, TQT_SLOT( popupCut() ) ) ); mEditOnlyItems.append( insertItem( KOGlobals::self()->smallIcon("editcopy"), i18n("&Copy"), - this, SLOT( popupCopy() ) ) ); + this, TQT_SLOT( popupCopy() ) ) ); // paste is always possible insertItem( KOGlobals::self()->smallIcon("editpaste"), i18n("&Paste"), - this, SLOT( popupPaste() ) ); + this, TQT_SLOT( popupPaste() ) ); mEditOnlyItems.append( insertItem( KOGlobals::self()->smallIcon("editdelete"), i18n("&Delete"), - this, SLOT( popupDelete() ) ) ); + this, TQT_SLOT( popupDelete() ) ) ); //------------------------------------------------------------------------ mEditOnlyItems.append( insertSeparator() ); mEditOnlyItems.append( insertItem( KOGlobals::self()->smallIcon("bell"), i18n("&Toggle Reminder"), - this, SLOT( popupAlarm() ) ) ); + this, TQT_SLOT( popupAlarm() ) ) ); //------------------------------------------------------------------------ mRecurrenceItems.append( insertSeparator() ); mRecurrenceItems.append( insertItem( i18n("&Dissociate This Occurrence"), - this, SLOT( dissociateOccurrence() ) ) ); + this, TQT_SLOT( dissociateOccurrence() ) ) ); mRecurrenceItems.append( insertItem( i18n("&Dissociate Future Occurrences"), - this, SLOT( dissociateFutureOccurrence() ) ) ); + this, TQT_SLOT( dissociateFutureOccurrence() ) ) ); insertSeparator(); insertItem( KOGlobals::self()->smallIcon("mail_forward"), i18n( "Send as iCalendar..."), - this, SLOT(forward()) ); + this, TQT_SLOT(forward()) ); } -void KOEventPopupMenu::showIncidencePopup( Incidence *incidence, const QDate &qd ) +void KOEventPopupMenu::showIncidencePopup( Incidence *incidence, const TQDate &qd ) { mCurrentIncidence = incidence; mCurrentDate = qd; if (mCurrentIncidence) { // Enable/Disabled menu items only valid for editable events. - QValueList<int>::Iterator it; + TQValueList<int>::Iterator it; for( it = mEditOnlyItems.begin(); it != mEditOnlyItems.end(); ++it ) { setItemEnabled(*it,!mCurrentIncidence->isReadOnly()); } for ( it = mRecurrenceItems.begin(); it != mRecurrenceItems.end(); ++it ) { setItemVisible( *it, mCurrentIncidence->doesRecur() ); } - popup(QCursor::pos()); + popup(TQCursor::pos()); } else { kdDebug(5850) << "KOEventPopupMenu::showEventPopup(): No event selected" << endl; } } -void KOEventPopupMenu::addAdditionalItem(const QIconSet &icon,const QString &text, - const QObject *receiver, const char *member, +void KOEventPopupMenu::addAdditionalItem(const TQIconSet &icon,const TQString &text, + const TQObject *receiver, const char *member, bool editOnly) { if (!mHasAdditionalItems) { @@ -136,7 +136,7 @@ void KOEventPopupMenu::print() #ifndef KORG_NOPRINTER KOCoreHelper helper; CalPrinter printer( this, 0, &helper ); - connect( this, SIGNAL(configChanged()), &printer, SLOT(updateConfig()) ); + connect( this, TQT_SIGNAL(configChanged()), &printer, TQT_SLOT(updateConfig()) ); Incidence::List selectedIncidences; selectedIncidences.append( mCurrentIncidence ); diff --git a/korganizer/koeventpopupmenu.h b/korganizer/koeventpopupmenu.h index 9d5db17c4..8d4f2df26 100644 --- a/korganizer/koeventpopupmenu.h +++ b/korganizer/koeventpopupmenu.h @@ -27,26 +27,26 @@ // Context menu for event views with standard event actions // -#include <qpopupmenu.h> -#include <qdatetime.h> +#include <tqpopupmenu.h> +#include <tqdatetime.h> namespace KCal { class Incidence; } using namespace KCal; -class KOEventPopupMenu : public QPopupMenu { +class KOEventPopupMenu : public TQPopupMenu { Q_OBJECT public: KOEventPopupMenu(); - void addAdditionalItem(const QIconSet &icon,const QString &text, - const QObject *receiver, const char *member, + void addAdditionalItem(const TQIconSet &icon,const TQString &text, + const TQObject *receiver, const char *member, bool editOnly=false); public slots: - void showIncidencePopup( Incidence *, const QDate & ); + void showIncidencePopup( Incidence *, const TQDate & ); protected slots: void popupShow(); @@ -69,16 +69,16 @@ class KOEventPopupMenu : public QPopupMenu { void copyIncidenceSignal(Incidence *); void pasteIncidenceSignal(); void toggleAlarmSignal(Incidence *); - void dissociateOccurrenceSignal( Incidence *, const QDate & ); - void dissociateFutureOccurrenceSignal( Incidence *, const QDate & ); + void dissociateOccurrenceSignal( Incidence *, const TQDate & ); + void dissociateFutureOccurrenceSignal( Incidence *, const TQDate & ); private: Incidence *mCurrentIncidence; - QDate mCurrentDate; + TQDate mCurrentDate; bool mHasAdditionalItems; - QValueList<int> mEditOnlyItems; - QValueList<int> mRecurrenceItems; + TQValueList<int> mEditOnlyItems; + TQValueList<int> mRecurrenceItems; }; #endif diff --git a/korganizer/koeventview.cpp b/korganizer/koeventview.cpp index 1f3e62a59..17708953b 100644 --- a/korganizer/koeventview.cpp +++ b/korganizer/koeventview.cpp @@ -22,8 +22,8 @@ without including the source code for Qt in the source distribution. */ -#include <qpopupmenu.h> -#include <qcursor.h> +#include <tqpopupmenu.h> +#include <tqcursor.h> #include <klocale.h> #include <kdebug.h> @@ -44,7 +44,7 @@ using namespace KOrg; //--------------------------------------------------------------------------- -KOEventView::KOEventView(Calendar *cal,QWidget *parent,const char *name) +KOEventView::KOEventView(Calendar *cal,TQWidget *parent,const char *name) : KOrg::BaseView(cal,parent,name) { } @@ -61,29 +61,29 @@ KOEventPopupMenu *KOEventView::eventPopup() { KOEventPopupMenu *eventPopup = new KOEventPopupMenu; - connect(eventPopup,SIGNAL(editIncidenceSignal(Incidence *)), - SIGNAL(editIncidenceSignal(Incidence *))); - connect(eventPopup,SIGNAL(showIncidenceSignal(Incidence *)), - SIGNAL(showIncidenceSignal(Incidence *))); - connect(eventPopup,SIGNAL(deleteIncidenceSignal(Incidence *)), - SIGNAL(deleteIncidenceSignal(Incidence *))); - connect(eventPopup,SIGNAL(cutIncidenceSignal(Incidence *)), - SIGNAL(cutIncidenceSignal(Incidence *))); - connect(eventPopup,SIGNAL(copyIncidenceSignal(Incidence *)), - SIGNAL(copyIncidenceSignal(Incidence *))); - connect(eventPopup,SIGNAL(pasteIncidenceSignal()), - SIGNAL(pasteIncidenceSignal())); - connect(eventPopup,SIGNAL(toggleAlarmSignal(Incidence *)), - SIGNAL(toggleAlarmSignal(Incidence*))); - connect(eventPopup,SIGNAL(dissociateOccurrenceSignal( Incidence *, const QDate & )), - SIGNAL(dissociateOccurrenceSignal( Incidence *, const QDate & ))); - connect(eventPopup,SIGNAL(dissociateFutureOccurrenceSignal( Incidence *, const QDate & )), - SIGNAL(dissociateFutureOccurrenceSignal( Incidence *, const QDate & ))); + connect(eventPopup,TQT_SIGNAL(editIncidenceSignal(Incidence *)), + TQT_SIGNAL(editIncidenceSignal(Incidence *))); + connect(eventPopup,TQT_SIGNAL(showIncidenceSignal(Incidence *)), + TQT_SIGNAL(showIncidenceSignal(Incidence *))); + connect(eventPopup,TQT_SIGNAL(deleteIncidenceSignal(Incidence *)), + TQT_SIGNAL(deleteIncidenceSignal(Incidence *))); + connect(eventPopup,TQT_SIGNAL(cutIncidenceSignal(Incidence *)), + TQT_SIGNAL(cutIncidenceSignal(Incidence *))); + connect(eventPopup,TQT_SIGNAL(copyIncidenceSignal(Incidence *)), + TQT_SIGNAL(copyIncidenceSignal(Incidence *))); + connect(eventPopup,TQT_SIGNAL(pasteIncidenceSignal()), + TQT_SIGNAL(pasteIncidenceSignal())); + connect(eventPopup,TQT_SIGNAL(toggleAlarmSignal(Incidence *)), + TQT_SIGNAL(toggleAlarmSignal(Incidence*))); + connect(eventPopup,TQT_SIGNAL(dissociateOccurrenceSignal( Incidence *, const TQDate & )), + TQT_SIGNAL(dissociateOccurrenceSignal( Incidence *, const TQDate & ))); + connect(eventPopup,TQT_SIGNAL(dissociateFutureOccurrenceSignal( Incidence *, const TQDate & )), + TQT_SIGNAL(dissociateFutureOccurrenceSignal( Incidence *, const TQDate & ))); return eventPopup; } -QPopupMenu *KOEventView::newEventPopup() +TQPopupMenu *KOEventView::newEventPopup() { KXMLGUIClient *client = KOCore::self()->xmlguiClient( this ); if ( !client ) { @@ -95,7 +95,7 @@ QPopupMenu *KOEventView::newEventPopup() return 0; // can happen if called too early } - return static_cast<QPopupMenu*> + return static_cast<TQPopupMenu*> ( client->factory()->container( "rmb_selection_popup", client ) ); } //--------------------------------------------------------------------------- @@ -137,14 +137,14 @@ void KOEventView::popupCopy() void KOEventView::showNewEventPopup() { - QPopupMenu *popup = newEventPopup(); + TQPopupMenu *popup = newEventPopup(); if ( !popup ) { kdError() << "KOEventView::showNewEventPopup(): popup creation failed" << endl; return; } - popup->popup( QCursor::pos() ); + popup->popup( TQCursor::pos() ); } //--------------------------------------------------------------------------- diff --git a/korganizer/koeventview.h b/korganizer/koeventview.h index d2073d532..23d1bc441 100644 --- a/korganizer/koeventview.h +++ b/korganizer/koeventview.h @@ -61,10 +61,10 @@ class KOEventView : public KOrg::BaseView * Constructs a view. * @param cal is a pointer to the calendar object from which events * will be retrieved for display. - * @param parent is the parent QWidget. + * @param parent is the parent TQWidget. * @param name is the view name. */ - KOEventView(Calendar *cal,QWidget *parent=0,const char *name=0); + KOEventView(Calendar *cal,TQWidget *parent=0,const char *name=0); /** * Destructor. Views will do view-specific cleanups here. @@ -85,7 +85,7 @@ class KOEventView : public KOrg::BaseView /** * Construct a standard context that allows to create a new event. */ - QPopupMenu *newEventPopup(); + TQPopupMenu *newEventPopup(); /** This view is an view for displaying events. */ bool isEventView() { return true; } @@ -113,7 +113,7 @@ class KOEventView : public KOrg::BaseView * Emitted when an event is moved using the mouse in an agenda * view (week / month). */ - void shiftedEvent(const QDate& olddate, const QDate& newdate); + void shiftedEvent(const TQDate& olddate, const TQDate& newdate); protected slots: diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index 5567211e5..47ac5b7a4 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp @@ -31,8 +31,8 @@ #include <kdebug.h> #include <koglobals.h> -KOEventViewer::KOEventViewer( QWidget *parent, const char *name ) - : QTextBrowser( parent, name ), mDefaultText("") +KOEventViewer::KOEventViewer( TQWidget *parent, const char *name ) + : TQTextBrowser( parent, name ), mDefaultText("") { mIncidence = 0; } @@ -47,7 +47,7 @@ void KOEventViewer::readSettings( KConfig * config ) // With each restart of KOrganizer the font site gets halfed. What should this // be good for? #if 0 - config->setGroup( QString("EventViewer-%1").arg( name() ) ); + config->setGroup( TQString("EventViewer-%1").arg( name() ) ); int zoomFactor = config->readNumEntry("ZoomFactor", pointSize() ); zoomTo( zoomFactor/2 ); kdDebug(5850) << " KOEventViewer: restoring the pointSize: "<< pointSize() @@ -60,12 +60,12 @@ void KOEventViewer::writeSettings( KConfig * config ) { if ( config ) { kdDebug(5850) << " KOEventViewer: saving the zoomFactor: "<< pointSize() << endl; - config->setGroup( QString("EventViewer-%1").arg( name() ) ); + config->setGroup( TQString("EventViewer-%1").arg( name() ) ); config->writeEntry("ZoomFactor", pointSize() ); } } -void KOEventViewer::setSource( const QString &n ) +void KOEventViewer::setSource( const TQString &n ) { UriHandler::process( n ); } @@ -94,13 +94,13 @@ void KOEventViewer::clearEvents( bool now ) if ( now ) setText( mDefaultText ); } -void KOEventViewer::addText( const QString &text ) +void KOEventViewer::addText( const TQString &text ) { mText.append( text ); setText( mText ); } -void KOEventViewer::setDefaultText( const QString &text ) +void KOEventViewer::setDefaultText( const TQString &text ) { mDefaultText = text; } diff --git a/korganizer/koeventviewer.h b/korganizer/koeventviewer.h index 31a4160d6..80b1ef772 100644 --- a/korganizer/koeventviewer.h +++ b/korganizer/koeventviewer.h @@ -24,7 +24,7 @@ #ifndef KOEVENTVIEWER_H #define KOEVENTVIEWER_H -#include <qtextbrowser.h> +#include <tqtextbrowser.h> #include <kdepimmacros.h> #include <kconfig.h> @@ -43,13 +43,13 @@ class KDE_EXPORT KOEventViewer : public QTextBrowser { Q_OBJECT public: - KOEventViewer( QWidget *parent = 0, const char *name = 0 ); + KOEventViewer( TQWidget *parent = 0, const char *name = 0 ); virtual ~KOEventViewer(); /** - Reimplemented from QTextBrowser to handle links. + Reimplemented from TQTextBrowser to handle links. */ - void setSource( const QString & ); + void setSource( const TQString & ); virtual bool appendIncidence( Incidence * ); @@ -63,13 +63,13 @@ class KDE_EXPORT KOEventViewer : public QTextBrowser Add given text to currently shown content. */ - void addText( const QString &text ); + void addText( const TQString &text ); /** Set the default text that is showed when there aren't a incidence to show */ - void setDefaultText( const QString &text ); + void setDefaultText( const TQString &text ); void readSettings( KConfig *config); void writeSettings ( KConfig *config); @@ -82,9 +82,9 @@ class KDE_EXPORT KOEventViewer : public QTextBrowser void changeIncidenceDisplay( Incidence *incidence, int action ); private: Incidence *mIncidence; - QTextBrowser *mEventTextView; - QString mDefaultText; - QString mText; + TQTextBrowser *mEventTextView; + TQString mDefaultText; + TQString mText; }; #endif diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp index f99a9ac13..a51e5bccb 100644 --- a/korganizer/koeventviewerdialog.cpp +++ b/korganizer/koeventviewerdialog.cpp @@ -28,7 +28,7 @@ #include <klocale.h> -KOEventViewerDialog::KOEventViewerDialog( QWidget *parent, const char *name, +KOEventViewerDialog::KOEventViewerDialog( TQWidget *parent, const char *name, bool compact ) : KDialogBase( parent, name, false, i18n("Event Viewer"), Ok, Ok, false, i18n("Edit") ) @@ -44,14 +44,14 @@ KOEventViewerDialog::KOEventViewerDialog( QWidget *parent, const char *name, setMinimumSize( 300, 200 ); resize( 320, 300 ); } - connect( this, SIGNAL(finished()), this, SLOT(delayedDestruct()) ); + connect( this, TQT_SIGNAL(finished()), this, TQT_SLOT(delayedDestruct()) ); } KOEventViewerDialog::~KOEventViewerDialog() { } -void KOEventViewerDialog::addText( const QString &text ) +void KOEventViewerDialog::addText( const TQString &text ) { mEventViewer->addText(text); } diff --git a/korganizer/koeventviewerdialog.h b/korganizer/koeventviewerdialog.h index 750b29f05..e14c6bafd 100644 --- a/korganizer/koeventviewerdialog.h +++ b/korganizer/koeventviewerdialog.h @@ -42,14 +42,14 @@ class KDE_EXPORT KOEventViewerDialog : public KDialogBase { Q_OBJECT public: - KOEventViewerDialog( QWidget *parent = 0, const char *name = 0, + KOEventViewerDialog( TQWidget *parent = 0, const char *name = 0, bool compact = false ); virtual ~KOEventViewerDialog(); void setIncidence( Incidence *incidence ) { mEventViewer->setIncidence( incidence ); } void appendIncidence( Incidence *incidence ) { mEventViewer->appendIncidence( incidence ); } - void addText( const QString &text ); + void addText( const TQString &text ); private: KOEventViewer *mEventViewer; diff --git a/korganizer/koglobals.cpp b/korganizer/koglobals.cpp index 21428e85b..dd55bd374 100644 --- a/korganizer/koglobals.cpp +++ b/korganizer/koglobals.cpp @@ -22,7 +22,7 @@ without including the source code for Qt in the source distribution. */ -#include <qapplication.h> +#include <tqapplication.h> #include <kdebug.h> #include <kglobal.h> @@ -99,14 +99,14 @@ AlarmClient *KOGlobals::alarmClient() const return mAlarmClient; } -void KOGlobals::fitDialogToScreen( QWidget *wid, bool force ) +void KOGlobals::fitDialogToScreen( TQWidget *wid, bool force ) { bool resized = false; int w = wid->frameSize().width(); int h = wid->frameSize().height(); - QRect desk = KGlobalSettings::desktopGeometry( wid ); + TQRect desk = KGlobalSettings::desktopGeometry( wid ); if ( w > desk.width() ) { w = desk.width(); resized = true; @@ -127,43 +127,43 @@ void KOGlobals::fitDialogToScreen( QWidget *wid, bool force ) bool KOGlobals::reverseLayout() { #if QT_VERSION >= 0x030000 - return QApplication::reverseLayout(); + return TQApplication::reverseLayout(); #else return false; #endif } -QPixmap KOGlobals::smallIcon( const QString& name ) +TQPixmap KOGlobals::smallIcon( const TQString& name ) { return SmallIcon( name, mOwnInstance ); } -QIconSet KOGlobals::smallIconSet( const QString& name, int size ) +TQIconSet KOGlobals::smallIconSet( const TQString& name, int size ) { return SmallIconSet( name, size, mOwnInstance ); } -QStringList KOGlobals::holiday( const QDate &date ) +TQStringList KOGlobals::holiday( const TQDate &date ) { - QStringList hdays; + TQStringList hdays; if ( !mHolidays ) return hdays; - QValueList<KHoliday> list = mHolidays->getHolidays( date ); - QValueList<KHoliday>::ConstIterator it = list.begin(); + TQValueList<KHoliday> list = mHolidays->getHolidays( date ); + TQValueList<KHoliday>::ConstIterator it = list.begin(); for ( ; it != list.end(); ++it ) { hdays.append( (*it).text ); } return hdays; } -bool KOGlobals::isWorkDay( const QDate &date ) +bool KOGlobals::isWorkDay( const TQDate &date ) { int mask( ~( KOPrefs::instance()->mWorkWeekMask ) ); bool nonWorkDay = ( mask & ( 1 << ( date.dayOfWeek() - 1 ) ) ); if ( KOPrefs::instance()->mExcludeHolidays && mHolidays ) { - QValueList<KHoliday> list = mHolidays->getHolidays( date ); - QValueList<KHoliday>::ConstIterator it = list.begin(); + TQValueList<KHoliday> list = mHolidays->getHolidays( date ); + TQValueList<KHoliday>::ConstIterator it = list.begin(); for ( ; it != list.end(); ++it ) { nonWorkDay = nonWorkDay || ( (*it).Category == KHolidays::HOLIDAY ); diff --git a/korganizer/koglobals.h b/korganizer/koglobals.h index d03a5d8ce..88435d4cd 100644 --- a/korganizer/koglobals.h +++ b/korganizer/koglobals.h @@ -45,7 +45,7 @@ class KDE_EXPORT KOGlobals DESCRIPTION_MODIFIED, SUMMARY_MODIFIED, COMPLETION_MODIFIED_WITH_RECURRENCE, UNKNOWN_MODIFIED }; - static void fitDialogToScreen( QWidget *widget, bool force=false ); + static void fitDialogToScreen( TQWidget *widget, bool force=false ); KConfig *config() const; static bool reverseLayout(); @@ -56,11 +56,11 @@ class KDE_EXPORT KOGlobals ~KOGlobals(); - QPixmap smallIcon( const QString& name ); - QIconSet smallIconSet( const QString& name, int size = 0 ); + TQPixmap smallIcon( const TQString& name ); + TQIconSet smallIconSet( const TQString& name, int size = 0 ); - QStringList holiday( const QDate & ); - bool isWorkDay( const QDate & ); + TQStringList holiday( const TQDate & ); + bool isWorkDay( const TQDate & ); int getWorkWeekMask(); /** Set which holidays the user wants to use. diff --git a/korganizer/kogroupware.cpp b/korganizer/kogroupware.cpp index d788abddd..7b017cc4d 100644 --- a/korganizer/kogroupware.cpp +++ b/korganizer/kogroupware.cpp @@ -48,10 +48,10 @@ #include <kmessagebox.h> #include <kstandarddirs.h> #include <kdirwatch.h> -#include <qfile.h> -#include <qregexp.h> -#include <qdir.h> -#include <qtimer.h> +#include <tqfile.h> +#include <tqregexp.h> +#include <tqdir.h> +#include <tqtimer.h> FreeBusyManager *KOGroupware::mFreeBusyManager = 0; @@ -74,7 +74,7 @@ KOGroupware *KOGroupware::instance() KOGroupware::KOGroupware( CalendarView* view, KCal::CalendarResources* cal ) - : QObject( 0, "kmgroupware_instance" ), mView( view ), mCalendar( cal ) + : TQObject( 0, "kmgroupware_instance" ), mView( view ), mCalendar( cal ) { // Set up the dir watch of the three incoming dirs KDirWatch* watcher = KDirWatch::self(); @@ -84,10 +84,10 @@ KOGroupware *KOGroupware::instance() watcher->addDir( locateLocal( "data", "korganizer/income.cancel/" ) ); watcher->addDir( locateLocal( "data", "korganizer/income.reply/" ) ); watcher->addDir( locateLocal( "data", "korganizer/income.delegated/" ) ); - connect( watcher, SIGNAL( dirty( const QString& ) ), - this, SLOT( incomingDirChanged( const QString& ) ) ); + connect( watcher, TQT_SIGNAL( dirty( const TQString& ) ), + this, TQT_SLOT( incomingDirChanged( const TQString& ) ) ); // Now set the ball rolling - QTimer::singleShot( 0, this, SLOT(initialCheckForChanges()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(initialCheckForChanges()) ); } void KOGroupware::initialCheckForChanges() @@ -103,14 +103,14 @@ void KOGroupware::initialCheckForChanges() void KOGroupware::slotViewNewIncidenceChanger( IncidenceChangerBase* changer ) { // Call slot perhapsUploadFB if an incidence was added, changed or removed - connect( changer, SIGNAL( incidenceAdded( Incidence* ) ), - mFreeBusyManager, SLOT( slotPerhapsUploadFB() ) ); - connect( changer, SIGNAL( incidenceChanged( Incidence*, Incidence*, int ) ), - mFreeBusyManager, SLOT( slotPerhapsUploadFB() ) ); - connect( changer, SIGNAL( incidenceChanged( Incidence*, Incidence* ) ), - mFreeBusyManager, SLOT( slotPerhapsUploadFB() ) ) ; - connect( changer, SIGNAL( incidenceDeleted( Incidence * ) ), - mFreeBusyManager, SLOT( slotPerhapsUploadFB() ) ); + connect( changer, TQT_SIGNAL( incidenceAdded( Incidence* ) ), + mFreeBusyManager, TQT_SLOT( slotPerhapsUploadFB() ) ); + connect( changer, TQT_SIGNAL( incidenceChanged( Incidence*, Incidence*, int ) ), + mFreeBusyManager, TQT_SLOT( slotPerhapsUploadFB() ) ); + connect( changer, TQT_SIGNAL( incidenceChanged( Incidence*, Incidence* ) ), + mFreeBusyManager, TQT_SLOT( slotPerhapsUploadFB() ) ) ; + connect( changer, TQT_SIGNAL( incidenceDeleted( Incidence * ) ), + mFreeBusyManager, TQT_SLOT( slotPerhapsUploadFB() ) ); } FreeBusyManager *KOGroupware::freeBusyManager() @@ -118,52 +118,52 @@ FreeBusyManager *KOGroupware::freeBusyManager() if ( !mFreeBusyManager ) { mFreeBusyManager = new FreeBusyManager( this, "freebusymanager" ); mFreeBusyManager->setCalendar( mCalendar ); - connect( mCalendar, SIGNAL( calendarChanged() ), - mFreeBusyManager, SLOT( slotPerhapsUploadFB() ) ); - connect( mView, SIGNAL( newIncidenceChanger( IncidenceChangerBase* ) ), - this, SLOT( slotViewNewIncidenceChanger( IncidenceChangerBase* ) ) ); + connect( mCalendar, TQT_SIGNAL( calendarChanged() ), + mFreeBusyManager, TQT_SLOT( slotPerhapsUploadFB() ) ); + connect( mView, TQT_SIGNAL( newIncidenceChanger( IncidenceChangerBase* ) ), + this, TQT_SLOT( slotViewNewIncidenceChanger( IncidenceChangerBase* ) ) ); slotViewNewIncidenceChanger( mView->incidenceChanger() ); } return mFreeBusyManager; } -void KOGroupware::incomingDirChanged( const QString& path ) +void KOGroupware::incomingDirChanged( const TQString& path ) { - const QString incomingDirName = locateLocal( "data","korganizer/" ) + const TQString incomingDirName = locateLocal( "data","korganizer/" ) + "income."; if ( !path.startsWith( incomingDirName ) ) { kdDebug(5850) << "incomingDirChanged: Wrong dir " << path << endl; return; } - QString action = path.mid( incomingDirName.length() ); + TQString action = path.mid( incomingDirName.length() ); while ( action.length() > 0 && action[ action.length()-1 ] == '/' ) // Strip slashes at the end action.truncate( action.length()-1 ); // Handle accepted invitations - QDir dir( path ); - const QStringList files = dir.entryList( QDir::Files ); + TQDir dir( path ); + const TQStringList files = dir.entryList( TQDir::Files ); if ( files.isEmpty() ) // No more files here return; // Read the file and remove it - QFile f( path + "/" + files[0] ); + TQFile f( path + "/" + files[0] ); if (!f.open(IO_ReadOnly)) { kdError(5850) << "Can't open file '" << files[0] << "'" << endl; return; } - QTextStream t(&f); - t.setEncoding( QTextStream::UnicodeUTF8 ); - QString receiver = KPIM::getFirstEmailAddress( t.readLine() ); - QString iCal = t.read(); + TQTextStream t(&f); + t.setEncoding( TQTextStream::UnicodeUTF8 ); + TQString receiver = KPIM::getFirstEmailAddress( t.readLine() ); + TQString iCal = t.read(); f.remove(); ScheduleMessage *message = mFormat.parseScheduleMessage( mCalendar, iCal ); if ( !message ) { - QString errorMessage; + TQString errorMessage; if (mFormat.exception()) errorMessage = i18n( "Error message: %1" ).arg( mFormat.exception()->message() ); kdDebug(5850) << "MailScheduler::retrieveTransactions() Error parsing " @@ -227,7 +227,7 @@ void KOGroupware::incomingDirChanged( const QString& path ) class KOInvitationFormatterHelper : public InvitationFormatterHelper { public: - virtual QString generateLinkURL( const QString &id ) { return "kmail:groupware_request_" + id; } + virtual TQString generateLinkURL( const TQString &id ) { return "kmail:groupware_request_" + id; } }; /* This function sends mails if necessary, and makes sure the user really @@ -236,7 +236,7 @@ class KOInvitationFormatterHelper : public InvitationFormatterHelper * Return true means accept the changes * Return false means revert the changes */ -bool KOGroupware::sendICalMessage( QWidget* parent, +bool KOGroupware::sendICalMessage( TQWidget* parent, KCal::Scheduler::Method method, Incidence* incidence, bool isDeleting, bool statusChanged ) @@ -267,12 +267,12 @@ bool KOGroupware::sendICalMessage( QWidget* parent, * mail. */ if ( incidence->attendees().count() > 1 || incidence->attendees().first()->email() != incidence->organizer().email() ) { - QString type; + TQString type; if( incidence->type() == "Event") type = i18n("event"); else if( incidence->type() == "Todo" ) type = i18n("task"); else if( incidence->type() == "Journal" ) type = i18n("journal entry"); else type = incidence->type(); - QString txt = i18n( "This %1 includes other people. " + TQString txt = i18n( "This %1 includes other people. " "Should email be sent out to the attendees?" ) .arg( type ); rc = KMessageBox::questionYesNoCancel( parent, txt, @@ -286,17 +286,17 @@ bool KOGroupware::sendICalMessage( QWidget* parent, method = Scheduler::Reply; // Ask if the user wants to tell the organizer about the current status - QString txt = i18n( "Do you want to send a status update to the " + TQString txt = i18n( "Do you want to send a status update to the " "organizer of this task?"); - rc = KMessageBox::questionYesNo( parent, txt, QString::null, i18n("Send Update"), i18n("Do Not Send") ); + rc = KMessageBox::questionYesNo( parent, txt, TQString::null, i18n("Send Update"), i18n("Do Not Send") ); } else if( incidence->type() == "Event" ) { - QString txt; + TQString txt; if ( statusChanged && method == Scheduler::Request ) { txt = i18n( "Your status as an attendee of this event " "changed. Do you want to send a status update to the " "organizer of this event?" ); method = Scheduler::Reply; - rc = KMessageBox::questionYesNo( parent, txt, QString::null, i18n("Send Update"), i18n("Do Not Send") ); + rc = KMessageBox::questionYesNo( parent, txt, TQString::null, i18n("Send Update"), i18n("Do Not Send") ); } else { if( isDeleting ) txt = i18n( "You are not the organizer of this event. " diff --git a/korganizer/kogroupware.h b/korganizer/kogroupware.h index 25f62cef4..0af6a3c42 100644 --- a/korganizer/kogroupware.h +++ b/korganizer/kogroupware.h @@ -40,7 +40,7 @@ #include <libkcal/calendarresources.h> #include <libkcal/icalformat.h> #include <libkcal/scheduler.h> -#include <qstring.h> +#include <tqstring.h> #include <kio/job.h> @@ -72,7 +72,7 @@ class KOGroupware : public QObject Returns false if the user cancels the dialog, and true if the user presses Yes og or No. */ - bool sendICalMessage( QWidget* parent, KCal::Scheduler::Method method, + bool sendICalMessage( TQWidget* parent, KCal::Scheduler::Method method, Incidence* incidence, bool isDeleting = false, bool statusChanged = false ); @@ -87,11 +87,11 @@ class KOGroupware : public QObject enum EventState { Accepted, ConditionallyAccepted, Declined, Request }; // convert the TNEF attachment to a vCard or iCalendar part - QString msTNEFToVPart( const QByteArray& tnef ); + TQString msTNEFToVPart( const TQByteArray& tnef ); private slots: /** Handle iCals given by KMail. */ - void incomingDirChanged( const QString& path ); + void incomingDirChanged( const TQString& path ); /** Updates some slot connections when the view incidence changer changes */ void slotViewNewIncidenceChanger( IncidenceChangerBase* changer ); diff --git a/korganizer/kohelper.cpp b/korganizer/kohelper.cpp index 5c0b4ccb5..827279fe4 100644 --- a/korganizer/kohelper.cpp +++ b/korganizer/kohelper.cpp @@ -22,7 +22,7 @@ without including the source code for Qt in the source distribution. */ -#include <qcolor.h> +#include <tqcolor.h> #include <kdebug.h> @@ -34,9 +34,9 @@ #include "koprefs.h" #include "kohelper.h" -QColor KOHelper::resourceColor( KCal::Calendar*calendar, KCal::Incidence*incidence ) +TQColor KOHelper::resourceColor( KCal::Calendar*calendar, KCal::Incidence*incidence ) { - QColor resourceColor = QColor(); //Default invalid color + TQColor resourceColor = TQColor(); //Default invalid color //FIXME: dynamic_cast are dirty, Better We implements interface to get the color // from the calendar KCal::CalendarResources *calendarResource = dynamic_cast<KCal::CalendarResources*>( calendar ); @@ -45,14 +45,14 @@ QColor KOHelper::resourceColor( KCal::Calendar*calendar, KCal::Incidence*inciden KCal::ResourceCalendar *resourceCalendar = calendarResource->resource( incidence ); if( resourceCalendar ) { - QString identifier = resourceCalendar->identifier(); + TQString identifier = resourceCalendar->identifier(); resourceColor = *KOPrefs::instance()->resourceColor( identifier ); if ( !resourceCalendar->subresources().isEmpty() ) { identifier = resourceCalendar->subresourceIdentifier( incidence ); if ( identifier.isEmpty() ) identifier = resourceCalendar->identifier(); - QColor subrescolor( *KOPrefs::instance()->resourceColor( identifier ) ); + TQColor subrescolor( *KOPrefs::instance()->resourceColor( identifier ) ); if ( subrescolor.isValid() ) resourceColor = subrescolor; } @@ -63,16 +63,16 @@ QColor KOHelper::resourceColor( KCal::Calendar*calendar, KCal::Incidence*inciden return resourceColor; } -QString KOHelper::resourceLabel(KCal::Calendar * calendar, KCal::Incidence * incidence) +TQString KOHelper::resourceLabel(KCal::Calendar * calendar, KCal::Incidence * incidence) { KCal::CalendarResources *calendarResource = dynamic_cast<KCal::CalendarResources*>( calendar ); if ( !calendarResource || ! incidence ) - return QString(); + return TQString(); KCal::ResourceCalendar *resourceCalendar = calendarResource->resource( incidence ); if( resourceCalendar ) { if ( !resourceCalendar->subresources().isEmpty() ) { - QString subRes = resourceCalendar->subresourceIdentifier( incidence ); + TQString subRes = resourceCalendar->subresourceIdentifier( incidence ); if ( subRes.isEmpty() ) return resourceCalendar->resourceName(); return resourceCalendar->labelForSubresource( subRes ); @@ -80,5 +80,5 @@ QString KOHelper::resourceLabel(KCal::Calendar * calendar, KCal::Incidence * inc return resourceCalendar->resourceName(); } - return QString(); + return TQString(); } diff --git a/korganizer/kohelper.h b/korganizer/kohelper.h index 0f5ec764b..b7f61b796 100644 --- a/korganizer/kohelper.h +++ b/korganizer/kohelper.h @@ -41,12 +41,12 @@ class KDE_EXPORT KOHelper @return The resource color for the incidence. If the incidence belongs to a subresource, the color for the subresource is returned (if set). */ - static QColor resourceColor( KCal::Calendar*calendar, KCal::Incidence*incidence ); + static TQColor resourceColor( KCal::Calendar*calendar, KCal::Incidence*incidence ); /** Returns the resource label the given incidence belongs to. */ - static QString resourceLabel( KCal::Calendar *calendar, KCal::Incidence *incidence ); + static TQString resourceLabel( KCal::Calendar *calendar, KCal::Incidence *incidence ); }; diff --git a/korganizer/koidentitymanager.cpp b/korganizer/koidentitymanager.cpp index eb68b939b..86bac4c9f 100644 --- a/korganizer/koidentitymanager.cpp +++ b/korganizer/koidentitymanager.cpp @@ -28,7 +28,7 @@ // This is called to create a default identity in case emailidentities has none // (i.e. the user never used KMail before) // We provide the values from KOPrefs, since those are configurable in korganizer. -void KOrg::IdentityManager::createDefaultIdentity( QString& fullName, QString& emailAddress ) +void KOrg::IdentityManager::createDefaultIdentity( TQString& fullName, TQString& emailAddress ) { fullName = KOPrefs::instance()->fullName(); emailAddress = KOPrefs::instance()->email(); diff --git a/korganizer/koidentitymanager.h b/korganizer/koidentitymanager.h index 69067d199..c1a70fc21 100644 --- a/korganizer/koidentitymanager.h +++ b/korganizer/koidentitymanager.h @@ -32,11 +32,11 @@ namespace KOrg { class IdentityManager : public KPIM::IdentityManager { public: - IdentityManager( QObject * parent=0, const char * name=0 ) + IdentityManager( TQObject * parent=0, const char * name=0 ) : KPIM::IdentityManager( true /*readonly*/, parent, name ) {} protected: - virtual void createDefaultIdentity( QString& fullName, QString& emailAddress ); + virtual void createDefaultIdentity( TQString& fullName, TQString& emailAddress ); }; } // namespace diff --git a/korganizer/koincidenceeditor.cpp b/korganizer/koincidenceeditor.cpp index b854ea519..3eb4920f8 100644 --- a/korganizer/koincidenceeditor.cpp +++ b/korganizer/koincidenceeditor.cpp @@ -22,14 +22,14 @@ without including the source code for Qt in the source distribution. */ -#include <qtooltip.h> -#include <qframe.h> -#include <qguardedptr.h> -#include <qpixmap.h> -#include <qlayout.h> -#include <qwidgetstack.h> -#include <qdatetime.h> -#include <qwhatsthis.h> +#include <tqtooltip.h> +#include <tqframe.h> +#include <tqguardedptr.h> +#include <tqpixmap.h> +#include <tqlayout.h> +#include <tqwidgetstack.h> +#include <tqdatetime.h> +#include <tqwhatsthis.h> #include <kdebug.h> #include <klocale.h> @@ -54,8 +54,8 @@ #include "koincidenceeditor.h" #include "templatemanagementdialog.h" -KOIncidenceEditor::KOIncidenceEditor( const QString &caption, - Calendar *calendar, QWidget *parent ) +KOIncidenceEditor::KOIncidenceEditor( const TQString &caption, + Calendar *calendar, TQWidget *parent ) : KDialogBase( Tabbed, caption, Ok | Apply | Cancel | Default, Ok, parent, 0, false, false ), mAttendeeEditor( 0 ), mIsCounter( false ) @@ -73,8 +73,8 @@ KOIncidenceEditor::KOIncidenceEditor( const QString &caption, setButtonText( Default, i18n("&Templates...") ); } - connect( this, SIGNAL( defaultClicked() ), SLOT( slotManageTemplates() ) ); - connect( this, SIGNAL( finished() ), SLOT( delayedDestruct() ) ); + connect( this, TQT_SIGNAL( defaultClicked() ), TQT_SLOT( slotManageTemplates() ) ); + connect( this, TQT_SIGNAL( finished() ), TQT_SLOT( delayedDestruct() ) ); } KOIncidenceEditor::~KOIncidenceEditor() @@ -83,12 +83,12 @@ KOIncidenceEditor::~KOIncidenceEditor() void KOIncidenceEditor::setupAttendeesTab() { - QFrame *topFrame = addPage( i18n("Atte&ndees") ); - QWhatsThis::add( topFrame, + TQFrame *topFrame = addPage( i18n("Atte&ndees") ); + TQWhatsThis::add( topFrame, i18n("The Attendees tab allows you to Add or Remove " "Attendees to/from this event or to-do.") ); - QBoxLayout *topLayout = new QVBoxLayout( topFrame ); + TQBoxLayout *topLayout = new TQVBoxLayout( topFrame ); mAttendeeEditor = mDetails = new KOEditorDetails( spacingHint(), topFrame ); topLayout->addWidget( mDetails ); @@ -104,7 +104,7 @@ void KOIncidenceEditor::slotOk() // "this" can be deleted before processInput() returns (processInput() opens // a non-modal dialog when Kolab is used). So accept should only be executed // when "this" is still valid - QGuardedPtr<QWidget> ptr( this ); + TQGuardedPtr<TQWidget> ptr( this ); if ( processInput() && ptr ) accept(); } @@ -137,22 +137,22 @@ void KOIncidenceEditor::slotManageTemplates() kdDebug(5850) << "KOIncidenceEditor::manageTemplates()" << endl; TemplateManagementDialog * const d = new TemplateManagementDialog( this, templates() ); - connect( d, SIGNAL( loadTemplate( const QString& ) ), - this, SLOT( slotLoadTemplate( const QString& ) ) ); - connect( d, SIGNAL( templatesChanged( const QStringList& ) ), - this, SLOT( slotTemplatesChanged( const QStringList& ) ) ); - connect( d, SIGNAL( saveTemplate( const QString& ) ), - this, SLOT( slotSaveTemplate( const QString& ) ) ); + connect( d, TQT_SIGNAL( loadTemplate( const TQString& ) ), + this, TQT_SLOT( slotLoadTemplate( const TQString& ) ) ); + connect( d, TQT_SIGNAL( templatesChanged( const TQStringList& ) ), + this, TQT_SLOT( slotTemplatesChanged( const TQStringList& ) ) ); + connect( d, TQT_SIGNAL( saveTemplate( const TQString& ) ), + this, TQT_SLOT( slotSaveTemplate( const TQString& ) ) ); d->exec(); return; } void KOIncidenceEditor::saveAsTemplate( Incidence *incidence, - const QString &templateName ) + const TQString &templateName ) { if ( !incidence || templateName.isEmpty() ) return; - QString fileName = "templates/" + incidence->type(); + TQString fileName = "templates/" + incidence->type(); fileName.append( "/" + templateName ); fileName = locateLocal( "data", "korganizer/" + fileName ); @@ -162,10 +162,10 @@ void KOIncidenceEditor::saveAsTemplate( Incidence *incidence, format.save( &cal, fileName ); } -void KOIncidenceEditor::slotLoadTemplate( const QString& templateName ) +void KOIncidenceEditor::slotLoadTemplate( const TQString& templateName ) { CalendarLocal cal( KOPrefs::instance()->mTimeZoneId ); - QString fileName = locateLocal( "data", "korganizer/templates/" + type() + "/" + + TQString fileName = locateLocal( "data", "korganizer/templates/" + type() + "/" + templateName ); if ( fileName.isEmpty() ) { @@ -182,37 +182,37 @@ void KOIncidenceEditor::slotLoadTemplate( const QString& templateName ) loadTemplate( cal ); } -void KOIncidenceEditor::slotTemplatesChanged( const QStringList& newTemplates ) +void KOIncidenceEditor::slotTemplatesChanged( const TQStringList& newTemplates ) { templates() = newTemplates; } -void KOIncidenceEditor::setupDesignerTabs( const QString &type ) +void KOIncidenceEditor::setupDesignerTabs( const TQString &type ) { - QStringList activePages = KOPrefs::instance()->activeDesignerFields(); + TQStringList activePages = KOPrefs::instance()->activeDesignerFields(); - QStringList list = KGlobal::dirs()->findAllResources( "data", + TQStringList list = KGlobal::dirs()->findAllResources( "data", "korganizer/designer/" + type + "/*.ui", true, true ); - for ( QStringList::iterator it = list.begin(); it != list.end(); ++it ) { - const QString &fn = (*it).mid( (*it).findRev('/') + 1 ); + for ( TQStringList::iterator it = list.begin(); it != list.end(); ++it ) { + const TQString &fn = (*it).mid( (*it).findRev('/') + 1 ); if ( activePages.find( fn ) != activePages.end() ) { addDesignerTab( *it ); } } } -QWidget *KOIncidenceEditor::addDesignerTab( const QString &uifile ) +TQWidget *KOIncidenceEditor::addDesignerTab( const TQString &uifile ) { kdDebug(5850) << "Designer tab: " << uifile << endl; KPIM::DesignerFields *wid = new KPIM::DesignerFields( uifile, 0 ); mDesignerFields.append( wid ); - QFrame *topFrame = addPage( wid->title() ); + TQFrame *topFrame = addPage( wid->title() ); - QBoxLayout *topLayout = new QVBoxLayout( topFrame ); + TQBoxLayout *topLayout = new TQVBoxLayout( topFrame ); - wid->reparent( topFrame, 0, QPoint() ); + wid->reparent( topFrame, 0, TQPoint() ); topLayout->addWidget( wid ); mDesignerFieldForWidget[ topFrame ] = wid; @@ -227,15 +227,15 @@ class KCalStorage : public KPIM::DesignerFields::Storage { } - QStringList keys() + TQStringList keys() { - QStringList keys; + TQStringList keys; - QMap<QCString, QString> props = mIncidence->customProperties(); - QMap<QCString, QString>::ConstIterator it; + TQMap<TQCString, TQString> props = mIncidence->customProperties(); + TQMap<TQCString, TQString>::ConstIterator it; for( it = props.begin(); it != props.end(); ++it ) { - QString customKey = it.key(); - QStringList parts = QStringList::split( "-", customKey ); + TQString customKey = it.key(); + TQStringList parts = TQStringList::split( "-", customKey ); if ( parts.count() != 4 ) continue; if ( parts[ 2 ] != "KORGANIZER" ) continue; keys.append( parts[ 3 ] ); @@ -244,12 +244,12 @@ class KCalStorage : public KPIM::DesignerFields::Storage return keys; } - QString read( const QString &key ) + TQString read( const TQString &key ) { return mIncidence->customProperty( "KORGANIZER", key.utf8() ); } - void write( const QString &key, const QString &value ) + void write( const TQString &key, const TQString &value ) { mIncidence->setCustomProperty( "KORGANIZER", key.utf8(), value ); } @@ -282,20 +282,20 @@ void KOIncidenceEditor::writeDesignerFields( Incidence *i ) } -void KOIncidenceEditor::setupEmbeddedURLPage( const QString &label, - const QString &url, const QString &mimetype ) +void KOIncidenceEditor::setupEmbeddedURLPage( const TQString &label, + const TQString &url, const TQString &mimetype ) { kdDebug(5850) << "KOIncidenceEditor::setupEmbeddedURLPage()" << endl; kdDebug(5850) << "label=" << label << ", url=" << url << ", mimetype=" << mimetype << endl; - QFrame *topFrame = addPage( label ); - QBoxLayout *topLayout = new QVBoxLayout( topFrame ); + TQFrame *topFrame = addPage( label ); + TQBoxLayout *topLayout = new TQVBoxLayout( topFrame ); KPIM::EmbeddedURLPage *wid = new KPIM::EmbeddedURLPage( url, mimetype, topFrame ); topLayout->addWidget( wid ); mEmbeddedURLPages.append( topFrame ); - connect( wid, SIGNAL( openURL( const KURL & ) ) , - this, SLOT( openURL( const KURL & ) ) ); + connect( wid, TQT_SIGNAL( openURL( const KURL & ) ) , + this, TQT_SLOT( openURL( const KURL & ) ) ); // TODO: Call this method only when the tab is actually activated! wid->loadContents(); } @@ -312,7 +312,7 @@ void KOIncidenceEditor::createEmbeddedURLPages( Incidence *i ) mEmbeddedURLPages.setAutoDelete( false ); } if ( !mAttachedDesignerFields.isEmpty() ) { - for ( QPtrList<QWidget>::Iterator it = mAttachedDesignerFields.begin(); + for ( TQPtrList<TQWidget>::Iterator it = mAttachedDesignerFields.begin(); it != mAttachedDesignerFields.end(); ++it ) { if ( mDesignerFieldForWidget.contains( *it ) ) { mDesignerFields.remove( mDesignerFieldForWidget[ *it ] ); @@ -331,7 +331,7 @@ void KOIncidenceEditor::createEmbeddedURLPages( Incidence *i ) if ( a && a->showInline() && a->isUri() ) { // TODO: Allow more mime-types, but add security checks! /* if ( a->mimeType() == "application/x-designer" ) { - QString tmpFile; + TQString tmpFile; if ( KIO::NetAccess::download( a->uri(), tmpFile, this ) ) { mAttachedDesignerFields.append( addDesignerTab( tmpFile ) ); KIO::NetAccess::removeTempFile( tmpFile ); @@ -348,22 +348,22 @@ void KOIncidenceEditor::createEmbeddedURLPages( Incidence *i ) void KOIncidenceEditor::openURL( const KURL &url ) { - QString uri = url.url(); + TQString uri = url.url(); UriHandler::process( uri ); } -void KOIncidenceEditor::addAttachments( const QStringList &attachments, - const QStringList &mimeTypes, +void KOIncidenceEditor::addAttachments( const TQStringList &attachments, + const TQStringList &mimeTypes, bool inlineAttachments ) { emit signalAddAttachments( attachments, mimeTypes, inlineAttachments ); } -void KOIncidenceEditor::addAttendees( const QStringList &attendees ) +void KOIncidenceEditor::addAttendees( const TQStringList &attendees ) { - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = attendees.begin(); it != attendees.end(); ++it ) { - QString name, email; + TQString name, email; KABC::Addressee::parseEmailAddress( *it, name, email ); mAttendeeEditor->insertAttendee( new Attendee( name, email ) ); } diff --git a/korganizer/koincidenceeditor.h b/korganizer/koincidenceeditor.h index 6816c7808..3440a35b2 100644 --- a/korganizer/koincidenceeditor.h +++ b/korganizer/koincidenceeditor.h @@ -59,8 +59,8 @@ class KOIncidenceEditor : public KDialogBase /** Construct new IncidenceEditor. */ - KOIncidenceEditor( const QString &caption, Calendar *calendar, - QWidget *parent ); + KOIncidenceEditor( const TQString &caption, Calendar *calendar, + TQWidget *parent ); virtual ~KOIncidenceEditor(); /** This incidence has been modified externally */ @@ -80,13 +80,13 @@ class KOIncidenceEditor : public KDialogBase /** Adds attachments to the editor */ - void addAttachments( const QStringList &attachments, - const QStringList& mimeTypes = QStringList(), + void addAttachments( const TQStringList &attachments, + const TQStringList& mimeTypes = TQStringList(), bool inlineAttachment = false ); /** Adds attendees to the editor */ - void addAttendees( const QStringList &attendees ); + void addAttendees( const TQStringList &attendees ); signals: @@ -98,8 +98,8 @@ class KOIncidenceEditor : public KDialogBase void editCanceled( Incidence * ); void deleteIncidenceSignal( Incidence * ); - void signalAddAttachments( const QStringList &attachments, - const QStringList& mimeTypes = QStringList(), + void signalAddAttachments( const TQStringList &attachments, + const TQStringList& mimeTypes = TQStringList(), bool inlineAttachment = false ); @@ -111,27 +111,27 @@ class KOIncidenceEditor : public KDialogBase virtual void slotManageTemplates(); - virtual void slotSaveTemplate( const QString & ) = 0; - virtual void slotLoadTemplate( const QString& ); - virtual void slotTemplatesChanged( const QStringList& ); + virtual void slotSaveTemplate( const TQString & ) = 0; + virtual void slotLoadTemplate( const TQString& ); + virtual void slotTemplatesChanged( const TQStringList& ); protected: - virtual QString type() { return QString::null; } - virtual QStringList& templates() const = 0; + virtual TQString type() { return TQString::null; } + virtual TQStringList& templates() const = 0; virtual void loadTemplate( /*const*/ CalendarLocal& ) = 0; void setupAttendeesTab(); - void setupDesignerTabs( const QString &type ); + void setupDesignerTabs( const TQString &type ); - void saveAsTemplate( Incidence *, const QString &name ); + void saveAsTemplate( Incidence *, const TQString &name ); void readDesignerFields( Incidence *i ); void writeDesignerFields( Incidence *i ); // Returns the page widget. To remove the tab, just delete that one. - QWidget *addDesignerTab( const QString &uifile ); + TQWidget *addDesignerTab( const TQString &uifile ); - void setupEmbeddedURLPage( const QString &label, const QString &url, - const QString &mimetype ); + void setupEmbeddedURLPage( const TQString &label, const TQString &url, + const TQString &mimetype ); void createEmbeddedURLPages( Incidence *i ); /** @@ -149,10 +149,10 @@ class KOIncidenceEditor : public KDialogBase KOAttendeeEditor *mAttendeeEditor; KOrg::IncidenceChangerBase *mChanger; - QPtrList<KPIM::DesignerFields> mDesignerFields; - QMap<QWidget*, KPIM::DesignerFields*> mDesignerFieldForWidget; - QPtrList<QWidget> mEmbeddedURLPages; - QPtrList<QWidget> mAttachedDesignerFields; + TQPtrList<KPIM::DesignerFields> mDesignerFields; + TQMap<TQWidget*, KPIM::DesignerFields*> mDesignerFieldForWidget; + TQPtrList<TQWidget> mEmbeddedURLPages; + TQPtrList<TQWidget> mAttachedDesignerFields; bool mIsCounter; }; diff --git a/korganizer/koincidencetooltip.cpp b/korganizer/koincidencetooltip.cpp index c7065a28b..8b3f11756 100644 --- a/korganizer/koincidencetooltip.cpp +++ b/korganizer/koincidencetooltip.cpp @@ -33,22 +33,22 @@ some improvements by Mikolaj Machowski */ -void KOIncidenceToolTip::add ( QWidget * widget, Incidence *incidence, - QToolTipGroup * group, const QString & longText ) +void KOIncidenceToolTip::add ( TQWidget * widget, Incidence *incidence, + TQToolTipGroup * group, const TQString & longText ) { if ( !widget || !incidence ) return; - QToolTip::add(widget, IncidenceFormatter::toolTipString( incidence ), group, longText); + TQToolTip::add(widget, IncidenceFormatter::toolTipString( incidence ), group, longText); } -void KOIncidenceToolTip::add(KOAgendaItem * item, Incidence * incidence, QToolTipGroup * group) +void KOIncidenceToolTip::add(KOAgendaItem * item, Incidence * incidence, TQToolTipGroup * group) { Q_UNUSED( incidence ); Q_UNUSED( group ); - QToolTip::remove( item ); + TQToolTip::remove( item ); new KOIncidenceToolTip( item ); } -void KOIncidenceToolTip::maybeTip(const QPoint & pos) +void KOIncidenceToolTip::maybeTip(const TQPoint & pos) { Q_UNUSED( pos ); KOAgendaItem *item = dynamic_cast<KOAgendaItem*>( parentWidget() ); @@ -56,5 +56,5 @@ void KOIncidenceToolTip::maybeTip(const QPoint & pos) return; if ( !mText ) mText = IncidenceFormatter::toolTipString( item->incidence() ); - tip( QRect( QPoint( 0, 0 ), item->size() ), mText ); + tip( TQRect( TQPoint( 0, 0 ), item->size() ), mText ); } diff --git a/korganizer/koincidencetooltip.h b/korganizer/koincidencetooltip.h index 5f6e84a81..11b5d39a3 100644 --- a/korganizer/koincidencetooltip.h +++ b/korganizer/koincidencetooltip.h @@ -23,7 +23,7 @@ #ifndef KOINCIDENCETOOLTIP_H #define KOINCIDENCETOOLTIP_H -#include <qtooltip.h> +#include <tqtooltip.h> namespace KCal { @@ -39,20 +39,20 @@ class KOAgendaItem; class KOIncidenceToolTip : public QToolTip { public: - KOIncidenceToolTip(QWidget * widget, QToolTipGroup * group = 0 ):QToolTip (widget, group),mText(0) {} + KOIncidenceToolTip(TQWidget * widget, TQToolTipGroup * group = 0 ):TQToolTip (widget, group),mText(0) {} /* ~KOIncidenceToolTip();*/ public: - static void add ( QWidget * widget, Incidence *incidence, - QToolTipGroup * group = 0, const QString & longText = "" ); + static void add ( TQWidget * widget, Incidence *incidence, + TQToolTipGroup * group = 0, const TQString & longText = "" ); static void add( KOAgendaItem *item, Incidence *incidence = 0, - QToolTipGroup *group = 0 ); + TQToolTipGroup *group = 0 ); - /* reimplmented from QToolTip */ - void maybeTip( const QPoint &pos ); + /* reimplmented from TQToolTip */ + void maybeTip( const TQPoint &pos ); private: - QString mText; + TQString mText; }; #endif diff --git a/korganizer/kojournaleditor.cpp b/korganizer/kojournaleditor.cpp index 1d2d75410..a50ba1fe2 100644 --- a/korganizer/kojournaleditor.cpp +++ b/korganizer/kojournaleditor.cpp @@ -39,11 +39,11 @@ #include <klocale.h> #include <kdebug.h> -#include <qlayout.h> +#include <tqlayout.h> using namespace KCal; -KOJournalEditor::KOJournalEditor( Calendar *calendar, QWidget *parent ) : +KOJournalEditor::KOJournalEditor( Calendar *calendar, TQWidget *parent ) : KOIncidenceEditor( i18n("Edit Journal Entry"), calendar, parent ) { mJournal = 0; @@ -71,9 +71,9 @@ void KOJournalEditor::setupGeneral() mGeneral = new KOEditorGeneralJournal(this); if (KOPrefs::instance()->mCompactDialogs) { - QFrame *topFrame = addPage(i18n("General")); + TQFrame *topFrame = addPage(i18n("General")); - QBoxLayout *topLayout = new QVBoxLayout( topFrame ); + TQBoxLayout *topLayout = new TQVBoxLayout( topFrame ); topLayout->setMargin( marginHint() ); topLayout->setSpacing( spacingHint() ); @@ -81,9 +81,9 @@ void KOJournalEditor::setupGeneral() mGeneral->initDate( topFrame, topLayout ); mGeneral->initDescription( topFrame, topLayout ); } else { - QFrame *topFrame = addPage(i18n("&General")); + TQFrame *topFrame = addPage(i18n("&General")); - QBoxLayout *topLayout = new QVBoxLayout(topFrame); + TQBoxLayout *topLayout = new TQVBoxLayout(topFrame); topLayout->setSpacing(spacingHint()); mGeneral->initTitle( topFrame, topLayout ); @@ -114,7 +114,7 @@ void KOJournalEditor::newJournal() loadDefaults(); } -void KOJournalEditor::setTexts( const QString &summary, const QString &description ) +void KOJournalEditor::setTexts( const TQString &summary, const TQString &description ) { if ( description.isEmpty() && summary.contains("\n") ) { mGeneral->setDescription( summary ); @@ -130,7 +130,7 @@ void KOJournalEditor::setTexts( const QString &summary, const QString &descripti void KOJournalEditor::loadDefaults() { - setDate( QDate::currentDate() ); + setDate( TQDate::currentDate() ); } bool KOJournalEditor::processInput() @@ -170,7 +170,7 @@ void KOJournalEditor::deleteJournal() reject(); } -void KOJournalEditor::setDate( const QDate &date ) +void KOJournalEditor::setDate( const TQDate &date ) { mGeneral->setDefaults( date ); mDetails->setDefaults(); @@ -219,14 +219,14 @@ void KOJournalEditor::loadTemplate( /*const*/ CalendarLocal& cal) } } -void KOJournalEditor::slotSaveTemplate( const QString &templateName ) +void KOJournalEditor::slotSaveTemplate( const TQString &templateName ) { Journal *journal = new Journal; writeJournal( journal ); saveAsTemplate( journal, templateName ); } -QStringList& KOJournalEditor::templates() const +TQStringList& KOJournalEditor::templates() const { return KOPrefs::instance()->mJournalTemplates; } diff --git a/korganizer/kojournaleditor.h b/korganizer/kojournaleditor.h index a6dc501d6..7d102769e 100644 --- a/korganizer/kojournaleditor.h +++ b/korganizer/kojournaleditor.h @@ -28,7 +28,7 @@ #include "koincidenceeditor.h" -#include <qdatetime.h> +#include <tqdatetime.h> class QDateTime; namespace KCal { @@ -50,7 +50,7 @@ class KOJournalEditor : public KOIncidenceEditor /** Constructs a new Journal editor. */ - KOJournalEditor( Calendar *calendar, QWidget *parent ); + KOJournalEditor( Calendar *calendar, TQWidget *parent ); virtual ~KOJournalEditor(); void init(); @@ -67,12 +67,12 @@ class KOJournalEditor : public KOIncidenceEditor summary contains multiple lines, the summary will be used as description and only the first line of summary will be used as the summary. */ - void setTexts( const QString &summary, const QString &description = QString::null ); + void setTexts( const TQString &summary, const TQString &description = TQString::null ); /** Edit an existing Journal. */ void editIncidence(Incidence *, Calendar *); /** Set widgets to default values */ - void setDate( const QDate &date ); + void setDate( const TQDate &date ); /** Read event object and setup widgets accordingly */ void readJournal( Journal * ); /** Write event settings to event object */ @@ -92,15 +92,15 @@ class KOJournalEditor : public KOIncidenceEditor void loadDefaults(); void deleteJournal(); - void slotSaveTemplate( const QString & ); + void slotSaveTemplate( const TQString & ); protected: - QString type() { return "Journal"; } + TQString type() { return "Journal"; } void setupGeneral(); // int msgItemDelete(); void loadTemplate( /*const*/ CalendarLocal& ); - QStringList& templates() const; + TQStringList& templates() const; private: Journal *mJournal; KOEditorGeneralJournal *mGeneral; diff --git a/korganizer/kojournalview.cpp b/korganizer/kojournalview.cpp index dd064169b..e8de3daed 100644 --- a/korganizer/kojournalview.cpp +++ b/korganizer/kojournalview.cpp @@ -25,11 +25,11 @@ // // View of Journal entries -#include <qlayout.h> -#include <qpopupmenu.h> -#include <qvbox.h> -#include <qlabel.h> -#include <qscrollview.h> +#include <tqlayout.h> +#include <tqpopupmenu.h> +#include <tqvbox.h> +#include <tqlabel.h> +#include <tqscrollview.h> #include <klocale.h> #include <kdebug.h> @@ -42,17 +42,17 @@ #include "koglobals.h" using namespace KOrg; -KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent, +KOJournalView::KOJournalView(Calendar *calendar, TQWidget *parent, const char *name) : KOrg::BaseView(calendar, parent, name) { - QVBoxLayout*topLayout = new QVBoxLayout( this ); + TQVBoxLayout*topLayout = new TQVBoxLayout( this ); topLayout->setAutoAdd(true); - mSV = new QScrollView( this, "JournalScrollView" ); - mVBox = new QVBox( mSV->viewport() ); - mSV->setVScrollBarMode( QScrollView::Auto ); - mSV->setHScrollBarMode( QScrollView::AlwaysOff ); - mSV->setResizePolicy( QScrollView::AutoOneFit ); + mSV = new TQScrollView( this, "JournalScrollView" ); + mVBox = new TQVBox( mSV->viewport() ); + mSV->setVScrollBarMode( TQScrollView::Auto ); + mSV->setHScrollBarMode( TQScrollView::AlwaysOff ); + mSV->setResizePolicy( TQScrollView::AutoOneFit ); mSV->addChild( mVBox ); // mVBox->setSpacing( 10 ); } @@ -61,7 +61,7 @@ KOJournalView::~KOJournalView() { } -void KOJournalView::appendJournal( Journal*journal, const QDate &dt) +void KOJournalView::appendJournal( Journal*journal, const TQDate &dt) { JournalDateEntry *entry = 0; if ( mEntries.contains( dt ) ) { @@ -71,20 +71,20 @@ void KOJournalView::appendJournal( Journal*journal, const QDate &dt) entry->setDate( dt ); entry->setIncidenceChanger( mChanger ); entry->show(); - connect( this, SIGNAL(flushEntries()), entry, SIGNAL(flushEntries()) ); - connect( this, SIGNAL(setIncidenceChangerSignal( IncidenceChangerBase * ) ), - entry, SLOT(setIncidenceChanger( IncidenceChangerBase * ) ) ); - connect( this, SIGNAL( journalEdited( Journal* ) ), - entry, SLOT( journalEdited( Journal* ) ) ); - connect( this, SIGNAL( journalDeleted( Journal* ) ), - entry, SLOT( journalDeleted( Journal* ) ) ); - - connect( entry, SIGNAL( editIncidence( Incidence* ) ), - this, SIGNAL( editIncidenceSignal( Incidence* ) ) ); - connect( entry, SIGNAL( deleteIncidence( Incidence* ) ), - this, SIGNAL( deleteIncidenceSignal( Incidence* ) ) ); - connect( entry, SIGNAL( newJournal( const QDate & ) ), - this, SIGNAL( newJournalSignal( const QDate & ) ) ); + connect( this, TQT_SIGNAL(flushEntries()), entry, TQT_SIGNAL(flushEntries()) ); + connect( this, TQT_SIGNAL(setIncidenceChangerSignal( IncidenceChangerBase * ) ), + entry, TQT_SLOT(setIncidenceChanger( IncidenceChangerBase * ) ) ); + connect( this, TQT_SIGNAL( journalEdited( Journal* ) ), + entry, TQT_SLOT( journalEdited( Journal* ) ) ); + connect( this, TQT_SIGNAL( journalDeleted( Journal* ) ), + entry, TQT_SLOT( journalDeleted( Journal* ) ) ); + + connect( entry, TQT_SIGNAL( editIncidence( Incidence* ) ), + this, TQT_SIGNAL( editIncidenceSignal( Incidence* ) ) ); + connect( entry, TQT_SIGNAL( deleteIncidence( Incidence* ) ), + this, TQT_SIGNAL( deleteIncidenceSignal( Incidence* ) ) ); + connect( entry, TQT_SIGNAL( newJournal( const TQDate & ) ), + this, TQT_SIGNAL( newJournalSignal( const TQDate & ) ) ); mEntries.insert( dt, entry ); } @@ -109,7 +109,7 @@ Incidence::List KOJournalView::selectedIncidences() void KOJournalView::clearEntries() { // kdDebug(5850)<<"KOJournalView::clearEntries()"<<endl; - QMap<QDate, JournalDateEntry*>::Iterator it; + TQMap<TQDate, JournalDateEntry*>::Iterator it; for ( it = mEntries.begin(); it != mEntries.end(); ++it ) { delete (it.data()); } @@ -117,7 +117,7 @@ void KOJournalView::clearEntries() } void KOJournalView::updateView() { - QMap<QDate, JournalDateEntry*>::Iterator it; + TQMap<TQDate, JournalDateEntry*>::Iterator it; for ( it = mEntries.begin(); it != mEntries.end(); ++it ) { it.data()->clear(); Journal::List journals = calendar()->journals( it.key() ); @@ -134,7 +134,7 @@ void KOJournalView::flushView() emit flushEntries(); } -void KOJournalView::showDates(const QDate &start, const QDate &end) +void KOJournalView::showDates(const TQDate &start, const TQDate &end) { // kdDebug(5850) << "KOJournalView::showDates(): "<<start.toString().latin1()<<" - "<<end.toString().latin1() << endl; clearEntries(); @@ -142,8 +142,8 @@ void KOJournalView::showDates(const QDate &start, const QDate &end) Journal::List::ConstIterator it; Journal::List jnls; - QDate d=start; - for ( QDate d=start; d<=end; d=d.addDays(1) ) { + TQDate d=start; + for ( TQDate d=start; d<=end; d=d.addDays(1) ) { jnls = calendar()->journals( d ); for ( it = jnls.begin(); it != jnls.end(); ++it ) { appendJournal( *it, d ); @@ -202,7 +202,7 @@ void KOJournalView::setIncidenceChanger( IncidenceChangerBase *changer ) void KOJournalView::newJournal() { - emit newJournalSignal( QDate::currentDate() ); + emit newJournalSignal( TQDate::currentDate() ); } #include "kojournalview.moc" diff --git a/korganizer/kojournalview.h b/korganizer/kojournalview.h index 8c147d232..3e48dd710 100644 --- a/korganizer/kojournalview.h +++ b/korganizer/kojournalview.h @@ -42,24 +42,24 @@ class KOJournalView : public KOrg::BaseView { Q_OBJECT public: - KOJournalView( Calendar *calendar, QWidget *parent = 0, + KOJournalView( Calendar *calendar, TQWidget *parent = 0, const char *name = 0); ~KOJournalView(); virtual int currentDateCount(); virtual Incidence::List selectedIncidences(); DateList selectedDates() { return DateList(); } - void appendJournal( Journal*journal, const QDate &dt); + void appendJournal( Journal*journal, const TQDate &dt); CalPrinterBase::PrintType printType(); public slots: // Don't update the view when midnight passed, otherwise we'll have data loss (bug 79145) - virtual void dayPassed( const QDate & ) {} + virtual void dayPassed( const TQDate & ) {} void updateView(); void flushView(); - void showDates( const QDate &start, const QDate &end ); + void showDates( const TQDate &start, const TQDate &end ); void showIncidences( const Incidence::List &incidenceList ); void changeIncidenceDisplay( Incidence *, int ); @@ -75,9 +75,9 @@ class KOJournalView : public KOrg::BaseView void clearEntries(); private: - QScrollView *mSV; - QVBox *mVBox; - QMap<QDate, JournalDateEntry*> mEntries; + TQScrollView *mSV; + TQVBox *mVBox; + TQMap<TQDate, JournalDateEntry*> mEntries; // DateList mSelectedDates; // List of dates to be displayed }; diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index 722a26460..7ca342e87 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp @@ -24,10 +24,10 @@ without including the source code for Qt in the source distribution. */ -#include <qlistview.h> -#include <qlayout.h> -#include <qpopupmenu.h> -#include <qcursor.h> +#include <tqlistview.h> +#include <tqlayout.h> +#include <tqpopupmenu.h> +#include <tqcursor.h> #include <klocale.h> #include <kdebug.h> @@ -46,24 +46,24 @@ #include "kolistview.moc" -KOListViewToolTip::KOListViewToolTip( QWidget* parent, +KOListViewToolTip::KOListViewToolTip( TQWidget* parent, KListView* lv ) - :QToolTip(parent) + :TQToolTip(parent) { eventlist=lv; } -void KOListViewToolTip::maybeTip( const QPoint & pos) +void KOListViewToolTip::maybeTip( const TQPoint & pos) { - QRect r; - QListViewItem *it = eventlist->itemAt(pos); + TQRect r; + TQListViewItem *it = eventlist->itemAt(pos); KOListViewItem *i = static_cast<KOListViewItem*>(it); if( i && KOPrefs::instance()->mEnableToolTips ) { /* Calculate the rectangle. */ r=eventlist->itemRect( it ); /* Show the tip */ - QString tipText( IncidenceFormatter::toolTipString( i->data() ) ); + TQString tipText( IncidenceFormatter::toolTipString( i->data() ) ); if ( !tipText.isEmpty() ) { tip(r, tipText); } @@ -93,7 +93,7 @@ bool KOListView::ListItemVisitor::visit( Event *e ) { mItem->setText(0,e->summary()); if ( e->isAlarmEnabled() ) { - static const QPixmap alarmPxmp = KOGlobals::self()->smallIcon( "bell" ); + static const TQPixmap alarmPxmp = KOGlobals::self()->smallIcon( "bell" ); mItem->setPixmap(1,alarmPxmp); mItem->setSortKey(1,"1"); } @@ -101,14 +101,14 @@ bool KOListView::ListItemVisitor::visit( Event *e ) mItem->setSortKey(1,"0"); if ( e->doesRecur() ) { - static const QPixmap recurPxmp = KOGlobals::self()->smallIcon( "recur" ); + static const TQPixmap recurPxmp = KOGlobals::self()->smallIcon( "recur" ); mItem->setPixmap(2,recurPxmp); mItem->setSortKey(2,"1"); } else mItem->setSortKey(2,"0"); - static const QPixmap eventPxmp = KOGlobals::self()->smallIcon( "appointment" ); + static const TQPixmap eventPxmp = KOGlobals::self()->smallIcon( "appointment" ); mItem->setPixmap(0, eventPxmp); mItem->setText( 3,e->dtStartDateStr()); @@ -130,12 +130,12 @@ bool KOListView::ListItemVisitor::visit( Event *e ) bool KOListView::ListItemVisitor::visit(Todo *t) { - static const QPixmap todoPxmp = KOGlobals::self()->smallIcon( "todo" ); - static const QPixmap todoDonePxmp = KOGlobals::self()->smallIcon( "checkedbox" ); + static const TQPixmap todoPxmp = KOGlobals::self()->smallIcon( "todo" ); + static const TQPixmap todoDonePxmp = KOGlobals::self()->smallIcon( "checkedbox" ); mItem->setPixmap(0, t->isCompleted() ? todoDonePxmp : todoPxmp ); mItem->setText(0,t->summary()); if ( t->isAlarmEnabled() ) { - static const QPixmap alarmPxmp = KOGlobals::self()->smallIcon( "bell" ); + static const TQPixmap alarmPxmp = KOGlobals::self()->smallIcon( "bell" ); mItem->setPixmap(1,alarmPxmp); mItem->setSortKey(1, "1"); } @@ -143,7 +143,7 @@ bool KOListView::ListItemVisitor::visit(Todo *t) mItem->setSortKey(1, "0"); if ( t->doesRecur() ) { - static const QPixmap recurPxmp = KOGlobals::self()->smallIcon( "recur" ); + static const TQPixmap recurPxmp = KOGlobals::self()->smallIcon( "recur" ); mItem->setPixmap(2,recurPxmp); mItem->setSortKey(2, "1"); } @@ -185,7 +185,7 @@ bool KOListView::ListItemVisitor::visit(Todo *t) bool KOListView::ListItemVisitor::visit(Journal *t) { - static const QPixmap jrnalPxmp = KOGlobals::self()->smallIcon( "journal" ); + static const TQPixmap jrnalPxmp = KOGlobals::self()->smallIcon( "journal" ); mItem->setPixmap(0,jrnalPxmp); // Just use the first line mItem->setText( 0, t->description().section( "\n", 0, 0 ) ); @@ -195,7 +195,7 @@ bool KOListView::ListItemVisitor::visit(Journal *t) return true; } -KOListView::KOListView( Calendar *calendar, QWidget *parent, +KOListView::KOListView( Calendar *calendar, TQWidget *parent, const char *name) : KOEventView(calendar, parent, name) { @@ -215,35 +215,35 @@ KOListView::KOListView( Calendar *calendar, QWidget *parent, mListView->setColumnAlignment(6,AlignHCenter); mListView->addColumn(i18n("Categories")); - QBoxLayout *layoutTop = new QVBoxLayout(this); + TQBoxLayout *layoutTop = new TQVBoxLayout(this); layoutTop->addWidget(mListView); mPopupMenu = eventPopup(); /* mPopupMenu->insertSeparator(); mPopupMenu->insertItem(i18n("Show Dates"), this, - SLOT(showDates())); + TQT_SLOT(showDates())); mPopupMenu->insertItem(i18n("Hide Dates"), this, - SLOT(hideDates())); + TQT_SLOT(hideDates())); */ - QObject::connect( mListView, SIGNAL( doubleClicked( QListViewItem * ) ), - SLOT( defaultItemAction( QListViewItem * ) ) ); - QObject::connect( mListView, SIGNAL( returnPressed( QListViewItem * ) ), - SLOT( defaultItemAction( QListViewItem * ) ) ); - QObject::connect( mListView, SIGNAL( rightButtonClicked ( QListViewItem *, - const QPoint &, + TQObject::connect( mListView, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), + TQT_SLOT( defaultItemAction( TQListViewItem * ) ) ); + TQObject::connect( mListView, TQT_SIGNAL( returnPressed( TQListViewItem * ) ), + TQT_SLOT( defaultItemAction( TQListViewItem * ) ) ); + TQObject::connect( mListView, TQT_SIGNAL( rightButtonClicked ( TQListViewItem *, + const TQPoint &, int ) ), - SLOT( popupMenu( QListViewItem *, const QPoint &, int ) ) ); - QObject::connect( mListView, SIGNAL( selectionChanged() ), - SLOT( processSelectionChange() ) ); + TQT_SLOT( popupMenu( TQListViewItem *, const TQPoint &, int ) ) ); + TQObject::connect( mListView, TQT_SIGNAL( selectionChanged() ), + TQT_SLOT( processSelectionChange() ) ); // setMinimumSize(100,100); mListView->restoreLayout(KOGlobals::self()->config(),"KOListView Layout"); new KOListViewToolTip( mListView->viewport(), mListView ); - mSelectedDates.append( QDate::currentDate() ); + mSelectedDates.append( TQDate::currentDate() ); } KOListView::~KOListView() @@ -265,7 +265,7 @@ Incidence::List KOListView::selectedIncidences() { Incidence::List eventList; - QListViewItem *item = mListView->selectedItem(); + TQListViewItem *item = mListView->selectedItem(); if (item) eventList.append(((KOListViewItem *)item)->data()); return eventList; @@ -310,11 +310,11 @@ void KOListView::updateView() kdDebug(5850) << "KOListView::updateView() does nothing" << endl; } -void KOListView::showDates(const QDate &start, const QDate &end) +void KOListView::showDates(const TQDate &start, const TQDate &end) { clear(); - QDate date = start; + TQDate date = start; while( date <= end ) { addIncidences( calendar()->incidences(date) ); mSelectedDates.append( date ); @@ -357,10 +357,10 @@ void KOListView::showIncidences( const Incidence::List &incidenceList ) void KOListView::changeIncidenceDisplay(Incidence *incidence, int action) { KOListViewItem *item; - QDate f = mSelectedDates.first(); - QDate l = mSelectedDates.last(); + TQDate f = mSelectedDates.first(); + TQDate l = mSelectedDates.last(); - QDate date; + TQDate date; if ( incidence->type() == "Todo" ) date = static_cast<Todo *>(incidence)->dtDue().date(); else @@ -404,20 +404,20 @@ KOListViewItem *KOListView::getItemForIncidence(Incidence *incidence) return 0; } -void KOListView::defaultItemAction(QListViewItem *i) +void KOListView::defaultItemAction(TQListViewItem *i) { KOListViewItem *item = static_cast<KOListViewItem *>( i ); if ( item ) defaultAction( item->data() ); } -void KOListView::popupMenu(QListViewItem *item,const QPoint &,int) +void KOListView::popupMenu(TQListViewItem *item,const TQPoint &,int) { mActiveItem = (KOListViewItem *)item; if (mActiveItem) { Incidence *incidence = mActiveItem->data(); // FIXME: For recurring incidences we don't know the date of this // occurrence, there's no reference to it at all! - mPopupMenu->showIncidencePopup( incidence, QDate() ); + mPopupMenu->showIncidencePopup( incidence, TQDate() ); } else { showNewEventPopup(); diff --git a/korganizer/kolistview.h b/korganizer/kolistview.h index d2586ea4a..6da6988a8 100644 --- a/korganizer/kolistview.h +++ b/korganizer/kolistview.h @@ -26,8 +26,8 @@ #ifndef _KOLISTVIEW_H #define _KOLISTVIEW_H -#include <qdict.h> -#include <qtooltip.h> +#include <tqdict.h> +#include <tqtooltip.h> #include <libkcal/incidence.h> @@ -43,10 +43,10 @@ class KOListView; class KOListViewToolTip : public QToolTip { public: - KOListViewToolTip (QWidget* parent, KListView* lv ); + KOListViewToolTip (TQWidget* parent, KListView* lv ); protected: - void maybeTip( const QPoint & pos); + void maybeTip( const TQPoint & pos); private: KListView* eventlist; @@ -67,7 +67,7 @@ class KOListView : public KOEventView { Q_OBJECT public: - KOListView(Calendar *calendar, QWidget *parent = 0, + KOListView(Calendar *calendar, TQWidget *parent = 0, const char *name = 0); ~KOListView(); @@ -85,7 +85,7 @@ class KOListView : public KOEventView public slots: virtual void updateView(); - virtual void showDates( const QDate &start, const QDate &end ); + virtual void showDates( const TQDate &start, const TQDate &end ); virtual void showIncidences( const Incidence::List &incidenceList ); void clearSelection(); @@ -95,8 +95,8 @@ class KOListView : public KOEventView void changeIncidenceDisplay(Incidence *, int); - void defaultItemAction(QListViewItem *item); - void popupMenu(QListViewItem *item,const QPoint &,int); + void defaultItemAction(TQListViewItem *item); + void popupMenu(TQListViewItem *item,const TQPoint &,int); protected slots: void processSelectionChange(); @@ -111,7 +111,7 @@ class KOListView : public KOEventView KListView *mListView; KOEventPopupMenu *mPopupMenu; KOListViewItem *mActiveItem; - QDict<Incidence> mUidDict; + TQDict<Incidence> mUidDict; DateList mSelectedDates; }; diff --git a/korganizer/komailclient.cpp b/korganizer/komailclient.cpp index c9e021979..946331fde 100644 --- a/korganizer/komailclient.cpp +++ b/korganizer/komailclient.cpp @@ -51,16 +51,16 @@ KOMailClient::~KOMailClient() { } -bool KOMailClient::mailAttendees(IncidenceBase *incidence,const QString &attachment) +bool KOMailClient::mailAttendees(IncidenceBase *incidence,const TQString &attachment) { Attendee::List attendees = incidence->attendees(); if (attendees.count() == 0) return false; - const QString from = incidence->organizer().fullName(); - const QString organizerEmail = incidence->organizer().email(); - QStringList toList; + const TQString from = incidence->organizer().fullName(); + const TQString organizerEmail = incidence->organizer().email(); + TQStringList toList; for(uint i=0; i<attendees.count();++i) { - const QString email = (*attendees.at(i))->email(); + const TQString email = (*attendees.at(i))->email(); // In case we (as one of our identities) are the organizer we are sending this // mail. We could also have added ourselves as an attendee, in which case we // don't want to send ourselves a notification mail. @@ -70,9 +70,9 @@ bool KOMailClient::mailAttendees(IncidenceBase *incidence,const QString &attachm if( toList.count() == 0 ) // Not really to be called a groupware meeting, eh return false; - QString to = toList.join( ", " ); + TQString to = toList.join( ", " ); - QString subject; + TQString subject; if(incidence->type()!="FreeBusy") { Incidence *inc = static_cast<Incidence *>(incidence); subject = inc->summary(); @@ -80,20 +80,20 @@ bool KOMailClient::mailAttendees(IncidenceBase *incidence,const QString &attachm subject = "Free Busy Object"; } - QString body = IncidenceFormatter::mailBodyString(incidence); + TQString body = IncidenceFormatter::mailBodyString(incidence); bool bcc = KOPrefs::instance()->mBcc; return send(from,to,subject,body,bcc,attachment); } -bool KOMailClient::mailOrganizer(IncidenceBase *incidence,const QString &attachment, const QString &sub) +bool KOMailClient::mailOrganizer(IncidenceBase *incidence,const TQString &attachment, const TQString &sub) { - QString to = incidence->organizer().fullName(); + TQString to = incidence->organizer().fullName(); - QString from = KOPrefs::instance()->email(); + TQString from = KOPrefs::instance()->email(); - QString subject = sub; + TQString subject = sub; if(incidence->type()!="FreeBusy") { Incidence *inc = static_cast<Incidence *>(incidence); if ( subject.isEmpty() ) @@ -102,33 +102,33 @@ bool KOMailClient::mailOrganizer(IncidenceBase *incidence,const QString &attachm subject = "Free Busy Message"; } - QString body = IncidenceFormatter::mailBodyString(incidence); + TQString body = IncidenceFormatter::mailBodyString(incidence); bool bcc = KOPrefs::instance()->mBcc; return send(from,to,subject,body,bcc,attachment); } -bool KOMailClient::mailTo(IncidenceBase *incidence,const QString &recipients, - const QString &attachment) +bool KOMailClient::mailTo(IncidenceBase *incidence,const TQString &recipients, + const TQString &attachment) { - QString from = KOPrefs::instance()->email(); - QString subject; + TQString from = KOPrefs::instance()->email(); + TQString subject; if(incidence->type()!="FreeBusy") { Incidence *inc = static_cast<Incidence *>(incidence); subject = inc->summary(); } else { subject = "Free Busy Message"; } - QString body = IncidenceFormatter::mailBodyString(incidence); + TQString body = IncidenceFormatter::mailBodyString(incidence); bool bcc = KOPrefs::instance()->mBcc; kdDebug () << "KOMailClient::mailTo " << recipients << endl; return send(from,recipients,subject,body,bcc,attachment); } -bool KOMailClient::send(const QString &from,const QString &to, - const QString &subject,const QString &body,bool bcc, - const QString &attachment) +bool KOMailClient::send(const TQString &from,const TQString &to, + const TQString &subject,const TQString &body,bool bcc, + const TQString &attachment) { kdDebug(5850) << "KOMailClient::sendMail():\nFrom: " << from << "\nTo: " << to << "\nSubject: " << subject << "\nBody: \n" << body @@ -137,18 +137,18 @@ bool KOMailClient::send(const QString &from,const QString &to, if (KOPrefs::instance()->mMailClient == KOPrefs::MailClientSendmail) { bool needHeaders = true; - QString command = KStandardDirs::findExe(QString::fromLatin1("sendmail"), - QString::fromLatin1("/sbin:/usr/sbin:/usr/lib")); - if (!command.isNull()) command += QString::fromLatin1(" -oi -t"); + TQString command = KStandardDirs::findExe(TQString::fromLatin1("sendmail"), + TQString::fromLatin1("/sbin:/usr/sbin:/usr/lib")); + if (!command.isNull()) command += TQString::fromLatin1(" -oi -t"); else { - command = KStandardDirs::findExe(QString::fromLatin1("mail")); + command = KStandardDirs::findExe(TQString::fromLatin1("mail")); if (command.isNull()) return false; // give up - command.append(QString::fromLatin1(" -s ")); + command.append(TQString::fromLatin1(" -s ")); command.append(KProcess::quote(subject)); if (bcc) { - command.append(QString::fromLatin1(" -b ")); + command.append(TQString::fromLatin1(" -b ")); command.append(KProcess::quote(from)); } @@ -165,14 +165,14 @@ bool KOMailClient::send(const QString &from,const QString &to, return false; } - QString textComplete; + TQString textComplete; if (needHeaders) { - textComplete += QString::fromLatin1("From: ") + from + '\n'; - textComplete += QString::fromLatin1("To: ") + to + '\n'; - if (bcc) textComplete += QString::fromLatin1("Bcc: ") + from + '\n'; - textComplete += QString::fromLatin1("Subject: ") + subject + '\n'; - textComplete += QString::fromLatin1("X-Mailer: KOrganizer") + korgVersion + '\n'; + textComplete += TQString::fromLatin1("From: ") + from + '\n'; + textComplete += TQString::fromLatin1("To: ") + to + '\n'; + if (bcc) textComplete += TQString::fromLatin1("Bcc: ") + from + '\n'; + textComplete += TQString::fromLatin1("Subject: ") + subject + '\n'; + textComplete += TQString::fromLatin1("X-Mailer: KOrganizer") + korgVersion + '\n'; } textComplete += '\n'; // end of headers textComplete += body; @@ -193,7 +193,7 @@ bool KOMailClient::send(const QString &from,const QString &to, if (attachment.isEmpty()) { if (!kMailOpenComposer(to,"",bcc ? from : "",subject,body,0,KURL())) return false; } else { - QString meth; + TQString meth; int idx = attachment.find("METHOD"); if (idx>=0) { idx = attachment.find(':',idx)+1; @@ -211,8 +211,8 @@ bool KOMailClient::send(const QString &from,const QString &to, return true; } -int KOMailClient::kMailOpenComposer(const QString& arg0,const QString& arg1, - const QString& arg2,const QString& arg3,const QString& arg4,int arg5, +int KOMailClient::kMailOpenComposer(const TQString& arg0,const TQString& arg1, + const TQString& arg2,const TQString& arg3,const TQString& arg4,int arg5, const KURL& arg6) { //kdDebug(5850) << "KOMailClient::kMailOpenComposer( " @@ -220,9 +220,9 @@ int KOMailClient::kMailOpenComposer(const QString& arg0,const QString& arg1, // << arg4 << " , " << arg5 << " , " << arg6 << " )" << endl; int result = 0; - QByteArray data, replyData; - QCString replyType; - QDataStream arg( data, IO_WriteOnly ); + TQByteArray data, replyData; + TQCString replyType; + TQDataStream arg( data, IO_WriteOnly ); arg << arg0; arg << arg1; arg << arg2; @@ -233,9 +233,9 @@ int KOMailClient::kMailOpenComposer(const QString& arg0,const QString& arg1, #if KDE_IS_VERSION( 3, 2, 90 ) kapp->updateRemoteUserTimestamp( "kmail" ); #endif - if (kapp->dcopClient()->call("kmail","KMailIface","openComposer(QString,QString,QString,QString,QString,int,KURL)", data, replyType, replyData ) ) { + if (kapp->dcopClient()->call("kmail","KMailIface","openComposer(TQString,TQString,TQString,TQString,TQString,int,KURL)", data, replyType, replyData ) ) { if ( replyType == "int" ) { - QDataStream _reply_stream( replyData, IO_ReadOnly ); + TQDataStream _reply_stream( replyData, IO_ReadOnly ); _reply_stream >> result; } else { kdDebug(5850) << "kMailOpenComposer() call failed." << endl; @@ -246,13 +246,13 @@ int KOMailClient::kMailOpenComposer(const QString& arg0,const QString& arg1, return result; } -int KOMailClient::kMailOpenComposer( const QString& arg0, const QString& arg1, - const QString& arg2, const QString& arg3, - const QString& arg4, int arg5, const QString& arg6, - const QCString& arg7, const QCString& arg8, - const QCString& arg9, const QCString& arg10, - const QCString& arg11, const QString& arg12, - const QCString& arg13, const QCString& arg14 ) +int KOMailClient::kMailOpenComposer( const TQString& arg0, const TQString& arg1, + const TQString& arg2, const TQString& arg3, + const TQString& arg4, int arg5, const TQString& arg6, + const TQCString& arg7, const TQCString& arg8, + const TQCString& arg9, const TQCString& arg10, + const TQCString& arg11, const TQString& arg12, + const TQCString& arg13, const TQCString& arg14 ) { //kdDebug(5850) << "KOMailClient::kMailOpenComposer( " // << arg0 << " , " << arg1 << arg2 << " , " << arg3 @@ -263,9 +263,9 @@ int KOMailClient::kMailOpenComposer( const QString& arg0, const QString& arg1, int result = 0; - QByteArray data, replyData; - QCString replyType; - QDataStream arg( data, IO_WriteOnly ); + TQByteArray data, replyData; + TQCString replyType; + TQDataStream arg( data, IO_WriteOnly ); arg << arg0; arg << arg1; arg << arg2; @@ -285,9 +285,9 @@ int KOMailClient::kMailOpenComposer( const QString& arg0, const QString& arg1, kapp->updateRemoteUserTimestamp("kmail"); #endif if ( kapp->dcopClient()->call("kmail","KMailIface", - "openComposer(QString,QString,QString,QString,QString,int,QString,QCString,QCString,QCString,QCString,QCString,QString,QCString,QCString)", data, replyType, replyData ) ) { + "openComposer(TQString,TQString,TQString,TQString,TQString,int,TQString,TQCString,TQCString,TQCString,TQCString,TQCString,TQString,TQCString,TQCString)", data, replyType, replyData ) ) { if ( replyType == "int" ) { - QDataStream _reply_stream( replyData, IO_ReadOnly ); + TQDataStream _reply_stream( replyData, IO_ReadOnly ); _reply_stream >> result; } else { kdDebug(5850) << "kMailOpenComposer() call failed." << endl; diff --git a/korganizer/komailclient.h b/korganizer/komailclient.h index ad9b756bb..da71ecec1 100644 --- a/korganizer/komailclient.h +++ b/korganizer/komailclient.h @@ -24,7 +24,7 @@ #ifndef KOMAILCLIENT_H #define KOMAILCLIENT_H -#include <qstring.h> +#include <tqstring.h> class KURL; namespace KCal { @@ -38,31 +38,31 @@ class KOMailClient KOMailClient(); virtual ~KOMailClient(); - bool mailAttendees(IncidenceBase *,const QString &attachment=QString::null); - bool mailOrganizer(IncidenceBase *,const QString &attachment=QString::null, const QString &sub = QString::null); - bool mailTo(IncidenceBase *,const QString &recipients,const QString &attachment=QString::null); + bool mailAttendees(IncidenceBase *,const TQString &attachment=TQString::null); + bool mailOrganizer(IncidenceBase *,const TQString &attachment=TQString::null, const TQString &sub = TQString::null); + bool mailTo(IncidenceBase *,const TQString &recipients,const TQString &attachment=TQString::null); protected: /** Send mail with specified from, to and subject field and body as text. If * bcc is set, send a blind carbon copy to the sender from */ - bool send(const QString &from,const QString &to,const QString &subject, - const QString &body,bool bcc=false, - const QString &attachment=QString::null); + bool send(const TQString &from,const TQString &to,const TQString &subject, + const TQString &body,bool bcc=false, + const TQString &attachment=TQString::null); - int kMailOpenComposer(const QString& to, const QString& cc, - const QString& bcc, const QString& subject, - const QString& body, int hidden, - const QString& attachName, const QCString& attachCte, - const QCString& attachData, - const QCString& attachType, - const QCString& attachSubType, - const QCString& attachParamAttr, - const QString& attachParamValue, - const QCString& attachContDisp, - const QCString& attachCharset); - int kMailOpenComposer(const QString& arg0,const QString& arg1, - const QString& arg2,const QString& arg3, - const QString& arg4,int arg5,const KURL& arg6); + int kMailOpenComposer(const TQString& to, const TQString& cc, + const TQString& bcc, const TQString& subject, + const TQString& body, int hidden, + const TQString& attachName, const TQCString& attachCte, + const TQCString& attachData, + const TQCString& attachType, + const TQCString& attachSubType, + const TQCString& attachParamAttr, + const TQString& attachParamValue, + const TQCString& attachContDisp, + const TQCString& attachCharset); + int kMailOpenComposer(const TQString& arg0,const TQString& arg1, + const TQString& arg2,const TQString& arg3, + const TQString& arg4,int arg5,const KURL& arg6); }; #endif diff --git a/korganizer/komessagebox.cpp b/korganizer/komessagebox.cpp index d3189ffaa..1874fe202 100644 --- a/korganizer/komessagebox.cpp +++ b/korganizer/komessagebox.cpp @@ -24,12 +24,12 @@ #include <kmessagebox.h> #include <kdialogbase.h> -#include <qpushbutton.h> +#include <tqpushbutton.h> #include "komessagebox.h" -int KOMessageBox::fourBtnMsgBox( QWidget *parent, QMessageBox::Icon type, - const QString &text, const QString &caption, +int KOMessageBox::fourBtnMsgBox( TQWidget *parent, TQMessageBox::Icon type, + const TQString &text, const TQString &caption, const KGuiItem &button1, const KGuiItem &button2, const KGuiItem &button3, int options) { @@ -41,14 +41,14 @@ int KOMessageBox::fourBtnMsgBox( QWidget *parent, QMessageBox::Icon type, dialog->setButtonOK( button3 ); dialog->setButtonText( KDialogBase::Yes, button1.text() ); dialog->setButtonText( KDialogBase::No, button2.text() ); - QObject::connect( dialog->actionButton( KDialogBase::Yes ), SIGNAL( clicked() ), dialog, SLOT(slotYes())); - QObject::connect( dialog->actionButton( KDialogBase::No ), SIGNAL( clicked() ), dialog, SLOT(slotNo())); -// QObject::connect( dialog, SIGNAL( noClicked() ), dialog, SLOT(slotNo())); + TQObject::connect( dialog->actionButton( KDialogBase::Yes ), TQT_SIGNAL( clicked() ), dialog, TQT_SLOT(slotYes())); + TQObject::connect( dialog->actionButton( KDialogBase::No ), TQT_SIGNAL( clicked() ), dialog, TQT_SLOT(slotNo())); +// TQObject::connect( dialog, TQT_SIGNAL( noClicked() ), dialog, TQT_SLOT(slotNo())); bool checkboxResult = false; - int result = KMessageBox::createKMessageBox(dialog, type, text, QStringList(), - QString::null, &checkboxResult, options); + int result = KMessageBox::createKMessageBox(dialog, type, text, TQStringList(), + TQString::null, &checkboxResult, options); switch (result) { case KDialogBase::Yes: result = KMessageBox::Yes; break; case KDialogBase::No: result = KMessageBox::No; break; diff --git a/korganizer/komessagebox.h b/korganizer/komessagebox.h index be40eeb6e..a1499bfe6 100644 --- a/korganizer/komessagebox.h +++ b/korganizer/komessagebox.h @@ -26,15 +26,15 @@ #include <kguiitem.h> #include <kstdguiitem.h> #include <kmessagebox.h> -#include <qmessagebox.h> -#include <qstring.h> +#include <tqmessagebox.h> +#include <tqstring.h> class KOMessageBox { public: - static int fourBtnMsgBox( QWidget *parent, QMessageBox::Icon type, - const QString &text, const QString &caption = QString::null, + static int fourBtnMsgBox( TQWidget *parent, TQMessageBox::Icon type, + const TQString &text, const TQString &caption = TQString::null, const KGuiItem &button1 = KStdGuiItem::yes(), const KGuiItem &button2 = KStdGuiItem::no(), const KGuiItem &button3 = KStdGuiItem::cont(), int options = 0 ); diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 3c88bb01f..f54a6a183 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -23,19 +23,19 @@ without including the source code for Qt in the source distribution. */ -#include <qpopupmenu.h> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qkeycode.h> -#include <qhbox.h> -#include <qvbox.h> -#include <qpushbutton.h> -#include <qtooltip.h> -#include <qpainter.h> -#include <qcursor.h> -#include <qlistbox.h> -#include <qlayout.h> -#include <qlabel.h> +#include <tqpopupmenu.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqkeycode.h> +#include <tqhbox.h> +#include <tqvbox.h> +#include <tqpushbutton.h> +#include <tqtooltip.h> +#include <tqpainter.h> +#include <tqcursor.h> +#include <tqlistbox.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <kdebug.h> #include <klocale.h> @@ -61,59 +61,59 @@ //-------------------------------------------------------------------------- -KOMonthCellToolTip::KOMonthCellToolTip( QWidget *parent, +KOMonthCellToolTip::KOMonthCellToolTip( TQWidget *parent, KNoScrollListBox *lv ) - : QToolTip( parent ) + : TQToolTip( parent ) { eventlist = lv; } -void KOMonthCellToolTip::maybeTip( const QPoint & pos ) +void KOMonthCellToolTip::maybeTip( const TQPoint & pos ) { - QRect r; - QListBoxItem *it = eventlist->itemAt( pos ); + TQRect r; + TQListBoxItem *it = eventlist->itemAt( pos ); MonthViewItem *i = static_cast<MonthViewItem*>( it ); if( i && KOPrefs::instance()->mEnableToolTips ) { /* Calculate the rectangle. */ r=eventlist->itemRect( it ); /* Show the tip */ - QString tipText( IncidenceFormatter::toolTipString( i->incidence() ) ); + TQString tipText( IncidenceFormatter::toolTipString( i->incidence() ) ); if ( !tipText.isEmpty() ) { tip( r, tipText ); } } } -KNoScrollListBox::KNoScrollListBox( QWidget *parent, const char *name ) - : QListBox( parent, name ), +KNoScrollListBox::KNoScrollListBox( TQWidget *parent, const char *name ) + : TQListBox( parent, name ), mSqueezing( false ) { - QPalette pal = palette(); - pal.setColor( QColorGroup::Foreground, KOPrefs::instance()->agendaBgColor().dark( 150 ) ); - pal.setColor( QColorGroup::Base, KOPrefs::instance()->agendaBgColor() ); + TQPalette pal = palette(); + pal.setColor( TQColorGroup::Foreground, KOPrefs::instance()->agendaBgColor().dark( 150 ) ); + pal.setColor( TQColorGroup::Base, KOPrefs::instance()->agendaBgColor() ); setPalette( pal ); } void KNoScrollListBox::setBackground( bool primary, bool workDay ) { - QColor color; + TQColor color; if ( workDay ) { color = KOPrefs::instance()->workingHoursColor(); } else { color = KOPrefs::instance()->agendaBgColor(); } - QPalette pal = palette(); + TQPalette pal = palette(); if ( primary ) { - pal.setColor( QColorGroup::Base, color ); + pal.setColor( TQColorGroup::Base, color ); } else { - pal.setColor( QColorGroup::Base, color.dark( 115 ) ); + pal.setColor( TQColorGroup::Base, color.dark( 115 ) ); } setPalette( pal ); } -void KNoScrollListBox::keyPressEvent( QKeyEvent *e ) +void KNoScrollListBox::keyPressEvent( TQKeyEvent *e ) { switch( e->key() ) { case Key_Right: @@ -151,7 +151,7 @@ void KNoScrollListBox::keyPressEvent( QKeyEvent *e ) } } -void KNoScrollListBox::keyReleaseEvent( QKeyEvent *e ) +void KNoScrollListBox::keyReleaseEvent( TQKeyEvent *e ) { switch( e->key() ) { case Key_Shift: @@ -162,36 +162,36 @@ void KNoScrollListBox::keyReleaseEvent( QKeyEvent *e ) } } -void KNoScrollListBox::mousePressEvent( QMouseEvent *e ) +void KNoScrollListBox::mousePressEvent( TQMouseEvent *e ) { - QListBox::mousePressEvent( e ); + TQListBox::mousePressEvent( e ); if ( e->button() == RightButton ) { emit rightClick(); } } -void KNoScrollListBox::contentsMouseDoubleClickEvent ( QMouseEvent * e ) +void KNoScrollListBox::contentsMouseDoubleClickEvent ( TQMouseEvent * e ) { - QListBox::contentsMouseDoubleClickEvent( e ); - QListBoxItem *item = itemAt( e->pos() ); + TQListBox::contentsMouseDoubleClickEvent( e ); + TQListBoxItem *item = itemAt( e->pos() ); if ( !item ) { emit doubleClicked( item ); } } -void KNoScrollListBox::resizeEvent( QResizeEvent *e ) +void KNoScrollListBox::resizeEvent( TQResizeEvent *e ) { bool s = count() && ( maxItemWidth() > e->size().width() ); if ( mSqueezing || s ) triggerUpdate( false ); mSqueezing = s; - QListBox::resizeEvent( e ); + TQListBox::resizeEvent( e ); } -MonthViewItem::MonthViewItem( Incidence *incidence, const QDateTime &qd, - const QString & s ) : QListBoxItem() +MonthViewItem::MonthViewItem( Incidence *incidence, const TQDateTime &qd, + const TQString & s ) : TQListBoxItem() { setText( s ); @@ -205,7 +205,7 @@ MonthViewItem::MonthViewItem( Incidence *incidence, const QDateTime &qd, mRecurPixmap = KOGlobals::self()->smallIcon( "recur" ); mReplyPixmap = KOGlobals::self()->smallIcon( "mail_reply" ); - mResourceColor = QColor(); + mResourceColor = TQColor(); mEvent = false; mTodo = false; mTodoDone = false; @@ -214,7 +214,7 @@ MonthViewItem::MonthViewItem( Incidence *incidence, const QDateTime &qd, mReply = false; } -void MonthViewItem::paint( QPainter *p ) +void MonthViewItem::paint( TQPainter *p ) { #if QT_VERSION >= 0x030000 bool sel = isSelected(); @@ -222,8 +222,8 @@ void MonthViewItem::paint( QPainter *p ) bool sel = selected(); #endif - QColor bgColor = palette().color( QPalette::Normal, - sel ? QColorGroup::Highlight : QColorGroup::Background ); + TQColor bgColor = palette().color( TQPalette::Normal, + sel ? TQColorGroup::Highlight : TQColorGroup::Background ); int offset=0; if ( KOPrefs::instance()->monthViewUsesResourceColor() && mResourceColor.isValid() ) { @@ -261,7 +261,7 @@ void MonthViewItem::paint( QPainter *p ) p->drawPixmap(x, 0, mReplyPixmap ); x += mReplyPixmap.width() + 2; } - QFontMetrics fm = p->fontMetrics(); + TQFontMetrics fm = p->fontMetrics(); int yPos; int pmheight = QMAX( mRecurPixmap.height(), QMAX( mAlarmPixmap.height(), mReplyPixmap.height() ) ); @@ -269,19 +269,19 @@ void MonthViewItem::paint( QPainter *p ) yPos = fm.ascent() + fm.leading()/2; else yPos = pmheight/2 - fm.height()/2 + fm.ascent(); - QColor textColor = getTextColor( bgColor ); + TQColor textColor = getTextColor( bgColor ); p->setPen( textColor ); KWordWrap::drawFadeoutText( p, x, yPos, listBox()->width() - x, text() ); } -int MonthViewItem::height( const QListBox *lb ) const +int MonthViewItem::height( const TQListBox *lb ) const { return QMAX( QMAX( mRecurPixmap.height(), mReplyPixmap.height() ), QMAX( mAlarmPixmap.height(), lb->fontMetrics().lineSpacing()+1) ); } -int MonthViewItem::width( const QListBox *lb ) const +int MonthViewItem::width( const TQListBox *lb ) const { int x = 3; if( mRecur ) { @@ -299,19 +299,19 @@ int MonthViewItem::width( const QListBox *lb ) const MonthViewCell::MonthViewCell( KOMonthView *parent) - : QWidget( parent ), + : TQWidget( parent ), mMonthView( parent ), mPrimary( false ), mHoliday( false ) { - QVBoxLayout *topLayout = new QVBoxLayout( this ); + TQVBoxLayout *topLayout = new TQVBoxLayout( this ); - mLabel = new QLabel( this ); - mLabel->setFrameStyle( QFrame::Panel | QFrame::Plain ); + mLabel = new TQLabel( this ); + mLabel->setFrameStyle( TQFrame::Panel | TQFrame::Plain ); mLabel->setLineWidth( 1 ); mLabel->setAlignment( AlignCenter ); mItemList = new KNoScrollListBox( this ); mItemList->setMinimumSize( 10, 10 ); - mItemList->setFrameStyle( QFrame::Panel | QFrame::Plain ); + mItemList->setFrameStyle( TQFrame::Panel | TQFrame::Plain ); mItemList->setLineWidth( 1 ); new KOMonthCellToolTip( mItemList->viewport(), @@ -327,16 +327,16 @@ MonthViewCell::MonthViewCell( KOMonthView *parent) updateConfig(); - connect( mItemList, SIGNAL( doubleClicked( QListBoxItem *) ), - SLOT( defaultAction( QListBoxItem * ) ) ); - connect( mItemList, SIGNAL( rightButtonPressed( QListBoxItem *, - const QPoint &) ), - SLOT( contextMenu( QListBoxItem * ) ) ); - connect( mItemList, SIGNAL( clicked( QListBoxItem * ) ), - SLOT( select() ) ); + connect( mItemList, TQT_SIGNAL( doubleClicked( TQListBoxItem *) ), + TQT_SLOT( defaultAction( TQListBoxItem * ) ) ); + connect( mItemList, TQT_SIGNAL( rightButtonPressed( TQListBoxItem *, + const TQPoint &) ), + TQT_SLOT( contextMenu( TQListBoxItem * ) ) ); + connect( mItemList, TQT_SIGNAL( clicked( TQListBoxItem * ) ), + TQT_SLOT( select() ) ); } -void MonthViewCell::setDate( const QDate &date ) +void MonthViewCell::setDate( const TQDate &date ) { // kdDebug(5850) << "MonthViewCell::setDate(): " << date.toString() << endl; @@ -344,23 +344,23 @@ void MonthViewCell::setDate( const QDate &date ) setFrameWidth(); - QString text; + TQString text; if ( KOGlobals::self()->calendarSystem()->day( date ) == 1 ) { text = i18n("'Month day' for month view cells", "%1 %2") .arg( KOGlobals::self()->calendarSystem()->monthName( date, true ) ) .arg( KOGlobals::self()->calendarSystem()->day(mDate) ); - QFontMetrics fm( mLabel->font() ); - mLabel->resize( mLabelSize + QSize( fm.width( text ), 0 ) ); + TQFontMetrics fm( mLabel->font() ); + mLabel->resize( mLabelSize + TQSize( fm.width( text ), 0 ) ); } else { mLabel->resize( mLabelSize ); - text = QString::number( KOGlobals::self()->calendarSystem()->day(mDate) ); + text = TQString::number( KOGlobals::self()->calendarSystem()->day(mDate) ); } mLabel->setText( text ); resizeEvent( 0 ); } -QDate MonthViewCell::date() const +TQDate MonthViewCell::date() const { return mDate; } @@ -368,7 +368,7 @@ QDate MonthViewCell::date() const void MonthViewCell::setFrameWidth() { // show current day with a thicker frame - if ( mDate == QDate::currentDate() ) + if ( mDate == TQDate::currentDate() ) mItemList->setLineWidth( 3 ); else mItemList->setLineWidth( 1 ); @@ -403,7 +403,7 @@ void MonthViewCell::setHoliday( bool holiday ) } } -void MonthViewCell::setHolidayString( const QString &holiday ) +void MonthViewCell::setHolidayString( const TQString &holiday ) { mHolidayString = holiday; } @@ -412,11 +412,11 @@ void MonthViewCell::updateCell() { setFrameWidth(); - if ( mDate == QDate::currentDate() ) { + if ( mDate == TQDate::currentDate() ) { setPalette( mTodayPalette ); - QPalette pal = mItemList->palette(); - pal.setColor( QColorGroup::Foreground, KOPrefs::instance()->highlightColor() ); + TQPalette pal = mItemList->palette(); + pal.setColor( TQColorGroup::Foreground, KOPrefs::instance()->highlightColor() ); mItemList->setPalette( pal ); } else { @@ -425,15 +425,15 @@ void MonthViewCell::updateCell() else setPalette( mStandardPalette ); - QPalette pal = mItemList->palette(); - pal.setColor( QColorGroup::Foreground, KOPrefs::instance()->agendaBgColor().dark( 150 ) ); + TQPalette pal = mItemList->palette(); + pal.setColor( TQColorGroup::Foreground, KOPrefs::instance()->agendaBgColor().dark( 150 ) ); mItemList->setPalette( pal ); } mItemList->clear(); if ( !mHolidayString.isEmpty() ) { - MonthViewItem *item = new MonthViewItem( 0, QDateTime( mDate ), mHolidayString ); + MonthViewItem *item = new MonthViewItem( 0, TQDateTime( mDate ), mHolidayString ); item->setPalette( mHolidayPalette ); mItemList->insertItem( item ); } @@ -445,7 +445,7 @@ class MonthViewCell::CreateItemVisitor : public: CreateItemVisitor() : mItem(0) { emails = KOPrefs::instance()->allEmails(); } - bool act( IncidenceBase *incidence, QDate date, QPalette stdPal, int multiDay ) + bool act( IncidenceBase *incidence, TQDate date, TQPalette stdPal, int multiDay ) { mItem = 0; mDate = date; @@ -454,14 +454,14 @@ class MonthViewCell::CreateItemVisitor : return incidence->accept( *this ); } MonthViewItem *item() const { return mItem; } - QStringList emails; + TQStringList emails; protected: bool visit( Event *event ) { - QString text; - QDateTime dt( mDate ); + TQString text; + TQDateTime dt( mDate ); // take the time 0:00 into account, which is non-inclusive - QDate dtEnd = event->dtEnd().addSecs( event->doesFloat() ? 0 : -1).date(); + TQDate dtEnd = event->dtEnd().addSecs( event->doesFloat() ? 0 : -1).date(); int length = event->dtStart().daysTo( dtEnd ); if ( event->isMultiDay() ) { if ( mDate == event->dtStart().date() @@ -476,7 +476,7 @@ class MonthViewCell::CreateItemVisitor : text = "-- " + event->summary() + " --"; } else { text = "----------------"; - dt = QDateTime( mDate ); + dt = TQDateTime( mDate ); } } else { if (event->doesFloat()) @@ -491,12 +491,12 @@ class MonthViewCell::CreateItemVisitor : mItem = new MonthViewItem( event, dt, text ); mItem->setEvent( true ); if (KOPrefs::instance()->monthViewUsesCategoryColor()) { - QStringList categories = event->categories(); - QString cat = categories.first(); + TQStringList categories = event->categories(); + TQString cat = categories.first(); if (cat.isEmpty()) { - mItem->setPalette(QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor)); + mItem->setPalette(TQPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor)); } else { - mItem->setPalette(QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat)))); + mItem->setPalette(TQPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat)))); } } else { mItem->setPalette( mStandardPalette ); @@ -510,10 +510,10 @@ class MonthViewCell::CreateItemVisitor : return true; } bool visit( Todo *todo ) { - QString text; + TQString text; if ( !KOPrefs::instance()->showAllDayTodo() ) return false; - QDateTime dt( mDate ); + TQDateTime dt( mDate ); if ( todo->hasDueDate() && !todo->doesFloat() ) { text += KGlobal::locale()->formatTime( todo->dtDue().time() ); text += ' '; @@ -533,8 +533,8 @@ class MonthViewCell::CreateItemVisitor : } protected: MonthViewItem *mItem; - QDate mDate; - QPalette mStandardPalette; + TQDate mDate; + TQPalette mStandardPalette; int mMultiDay; }; @@ -547,7 +547,7 @@ void MonthViewCell::addIncidence( Incidence *incidence, CreateItemVisitor& v, in item->setAlarm( incidence->isAlarmEnabled() ); item->setRecur( incidence->recurrenceType() ); - QColor resourceColor = KOHelper::resourceColor( mCalendar, incidence ); + TQColor resourceColor = KOHelper::resourceColor( mCalendar, incidence ); if ( !resourceColor.isValid() ) resourceColor = KOPrefs::instance()->mEventColor; item->setResourceColor( resourceColor ); @@ -557,10 +557,10 @@ void MonthViewCell::addIncidence( Incidence *incidence, CreateItemVisitor& v, in // chronologically sorted. uint i = 0; int pos = -1; - QDateTime dt( item->incidenceDateTime() ); + TQDateTime dt( item->incidenceDateTime() ); while ( i < mItemList->count() && pos<0 ) { - QListBoxItem *item = mItemList->item( i ); + TQListBoxItem *item = mItemList->item( i ); MonthViewItem *mvitem = dynamic_cast<MonthViewItem*>( item ); if ( mvitem && mvitem->incidenceDateTime()>dt ) { pos = i; @@ -588,12 +588,12 @@ void MonthViewCell::updateConfig() { setFont( KOPrefs::instance()->mMonthViewFont ); - QFontMetrics fm( font() ); + TQFontMetrics fm( font() ); mLabelSize = fm.size( 0, "30" ) + - QSize( mLabel->frameWidth() * 2, mLabel->frameWidth() * 2 ) + - QSize( 2, 2 ); + TQSize( mLabel->frameWidth() * 2, mLabel->frameWidth() * 2 ) + + TQSize( 2, 2 ); // mStandardPalette = mOriginalPalette; - QColor bg = mStandardPalette.color( QPalette::Active, QColorGroup::Background ); + TQColor bg = mStandardPalette.color( TQPalette::Active, TQColorGroup::Background ); int h,s,v; bg.getHsv( &h, &s, &v ); if ( date().month() %2 == 0 ) { @@ -604,17 +604,17 @@ void MonthViewCell::updateConfig() } } setPaletteBackgroundColor( bg ); -// mStandardPalette.setColor( QColorGroup::Background, bg);*/ +// mStandardPalette.setColor( TQColorGroup::Background, bg);*/ mHolidayPalette = mStandardPalette; - mHolidayPalette.setColor( QColorGroup::Foreground, + mHolidayPalette.setColor( TQColorGroup::Foreground, KOPrefs::instance()->holidayColor() ); - mHolidayPalette.setColor( QColorGroup::Text, + mHolidayPalette.setColor( TQColorGroup::Text, KOPrefs::instance()->holidayColor() ); mTodayPalette = mStandardPalette; - mTodayPalette.setColor( QColorGroup::Foreground, + mTodayPalette.setColor( TQColorGroup::Foreground, KOPrefs::instance()->highlightColor() ); - mTodayPalette.setColor( QColorGroup::Text, + mTodayPalette.setColor( TQColorGroup::Text, KOPrefs::instance()->highlightColor() ); updateCell(); @@ -624,11 +624,11 @@ void MonthViewCell::updateConfig() void MonthViewCell::enableScrollBars( bool enabled ) { if ( enabled ) { - mItemList->setVScrollBarMode( QScrollView::Auto ); - mItemList->setHScrollBarMode( QScrollView::Auto ); + mItemList->setVScrollBarMode( TQScrollView::Auto ); + mItemList->setHScrollBarMode( TQScrollView::Auto ); } else { - mItemList->setVScrollBarMode( QScrollView::AlwaysOff ); - mItemList->setHScrollBarMode( QScrollView::AlwaysOff ); + mItemList->setVScrollBarMode( TQScrollView::AlwaysOff ); + mItemList->setHScrollBarMode( TQScrollView::AlwaysOff ); } } @@ -645,9 +645,9 @@ Incidence *MonthViewCell::selectedIncidence() return item->incidence(); } -QDate MonthViewCell::selectedIncidenceDate() +TQDate MonthViewCell::selectedIncidenceDate() { - QDate qd; + TQDate qd; int index = mItemList->currentItem(); if ( index < 0 ) return qd; @@ -668,8 +668,8 @@ void MonthViewCell::select() enableScrollBars( true ); // don't mess up the cell when it represents today - if( mDate != QDate::currentDate() ) { - mItemList->setFrameStyle( QFrame::Sunken | QFrame::Panel ); + if( mDate != TQDate::currentDate() ) { + mItemList->setFrameStyle( TQFrame::Sunken | TQFrame::Panel ); mItemList->setLineWidth( 3 ); } } @@ -677,18 +677,18 @@ void MonthViewCell::select() void MonthViewCell::deselect() { mItemList->clearSelection(); - mItemList->setFrameStyle( QFrame::Plain | QFrame::Panel ); + mItemList->setFrameStyle( TQFrame::Plain | TQFrame::Panel ); setFrameWidth(); enableScrollBars( false ); } -void MonthViewCell::resizeEvent ( QResizeEvent * ) +void MonthViewCell::resizeEvent ( TQResizeEvent * ) { mLabel->move( width() - mLabel->width(), height() - mLabel->height() ); } -void MonthViewCell::defaultAction( QListBoxItem *item ) +void MonthViewCell::defaultAction( TQListBoxItem *item ) { select(); @@ -701,7 +701,7 @@ void MonthViewCell::defaultAction( QListBoxItem *item ) } } -void MonthViewCell::contextMenu( QListBoxItem *item ) +void MonthViewCell::contextMenu( TQListBoxItem *item ) { select(); @@ -716,27 +716,27 @@ void MonthViewCell::contextMenu( QListBoxItem *item ) } -KOMonthView::KOMonthView( Calendar *calendar, QWidget *parent, const char *name ) +KOMonthView::KOMonthView( Calendar *calendar, TQWidget *parent, const char *name ) : KOEventView( calendar, parent, name ), mDaysPerWeek( 7 ), mNumWeeks( 6 ), mNumCells( mDaysPerWeek * mNumWeeks ), mShortDayLabels( false ), mWidthLongDayLabel( 0 ), mSelectedCell( 0 ) { mCells.setAutoDelete( true ); - QGridLayout *dayLayout = new QGridLayout( this ); + TQGridLayout *dayLayout = new TQGridLayout( this ); - QFont bfont = font(); + TQFont bfont = font(); bfont.setBold( true ); - QFont mfont = bfont; + TQFont mfont = bfont; mfont.setPointSize( 20 ); // month name on top - mLabel = new QLabel( this ); + mLabel = new TQLabel( this ); mLabel->setFont( mfont ); mLabel->setAlignment( AlignCenter ); mLabel->setLineWidth( 0 ); - mLabel->setFrameStyle( QFrame::Plain ); + mLabel->setFrameStyle( TQFrame::Plain ); dayLayout->addMultiCellWidget( mLabel, 0, 0, 0, mDaysPerWeek ); @@ -745,9 +745,9 @@ KOMonthView::KOMonthView( Calendar *calendar, QWidget *parent, const char *name mDayLabels.resize( mDaysPerWeek ); int i; for( i = 0; i < mDaysPerWeek; i++ ) { - QLabel *label = new QLabel( this ); + TQLabel *label = new TQLabel( this ); label->setFont( bfont ); - label->setFrameStyle( QFrame::Panel | QFrame::Raised ); + label->setFrameStyle( TQFrame::Panel | TQFrame::Raised ); label->setLineWidth( 1 ); label->setAlignment( AlignCenter ); @@ -768,10 +768,10 @@ KOMonthView::KOMonthView( Calendar *calendar, QWidget *parent, const char *name mCells.insert( row * mDaysPerWeek + col, cell ); dayLayout->addWidget( cell, row + 2, col ); - connect( cell, SIGNAL( defaultAction( Incidence * ) ), - SLOT( defaultAction( Incidence * ) ) ); - connect( cell, SIGNAL( newEventSignal( const QDate & ) ), - SIGNAL( newEventSignal( const QDate & ) ) ); + connect( cell, TQT_SIGNAL( defaultAction( Incidence * ) ), + TQT_SLOT( defaultAction( Incidence * ) ) ); + connect( cell, TQT_SIGNAL( newEventSignal( const TQDate & ) ), + TQT_SIGNAL( newEventSignal( const TQDate & ) ) ); } dayLayout->setRowStretch( row + 2, 1 ); } @@ -815,14 +815,14 @@ DateList KOMonthView::selectedDates() DateList selected; if ( mSelectedCell ) { - QDate qd = mSelectedCell->selectedIncidenceDate(); + TQDate qd = mSelectedCell->selectedIncidenceDate(); if ( qd.isValid() ) selected.append( qd ); } return selected; } -bool KOMonthView::eventDurationHint( QDateTime &startDt, QDateTime &endDt, bool &allDay ) +bool KOMonthView::eventDurationHint( TQDateTime &startDt, TQDateTime &endDt, bool &allDay ) { if ( mSelectedCell ) { startDt.setDate( mSelectedCell->date() ); @@ -837,7 +837,7 @@ void KOMonthView::updateConfig() { mWeekStartDay = KGlobal::locale()->weekStartDay(); - QFontMetrics fontmetric( mDayLabels[0]->font() ); + TQFontMetrics fontmetric( mDayLabels[0]->font() ); mWidthLongDayLabel = 0; for ( int i = 0; i < 7; ++i ) { @@ -866,7 +866,7 @@ void KOMonthView::updateDayLabels() } } -void KOMonthView::showDates( const QDate &start, const QDate & ) +void KOMonthView::showDates( const TQDate &start, const TQDate & ) { // kdDebug(5850) << "KOMonthView::showDates(): " << start.toString() << endl; @@ -892,7 +892,7 @@ void KOMonthView::showDates( const QDate &start, const QDate & ) bool primary = false; uint i; for( i = 0; i < mCells.size(); ++i ) { - QDate date = mStartDate.addDays( i ); + TQDate date = mStartDate.addDays( i ); if ( calSys->day( date ) == 1 ) { primary = !primary; } @@ -909,7 +909,7 @@ void KOMonthView::showDates( const QDate &start, const QDate & ) mCells[i]->setHoliday( isHoliday ); // add holiday, if present - QStringList holidays( KOGlobals::self()->holiday( date ) ); + TQStringList holidays( KOGlobals::self()->holiday( date ) ); mCells[i]->setHolidayString( holidays.join( i18n("delimiter for joining holiday names", ", " ) ) ); } @@ -930,8 +930,8 @@ class KOMonthView::GetDateVisitor : public IncidenceBase::Visitor { return incidence->accept( *this ); } - QDateTime startDate() const { return mStartDate; } - QDateTime endDate() const { return mEndDate; } + TQDateTime startDate() const { return mStartDate; } + TQDateTime endDate() const { return mEndDate; } protected: bool visit( Event *event ) { @@ -953,8 +953,8 @@ class KOMonthView::GetDateVisitor : public IncidenceBase::Visitor return true; } protected: - QDateTime mStartDate; - QDateTime mEndDate; + TQDateTime mStartDate; + TQDateTime mEndDate; }; void KOMonthView::changeIncidenceDisplayAdded( Incidence *incidence, MonthViewCell::CreateItemVisitor& v) @@ -982,8 +982,8 @@ void KOMonthView::changeIncidenceDisplayAdded( Incidence *incidence, MonthViewCe } else { // addSecs(-1) is added to handle 0:00 cases (because it's non-inclusive according to rfc) if ( gdv.endDate().isValid() ) { - QDate endDate = gdv.endDate().addSecs( floats ? 0 : -1).date(); - for ( QDate date = gdv.startDate().date(); + TQDate endDate = gdv.endDate().addSecs( floats ? 0 : -1).date(); + for ( TQDate date = gdv.startDate().date(); date <= endDate; date = date.addDays( 1 ) ) { MonthViewCell *mvc = mDateToCell[ date ]; if ( mvc ) mvc->addIncidence( incidence, v ); @@ -1029,7 +1029,7 @@ void KOMonthView::updateView() processSelectionChange(); } -void KOMonthView::resizeEvent( QResizeEvent * ) +void KOMonthView::resizeEvent( TQResizeEvent * ) { // select the appropriate heading string size. E.g. "Wednesday" or "Wed". // note this only changes the text if the requested size crosses the @@ -1048,7 +1048,7 @@ void KOMonthView::resizeEvent( QResizeEvent * ) } } -void KOMonthView::showEventContextMenu( Incidence *incidence, const QDate &qd ) +void KOMonthView::showEventContextMenu( Incidence *incidence, const TQDate &qd ) { mEventContextMenu->showIncidencePopup( incidence, qd ); } diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h index 44e36b055..9a3015d03 100644 --- a/korganizer/komonthview.h +++ b/korganizer/komonthview.h @@ -26,9 +26,9 @@ #ifndef _KOMONTHVIEW_H #define _KOMONTHVIEW_H -#include <qlistbox.h> -#include <qptrvector.h> -#include <qtooltip.h> +#include <tqlistbox.h> +#include <tqptrvector.h> +#include <tqtooltip.h> #include "koeventview.h" class KNoScrollListBox; @@ -36,10 +36,10 @@ class KNoScrollListBox; class KOMonthCellToolTip : public QToolTip { public: - KOMonthCellToolTip (QWidget* parent, KNoScrollListBox* lv ); + KOMonthCellToolTip (TQWidget* parent, KNoScrollListBox* lv ); protected: - void maybeTip( const QPoint & pos); + void maybeTip( const TQPoint & pos); private: KNoScrollListBox* eventlist; @@ -50,7 +50,7 @@ class KNoScrollListBox: public QListBox { Q_OBJECT public: - KNoScrollListBox(QWidget *parent=0, const char *name=0); + KNoScrollListBox(TQWidget *parent=0, const char *name=0); ~KNoScrollListBox() {} void setBackground( bool primary, bool workday ); @@ -61,11 +61,11 @@ class KNoScrollListBox: public QListBox void rightClick(); protected slots: - void keyPressEvent(QKeyEvent *); - void keyReleaseEvent(QKeyEvent *); - void mousePressEvent(QMouseEvent *); - void resizeEvent(QResizeEvent *); - void contentsMouseDoubleClickEvent( QMouseEvent * e ); + void keyPressEvent(TQKeyEvent *); + void keyReleaseEvent(TQKeyEvent *); + void mousePressEvent(TQMouseEvent *); + void resizeEvent(TQResizeEvent *); + void contentsMouseDoubleClickEvent( TQMouseEvent * e ); private: bool mSqueezing; @@ -75,7 +75,7 @@ class KNoScrollListBox: public QListBox class MonthViewItem: public QListBoxItem { public: - MonthViewItem( Incidence *, const QDateTime &qd, const QString & title ); + MonthViewItem( Incidence *, const TQDateTime &qd, const TQString & title ); void setEvent(bool on) { mEvent = on; } void setTodo(bool on) { mTodo = on; } @@ -84,20 +84,20 @@ class MonthViewItem: public QListBoxItem void setAlarm(bool on) { mAlarm = on; } void setReply(bool on) { mReply = on; } - void setPalette(const QPalette &p) { mPalette = p; } - QPalette palette() const { return mPalette; } + void setPalette(const TQPalette &p) { mPalette = p; } + TQPalette palette() const { return mPalette; } Incidence *incidence() const { return mIncidence; } - QDateTime incidenceDateTime() { return mDateTime; } + TQDateTime incidenceDateTime() { return mDateTime; } - void setResourceColor( QColor& color ) { mResourceColor = color; } - QColor &resourceColor() { return mResourceColor; } + void setResourceColor( TQColor& color ) { mResourceColor = color; } + TQColor &resourceColor() { return mResourceColor; } protected: - virtual void paint(QPainter *); - virtual int height(const QListBox *) const; - virtual int width(const QListBox *) const; + virtual void paint(TQPainter *); + virtual int height(const TQListBox *) const; + virtual int width(const TQListBox *) const; //Color of the resource - QColor mResourceColor; + TQColor mResourceColor; private: bool mEvent; bool mTodo; @@ -106,15 +106,15 @@ class MonthViewItem: public QListBoxItem bool mAlarm; bool mReply; - QPixmap mEventPixmap; - QPixmap mTodoPixmap; - QPixmap mTodoDonePixmap; - QPixmap mAlarmPixmap; - QPixmap mRecurPixmap; - QPixmap mReplyPixmap; + TQPixmap mEventPixmap; + TQPixmap mTodoPixmap; + TQPixmap mTodoDonePixmap; + TQPixmap mAlarmPixmap; + TQPixmap mRecurPixmap; + TQPixmap mReplyPixmap; - QPalette mPalette; - QDateTime mDateTime; + TQPalette mPalette; + TQDateTime mDateTime; Incidence *mIncidence; }; @@ -134,9 +134,9 @@ class MonthViewCell : public QWidget MonthViewCell( KOMonthView * ); /** Sets the date of the cell */ - void setDate( const QDate & ); + void setDate( const TQDate & ); /** @return Date of cell */ - QDate date() const; + TQDate date() const; /** Set this cell as primary if @p primary is true. A primary cell belongs @@ -158,7 +158,7 @@ class MonthViewCell : public QWidget setHoliday( true ). @param name The name of the holiday. */ - void setHolidayString( const QString &name ); + void setHolidayString( const TQString &name ); void updateCell(); /** Adds an incidence to the cell. @@ -180,7 +180,7 @@ class MonthViewCell : public QWidget void enableScrollBars( bool ); Incidence *selectedIncidence(); - QDate selectedIncidenceDate(); + TQDate selectedIncidenceDate(); void deselect(); @@ -192,37 +192,37 @@ class MonthViewCell : public QWidget will pop up. @param date The date of the event we want create. */ - void newEventSignal( const QDate &date ); + void newEventSignal( const TQDate &date ); public slots: void select(); protected: void setFrameWidth(); - void resizeEvent( QResizeEvent * ); + void resizeEvent( TQResizeEvent * ); protected slots: - void defaultAction( QListBoxItem * ); - void contextMenu( QListBoxItem * ); + void defaultAction( TQListBoxItem * ); + void contextMenu( TQListBoxItem * ); private: KOMonthView *mMonthView; // We need the calendar for paint the ResourceColor Calendar *mCalendar; - QDate mDate; + TQDate mDate; bool mPrimary; bool mHoliday; - QString mHolidayString; + TQString mHolidayString; - QLabel *mLabel; + TQLabel *mLabel; KNoScrollListBox *mItemList; - QSize mLabelSize; -// QPalette mOriginalPalette; - QPalette mHolidayPalette; - QPalette mStandardPalette; - QPalette mTodayPalette; + TQSize mLabelSize; +// TQPalette mOriginalPalette; + TQPalette mHolidayPalette; + TQPalette mStandardPalette; + TQPalette mTodayPalette; }; /** @@ -236,7 +236,7 @@ class KOMonthView: public KOEventView { Q_OBJECT public: - KOMonthView(Calendar *cal, QWidget *parent = 0, const char *name = 0 ); + KOMonthView(Calendar *cal, TQWidget *parent = 0, const char *name = 0 ); ~KOMonthView(); /** Returns maximum number of days supported by the komonthview */ @@ -251,12 +251,12 @@ class KOMonthView: public KOEventView /** Returns dates of the currently selected events */ virtual DateList selectedDates(); - virtual bool eventDurationHint(QDateTime &startDt, QDateTime &endDt, bool &allDay); + virtual bool eventDurationHint(TQDateTime &startDt, TQDateTime &endDt, bool &allDay); public slots: virtual void updateView(); virtual void updateConfig(); - virtual void showDates(const QDate &start, const QDate &end); + virtual void showDates(const TQDate &start, const TQDate &end); virtual void showIncidences( const Incidence::List &incidenceList ); void changeIncidenceDisplay(Incidence *, int); @@ -264,7 +264,7 @@ class KOMonthView: public KOEventView void clearSelection(); - void showEventContextMenu( Incidence *, const QDate & ); + void showEventContextMenu( Incidence *, const TQDate & ); void showGeneralContextMenu(); void setSelectedCell( MonthViewCell * ); @@ -273,7 +273,7 @@ class KOMonthView: public KOEventView void processSelectionChange(); protected: - void resizeEvent(QResizeEvent *); + void resizeEvent(TQResizeEvent *); void viewChanged(); void updateDayLabels(); @@ -285,20 +285,20 @@ class KOMonthView: public KOEventView int mNumCells; int mWeekStartDay; - QPtrVector<MonthViewCell> mCells; - QMap<QDate,MonthViewCell *> mDateToCell; - QPtrVector<QLabel> mDayLabels; + TQPtrVector<MonthViewCell> mCells; + TQMap<TQDate,MonthViewCell *> mDateToCell; + TQPtrVector<TQLabel> mDayLabels; bool mShortDayLabels; int mWidthLongDayLabel; - QDate mStartDate; - QDate mSelectedDate; + TQDate mStartDate; + TQDate mSelectedDate; MonthViewCell *mSelectedCell; KOEventPopupMenu *mEventContextMenu; - QLabel *mLabel; + TQLabel *mLabel; }; #endif diff --git a/korganizer/konewstuff.cpp b/korganizer/konewstuff.cpp index 331126b38..83ee226da 100644 --- a/korganizer/konewstuff.cpp +++ b/korganizer/konewstuff.cpp @@ -38,7 +38,7 @@ KONewStuff::KONewStuff( CalendarView *view ) : { } -bool KONewStuff::install( const QString &fileName ) +bool KONewStuff::install( const TQString &fileName ) { kdDebug(5850) << "KONewStuff::install(): " << fileName << endl; @@ -51,11 +51,11 @@ bool KONewStuff::install( const QString &fileName ) Event::List events = cal.events(); - QStringList eventList; + TQStringList eventList; Event::List::ConstIterator it; for( it = events.begin(); it != events.end(); ++it ) { - QString text = (*it)->summary(); + TQString text = (*it)->summary(); eventList.append( text ); } @@ -68,7 +68,7 @@ bool KONewStuff::install( const QString &fileName ) return mView->openCalendar( fileName, true ); } -bool KONewStuff::createUploadFile( const QString &fileName ) +bool KONewStuff::createUploadFile( const TQString &fileName ) { return mView->saveCalendar( fileName ); } diff --git a/korganizer/konewstuff.h b/korganizer/konewstuff.h index c9a5333a8..ba70394fa 100644 --- a/korganizer/konewstuff.h +++ b/korganizer/konewstuff.h @@ -33,8 +33,8 @@ class KONewStuff : public KNewStuff public: KONewStuff( CalendarView * ); - bool install( const QString &fileName ); - bool createUploadFile( const QString &fileName ); + bool install( const TQString &fileName ); + bool createUploadFile( const TQString &fileName ); private: CalendarView *mView; diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 3e4d78dda..3532b1cc1 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp @@ -26,12 +26,12 @@ #include <time.h> #include <unistd.h> -#include <qdir.h> -#include <qstring.h> -#include <qfont.h> -#include <qcolor.h> -#include <qmap.h> -#include <qstringlist.h> +#include <tqdir.h> +#include <tqstring.h> +#include <tqfont.h> +#include <tqcolor.h> +#include <tqmap.h> +#include <tqstringlist.h> #include <kglobalsettings.h> #include <kglobal.h> @@ -55,10 +55,10 @@ KOPrefs *KOPrefs::mInstance = 0; static KStaticDeleter<KOPrefs> insd; -QColor getTextColor(const QColor &c) +TQColor getTextColor(const TQColor &c) { float luminance = (c.red() * 0.299) + (c.green() * 0.587) + (c.blue() * 0.114); - return (luminance > 128.0) ? QColor( 0, 0 ,0 ) : QColor( 255, 255 ,255 ); + return (luminance > 128.0) ? TQColor( 0, 0 ,0 ) : TQColor( 255, 255 ,255 ); } @@ -68,9 +68,9 @@ KOPrefs::KOPrefs() : mCategoryColors.setAutoDelete( true ); mResourceColors.setAutoDelete( true ); - mDefaultCategoryColor = QColor( 151, 235, 121 ); + mDefaultCategoryColor = TQColor( 151, 235, 121 ); - mDefaultResourceColor = QColor();//Default is a color invalid + mDefaultResourceColor = TQColor();//Default is a color invalid mDefaultTimeBarFont = KGlobalSettings::generalFont(); // make a large default time bar font, at least 16 points. @@ -84,7 +84,7 @@ KOPrefs::KOPrefs() : KConfigSkeleton::setCurrentGroup( "General" ); addItemPath( "Html Export File", mHtmlExportFile, - QDir::homeDirPath() + "/" + i18n( "Default export file", "calendar.html" ) ); + TQDir::homeDirPath() + "/" + i18n( "Default export file", "calendar.html" ) ); timeBarFontItem()->setDefaultValue( mDefaultTimeBarFont ); monthViewFontItem()->setDefaultValue( mDefaultMonthViewFont ); @@ -119,7 +119,7 @@ void KOPrefs::usrSetDefaults() // settings for example. KEMailSettings settings; - QString tmp = settings.getSetting(KEMailSettings::RealName); + TQString tmp = settings.getSetting(KEMailSettings::RealName); if ( !tmp.isEmpty() ) setUserName( tmp ); tmp = settings.getSetting(KEMailSettings::EmailAddress); if ( !tmp.isEmpty() ) setUserEmail( tmp ); @@ -136,7 +136,7 @@ void KOPrefs::usrSetDefaults() void KOPrefs::fillMailDefaults() { userEmailItem()->swapDefault(); - QString defEmail = userEmailItem()->value(); + TQString defEmail = userEmailItem()->value(); userEmailItem()->swapDefault(); if ( userEmail() == defEmail ) { @@ -149,7 +149,7 @@ void KOPrefs::fillMailDefaults() void KOPrefs::setTimeZoneIdDefault() { - QString zone; + TQString zone; zone = KTimezones().local()->name(); @@ -179,28 +179,28 @@ void KOPrefs::usrReadConfig() // old category colors, ignore if they have the old default // should be removed a few versions after 3.2... config()->setGroup("Category Colors"); - QValueList<QColor> oldCategoryColors; - QStringList::Iterator it; + TQValueList<TQColor> oldCategoryColors; + TQStringList::Iterator it; for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { - QColor c = config()->readColorEntry(*it, &mDefaultCategoryColor); - oldCategoryColors.append( (c == QColor(196,196,196)) ? + TQColor c = config()->readColorEntry(*it, &mDefaultCategoryColor); + oldCategoryColors.append( (c == TQColor(196,196,196)) ? mDefaultCategoryColor : c); } // new category colors config()->setGroup("Category Colors2"); - QValueList<QColor>::Iterator it2; + TQValueList<TQColor>::Iterator it2; for (it = mCustomCategories.begin(), it2 = oldCategoryColors.begin(); it != mCustomCategories.end(); ++it, ++it2 ) { - QColor c = config()->readColorEntry(*it, &*it2); + TQColor c = config()->readColorEntry(*it, &*it2); if ( c != mDefaultCategoryColor ) setCategoryColor(*it,c); } config()->setGroup( "Resources Colors" ); - QMap<QString, QString> map = config()->entryMap( "Resources Colors" ); + TQMap<TQString, TQString> map = config()->entryMap( "Resources Colors" ); - QMapIterator<QString, QString> it3; + TQMapIterator<TQString, TQString> it3; for( it3 = map.begin(); it3 != map.end(); ++it3 ) { kdDebug(5850)<< "KOPrefs::usrReadConfig: key: " << it3.key() << " value: " << it3.data()<<endl; @@ -232,14 +232,14 @@ void KOPrefs::usrWriteConfig() config()->writeEntry("Custom Categories",mCustomCategories); config()->setGroup("Category Colors2"); - QDictIterator<QColor> it(mCategoryColors); + TQDictIterator<TQColor> it(mCategoryColors); while (it.current()) { config()->writeEntry(it.currentKey(),*(it.current())); ++it; } config()->setGroup( "Resources Colors" ); - QDictIterator<QColor> it2( mResourceColors ); + TQDictIterator<TQColor> it2( mResourceColors ); while( it2.current() ) { config()->writeEntry( it2.currentKey(), *( it2.current() ) ); ++it2; @@ -269,14 +269,14 @@ void KOPrefs::usrWriteConfig() KPimPrefs::usrWriteConfig(); } -void KOPrefs::setCategoryColor( const QString &cat, const QColor & color) +void KOPrefs::setCategoryColor( const TQString &cat, const TQColor & color) { - mCategoryColors.replace( cat, new QColor( color ) ); + mCategoryColors.replace( cat, new TQColor( color ) ); } -QColor *KOPrefs::categoryColor( const QString &cat ) +TQColor *KOPrefs::categoryColor( const TQString &cat ) { - QColor *color = 0; + TQColor *color = 0; if ( !cat.isEmpty() ) color = mCategoryColors[ cat ]; @@ -285,28 +285,28 @@ QColor *KOPrefs::categoryColor( const QString &cat ) } -bool KOPrefs::hasCategoryColor( const QString& cat ) const +bool KOPrefs::hasCategoryColor( const TQString& cat ) const { return mCategoryColors[ cat ]; } -void KOPrefs::setResourceColor ( const QString &cal, const QColor &color ) +void KOPrefs::setResourceColor ( const TQString &cal, const TQColor &color ) { kdDebug(5850)<<"KOPrefs::setResourceColor: " << cal << " color: "<< color.name()<<endl; - mResourceColors.replace( cal, new QColor( color ) ); + mResourceColors.replace( cal, new TQColor( color ) ); } -QColor* KOPrefs::resourceColor( const QString &cal ) +TQColor* KOPrefs::resourceColor( const TQString &cal ) { - QColor *color=0; + TQColor *color=0; if( !cal.isEmpty() ) color = mResourceColors[cal]; // assign default color if enabled if ( !cal.isEmpty() && !color && assignDefaultResourceColors() ) { - QColor defColor( 0x37, 0x7A, 0xBC ); + TQColor defColor( 0x37, 0x7A, 0xBC ); if ( defaultResourceColorSeed() > 0 && defaultResourceColorSeed() - 1 < (int)defaultResourceColors().size() ) { - defColor = QColor( defaultResourceColors()[defaultResourceColorSeed()-1] ); + defColor = TQColor( defaultResourceColors()[defaultResourceColorSeed()-1] ); } else { int h, s, v; defColor.getHsv( h, s, v ); @@ -325,7 +325,7 @@ QColor* KOPrefs::resourceColor( const QString &cal ) return &mDefaultResourceColor; } -QString KOPrefs::fullName() +TQString KOPrefs::fullName() { if ( mEmailControlCenter ) { KEMailSettings settings; @@ -335,7 +335,7 @@ QString KOPrefs::fullName() } } -QString KOPrefs::email() +TQString KOPrefs::email() { if ( mEmailControlCenter ) { KEMailSettings settings; @@ -345,10 +345,10 @@ QString KOPrefs::email() } } -QStringList KOPrefs::allEmails() +TQStringList KOPrefs::allEmails() { // Grab emails from the email identities - QStringList lst = KOCore::self()->identityManager()->allEmails(); + TQStringList lst = KOCore::self()->identityManager()->allEmails(); // Add emails configured in korganizer lst += mAdditionalMails; // Add emails from the user's kaddressbook entry @@ -360,16 +360,16 @@ QStringList KOPrefs::allEmails() return lst; } -QStringList KOPrefs::fullEmails() +TQStringList KOPrefs::fullEmails() { - QStringList fullEmails; + TQStringList fullEmails; // The user name and email from the config dialog: - fullEmails << QString("%1 <%2>").arg( fullName() ).arg( email() ); + fullEmails << TQString("%1 <%2>").arg( fullName() ).arg( email() ); - QStringList::Iterator it; + TQStringList::Iterator it; // Grab emails from the email identities KPIM::IdentityManager *idmanager = KOCore::self()->identityManager(); - QStringList lst = idmanager->identities(); + TQStringList lst = idmanager->identities(); KPIM::IdentityManager::ConstIterator it1; for ( it1 = idmanager->begin() ; it1 != idmanager->end() ; ++it1 ) { fullEmails << (*it1).fullEmailAddr(); @@ -377,7 +377,7 @@ QStringList KOPrefs::fullEmails() // Add emails configured in korganizer lst = mAdditionalMails; for ( it = lst.begin(); it != lst.end(); ++it ) { - fullEmails << QString("%1 <%2>").arg( fullName() ).arg( *it ); + fullEmails << TQString("%1 <%2>").arg( fullName() ).arg( *it ); } // Add emails from the user's kaddressbook entry KABC::Addressee me = KABC::StdAddressBook::self()->whoAmI(); @@ -390,7 +390,7 @@ QStringList KOPrefs::fullEmails() return fullEmails; } -bool KOPrefs::thatIsMe( const QString& _email ) +bool KOPrefs::thatIsMe( const TQString& _email ) { // NOTE: this method is called for every created agenda view item, so we need to keep // performance in mind @@ -405,13 +405,13 @@ bool KOPrefs::thatIsMe( const QString& _email ) // in case email contains a full name, strip it out // the below is the simpler but slower version of the following KMime code - // const QString email = KPIM::getEmailAddress( _email ); - const QCString tmp = _email.utf8(); + // const TQString email = KPIM::getEmailAddress( _email ); + const TQCString tmp = _email.utf8(); const char *cursor = tmp.data(); const char *end = tmp.data() + tmp.length(); KMime::Types::Mailbox mbox; KMime::HeaderParsing::parseMailbox( cursor, end, mbox ); - const QString email = mbox.addrSpec.asString(); + const TQString email = mbox.addrSpec.asString(); for ( KPIM::IdentityManager::ConstIterator it = KOCore::self()->identityManager()->begin(); it != KOCore::self()->identityManager()->end(); ++it ) { @@ -421,7 +421,7 @@ bool KOPrefs::thatIsMe( const QString& _email ) if ( mAdditionalMails.find( email ) != mAdditionalMails.end() ) return true; - QStringList lst = mMyAddrBookMails; + TQStringList lst = mMyAddrBookMails; if ( lst.find( email ) != lst.end() ) return true; return false; diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index dc7a62d18..c65382f5d 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h @@ -24,7 +24,7 @@ #ifndef KOPREFS_H #define KOPREFS_H -#include <qdict.h> +#include <tqdict.h> #include <kdepimmacros.h> @@ -35,7 +35,7 @@ class QFont; class QColor; class QStringList; -QColor getTextColor(const QColor &c); +TQColor getTextColor(const TQColor &c); class KDE_EXPORT KOPrefs : public KOPrefsBase @@ -72,46 +72,46 @@ class KDE_EXPORT KOPrefs : public KOPrefsBase public: // preferences data - void setFullName( const QString & ); - QString fullName(); - void setEmail( const QString & ); - QString email(); + void setFullName( const TQString & ); + TQString fullName(); + void setEmail( const TQString & ); + TQString email(); /// Returns all email addresses for the user. - QStringList allEmails(); + TQStringList allEmails(); /// Returns all email addresses together with the full username for the user. - QStringList fullEmails(); + TQStringList fullEmails(); /// Return true if the given email belongs to the user - bool thatIsMe( const QString& email ); + bool thatIsMe( const TQString& email ); - void setCategoryColor( const QString &cat, const QColor &color ); - QColor *categoryColor( const QString &cat ); - bool hasCategoryColor( const QString &cat ) const; + void setCategoryColor( const TQString &cat, const TQColor &color ); + TQColor *categoryColor( const TQString &cat ); + bool hasCategoryColor( const TQString &cat ) const; - void setResourceColor ( const QString &, const QColor & ); - QColor* resourceColor( const QString & ); + void setResourceColor ( const TQString &, const TQColor & ); + TQColor* resourceColor( const TQString & ); - QString mHtmlExportFile; + TQString mHtmlExportFile; bool mAlarmsEnabledByDefault; // Groupware passwords - QString mPublishPassword; - QString mRetrievePassword; + TQString mPublishPassword; + TQString mRetrievePassword; private: - QDict<QColor> mCategoryColors; - QColor mDefaultCategoryColor; + TQDict<TQColor> mCategoryColors; + TQColor mDefaultCategoryColor; - QDict<QColor> mResourceColors; - QColor mDefaultResourceColor; + TQDict<TQColor> mResourceColors; + TQColor mDefaultResourceColor; - QFont mDefaultTimeBarFont; - QFont mDefaultMonthViewFont; + TQFont mDefaultTimeBarFont; + TQFont mDefaultMonthViewFont; - QStringList mMyAddrBookMails; + TQStringList mMyAddrBookMails; public: // Do not use - except in KOPrefsDialogMain - QString mName; - QString mEmail; + TQString mName; + TQString mEmail; }; #endif diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index fd9fd8246..0205b59ea 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp @@ -23,25 +23,25 @@ without including the source code for Qt in the source distribution. */ -#include <qlayout.h> -#include <qlabel.h> -#include <qgroupbox.h> -#include <qbuttongroup.h> -#include <qlineedit.h> -#include <qslider.h> -#include <qfile.h> -#include <qcombobox.h> -#include <qhbox.h> -#include <qvbox.h> -#include <qgrid.h> -#include <qspinbox.h> -#include <qcheckbox.h> -#include <qradiobutton.h> -#include <qpushbutton.h> -#include <qstrlist.h> -#include <qlistview.h> -#include <qtabwidget.h> -#include <qwhatsthis.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqgroupbox.h> +#include <tqbuttongroup.h> +#include <tqlineedit.h> +#include <tqslider.h> +#include <tqfile.h> +#include <tqcombobox.h> +#include <tqhbox.h> +#include <tqvbox.h> +#include <tqgrid.h> +#include <tqspinbox.h> +#include <tqcheckbox.h> +#include <tqradiobutton.h> +#include <tqpushbutton.h> +#include <tqstrlist.h> +#include <tqlistview.h> +#include <tqtabwidget.h> +#include <tqwhatsthis.h> #include <kcolorbutton.h> #include <kdebug.h> @@ -76,39 +76,39 @@ #include <kdepimmacros.h> -KOPrefsDialogMain::KOPrefsDialogMain( QWidget *parent, const char *name ) +KOPrefsDialogMain::KOPrefsDialogMain( TQWidget *parent, const char *name ) : KPrefsModule( KOPrefs::instance(), parent, name ) { - QBoxLayout *topTopLayout = new QVBoxLayout( this ); + TQBoxLayout *topTopLayout = new TQVBoxLayout( this ); - QVBox *topFrame = new QVBox( this ); + TQVBox *topFrame = new TQVBox( this ); topTopLayout->addWidget( topFrame ); topFrame->setSpacing( KDialog::spacingHint() ); KPrefsWidBool *emailControlCenter = addWidBool( KOPrefs::instance()->emailControlCenterItem(), topFrame ); - connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), - SLOT(toggleEmailSettings(bool))); + connect(emailControlCenter->checkBox(),TQT_SIGNAL(toggled(bool)), + TQT_SLOT(toggleEmailSettings(bool))); - mUserEmailSettings = new QGrid( 2, topFrame ); + mUserEmailSettings = new TQGrid( 2, topFrame ); addWidString( KOPrefs::instance()->userNameItem(), mUserEmailSettings ); addWidString( KOPrefs::instance()->userEmailItem(), mUserEmailSettings ); - QGroupBox *saveGroup = new QGroupBox(1,Horizontal,i18n("Saving Calendar"), + TQGroupBox *saveGroup = new TQGroupBox(1,Horizontal,i18n("Saving Calendar"), topFrame); addWidBool( KOPrefs::instance()->htmlWithSaveItem(), saveGroup ); KPrefsWidBool *autoSave = addWidBool( KOPrefs::instance()->autoSaveItem(), saveGroup ); - QHBox *intervalBox = new QHBox( saveGroup ); + TQHBox *intervalBox = new TQHBox( saveGroup ); addWidInt( KOPrefs::instance()->autoSaveIntervalItem(), intervalBox ); - connect( autoSave->checkBox(), SIGNAL( toggled( bool ) ), - intervalBox, SLOT( setEnabled( bool ) ) ); + connect( autoSave->checkBox(), TQT_SIGNAL( toggled( bool ) ), + intervalBox, TQT_SLOT( setEnabled( bool ) ) ); intervalBox->setSpacing( KDialog::spacingHint() ); - new QWidget( intervalBox ); + new TQWidget( intervalBox ); addWidBool( KOPrefs::instance()->confirmItem(), topFrame ); addWidRadios( KOPrefs::instance()->destinationItem(), topFrame); @@ -134,7 +134,7 @@ void KOPrefsDialogMain::toggleEmailSettings( bool on ) extern "C" { - KDE_EXPORT KCModule *create_korganizerconfigmain( QWidget *parent, const char * ) + KDE_EXPORT KCModule *create_korganizerconfigmain( TQWidget *parent, const char * ) { return new KOPrefsDialogMain( parent, "kcmkorganizermain" ); } @@ -144,37 +144,37 @@ extern "C" class KOPrefsDialogTime : public KPrefsModule { public: - KOPrefsDialogTime( QWidget *parent, const char *name ) + KOPrefsDialogTime( TQWidget *parent, const char *name ) : KPrefsModule( KOPrefs::instance(), parent, name ) { - QBoxLayout *topTopLayout = new QVBoxLayout( this ); + TQBoxLayout *topTopLayout = new TQVBoxLayout( this ); - QWidget *topFrame = new QWidget( this ); + TQWidget *topFrame = new TQWidget( this ); topTopLayout->addWidget( topFrame ); - QGridLayout *topLayout = new QGridLayout(topFrame,6,2); + TQGridLayout *topLayout = new TQGridLayout(topFrame,6,2); topLayout->setSpacing( KDialog::spacingHint() ); - QHBox *timeZoneBox = new QHBox( topFrame ); + TQHBox *timeZoneBox = new TQHBox( topFrame ); topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); - QLabel *timeZoneLabel = new QLabel( i18n("Timezone:"), timeZoneBox ); - QString whatsThis = i18n( "Select your timezone from the list of " + TQLabel *timeZoneLabel = new TQLabel( i18n("Timezone:"), timeZoneBox ); + TQString whatsThis = i18n( "Select your timezone from the list of " "locations on this drop down box. If your city " "is not listed, select one which shares the " "same timezone. KOrganizer will automatically " "adjust for daylight savings." ); - QWhatsThis::add( timeZoneLabel, whatsThis ); - mTimeZoneCombo = new QComboBox( timeZoneBox ); + TQWhatsThis::add( timeZoneLabel, whatsThis ); + mTimeZoneCombo = new TQComboBox( timeZoneBox ); - connect( mTimeZoneCombo, SIGNAL( activated( int ) ), - SLOT( slotWidChanged() ) ); + connect( mTimeZoneCombo, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( slotWidChanged() ) ); FILE *f; char tempstring[101] = "Unknown"; - QString sCurrentlySet(i18n("Unknown")); + TQString sCurrentlySet(i18n("Unknown")); int nCurrentlySet = 0; - QStringList list; + TQStringList list; // read the currently set time zone #if defined(USE_SOLARIS) // MARCO @@ -189,7 +189,7 @@ class KOPrefsDialogTime : public KPrefsModule if (fgets(buf, MAXPATHLEN - 1, f) != NULL) { buf[strlen(buf) - 1] = '\0'; - sCurrentlySet = QString(buf); + sCurrentlySet = TQString(buf); } pclose(f); } @@ -198,7 +198,7 @@ class KOPrefsDialogTime : public KPrefsModule // get the currently set timezone fgets(tempstring, 100, f); tempstring[strlen(tempstring) - 1] = '\0'; - sCurrentlySet = QString(tempstring); + sCurrentlySet = TQString(tempstring); fclose(f); } #endif // !USE_SOLARIS @@ -246,34 +246,34 @@ class KOPrefsDialogTime : public KPrefsModule } mTimeZoneCombo->setCurrentItem(nCurrentlySet); - QWhatsThis::add( mTimeZoneCombo, whatsThis ); + TQWhatsThis::add( mTimeZoneCombo, whatsThis ); // holiday region selection - QHBox *holidayRegBox = new QHBox( topFrame ); + TQHBox *holidayRegBox = new TQHBox( topFrame ); topLayout->addMultiCellWidget( holidayRegBox, 1, 1, 0, 1 ); - QLabel *holidayLabel = new QLabel( i18n( "Use holiday region:" ), holidayRegBox ); + TQLabel *holidayLabel = new TQLabel( i18n( "Use holiday region:" ), holidayRegBox ); whatsThis = i18n( "Select from which region you want to use the " "holidays here. Defined holidays are shown as " "non-working days in the date navigator, the " "agenda view, etc." ); - QWhatsThis::add( holidayLabel, whatsThis ); + TQWhatsThis::add( holidayLabel, whatsThis ); - mHolidayCombo = new QComboBox( holidayRegBox ); - connect( mHolidayCombo, SIGNAL( activated( int ) ), - SLOT( slotWidChanged() ) ); + mHolidayCombo = new TQComboBox( holidayRegBox ); + connect( mHolidayCombo, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( slotWidChanged() ) ); - QWhatsThis::add( mHolidayCombo, whatsThis ); + TQWhatsThis::add( mHolidayCombo, whatsThis ); - QString currentHolidayName; - QStringList holidayList; - QStringList countryList = KHolidays::locations(); - QStringList::ConstIterator it; + TQString currentHolidayName; + TQStringList holidayList; + TQStringList countryList = KHolidays::locations(); + TQStringList::ConstIterator it; for ( it = countryList.begin(); it != countryList.end(); ++it ) { - QString countryFile = locate( "locale", + TQString countryFile = locate( "locale", "l10n/" + (*it) + "/entry.desktop" ); - QString regionName; + TQString regionName; if ( !countryFile.isEmpty() ) { KSimpleConfig cfg( countryFile ); cfg.setGroup( "KCM Locale" ); @@ -315,60 +315,60 @@ class KOPrefsDialogTime : public KPrefsModule topLayout->addWidget( defaultDuration->label(), 4, 0 ); topLayout->addWidget( defaultDuration->timeEdit(), 4, 1 ); - QStringList alarmList; + TQStringList alarmList; alarmList << i18n( "1 minute" ) << i18n( "5 minutes" ) << i18n( "10 minutes" ) << i18n( "15 minutes" ) << i18n( "30 minutes" ); - QLabel *alarmLabel = new QLabel( i18n( "Default reminder time:" ), topFrame); + TQLabel *alarmLabel = new TQLabel( i18n( "Default reminder time:" ), topFrame); topLayout->addWidget( alarmLabel, 5, 0 ); - QWhatsThis::add( alarmLabel, + TQWhatsThis::add( alarmLabel, i18n( "Enter the default reminder time here." ) ); - mAlarmTimeCombo = new QComboBox( topFrame ); - QWhatsThis::add( mAlarmTimeCombo, + mAlarmTimeCombo = new TQComboBox( topFrame ); + TQWhatsThis::add( mAlarmTimeCombo, i18n( "Enter the default reminder time here." ) ); - connect( mAlarmTimeCombo, SIGNAL( activated( int ) ), - SLOT( slotWidChanged() ) ); + connect( mAlarmTimeCombo, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( slotWidChanged() ) ); mAlarmTimeCombo->insertStringList( alarmList ); topLayout->addWidget( mAlarmTimeCombo, 5, 1 ); - QLabel *alarmDefaultLabel = new QLabel( i18n( "Enable reminders by default:" ), topFrame); + TQLabel *alarmDefaultLabel = new TQLabel( i18n( "Enable reminders by default:" ), topFrame); topLayout->addWidget( alarmDefaultLabel, 6, 0 ); - mAlarmTimeDefaultCheckBox = new QCheckBox( topFrame ); + mAlarmTimeDefaultCheckBox = new TQCheckBox( topFrame ); topLayout->addWidget( mAlarmTimeDefaultCheckBox, 6, 1 ); - connect( mAlarmTimeDefaultCheckBox, SIGNAL( toggled( bool ) ), - SLOT( slotWidChanged() ) ); + connect( mAlarmTimeDefaultCheckBox, TQT_SIGNAL( toggled( bool ) ), + TQT_SLOT( slotWidChanged() ) ); - QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, + TQGroupBox *workingHoursGroup = new TQGroupBox(1,Horizontal, i18n("Working Hours"), topFrame); topLayout->addMultiCellWidget( workingHoursGroup, 7, 7, 0, 1 ); - QHBox *workDaysBox = new QHBox( workingHoursGroup ); + TQHBox *workDaysBox = new TQHBox( workingHoursGroup ); // Respect start of week setting int weekStart=KGlobal::locale()->weekStartDay(); for ( int i = 0; i < 7; ++i ) { const KCalendarSystem *calSys = KOGlobals::self()->calendarSystem(); - QString weekDayName = calSys->weekDayName( (i + weekStart + 6)%7 + 1, true ); + TQString weekDayName = calSys->weekDayName( (i + weekStart + 6)%7 + 1, true ); if ( KOPrefs::instance()->mCompactDialogs ) { weekDayName = weekDayName.left( 1 ); } int index = ( i + weekStart + 6 ) % 7; - mWorkDays[ index ] = new QCheckBox( weekDayName, workDaysBox ); - QWhatsThis::add( mWorkDays[ index ], + mWorkDays[ index ] = new TQCheckBox( weekDayName, workDaysBox ); + TQWhatsThis::add( mWorkDays[ index ], i18n( "Check this box to make KOrganizer mark the " "working hours for this day of the week. " "If this is a work day for you, check " "this box, or the working hours will not be " "marked with color." ) ); - connect( mWorkDays[ index ], SIGNAL( stateChanged( int ) ), - SLOT( slotWidChanged() ) ); + connect( mWorkDays[ index ], TQT_SIGNAL( stateChanged( int ) ), + TQT_SLOT( slotWidChanged() ) ); } - QHBox *workStartBox = new QHBox(workingHoursGroup); + TQHBox *workStartBox = new TQHBox(workingHoursGroup); addWidTime( KOPrefs::instance()->workingHoursStartItem(), workStartBox ); - QHBox *workEndBox = new QHBox(workingHoursGroup); + TQHBox *workEndBox = new TQHBox(workingHoursGroup); addWidTime( KOPrefs::instance()->workingHoursEndItem(), workEndBox ); @@ -396,7 +396,7 @@ class KOPrefsDialogTime : public KPrefsModule void usrWriteConfig() { // Find untranslated selected zone - QStringList::Iterator tz; + TQStringList::Iterator tz; for ( tz = tzonenames.begin(); tz != tzonenames.end(); ++tz ) if (mTimeZoneCombo->currentText() == i18n((*tz).utf8())) break; @@ -406,7 +406,7 @@ class KOPrefsDialogTime : public KPrefsModule KOPrefs::instance()->mTimeZoneId = mTimeZoneCombo->currentText(); KOPrefs::instance()->mHolidays = ( mHolidayCombo->currentItem() == 0 ) ? // (None) - QString::null : + TQString::null : mRegionMap[mHolidayCombo->currentText()]; KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem(); @@ -419,8 +419,8 @@ class KOPrefsDialogTime : public KPrefsModule KOPrefs::instance()->writeConfig(); } - void setCombo( QComboBox *combo, const QString &text, - const QStringList *tags = 0 ) + void setCombo( TQComboBox *combo, const TQString &text, + const TQStringList *tags = 0 ) { if (tags) { int i = tags->findIndex(text); @@ -436,18 +436,18 @@ class KOPrefsDialogTime : public KPrefsModule } private: - QComboBox *mTimeZoneCombo; - QStringList tzonenames; - QComboBox *mHolidayCombo; - QMap<QString,QString> mRegionMap; - QComboBox *mAlarmTimeCombo; - QCheckBox *mAlarmTimeDefaultCheckBox; - QCheckBox *mWorkDays[7]; + TQComboBox *mTimeZoneCombo; + TQStringList tzonenames; + TQComboBox *mHolidayCombo; + TQMap<TQString,TQString> mRegionMap; + TQComboBox *mAlarmTimeCombo; + TQCheckBox *mAlarmTimeDefaultCheckBox; + TQCheckBox *mWorkDays[7]; }; extern "C" { - KCModule *create_korganizerconfigtime( QWidget *parent, const char * ) + KCModule *create_korganizerconfigtime( TQWidget *parent, const char * ) { KGlobal::locale()->insertCatalogue( "timezones" ); return new KOPrefsDialogTime( parent, "kcmkorganizertime" ); @@ -458,15 +458,15 @@ extern "C" class KOPrefsDialogViews : public KPrefsModule { public: - KOPrefsDialogViews( QWidget *parent, const char *name ) + KOPrefsDialogViews( TQWidget *parent, const char *name ) : KPrefsModule( KOPrefs::instance(), parent, name ) { - QBoxLayout *topTopLayout = new QVBoxLayout( this ); + TQBoxLayout *topTopLayout = new TQVBoxLayout( this ); - QWidget *topFrame = new QWidget( this ); + TQWidget *topFrame = new TQWidget( this ); topTopLayout->addWidget( topFrame ); - QBoxLayout *topLayout = new QVBoxLayout( topFrame ); + TQBoxLayout *topLayout = new TQVBoxLayout( topFrame ); topLayout->setSpacing( KDialog::spacingHint() ); KPrefsWidBool *enableToolTips = @@ -478,7 +478,7 @@ class KOPrefsDialogViews : public KPrefsModule topLayout->addWidget( showTodosAgenda->checkBox() ); /*** Date Navigator Group ***/ - QGroupBox *dateNavGroup = new QGroupBox( 1, Horizontal, + TQGroupBox *dateNavGroup = new TQGroupBox( 1, Horizontal, i18n("Date Navigator"), topFrame ); addWidBool( KOPrefs::instance()->dailyRecurItem(), dateNavGroup ); @@ -487,30 +487,30 @@ class KOPrefsDialogViews : public KPrefsModule /*** Agenda View Group ***/ - QGroupBox *agendaGroup = new QGroupBox( 1, Horizontal, + TQGroupBox *agendaGroup = new TQGroupBox( 1, Horizontal, i18n("Agenda View"), topFrame ); - QHBox *hourSizeBox = new QHBox( agendaGroup ); + TQHBox *hourSizeBox = new TQHBox( agendaGroup ); KPrefsWidInt *hourSize = addWidInt( KOPrefs::instance()->hourSizeItem(), hourSizeBox ); hourSize->spinBox()->setSuffix(i18n("suffix in the hour size spin box", " pixel")); // horizontal spacer: - new QWidget( hourSizeBox ); + new TQWidget( hourSizeBox ); - QHBox *nextDaysBox = new QHBox( agendaGroup ); + TQHBox *nextDaysBox = new TQHBox( agendaGroup ); KPrefsWidInt *nextDays = addWidInt( KOPrefs::instance()->nextXDaysItem(), nextDaysBox ); nextDays->spinBox()->setSuffix(i18n("suffix in the N days spin box", " days")); - new QWidget( nextDaysBox ); + new TQWidget( nextDaysBox ); KPrefsWidBool *marcusBainsEnabled = addWidBool( KOPrefs::instance()->marcusBainsEnabledItem(), agendaGroup ); KPrefsWidBool *marcusBainsShowSeconds = addWidBool( KOPrefs::instance()->marcusBainsShowSecondsItem(), agendaGroup ); - connect( marcusBainsEnabled->checkBox(), SIGNAL( toggled( bool ) ), - marcusBainsShowSeconds->checkBox(), SLOT( setEnabled( bool ) ) ); + connect( marcusBainsEnabled->checkBox(), TQT_SIGNAL( toggled( bool ) ), + marcusBainsShowSeconds->checkBox(), TQT_SLOT( setEnabled( bool ) ) ); addWidBool( KOPrefs::instance()->selectionStartsEditorItem(), agendaGroup ); @@ -521,11 +521,11 @@ class KOPrefsDialogViews : public KPrefsModule topLayout->addWidget( agendaGroup ); /*** Month and Todo view groups side by side, to save space. ***/ - QHBoxLayout *hbox = new QHBoxLayout(); + TQHBoxLayout *hbox = new TQHBoxLayout(); topLayout->addLayout( hbox ); /*** Month View Group ***/ - QGroupBox *monthGroup = new QGroupBox( 1, Horizontal, + TQGroupBox *monthGroup = new TQGroupBox( 1, Horizontal, i18n("Month View"), topFrame ); addWidBool( KOPrefs::instance()->enableMonthScrollItem(), monthGroup ); @@ -537,7 +537,7 @@ class KOPrefsDialogViews : public KPrefsModule /*** Todo View Group ***/ - QGroupBox *todoGroup = new QGroupBox( 1, Horizontal, + TQGroupBox *todoGroup = new TQGroupBox( 1, Horizontal, i18n("To-do View"), topFrame ); addWidBool( KOPrefs::instance()->fullViewTodoItem(), todoGroup ); @@ -552,7 +552,7 @@ class KOPrefsDialogViews : public KPrefsModule extern "C" { - KCModule *create_korganizerconfigviews( QWidget *parent, const char * ) + KCModule *create_korganizerconfigviews( TQWidget *parent, const char * ) { return new KOPrefsDialogViews( parent, "kcmkorganizerviews" ); } @@ -562,27 +562,27 @@ extern "C" class KOPrefsDialogFonts : public KPrefsModule { public: - KOPrefsDialogFonts( QWidget *parent, const char *name ) + KOPrefsDialogFonts( TQWidget *parent, const char *name ) : KPrefsModule( KOPrefs::instance(), parent, name ) { - QBoxLayout *topTopLayout = new QVBoxLayout( this ); + TQBoxLayout *topTopLayout = new TQVBoxLayout( this ); - QWidget *topFrame = new QWidget( this ); + TQWidget *topFrame = new TQWidget( this ); topTopLayout->addWidget( topFrame ); - QGridLayout *topLayout = new QGridLayout(topFrame,5,3); + TQGridLayout *topLayout = new TQGridLayout(topFrame,5,3); topLayout->setSpacing( KDialog::spacingHint() ); KPrefsWidFont *timeBarFont = addWidFont( KOPrefs::instance()->timeBarFontItem(), topFrame, - KGlobal::locale()->formatTime( QTime( 12, 34 ) ) ); + KGlobal::locale()->formatTime( TQTime( 12, 34 ) ) ); topLayout->addWidget(timeBarFont->label(),0,0); topLayout->addWidget(timeBarFont->preview(),0,1); topLayout->addWidget(timeBarFont->button(),0,2); KPrefsWidFont *monthViewFont = addWidFont( KOPrefs::instance()->monthViewFontItem(), topFrame, - KGlobal::locale()->formatTime(QTime(12,34)) + " " + + KGlobal::locale()->formatTime(TQTime(12,34)) + " " + i18n("Event text") ); topLayout->addWidget(monthViewFont->label(),1,0); @@ -598,7 +598,7 @@ class KOPrefsDialogFonts : public KPrefsModule KPrefsWidFont *marcusBainsFont = addWidFont( KOPrefs::instance()->marcusBainsFontItem(), topFrame, - KGlobal::locale()->formatTime( QTime( 12, 34, 23 ) ) ); + KGlobal::locale()->formatTime( TQTime( 12, 34, 23 ) ) ); topLayout->addWidget(marcusBainsFont->label(),3,0); topLayout->addWidget(marcusBainsFont->preview(),3,1); topLayout->addWidget(marcusBainsFont->button(),3,2); @@ -612,22 +612,22 @@ class KOPrefsDialogFonts : public KPrefsModule extern "C" { - KCModule *create_korganizerconfigfonts( QWidget *parent, const char * ) + KCModule *create_korganizerconfigfonts( TQWidget *parent, const char * ) { return new KOPrefsDialogFonts( parent, "kcmkorganizerfonts" ); } } -KOPrefsDialogColors::KOPrefsDialogColors( QWidget *parent, const char *name ) +KOPrefsDialogColors::KOPrefsDialogColors( TQWidget *parent, const char *name ) : KPrefsModule( KOPrefs::instance(), parent, name ) { - QBoxLayout *topTopLayout = new QVBoxLayout( this ); + TQBoxLayout *topTopLayout = new TQVBoxLayout( this ); - QWidget *topFrame = new QWidget( this ); + TQWidget *topFrame = new TQWidget( this ); topTopLayout->addWidget( topFrame ); - QGridLayout *topLayout = new QGridLayout(topFrame,7,2); + TQGridLayout *topLayout = new TQGridLayout(topFrame,7,2); topLayout->setSpacing( KDialog::spacingHint() ); // Holiday Color @@ -672,42 +672,42 @@ KOPrefsDialogColors::KOPrefsDialogColors( QWidget *parent, const char *name ) topLayout->addWidget(todoOverdueColor->button(),6,1); // categories colors - QGroupBox *categoryGroup = new QGroupBox(1,Horizontal,i18n("Categories"), + TQGroupBox *categoryGroup = new TQGroupBox(1,Horizontal,i18n("Categories"), topFrame); topLayout->addMultiCellWidget(categoryGroup,7,7,0,1); - mCategoryCombo = new QComboBox(categoryGroup); + mCategoryCombo = new TQComboBox(categoryGroup); mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); - QWhatsThis::add( mCategoryCombo, + TQWhatsThis::add( mCategoryCombo, i18n( "Select here the event category you want to modify. " "You can change the selected category color using " "the button below." ) ); - connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor())); + connect(mCategoryCombo,TQT_SIGNAL(activated(int)),TQT_SLOT(updateCategoryColor())); mCategoryButton = new KColorButton(categoryGroup); - QWhatsThis::add( mCategoryButton, + TQWhatsThis::add( mCategoryButton, i18n( "Choose here the color of the event category selected " "using the combo box above." ) ); - connect(mCategoryButton,SIGNAL(changed(const QColor &)),SLOT(setCategoryColor())); + connect(mCategoryButton,TQT_SIGNAL(changed(const TQColor &)),TQT_SLOT(setCategoryColor())); updateCategoryColor(); // resources colors - QGroupBox *resourceGroup = new QGroupBox(1,Horizontal,i18n("Resources"), + TQGroupBox *resourceGroup = new TQGroupBox(1,Horizontal,i18n("Resources"), topFrame); topLayout->addMultiCellWidget(resourceGroup,8,8,0,1); - mResourceCombo = new QComboBox(resourceGroup); - QWhatsThis::add( mResourceCombo, + mResourceCombo = new TQComboBox(resourceGroup); + TQWhatsThis::add( mResourceCombo, i18n( "Select here resource you want to modify. " "You can change the selected resource color using " "the button below." ) ); - connect(mResourceCombo,SIGNAL(activated(int)),SLOT(updateResourceColor())); + connect(mResourceCombo,TQT_SIGNAL(activated(int)),TQT_SLOT(updateResourceColor())); mResourceButton = new KColorButton(resourceGroup); - QWhatsThis::add( mResourceButton, + TQWhatsThis::add( mResourceButton, i18n( "Choose here the color of the resource selected " "using the combo box above." ) ); - connect(mResourceButton,SIGNAL(changed(const QColor &)),SLOT(setResourceColor())); + connect(mResourceButton,TQT_SIGNAL(changed(const TQColor &)),TQT_SLOT(setResourceColor())); updateResources(); topLayout->setRowStretch(9,1); @@ -717,13 +717,13 @@ KOPrefsDialogColors::KOPrefsDialogColors( QWidget *parent, const char *name ) void KOPrefsDialogColors::usrWriteConfig() { - QDictIterator<QColor> itCat(mCategoryDict); + TQDictIterator<TQColor> itCat(mCategoryDict); while (itCat.current()) { KOPrefs::instance()->setCategoryColor(itCat.currentKey(),*itCat.current()); ++itCat; } - QDictIterator<QColor> itRes(mResourceDict); + TQDictIterator<TQColor> itRes(mResourceDict); while (itRes.current()) { KOPrefs::instance()->setResourceColor(itRes.currentKey(),*itRes.current()); ++itRes; @@ -745,14 +745,14 @@ void KOPrefsDialogColors::updateCategories() void KOPrefsDialogColors::setCategoryColor() { - mCategoryDict.replace(mCategoryCombo->currentText(), new QColor(mCategoryButton->color())); + mCategoryDict.replace(mCategoryCombo->currentText(), new TQColor(mCategoryButton->color())); slotWidChanged(); } void KOPrefsDialogColors::updateCategoryColor() { - QString cat = mCategoryCombo->currentText(); - QColor *color = mCategoryDict.find(cat); + TQString cat = mCategoryCombo->currentText(); + TQColor *color = mCategoryDict.find(cat); if (!color) { color = KOPrefs::instance()->categoryColor(cat); } @@ -773,9 +773,9 @@ void KOPrefsDialogColors::updateResources() KCal::CalendarResourceManager::Iterator it; for( it = manager->begin(); it != manager->end(); ++it ) { if ( !(*it)->subresources().isEmpty() ) { - QStringList subresources = (*it)->subresources(); + TQStringList subresources = (*it)->subresources(); for ( uint i = 0; i < subresources.count(); ++i ) { - QString resource = subresources[ i ]; + TQString resource = subresources[ i ]; if ( (*it)->subresourceActive( resource ) ) { mResourceCombo->insertItem( (*it)->labelForSubresource( resource ) ); mResourceIdentifier.append( resource ); @@ -795,15 +795,15 @@ void KOPrefsDialogColors::setResourceColor() kdDebug( 5850) << "KOPrefsDialogColors::setResorceColor()" << endl; mResourceDict.replace( mResourceIdentifier[mResourceCombo->currentItem()], - new QColor( mResourceButton->color() ) ); + new TQColor( mResourceButton->color() ) ); slotWidChanged(); } void KOPrefsDialogColors::updateResourceColor() { kdDebug( 5850 ) << "KOPrefsDialogColors::updateResourceColor()" << endl; - QString res= mResourceIdentifier[mResourceCombo->currentItem()]; - QColor *color = mCategoryDict.find(res); + TQString res= mResourceIdentifier[mResourceCombo->currentItem()]; + TQColor *color = mCategoryDict.find(res); if( !color ) { color = KOPrefs::instance()->resourceColor( res ); } @@ -813,22 +813,22 @@ void KOPrefsDialogColors::updateResourceColor() } extern "C" { - KCModule *create_korganizerconfigcolors( QWidget *parent, const char * ) + KCModule *create_korganizerconfigcolors( TQWidget *parent, const char * ) { return new KOPrefsDialogColors( parent, "kcmkorganizercolors" ); } } -KOPrefsDialogGroupScheduling::KOPrefsDialogGroupScheduling( QWidget *parent, const char *name ) +KOPrefsDialogGroupScheduling::KOPrefsDialogGroupScheduling( TQWidget *parent, const char *name ) : KPrefsModule( KOPrefs::instance(), parent, name ) { - QBoxLayout *topTopLayout = new QVBoxLayout( this ); + TQBoxLayout *topTopLayout = new TQVBoxLayout( this ); - QWidget *topFrame = new QWidget( this ); + TQWidget *topFrame = new TQWidget( this ); topTopLayout->addWidget( topFrame ); - QGridLayout *topLayout = new QGridLayout(topFrame,6,2); + TQGridLayout *topLayout = new TQGridLayout(topFrame,6,2); topLayout->setSpacing( KDialog::spacingHint() ); KPrefsWidBool *useGroupwareBool = @@ -836,8 +836,8 @@ KOPrefsDialogGroupScheduling::KOPrefsDialogGroupScheduling( QWidget *parent, con topFrame ); topLayout->addMultiCellWidget(useGroupwareBool->checkBox(),0,0,0,1); // FIXME: This radio button should only be available when KMail is chosen -// connect(thekmailradiobuttonupthere,SIGNAL(toggled(bool)), -// useGroupwareBool->checkBox(), SLOT(enabled(bool))); +// connect(thekmailradiobuttonupthere,TQT_SIGNAL(toggled(bool)), +// useGroupwareBool->checkBox(), TQT_SLOT(enabled(bool))); KPrefsWidBool *bcc = addWidBool( KOPrefs::instance()->bccItem(), topFrame ); @@ -858,50 +858,50 @@ KOPrefsDialogGroupScheduling::KOPrefsDialogGroupScheduling( QWidget *parent, con topLayout->addMultiCellWidget(schedulerGroup->groupBox(),0,0,0,1); #endif - QLabel *aMailsLabel = new QLabel(i18n("Additional email addresses:"),topFrame); - QString whatsThis = i18n( "Add, edit or remove additional e-mails addresses " + TQLabel *aMailsLabel = new TQLabel(i18n("Additional email addresses:"),topFrame); + TQString whatsThis = i18n( "Add, edit or remove additional e-mails addresses " "here. These email addresses are the ones you " "have in addition to the one set in personal " "preferences. If you are an attendee of one event, " "but use another email address there, you need to " "list this address here so KOrganizer can " "recognize it as yours." ); - QWhatsThis::add( aMailsLabel, whatsThis ); + TQWhatsThis::add( aMailsLabel, whatsThis ); topLayout->addMultiCellWidget(aMailsLabel,3,3,0,1); - mAMails = new QListView(topFrame); - QWhatsThis::add( mAMails, whatsThis ); + mAMails = new TQListView(topFrame); + TQWhatsThis::add( mAMails, whatsThis ); mAMails->addColumn(i18n("Email"),300); topLayout->addMultiCellWidget(mAMails,4,4,0,1); - QLabel *aEmailsEditLabel = new QLabel(i18n("Additional email address:"),topFrame); + TQLabel *aEmailsEditLabel = new TQLabel(i18n("Additional email address:"),topFrame); whatsThis = i18n( "Edit additional e-mails addresses here. To edit an " "address select it from the list above " "or press the \"New\" button below. These email " "addresses are the ones you have in addition to the " "one set in personal preferences." ); - QWhatsThis::add( aEmailsEditLabel, whatsThis ); + TQWhatsThis::add( aEmailsEditLabel, whatsThis ); topLayout->addWidget(aEmailsEditLabel,5,0); - aEmailsEdit = new QLineEdit(topFrame); - QWhatsThis::add( aEmailsEdit, whatsThis ); + aEmailsEdit = new TQLineEdit(topFrame); + TQWhatsThis::add( aEmailsEdit, whatsThis ); aEmailsEdit->setEnabled(false); topLayout->addWidget(aEmailsEdit,5,1); - QPushButton *add = new QPushButton(i18n("New"),topFrame,"new"); + TQPushButton *add = new TQPushButton(i18n("New"),topFrame,"new"); whatsThis = i18n( "Press this button to add a new entry to the " "additional e-mail addresses list. Use the edit " "box above to edit the new entry." ); - QWhatsThis::add( add, whatsThis ); + TQWhatsThis::add( add, whatsThis ); topLayout->addWidget(add,6,0); - QPushButton *del = new QPushButton(i18n("Remove"),topFrame,"remove"); - QWhatsThis::add( del, whatsThis ); + TQPushButton *del = new TQPushButton(i18n("Remove"),topFrame,"remove"); + TQWhatsThis::add( del, whatsThis ); topLayout->addWidget(del,6,1); //topLayout->setRowStretch(2,1); - connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) ); - connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) ); - connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem())); - connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput())); + connect(add, TQT_SIGNAL( clicked() ), this, TQT_SLOT(addItem()) ); + connect(del, TQT_SIGNAL( clicked() ), this, TQT_SLOT(removeItem()) ); + connect(aEmailsEdit,TQT_SIGNAL( textChanged(const TQString&) ), this,TQT_SLOT(updateItem())); + connect(mAMails,TQT_SIGNAL(selectionChanged(TQListViewItem *)),TQT_SLOT(updateInput())); load(); } @@ -909,9 +909,9 @@ KOPrefsDialogGroupScheduling::KOPrefsDialogGroupScheduling( QWidget *parent, con void KOPrefsDialogGroupScheduling::usrReadConfig() { mAMails->clear(); - for ( QStringList::Iterator it = KOPrefs::instance()->mAdditionalMails.begin(); + for ( TQStringList::Iterator it = KOPrefs::instance()->mAdditionalMails.begin(); it != KOPrefs::instance()->mAdditionalMails.end(); ++it ) { - QListViewItem *item = new QListViewItem(mAMails); + TQListViewItem *item = new TQListViewItem(mAMails); item->setText(0,*it); mAMails->insertItem(item); } @@ -920,7 +920,7 @@ void KOPrefsDialogGroupScheduling::usrReadConfig() void KOPrefsDialogGroupScheduling::usrWriteConfig() { KOPrefs::instance()->mAdditionalMails.clear(); - QListViewItem *item; + TQListViewItem *item; item = mAMails->firstChild(); while (item) { @@ -932,7 +932,7 @@ void KOPrefsDialogGroupScheduling::usrWriteConfig() void KOPrefsDialogGroupScheduling::addItem() { aEmailsEdit->setEnabled(true); - QListViewItem *item = new QListViewItem(mAMails); + TQListViewItem *item = new TQListViewItem(mAMails); mAMails->insertItem(item); mAMails->setSelected(item,true); aEmailsEdit->setText(i18n("(EmptyEmail)")); @@ -941,7 +941,7 @@ void KOPrefsDialogGroupScheduling::addItem() void KOPrefsDialogGroupScheduling::removeItem() { - QListViewItem *item; + TQListViewItem *item; item = mAMails->selectedItem(); if (!item) return; mAMails->takeItem(item); @@ -958,7 +958,7 @@ void KOPrefsDialogGroupScheduling::removeItem() void KOPrefsDialogGroupScheduling::updateItem() { - QListViewItem *item; + TQListViewItem *item; item = mAMails->selectedItem(); if (!item) return; item->setText(0,aEmailsEdit->text()); @@ -967,7 +967,7 @@ void KOPrefsDialogGroupScheduling::updateItem() void KOPrefsDialogGroupScheduling::updateInput() { - QListViewItem *item; + TQListViewItem *item; item = mAMails->selectedItem(); if (!item) return; aEmailsEdit->setEnabled(true); @@ -976,7 +976,7 @@ void KOPrefsDialogGroupScheduling::updateInput() extern "C" { - KCModule *create_korganizerconfiggroupscheduling( QWidget *parent, + KCModule *create_korganizerconfiggroupscheduling( TQWidget *parent, const char * ) { return new KOPrefsDialogGroupScheduling( parent, @@ -985,12 +985,12 @@ extern "C" } -KOPrefsDialogGroupwareScheduling::KOPrefsDialogGroupwareScheduling( QWidget *parent, const char *name ) +KOPrefsDialogGroupwareScheduling::KOPrefsDialogGroupwareScheduling( TQWidget *parent, const char *name ) : KPrefsModule( KOPrefs::instance(), parent, name ) { mGroupwarePage = new KOGroupwarePrefsPage( this ); - connect( mGroupwarePage, SIGNAL( changed() ), SLOT( slotWidChanged() ) ); - ( new QVBoxLayout( this ) )->addWidget( mGroupwarePage ); + connect( mGroupwarePage, TQT_SIGNAL( changed() ), TQT_SLOT( slotWidChanged() ) ); + ( new TQVBoxLayout( this ) )->addWidget( mGroupwarePage ); load(); } @@ -1035,7 +1035,7 @@ void KOPrefsDialogGroupwareScheduling::usrWriteConfig() extern "C" { - KCModule *create_korganizerconfigfreebusy( QWidget *parent, const char * ) + KCModule *create_korganizerconfigfreebusy( TQWidget *parent, const char * ) { return new KOPrefsDialogGroupwareScheduling( parent, "kcmkorganizerfreebusy" ); @@ -1044,10 +1044,10 @@ extern "C" -class PluginItem : public QCheckListItem { +class PluginItem : public TQCheckListItem { public: - PluginItem( QListView *parent, KService::Ptr service ) : - QCheckListItem( parent, service->name(), QCheckListItem::CheckBox ), mService( service ) + PluginItem( TQListView *parent, KService::Ptr service ) : + TQCheckListItem( parent, service->name(), TQCheckListItem::CheckBox ), mService( service ) {} KService::Ptr service() { return mService; } private: @@ -1058,47 +1058,47 @@ class PluginItem : public QCheckListItem { /** Dialog for selecting and configuring KOrganizer plugins */ -KOPrefsDialogPlugins::KOPrefsDialogPlugins( QWidget *parent, const char* name ) +KOPrefsDialogPlugins::KOPrefsDialogPlugins( TQWidget *parent, const char* name ) : KPrefsModule( KOPrefs::instance(), parent, name ) { - QBoxLayout *topTopLayout = new QVBoxLayout( this ); + TQBoxLayout *topTopLayout = new TQVBoxLayout( this ); - QWidget *topFrame = new QWidget( this ); + TQWidget *topFrame = new TQWidget( this ); topTopLayout->addWidget( topFrame ); - QBoxLayout *topLayout = new QVBoxLayout( topFrame ); + TQBoxLayout *topLayout = new TQVBoxLayout( topFrame ); topLayout->setSpacing( KDialog::spacingHint() ); - mListView = new QListView( topFrame ); + mListView = new TQListView( topFrame ); mListView->addColumn( i18n("Name") ); - mListView->setResizeMode( QListView::LastColumn ); + mListView->setResizeMode( TQListView::LastColumn ); topLayout->addWidget( mListView ); - mDescription = new QLabel( topFrame ); - mDescription->setAlignment( QLabel::NoAccel | QLabel::WordBreak | QLabel::AlignVCenter ); - mDescription->setFrameShape( QLabel::Panel ); - mDescription->setFrameShadow( QLabel::Sunken ); - mDescription->setMinimumSize( QSize( 0, 55 ) ); + mDescription = new TQLabel( topFrame ); + mDescription->setAlignment( TQLabel::NoAccel | TQLabel::WordBreak | TQLabel::AlignVCenter ); + mDescription->setFrameShape( TQLabel::Panel ); + mDescription->setFrameShadow( TQLabel::Sunken ); + mDescription->setMinimumSize( TQSize( 0, 55 ) ); mDescription->setSizePolicy( - QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, + TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, mDescription->sizePolicy().hasHeightForWidth() ) ); topLayout->addWidget( mDescription ); - QWidget *buttonRow = new QWidget( topFrame ); - QBoxLayout *buttonRowLayout = new QHBoxLayout( buttonRow ); + TQWidget *buttonRow = new TQWidget( topFrame ); + TQBoxLayout *buttonRowLayout = new TQHBoxLayout( buttonRow ); mConfigureButton = new KPushButton( KGuiItem( i18n("Configure &Plugin..."), - "configure", QString::null, i18n("This button allows you to configure" + "configure", TQString::null, i18n("This button allows you to configure" " the plugin that you have selected in the list above") ), buttonRow ); buttonRowLayout->addWidget( mConfigureButton ); - buttonRowLayout->addItem( new QSpacerItem(1, 1, QSizePolicy::Expanding) ); + buttonRowLayout->addItem( new TQSpacerItem(1, 1, TQSizePolicy::Expanding) ); topLayout->addWidget( buttonRow ); - connect( mConfigureButton, SIGNAL( clicked() ), SLOT( configure() ) ); + connect( mConfigureButton, TQT_SIGNAL( clicked() ), TQT_SLOT( configure() ) ); - connect( mListView, SIGNAL( selectionChanged( QListViewItem* ) ), - SLOT( selectionChanged( QListViewItem* ) ) ); - connect( mListView, SIGNAL( clicked( QListViewItem* ) ), - SLOT( slotWidChanged() ) ); + connect( mListView, TQT_SIGNAL( selectionChanged( TQListViewItem* ) ), + TQT_SLOT( selectionChanged( TQListViewItem* ) ) ); + connect( mListView, TQT_SIGNAL( clicked( TQListViewItem* ) ), + TQT_SLOT( slotWidChanged() ) ); load(); // usrReadConfig(); @@ -1111,11 +1111,11 @@ void KOPrefsDialogPlugins::usrReadConfig() KTrader::OfferList plugins = KOCore::self()->availablePlugins(); plugins += KOCore::self()->availableParts(); - QStringList selectedPlugins = KOPrefs::instance()->mSelectedPlugins; + TQStringList selectedPlugins = KOPrefs::instance()->mSelectedPlugins; KTrader::OfferList::ConstIterator it; for( it = plugins.begin(); it != plugins.end(); ++it ) { - QCheckListItem *item = new PluginItem( mListView, *it ); + TQCheckListItem *item = new PluginItem( mListView, *it ); if ( selectedPlugins.find( (*it)->desktopEntryName() ) != selectedPlugins.end() ) { item->setOn( true ); @@ -1125,7 +1125,7 @@ void KOPrefsDialogPlugins::usrReadConfig() void KOPrefsDialogPlugins::usrWriteConfig() { - QStringList selectedPlugins; + TQStringList selectedPlugins; PluginItem *item = static_cast<PluginItem *>( mListView->firstChild() ); while( item ) { @@ -1153,16 +1153,16 @@ void KOPrefsDialogPlugins::configure() } } -void KOPrefsDialogPlugins::selectionChanged( QListViewItem *i ) +void KOPrefsDialogPlugins::selectionChanged( TQListViewItem *i ) { PluginItem *item = dynamic_cast<PluginItem*>( i ); if ( !item ) { mConfigureButton->setEnabled( false ); - mDescription->setText( QString::null ); + mDescription->setText( TQString::null ); return; } - QVariant variant = item->service()->property( "X-KDE-KOrganizer-HasSettings" ); + TQVariant variant = item->service()->property( "X-KDE-KOrganizer-HasSettings" ); bool hasSettings = true; if ( variant.isValid() ) @@ -1176,7 +1176,7 @@ void KOPrefsDialogPlugins::selectionChanged( QListViewItem *i ) extern "C" { - KCModule *create_korganizerconfigplugins( QWidget *parent, const char * ) + KCModule *create_korganizerconfigplugins( TQWidget *parent, const char * ) { return new KOPrefsDialogPlugins( parent, "kcmkorganizerplugins" ); @@ -1186,40 +1186,40 @@ extern "C" extern "C" { - KCModule *create_korgdesignerfields( QWidget *parent, const char * ) { + KCModule *create_korgdesignerfields( TQWidget *parent, const char * ) { return new KOPrefsDesignerFields( parent, "kcmkorgdesignerfields" ); } } -KOPrefsDesignerFields::KOPrefsDesignerFields( QWidget *parent, const char *name ) +KOPrefsDesignerFields::KOPrefsDesignerFields( TQWidget *parent, const char *name ) : KCMDesignerFields( parent, name ) { } -QString KOPrefsDesignerFields::localUiDir() +TQString KOPrefsDesignerFields::localUiDir() { - QString dir = locateLocal( "data", "korganizer/designer/event/"); + TQString dir = locateLocal( "data", "korganizer/designer/event/"); kdDebug() << "KOPrefsDesignerFields::localUiDir(): " << dir << endl; return dir; } -QString KOPrefsDesignerFields::uiPath() +TQString KOPrefsDesignerFields::uiPath() { return "korganizer/designer/event/"; } -void KOPrefsDesignerFields::writeActivePages( const QStringList &activePages ) +void KOPrefsDesignerFields::writeActivePages( const TQStringList &activePages ) { KOPrefs::instance()->setActiveDesignerFields( activePages ); KOPrefs::instance()->writeConfig(); } -QStringList KOPrefsDesignerFields::readActivePages() +TQStringList KOPrefsDesignerFields::readActivePages() { return KOPrefs::instance()->activeDesignerFields(); } -QString KOPrefsDesignerFields::applicationName() +TQString KOPrefsDesignerFields::applicationName() { return "KORGANIZER"; } diff --git a/korganizer/koprefsdialog.h b/korganizer/koprefsdialog.h index 797c50e5b..b412fff7e 100644 --- a/korganizer/koprefsdialog.h +++ b/korganizer/koprefsdialog.h @@ -27,7 +27,7 @@ #include <libkdepim/kprefsdialog.h> #include <libkdepim/kcmdesignerfields.h> -#include <qdict.h> +#include <tqdict.h> class QLineEdit; class QLabel; @@ -42,19 +42,19 @@ class KDE_EXPORT KOPrefsDialogMain : public KPrefsModule { Q_OBJECT public: - KOPrefsDialogMain( QWidget *parent, const char *name ); + KOPrefsDialogMain( TQWidget *parent, const char *name ); protected slots: void toggleEmailSettings( bool on ); private: - QWidget *mUserEmailSettings; + TQWidget *mUserEmailSettings; }; class KDE_EXPORT KOPrefsDialogColors : public KPrefsModule { Q_OBJECT public: - KOPrefsDialogColors( QWidget *parent, const char *name ); + KOPrefsDialogColors( TQWidget *parent, const char *name ); protected: void usrWriteConfig(); @@ -69,22 +69,22 @@ class KDE_EXPORT KOPrefsDialogColors : public KPrefsModule void setResourceColor(); void updateResourceColor(); private: - QComboBox *mCategoryCombo; + TQComboBox *mCategoryCombo; KColorButton *mCategoryButton; - QDict<QColor> mCategoryDict; + TQDict<TQColor> mCategoryDict; - QComboBox *mResourceCombo; + TQComboBox *mResourceCombo; KColorButton *mResourceButton; - QDict<QColor> mResourceDict; + TQDict<TQColor> mResourceDict; //For translation Identifier <->idx in Combo - QStringList mResourceIdentifier; + TQStringList mResourceIdentifier; }; class KDE_EXPORT KOPrefsDialogGroupScheduling : public KPrefsModule { Q_OBJECT public: - KOPrefsDialogGroupScheduling( QWidget *parent, const char *name ); + KOPrefsDialogGroupScheduling( TQWidget *parent, const char *name ); protected: void usrReadConfig(); @@ -97,8 +97,8 @@ class KDE_EXPORT KOPrefsDialogGroupScheduling : public KPrefsModule void updateInput(); private: - QListView *mAMails; - QLineEdit *aEmailsEdit; + TQListView *mAMails; + TQLineEdit *aEmailsEdit; }; class KOGroupwarePrefsPage; @@ -107,7 +107,7 @@ class KDE_EXPORT KOPrefsDialogGroupwareScheduling : public KPrefsModule { Q_OBJECT public: - KOPrefsDialogGroupwareScheduling( QWidget *parent, const char *name ); + KOPrefsDialogGroupwareScheduling( TQWidget *parent, const char *name ); protected: void usrReadConfig(); @@ -121,32 +121,32 @@ class KDE_EXPORT KOPrefsDialogPlugins : public KPrefsModule { Q_OBJECT public: - KOPrefsDialogPlugins( QWidget *parent, const char *name ); + KOPrefsDialogPlugins( TQWidget *parent, const char *name ); protected slots: void usrReadConfig(); void usrWriteConfig(); void configure(); - void selectionChanged( QListViewItem* ); + void selectionChanged( TQListViewItem* ); private: void buildList(); - QListView *mListView; - QLabel *mDescription; + TQListView *mListView; + TQLabel *mDescription; KPushButton *mConfigureButton; }; class KDE_EXPORT KOPrefsDesignerFields : public KPIM::KCMDesignerFields { public: - KOPrefsDesignerFields( QWidget *parent = 0, const char *name = 0 ); + KOPrefsDesignerFields( TQWidget *parent = 0, const char *name = 0 ); protected: - QString localUiDir(); - QString uiPath(); - void writeActivePages( const QStringList & ); - QStringList readActivePages(); - QString applicationName(); + TQString localUiDir(); + TQString uiPath(); + void writeActivePages( const TQStringList & ); + TQStringList readActivePages(); + TQString applicationName(); }; #endif diff --git a/korganizer/korgac/alarmclientiface.h b/korganizer/korgac/alarmclientiface.h index c4edd9f43..d7788a3b0 100644 --- a/korganizer/korgac/alarmclientiface.h +++ b/korganizer/korgac/alarmclientiface.h @@ -22,7 +22,7 @@ #define ALARMCLIENTIFACE_H #include <dcopobject.h> -#include <qstringlist.h> +#include <tqstringlist.h> class AlarmClientIface : virtual public DCOPObject { @@ -32,7 +32,7 @@ class AlarmClientIface : virtual public DCOPObject virtual ASYNC forceAlarmCheck() = 0; virtual ASYNC dumpDebug() = 0; - virtual QStringList dumpAlarms() = 0; + virtual TQStringList dumpAlarms() = 0; virtual void debugShowDialog() = 0; }; diff --git a/korganizer/korgac/alarmdialog.cpp b/korganizer/korgac/alarmdialog.cpp index 68e1822dc..6c9d62e90 100644 --- a/korganizer/korgac/alarmdialog.cpp +++ b/korganizer/korgac/alarmdialog.cpp @@ -22,15 +22,15 @@ without including the source code for Qt in the source distribution. */ -#include <qhbox.h> -#include <qvbox.h> -#include <qlabel.h> -#include <qfile.h> -#include <qspinbox.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qcstring.h> -#include <qdatastream.h> +#include <tqhbox.h> +#include <tqvbox.h> +#include <tqlabel.h> +#include <tqfile.h> +#include <tqspinbox.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqcstring.h> +#include <tqdatastream.h> #include <kapplication.h> #include <kconfig.h> @@ -57,7 +57,7 @@ class AlarmListItem : public KListViewItem { public: - AlarmListItem( Incidence *incidence, QListView *parent ) : + AlarmListItem( Incidence *incidence, TQListView *parent ) : KListViewItem( parent ), mIncidence( incidence->clone() ), mNotified( false ) @@ -69,13 +69,13 @@ class AlarmListItem : public KListViewItem } Incidence *mIncidence; - QDateTime mRemindAt; + TQDateTime mRemindAt; bool mNotified; }; -typedef QValueList<AlarmListItem*> ItemList; +typedef TQValueList<AlarmListItem*> ItemList; -AlarmDialog::AlarmDialog( QWidget *parent, const char *name ) +AlarmDialog::AlarmDialog( TQWidget *parent, const char *name ) : KDialogBase( Plain, WType_TopLevel | WStyle_Customize | WStyle_StaysOnTop | WStyle_DialogBorder, parent, name, false, i18n("Reminder"), Ok | User1 | User2 | User3, User1/*3*/, @@ -85,11 +85,11 @@ AlarmDialog::AlarmDialog( QWidget *parent, const char *name ) KGlobal::iconLoader()->addAppDir( "kdepim" ); setButtonOK( i18n( "Dismiss" ) ); - QWidget *topBox = plainPage(); - QBoxLayout *topLayout = new QVBoxLayout( topBox ); + TQWidget *topBox = plainPage(); + TQBoxLayout *topLayout = new TQVBoxLayout( topBox ); topLayout->setSpacing( spacingHint() ); - QLabel *label = new QLabel( i18n("The following events triggered reminders:"), + TQLabel *label = new TQLabel( i18n("The following events triggered reminders:"), topBox ); topLayout->addWidget( label ); @@ -97,22 +97,22 @@ AlarmDialog::AlarmDialog( QWidget *parent, const char *name ) mIncidenceListView->addColumn( i18n( "Summary" ) ); mIncidenceListView->addColumn( i18n( "Due" ) ); mIncidenceListView->setAllColumnsShowFocus( true ); - mIncidenceListView->setSelectionMode( QListView::Extended ); + mIncidenceListView->setSelectionMode( TQListView::Extended ); topLayout->addWidget( mIncidenceListView ); - connect( mIncidenceListView, SIGNAL(selectionChanged()), SLOT(updateButtons()) ); - connect( mIncidenceListView, SIGNAL(doubleClicked(QListViewItem*)), SLOT(slotUser2()) ); - connect( mIncidenceListView, SIGNAL(currentChanged(QListViewItem*)), SLOT(showDetails()) ); - connect( mIncidenceListView, SIGNAL(selectionChanged()), SLOT(showDetails()) ); + connect( mIncidenceListView, TQT_SIGNAL(selectionChanged()), TQT_SLOT(updateButtons()) ); + connect( mIncidenceListView, TQT_SIGNAL(doubleClicked(TQListViewItem*)), TQT_SLOT(slotUser2()) ); + connect( mIncidenceListView, TQT_SIGNAL(currentChanged(TQListViewItem*)), TQT_SLOT(showDetails()) ); + connect( mIncidenceListView, TQT_SIGNAL(selectionChanged()), TQT_SLOT(showDetails()) ); mDetailView = new KOEventViewer( topBox ); topLayout->addWidget( mDetailView ); - QHBox *suspendBox = new QHBox( topBox ); + TQHBox *suspendBox = new TQHBox( topBox ); suspendBox->setSpacing( spacingHint() ); topLayout->addWidget( suspendBox ); - QLabel *l = new QLabel( i18n("Suspend &duration:"), suspendBox ); - mSuspendSpin = new QSpinBox( 1, 9999, 1, suspendBox ); + TQLabel *l = new TQLabel( i18n("Suspend &duration:"), suspendBox ); + mSuspendSpin = new TQSpinBox( 1, 9999, 1, suspendBox ); mSuspendSpin->setValue( 5 ); // default suspend duration l->setBuddy( mSuspendSpin ); @@ -121,7 +121,7 @@ AlarmDialog::AlarmDialog( QWidget *parent, const char *name ) mSuspendUnit->insertItem( i18n("hour(s)") ); mSuspendUnit->insertItem( i18n("day(s)") ); mSuspendUnit->insertItem( i18n("week(s)") ); - connect( &mSuspendTimer, SIGNAL(timeout()), SLOT(wakeUp()) ); + connect( &mSuspendTimer, TQT_SIGNAL(timeout()), TQT_SLOT(wakeUp()) ); // showButton( User2/*3*/, false ); @@ -133,7 +133,7 @@ AlarmDialog::~AlarmDialog() mIncidenceListView->clear(); } -void AlarmDialog::addIncidence( Incidence *incidence, const QDateTime &reminderAt ) +void AlarmDialog::addIncidence( Incidence *incidence, const TQDateTime &reminderAt ) { AlarmListItem *item = new AlarmListItem( incidence, mIncidenceListView ); item->setText( 0, incidence->summary() ); @@ -142,7 +142,7 @@ void AlarmDialog::addIncidence( Incidence *incidence, const QDateTime &reminderA if ( dynamic_cast<Event*>( incidence ) ) { item->setPixmap( 0, SmallIcon( "appointment" ) ); if ( incidence->doesRecur() ) { - QDateTime nextStart = incidence->recurrence()->getNextDateTime( reminderAt ); + TQDateTime nextStart = incidence->recurrence()->getNextDateTime( reminderAt ); if ( nextStart.isValid() ) item->setText( 1, KGlobal::locale()->formatDateTime( nextStart ) ); } @@ -202,12 +202,12 @@ void AlarmDialog::suspend() break; } - for ( QListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) { + for ( TQListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) { AlarmListItem * item = static_cast<AlarmListItem*>( it.current() ); if ( item->isSelected() && item->isVisible() ) { item->setVisible( false ); item->setSelected( false ); - item->mRemindAt = QDateTime::currentDateTime().addSecs( unit * mSuspendSpin->value() ); + item->mRemindAt = TQDateTime::currentDateTime().addSecs( unit * mSuspendSpin->value() ); item->mNotified = false; } } @@ -225,10 +225,10 @@ void AlarmDialog::suspend() void AlarmDialog::setTimer() { int nextReminderAt = -1; - for ( QListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) { + for ( TQListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) { AlarmListItem * item = static_cast<AlarmListItem*>( it.current() ); - if ( item->mRemindAt > QDateTime::currentDateTime() ) { - int secs = QDateTime::currentDateTime().secsTo( item->mRemindAt ); + if ( item->mRemindAt > TQDateTime::currentDateTime() ) { + int secs = TQDateTime::currentDateTime().secsTo( item->mRemindAt ); nextReminderAt = nextReminderAt <= 0 ? secs : QMIN( nextReminderAt, secs ); } } @@ -247,17 +247,17 @@ void AlarmDialog::slotUser2() Incidence *incidence = selection.first()->mIncidence; if ( !kapp->dcopClient()->isApplicationRegistered( "korganizer" ) ) { - if ( kapp->startServiceByDesktopName( "korganizer", QString::null ) ) + if ( kapp->startServiceByDesktopName( "korganizer", TQString::null ) ) KMessageBox::error( 0, i18n("Could not start KOrganizer.") ); } kapp->dcopClient()->send( "korganizer", "KOrganizerIface", - "editIncidence(QString)", + "editIncidence(TQString)", incidence->uid() ); // get desktop # where korganizer (or kontact) runs - QByteArray replyData; - QCString object, replyType; + TQByteArray replyData; + TQCString object, replyType; object = kapp->dcopClient()->isApplicationRegistered( "kontact" ) ? "kontact-mainwindow#1" : "KOrganizer MainWindow"; if (!kapp->dcopClient()->call( "korganizer", object, @@ -266,7 +266,7 @@ void AlarmDialog::slotUser2() if ( replyType == "int" ) { int desktop, window; - QDataStream ds( replyData, IO_ReadOnly ); + TQDataStream ds( replyData, IO_ReadOnly ); ds >> window; desktop = KWin::windowInfo( window ).desktop(); @@ -287,7 +287,7 @@ void AlarmDialog::slotUser3() void AlarmDialog::dismissAll() { - for ( QListViewItemIterator it( mIncidenceListView ) ; it.current() ; ) { + for ( TQListViewItemIterator it( mIncidenceListView ) ; it.current() ; ) { AlarmListItem *item = static_cast<AlarmListItem*>( it.current() ); if ( !item->isVisible() ) { ++it; @@ -316,8 +316,8 @@ void AlarmDialog::eventNotification() { bool beeped = false, found = false; - QValueList<AlarmListItem*> list; - for ( QListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) { + TQValueList<AlarmListItem*> list; + for ( TQListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) { AlarmListItem *item = static_cast<AlarmListItem*>( it.current() ); if ( !item->isVisible() || item->mNotified ) continue; @@ -332,12 +332,12 @@ void AlarmDialog::eventNotification() // FIXME: Add a message box asking whether the procedure should really be executed kdDebug(5890) << "Starting program: '" << alarm->programFile() << "'" << endl; KProcess proc; - proc << QFile::encodeName(alarm->programFile()); + proc << TQFile::encodeName(alarm->programFile()); proc.start(KProcess::DontCare); } else if (alarm->type() == Alarm::Audio) { beeped = true; - KAudioPlayer::play(QFile::encodeName(alarm->audioFile())); + KAudioPlayer::play(TQFile::encodeName(alarm->audioFile())); } } } @@ -350,9 +350,9 @@ void AlarmDialog::eventNotification() void AlarmDialog::wakeUp() { bool activeReminders = false; - for ( QListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) { + for ( TQListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) { AlarmListItem * item = static_cast<AlarmListItem*>( it.current() ); - if ( item->mRemindAt <= QDateTime::currentDateTime() ) { + if ( item->mRemindAt <= TQDateTime::currentDateTime() ) { if ( !item->isVisible() ) { item->setVisible( true ); item->setSelected( false ); @@ -380,9 +380,9 @@ void AlarmDialog::slotSave() config->setGroup( "General" ); int numReminders = config->readNumEntry("Reminders", 0); - for ( QListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) { + for ( TQListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) { AlarmListItem * item = static_cast<AlarmListItem*>( it.current() ); - config->setGroup( QString("Incidence-%1").arg(numReminders) ); + config->setGroup( TQString("Incidence-%1").arg(numReminders) ); config->writeEntry( "UID", item->mIncidence->uid() ); config->writeEntry( "RemindAt", item->mRemindAt ); ++numReminders; @@ -402,10 +402,10 @@ void AlarmDialog::updateButtons() enableButton( User3, selection.count() > 0 ); } -QValueList< AlarmListItem * > AlarmDialog::selectedItems() const +TQValueList< AlarmListItem * > AlarmDialog::selectedItems() const { - QValueList<AlarmListItem*> list; - for ( QListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) { + TQValueList<AlarmListItem*> list; + for ( TQListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) { if ( it.current()->isSelected() ) list.append( static_cast<AlarmListItem*>( it.current() ) ); } @@ -415,7 +415,7 @@ QValueList< AlarmListItem * > AlarmDialog::selectedItems() const int AlarmDialog::activeCount() { int count = 0; - for ( QListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) { + for ( TQListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) { AlarmListItem * item = static_cast<AlarmListItem*>( it.current() ); if ( item->isVisible() ) ++count; @@ -426,7 +426,7 @@ int AlarmDialog::activeCount() void AlarmDialog::suspendAll() { mIncidenceListView->clearSelection(); - for ( QListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) { + for ( TQListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) { if ( it.current()->isVisible() ) it.current()->setSelected( true ); } diff --git a/korganizer/korgac/alarmdialog.h b/korganizer/korgac/alarmdialog.h index 085ae8a9b..711a47bd6 100644 --- a/korganizer/korgac/alarmdialog.h +++ b/korganizer/korgac/alarmdialog.h @@ -25,8 +25,8 @@ // // Alarm dialog. // -#include <qtimer.h> -#include <qdatetime.h> +#include <tqtimer.h> +#include <tqdatetime.h> #include <kdialogbase.h> @@ -44,10 +44,10 @@ class AlarmListItem; class AlarmDialog : public KDialogBase { Q_OBJECT public: - AlarmDialog( QWidget *parent = 0, const char *name = 0 ); + AlarmDialog( TQWidget *parent = 0, const char *name = 0 ); virtual ~AlarmDialog(); - void addIncidence( Incidence *incidence, const QDateTime &reminderAt ); + void addIncidence( Incidence *incidence, const TQDateTime &reminderAt ); void eventNotification(); public slots: @@ -73,14 +73,14 @@ class AlarmDialog : public KDialogBase { bool startKOrganizer(); void setTimer(); int activeCount(); - QValueList<AlarmListItem*> selectedItems() const; + TQValueList<AlarmListItem*> selectedItems() const; KListView *mIncidenceListView; KOEventViewer *mDetailView; - QSpinBox *mSuspendSpin; + TQSpinBox *mSuspendSpin; KComboBox *mSuspendUnit; - QTimer mSuspendTimer; + TQTimer mSuspendTimer; }; #endif diff --git a/korganizer/korgac/alarmdockwindow.cpp b/korganizer/korgac/alarmdockwindow.cpp index 074ee9206..bef9b1bda 100644 --- a/korganizer/korgac/alarmdockwindow.cpp +++ b/korganizer/korgac/alarmdockwindow.cpp @@ -39,8 +39,8 @@ #include <kaction.h> #include <kstdaction.h> -#include <qtooltip.h> -#include <qfile.h> +#include <tqtooltip.h> +#include <tqfile.h> #include <stdlib.h> @@ -64,16 +64,16 @@ AlarmDockWindow::AlarmDockWindow( const char *name ) setPixmap( alarmsEnabled ? mPixmapEnabled : mPixmapDisabled ); // Set up the context menu - mSuspendAll = contextMenu()->insertItem( i18n("Suspend All"), this, SLOT( slotSuspendAll() ) ); - mDismissAll = contextMenu()->insertItem( i18n("Dismiss All"), this, SLOT( slotDismissAll() ) ); + mSuspendAll = contextMenu()->insertItem( i18n("Suspend All"), this, TQT_SLOT( slotSuspendAll() ) ); + mDismissAll = contextMenu()->insertItem( i18n("Dismiss All"), this, TQT_SLOT( slotDismissAll() ) ); contextMenu()->setItemEnabled( mSuspendAll, false ); contextMenu()->setItemEnabled( mDismissAll, false ); contextMenu()->insertSeparator(); mAlarmsEnabledId = contextMenu()->insertItem( i18n("Reminders Enabled"), this, - SLOT( toggleAlarmsEnabled() ) ); + TQT_SLOT( toggleAlarmsEnabled() ) ); mAutostartId = contextMenu()->insertItem( i18n("Start Reminder Daemon at Login"), this, - SLOT( toggleAutostart() ) ); + TQT_SLOT( toggleAutostart() ) ); contextMenu()->setItemChecked( mAutostartId, autostart ); contextMenu()->setItemChecked( mAlarmsEnabledId, alarmsEnabled ); @@ -86,25 +86,25 @@ AlarmDockWindow::AlarmDockWindow( const char *name ) kdDebug(5890) << "No Quit standard action." << endl; } else { #if KDE_IS_VERSION(3,3,90) - quit->disconnect( SIGNAL( activated() ), this, - SLOT( maybeQuit() ) ); - connect( quit, SIGNAL( activated() ), SLOT( slotQuit() ) ); + quit->disconnect( TQT_SIGNAL( activated() ), this, + TQT_SLOT( maybeQuit() ) ); + connect( quit, TQT_SIGNAL( activated() ), TQT_SLOT( slotQuit() ) ); } #else //FIXME: remove for KDE 4.0 - quit->disconnect( SIGNAL( activated() ), qApp, - SLOT( closeAllWindows() ) ); + quit->disconnect( TQT_SIGNAL( activated() ), qApp, + TQT_SLOT( closeAllWindows() ) ); } - connect( this, SIGNAL( quitSelected() ), SLOT( slotQuit() ) ); + connect( this, TQT_SIGNAL( quitSelected() ), TQT_SLOT( slotQuit() ) ); #endif - QToolTip::add(this, mName ); + TQToolTip::add(this, mName ); } AlarmDockWindow::~AlarmDockWindow() { } -void AlarmDockWindow::resizeEvent ( QResizeEvent * ) +void AlarmDockWindow::resizeEvent ( TQResizeEvent * ) { // Honor Free Desktop specifications that allow for arbitrary system tray icon sizes mPixmapEnabled = loadSizedIcon( "korgac", width() ); @@ -117,17 +117,17 @@ void AlarmDockWindow::resizeEvent ( QResizeEvent * ) void AlarmDockWindow::slotUpdate( int reminders ) { - QToolTip::remove( this ); + TQToolTip::remove( this ); if ( reminders > 0 ) { - QToolTip::add( this, i18n( "There is 1 active reminder.", + TQToolTip::add( this, i18n( "There is 1 active reminder.", "There are %n active reminders.", reminders ) ); contextMenu()->setItemEnabled( mSuspendAll, true ); contextMenu()->setItemEnabled( mDismissAll, true ); } else { - QToolTip::add( this, mName ); + TQToolTip::add( this, mName ); contextMenu()->setItemEnabled( mSuspendAll, false ); contextMenu()->setItemEnabled( mDismissAll, false ); } @@ -175,16 +175,16 @@ void AlarmDockWindow::enableAutostart( bool enable ) contextMenu()->setItemChecked( mAutostartId, enable ); } -void AlarmDockWindow::mousePressEvent( QMouseEvent *e ) +void AlarmDockWindow::mousePressEvent( TQMouseEvent *e ) { if ( e->button() == LeftButton ) { - kapp->startServiceByDesktopName( "korganizer", QString::null ); + kapp->startServiceByDesktopName( "korganizer", TQString::null ); } else { KSystemTray::mousePressEvent( e ); } } -//void AlarmDockWindow::closeEvent( QCloseEvent * ) +//void AlarmDockWindow::closeEvent( TQCloseEvent * ) void AlarmDockWindow::slotQuit() { int result = KMessageBox::questionYesNoCancel( this, @@ -192,7 +192,7 @@ void AlarmDockWindow::slotQuit() "(note that you will not get reminders whilst the daemon is not running)?"), i18n("Close KOrganizer Reminder Daemon"), i18n("Start"), i18n("Do Not Start"), - QString::fromLatin1("AskForStartAtLogin") + TQString::fromLatin1("AskForStartAtLogin") ); bool autostart = true; diff --git a/korganizer/korgac/alarmdockwindow.h b/korganizer/korgac/alarmdockwindow.h index f26b6d8c1..548e39aa2 100644 --- a/korganizer/korgac/alarmdockwindow.h +++ b/korganizer/korgac/alarmdockwindow.h @@ -26,7 +26,7 @@ #include <ksystemtray.h> -#include <qpixmap.h> +#include <tqpixmap.h> class AlarmDockWindow : public KSystemTray { @@ -48,9 +48,9 @@ class AlarmDockWindow : public KSystemTray void dismissAllSignal(); protected: - void mousePressEvent( QMouseEvent * ); -// void closeEvent( QCloseEvent * ); - void resizeEvent ( QResizeEvent * ); + void mousePressEvent( TQMouseEvent * ); +// void closeEvent( TQCloseEvent * ); + void resizeEvent ( TQResizeEvent * ); protected slots: void slotQuit(); @@ -58,9 +58,9 @@ class AlarmDockWindow : public KSystemTray void slotDismissAll(); private: - QPixmap mPixmapEnabled; - QPixmap mPixmapDisabled; - QString mName; + TQPixmap mPixmapEnabled; + TQPixmap mPixmapDisabled; + TQString mName; int mAlarmsEnabledId; int mAutostartId; diff --git a/korganizer/korgac/koalarmclient.cpp b/korganizer/korgac/koalarmclient.cpp index c4ef2de82..a4298d7aa 100644 --- a/korganizer/korgac/koalarmclient.cpp +++ b/korganizer/korgac/koalarmclient.cpp @@ -37,28 +37,28 @@ #include <kapplication.h> #include <kwin.h> -#include <qpushbutton.h> +#include <tqpushbutton.h> -KOAlarmClient::KOAlarmClient( QObject *parent, const char *name ) - : DCOPObject( "ac" ), QObject( parent, name ), mDialog( 0 ) +KOAlarmClient::KOAlarmClient( TQObject *parent, const char *name ) + : DCOPObject( "ac" ), TQObject( parent, name ), mDialog( 0 ) { kdDebug(5890) << "KOAlarmClient::KOAlarmClient()" << endl; mDocker = new AlarmDockWindow; mDocker->show(); - connect( this, SIGNAL( reminderCount( int ) ), mDocker, SLOT( slotUpdate( int ) ) ); - connect( mDocker, SIGNAL( quitSignal() ), SLOT( slotQuit() ) ); + connect( this, TQT_SIGNAL( reminderCount( int ) ), mDocker, TQT_SLOT( slotUpdate( int ) ) ); + connect( mDocker, TQT_SIGNAL( quitSignal() ), TQT_SLOT( slotQuit() ) ); KConfig c( locate( "config", "korganizerrc" ) ); c.setGroup( "Time & Date" ); - QString tz = c.readEntry( "TimeZoneId" ); + TQString tz = c.readEntry( "TimeZoneId" ); kdDebug(5890) << "TimeZone: " << tz << endl; mCalendar = new CalendarResources( tz ); mCalendar->readConfig(); mCalendar->load(); - connect( &mCheckTimer, SIGNAL( timeout() ), SLOT( checkAlarms() ) ); + connect( &mCheckTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( checkAlarms() ) ); KConfig *config = kapp->config(); config->setGroup( "Alarms" ); @@ -72,10 +72,10 @@ KOAlarmClient::KOAlarmClient( QObject *parent, const char *name ) int numReminders = config->readNumEntry( "Reminders", 0 ); for ( int i=1; i<=numReminders; ++i ) { - QString group( QString( "Incidence-%1" ).arg( i ) ); + TQString group( TQString( "Incidence-%1" ).arg( i ) ); config->setGroup( group ); - QString uid = config->readEntry( "UID" ); - QDateTime dt = config->readDateTimeEntry( "RemindAt" ); + TQString uid = config->readEntry( "UID" ); + TQDateTime dt = config->readDateTimeEntry( "RemindAt" ); if ( !uid.isEmpty() ) createReminder( mCalendar->incidence( uid ), dt ); config->deleteGroup( group ); @@ -104,32 +104,32 @@ void KOAlarmClient::checkAlarms() cfg->setGroup( "General" ); if ( !cfg->readBoolEntry( "Enabled", true ) ) return; - QDateTime from = mLastChecked.addSecs( 1 ); - mLastChecked = QDateTime::currentDateTime(); + TQDateTime from = mLastChecked.addSecs( 1 ); + mLastChecked = TQDateTime::currentDateTime(); kdDebug(5891) << "Check: " << from.toString() << " - " << mLastChecked.toString() << endl; - QValueList<Alarm *> alarms = mCalendar->alarms( from, mLastChecked ); + TQValueList<Alarm *> alarms = mCalendar->alarms( from, mLastChecked ); - QValueList<Alarm *>::ConstIterator it; + TQValueList<Alarm *>::ConstIterator it; for( it = alarms.begin(); it != alarms.end(); ++it ) { kdDebug(5891) << "REMINDER: " << (*it)->parent()->summary() << endl; Incidence *incidence = mCalendar->incidence( (*it)->parent()->uid() ); - createReminder( incidence, QDateTime::currentDateTime() ); + createReminder( incidence, TQDateTime::currentDateTime() ); } } -void KOAlarmClient::createReminder( KCal::Incidence *incidence, QDateTime dt ) +void KOAlarmClient::createReminder( KCal::Incidence *incidence, TQDateTime dt ) { if ( !incidence ) return; if ( !mDialog ) { mDialog = new AlarmDialog(); - connect( mDialog, SIGNAL(reminderCount(int)), mDocker, SLOT(slotUpdate(int)) ); - connect( mDocker, SIGNAL(suspendAllSignal()), mDialog, SLOT(suspendAll()) ); - connect( mDocker, SIGNAL(dismissAllSignal()), mDialog, SLOT(dismissAll()) ); - connect( this, SIGNAL( saveAllSignal() ), mDialog, SLOT( slotSave() ) ); + connect( mDialog, TQT_SIGNAL(reminderCount(int)), mDocker, TQT_SLOT(slotUpdate(int)) ); + connect( mDocker, TQT_SIGNAL(suspendAllSignal()), mDialog, TQT_SLOT(suspendAll()) ); + connect( mDocker, TQT_SIGNAL(dismissAllSignal()), mDialog, TQT_SLOT(dismissAll()) ); + connect( this, TQT_SIGNAL( saveAllSignal() ), mDialog, TQT_SLOT( slotSave() ) ); } mDialog->addIncidence( incidence, dt ); @@ -175,27 +175,27 @@ void KOAlarmClient::dumpDebug() KConfig *cfg = kapp->config(); cfg->setGroup( "Alarms" ); - QDateTime lastChecked = cfg->readDateTimeEntry( "CalendarsLastChecked" ); + TQDateTime lastChecked = cfg->readDateTimeEntry( "CalendarsLastChecked" ); kdDebug(5890) << "Last Check: " << lastChecked << endl; } -QStringList KOAlarmClient::dumpAlarms() +TQStringList KOAlarmClient::dumpAlarms() { - QDateTime start = QDateTime( QDateTime::currentDateTime().date(), - QTime( 0, 0 ) ); - QDateTime end = start.addDays( 1 ).addSecs( -1 ); + TQDateTime start = TQDateTime( TQDateTime::currentDateTime().date(), + TQTime( 0, 0 ) ); + TQDateTime end = start.addDays( 1 ).addSecs( -1 ); - QStringList lst; + TQStringList lst; // Don't translate, this is for debugging purposes. - lst << QString("AlarmDeamon::dumpAlarms() from ") + start.toString()+ " to " + + lst << TQString("AlarmDeamon::dumpAlarms() from ") + start.toString()+ " to " + end.toString(); - QValueList<Alarm*> alarms = mCalendar->alarms( start, end ); - QValueList<Alarm*>::ConstIterator it; + TQValueList<Alarm*> alarms = mCalendar->alarms( start, end ); + TQValueList<Alarm*>::ConstIterator it; for( it = alarms.begin(); it != alarms.end(); ++it ) { Alarm *a = *it; - lst << QString(" ") + a->parent()->summary() + " (" + lst << TQString(" ") + a->parent()->summary() + " (" + a->time().toString() + ")"; } diff --git a/korganizer/korgac/koalarmclient.h b/korganizer/korgac/koalarmclient.h index 241a3eda8..89c122c39 100644 --- a/korganizer/korgac/koalarmclient.h +++ b/korganizer/korgac/koalarmclient.h @@ -30,8 +30,8 @@ #include <kapplication.h> -#include <qtimer.h> -#include <qdatetime.h> +#include <tqtimer.h> +#include <tqdatetime.h> class AlarmDialog; class AlarmDockWindow; @@ -41,11 +41,11 @@ class CalendarResources; class Incidence; } -class KOAlarmClient : public QObject, virtual public AlarmClientIface, public KSessionManaged +class KOAlarmClient : public TQObject, virtual public AlarmClientIface, public KSessionManaged { Q_OBJECT public: - KOAlarmClient( QObject *parent = 0, const char *name = 0 ); + KOAlarmClient( TQObject *parent = 0, const char *name = 0 ); ~KOAlarmClient(); bool commitData( QSessionManager & ); @@ -54,7 +54,7 @@ class KOAlarmClient : public QObject, virtual public AlarmClientIface, public KS void quit(); void forceAlarmCheck(); void dumpDebug(); - QStringList dumpAlarms(); + TQStringList dumpAlarms(); void debugShowDialog(); @@ -69,14 +69,14 @@ class KOAlarmClient : public QObject, virtual public AlarmClientIface, public KS void saveAllSignal(); private: - void createReminder( KCal::Incidence *incidence, QDateTime dt ); + void createReminder( KCal::Incidence *incidence, TQDateTime dt ); void saveLastCheckTime(); AlarmDockWindow *mDocker; // the panel icon KCal::CalendarResources *mCalendar; - QDateTime mLastChecked; - QTimer mCheckTimer; + TQDateTime mLastChecked; + TQTimer mCheckTimer; AlarmDialog *mDialog; }; diff --git a/korganizer/korgac/testalarmdlg.cpp b/korganizer/korgac/testalarmdlg.cpp index 69352a175..84fa51ed6 100644 --- a/korganizer/korgac/testalarmdlg.cpp +++ b/korganizer/korgac/testalarmdlg.cpp @@ -22,7 +22,7 @@ without including the source code for Qt in the source distribution. */ -#include <qwidget.h> +#include <tqwidget.h> #include <kaboutdata.h> #include <kapplication.h> @@ -41,7 +41,7 @@ int main(int argc,char **argv) Event *e1 = new Event; e1->setSummary( "This is a summary." ); - QDateTime now = QDateTime::currentDateTime(); + TQDateTime now = TQDateTime::currentDateTime(); e1->setDtStart( now ); e1->setDtEnd( now.addDays( 1 ) ); Alarm *a = e1->newAlarm(); @@ -61,9 +61,9 @@ int main(int argc,char **argv) AlarmDialog dlg; app.setMainWidget( &dlg ); - dlg.addIncidence( e1, QDateTime::currentDateTime() ); - dlg.addIncidence( t1, QDateTime::currentDateTime() ); - dlg.addIncidence( e2, QDateTime::currentDateTime() ); + dlg.addIncidence( e1, TQDateTime::currentDateTime() ); + dlg.addIncidence( t1, TQDateTime::currentDateTime() ); + dlg.addIncidence( e2, TQDateTime::currentDateTime() ); dlg.show(); dlg.eventNotification(); diff --git a/korganizer/korganizer.cpp b/korganizer/korganizer.cpp index 87dc79f4f..fae21bff1 100644 --- a/korganizer/korganizer.cpp +++ b/korganizer/korganizer.cpp @@ -73,12 +73,12 @@ #include <kstdguiitem.h> #include <kstatusbar.h> -#include <qcursor.h> -#include <qtimer.h> -#include <qvbox.h> -#include <qfile.h> -#include <qlabel.h> -#include <qlayout.h> +#include <tqcursor.h> +#include <tqtimer.h> +#include <tqvbox.h> +#include <tqfile.h> +#include <tqlabel.h> +#include <tqlayout.h> #include <stdlib.h> @@ -128,8 +128,8 @@ void KOrganizer::init( bool document ) } mActionManager->init(); - connect( mActionManager, SIGNAL( actionNew( const KURL & ) ), - SLOT( newMainWindow( const KURL & ) ) ); + connect( mActionManager, TQT_SIGNAL( actionNew( const KURL & ) ), + TQT_SLOT( newMainWindow( const KURL & ) ) ); mActionManager->loadParts(); @@ -139,7 +139,7 @@ void KOrganizer::init( bool document ) KStatusBar *bar = statusBar(); bar->insertItem( "", ID_GENERAL, 10 ); - connect( bar, SIGNAL( pressed( int ) ), SLOT( statusBarPressed( int ) ) ); + connect( bar, TQT_SIGNAL( pressed( int ) ), TQT_SLOT( statusBarPressed( int ) ) ); KPIM::ProgressDialog *progressDialog = new KPIM::ProgressDialog( bar, this ); progressDialog->hide(); @@ -150,8 +150,8 @@ void KOrganizer::init( bool document ) bar->addWidget( progressWidget, 0, true ); - connect( mActionManager->view(), SIGNAL( statusMessage( const QString & ) ), - SLOT( showStatusMessage( const QString & ) ) ); + connect( mActionManager->view(), TQT_SIGNAL( statusMessage( const TQString & ) ), + TQT_SLOT( showStatusMessage( const TQString & ) ) ); setStandardToolBarMenuEnabled( true ); setTitle(); @@ -208,9 +208,9 @@ void KOrganizer::initActions() setStandardToolBarMenuEnabled( true ); createStandardStatusBarAction(); - KStdAction::keyBindings(guiFactory(), SLOT(configureShortcuts()), actionCollection()); - KStdAction::configureToolbars(this, SLOT(configureToolbars() ), actionCollection()); - KStdAction::quit( this, SLOT( close() ), actionCollection() ); + KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection()); + KStdAction::configureToolbars(this, TQT_SLOT(configureToolbars() ), actionCollection()); + KStdAction::quit( this, TQT_SLOT( close() ), actionCollection() ); setAutoSaveSettings(); createGUI( 0 ); @@ -241,7 +241,7 @@ void KOrganizer::statusBarPressed( int /*id*/ ) { } -void KOrganizer::showStatusMessage( const QString &message ) +void KOrganizer::showStatusMessage( const TQString &message ) { statusBar()->message(message,2000); } @@ -285,7 +285,7 @@ void KOrganizer::setTitle() { // kdDebug(5850) << "KOrganizer::setTitle" << endl; - QString title; + TQString title; if ( !hasDocument() ) { title = i18n("Calendar"); } else { diff --git a/korganizer/korganizer.h b/korganizer/korganizer.h index ab9f44f68..3ad0952a1 100644 --- a/korganizer/korganizer.h +++ b/korganizer/korganizer.h @@ -93,11 +93,11 @@ class KOrganizer : public KPartsMainWindow, public KOrgMainWindow virtual KXMLGUIFactory *mainGuiFactory() { return factory(); } virtual KXMLGUIClient *mainGuiClient() { return this; } - virtual QWidget *topLevelWidget() { return this; } + virtual TQWidget *topLevelWidget() { return this; } public slots: /** show status message */ - void showStatusMessage( const QString & ); + void showStatusMessage( const TQString & ); protected slots: diff --git a/korganizer/korganizer_part.cpp b/korganizer/korganizer_part.cpp index 32786943d..572255494 100644 --- a/korganizer/korganizer_part.cpp +++ b/korganizer/korganizer_part.cpp @@ -58,17 +58,17 @@ #include <sidebarextension.h> #include <infoextension.h> -#include <qapplication.h> -#include <qfile.h> -#include <qtimer.h> -#include <qlayout.h> +#include <tqapplication.h> +#include <tqfile.h> +#include <tqtimer.h> +#include <tqlayout.h> typedef KParts::GenericFactory< KOrganizerPart > KOrganizerFactory; K_EXPORT_COMPONENT_FACTORY( libkorganizerpart, KOrganizerFactory ) -KOrganizerPart::KOrganizerPart( QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, - const QStringList & ) : +KOrganizerPart::KOrganizerPart( TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name, + const TQStringList & ) : KParts::ReadOnlyPart(parent, name), mTopLevelWidget( parentWidget->topLevelWidget() ) { KGlobal::locale()->insertCatalogue( "libkcal" ); @@ -77,11 +77,11 @@ KOrganizerPart::KOrganizerPart( QWidget *parentWidget, const char *widgetName, KOCore::self()->addXMLGUIClient( mTopLevelWidget, this ); - QString pname( name ); + TQString pname( name ); // create a canvas to insert our widget - QWidget *canvas = new QWidget( parentWidget, widgetName ); - canvas->setFocusPolicy( QWidget::ClickFocus ); + TQWidget *canvas = new TQWidget( parentWidget, widgetName ); + canvas->setFocusPolicy( TQWidget::ClickFocus ); setWidget( canvas ); mView = new CalendarView( canvas ); @@ -102,17 +102,17 @@ KOrganizerPart::KOrganizerPart( QWidget *parentWidget, const char *widgetName, setInstance( KOrganizerFactory::instance() ); - QVBoxLayout *topLayout = new QVBoxLayout( canvas ); + TQVBoxLayout *topLayout = new TQVBoxLayout( canvas ); topLayout->addWidget( mView ); new KParts::SideBarExtension( mView->leftFrame(), this, "SBE" ); KParts::InfoExtension *ie = new KParts::InfoExtension( this, "KOrganizerInfo" ); - connect( mView, SIGNAL( incidenceSelected( Incidence * ) ), - SLOT( slotChangeInfo( Incidence * ) ) ); - connect( this, SIGNAL( textChanged( const QString & ) ), - ie, SIGNAL( textChanged( const QString & ) ) ); + connect( mView, TQT_SIGNAL( incidenceSelected( Incidence * ) ), + TQT_SLOT( slotChangeInfo( Incidence * ) ) ); + connect( this, TQT_SIGNAL( textChanged( const TQString & ) ), + ie, TQT_SIGNAL( textChanged( const TQString & ) ) ); mActionManager->init(); mActionManager->readSettings(); @@ -151,11 +151,11 @@ void KOrganizerPart::slotChangeInfo( Incidence *incidence ) emit textChanged( incidence->summary() + " / " + incidence->dtStartTimeStr() ); } else { - emit textChanged( QString::null ); + emit textChanged( TQString::null ); } } -QWidget *KOrganizerPart::topLevelWidget() +TQWidget *KOrganizerPart::topLevelWidget() { return mView->topLevelWidget(); } @@ -165,7 +165,7 @@ ActionManager *KOrganizerPart::actionManager() return mActionManager; } -void KOrganizerPart::showStatusMessage( const QString &message ) +void KOrganizerPart::showStatusMessage( const TQString &message ) { KStatusBar *statusBar = mStatusBarExtension->statusBar(); if ( statusBar ) statusBar->message( message ); @@ -211,7 +211,7 @@ void KOrganizerPart::setTitle() // type of view (calendar, to-do, journal). How can I add the filter // name in that case? /* - QString title; + TQString title; if ( !hasDocument() ) { title = i18n("Calendar"); } else { diff --git a/korganizer/korganizer_part.h b/korganizer/korganizer_part.h index cb1bf99c9..25a4b9c4b 100644 --- a/korganizer/korganizer_part.h +++ b/korganizer/korganizer_part.h @@ -56,8 +56,8 @@ class KOrganizerPart: public KParts::ReadOnlyPart, { Q_OBJECT public: - KOrganizerPart( QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, const QStringList & ); + KOrganizerPart( TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name, const TQStringList & ); virtual ~KOrganizerPart(); static KAboutData *createAboutData(); @@ -76,10 +76,10 @@ class KOrganizerPart: public KParts::ReadOnlyPart, virtual KXMLGUIFactory *mainGuiFactory() { return factory(); } virtual KXMLGUIClient *mainGuiClient() { return this; } - virtual QWidget *topLevelWidget(); + virtual TQWidget *topLevelWidget(); virtual ActionManager *actionManager(); virtual KActionCollection *getActionCollection() const { return actionCollection(); } - virtual void showStatusMessage( const QString &message ); + virtual void showStatusMessage( const TQString &message ); void setTitle(); @@ -96,10 +96,10 @@ class KOrganizerPart: public KParts::ReadOnlyPart, CalendarView *mView; ActionManager *mActionManager; KParts::StatusBarExtension *mStatusBarExtension; - QWidget *mTopLevelWidget; + TQWidget *mTopLevelWidget; signals: - void textChanged( const QString & ); + void textChanged( const TQString & ); }; #endif diff --git a/korganizer/korganizeriface.h b/korganizer/korganizeriface.h index 5a8c7bde8..b3be3c64a 100644 --- a/korganizer/korganizeriface.h +++ b/korganizer/korganizeriface.h @@ -27,22 +27,22 @@ class KOrganizerIface : virtual public DCOPObject { K_DCOP k_dcop: - virtual bool openURL(const QString &url) = 0; - virtual bool mergeURL(const QString &url) = 0; + virtual bool openURL(const TQString &url) = 0; + virtual bool mergeURL(const TQString &url) = 0; virtual void closeURL() = 0; virtual bool saveURL() = 0; virtual bool canQueryClose() = 0; - virtual bool saveAsURL(const QString &url) = 0; - virtual QString getCurrentURLasString() const = 0; - virtual bool editIncidence(const QString &uid) = 0; - virtual bool deleteIncidence(const QString &uid) = 0; + virtual bool saveAsURL(const TQString &url) = 0; + virtual TQString getCurrentURLasString() const = 0; + virtual bool editIncidence(const TQString &uid) = 0; + virtual bool deleteIncidence(const TQString &uid) = 0; /** Delete the incidence with the given unique ID from the active calendar. @param uid The incidence's unique ID. @param force If true, all recurrences and sub-todos (if applicable) will be deleted without prompting for confirmation. */ - virtual bool deleteIncidence(const QString &uid, bool force) = 0; + virtual bool deleteIncidence(const TQString &uid, bool force) = 0; /** Add an incidence to the active calendar. @param iCal A calendar in iCalendar format containing the incidence. The @@ -51,10 +51,10 @@ class KOrganizerIface : virtual public DCOPObject optionally a VTIMEZONE component. If there is more than one incidence, only the first is added to KOrganizer's calendar. */ - virtual bool addIncidence(const QString &iCal) = 0; + virtual bool addIncidence(const TQString &iCal) = 0; - virtual void loadProfile( const QString& path ) = 0; - virtual void saveToProfile( const QString& path ) const = 0; + virtual void loadProfile( const TQString& path ) = 0; + virtual void saveToProfile( const TQString& path ) const = 0; }; #endif diff --git a/korganizer/korganizerifaceimpl.cpp b/korganizer/korganizerifaceimpl.cpp index a88a41cd5..7b61f8cf7 100644 --- a/korganizer/korganizerifaceimpl.cpp +++ b/korganizer/korganizerifaceimpl.cpp @@ -35,8 +35,8 @@ KOrganizerIfaceImpl::KOrganizerIfaceImpl( ActionManager* actionManager, - QObject* parent, const char* name ) - : DCOPObject( "KOrganizerIface" ), QObject( parent, name ), + TQObject* parent, const char* name ) + : DCOPObject( "KOrganizerIface" ), TQObject( parent, name ), mActionManager( actionManager ) { } @@ -45,12 +45,12 @@ KOrganizerIfaceImpl::~KOrganizerIfaceImpl() { } -bool KOrganizerIfaceImpl::openURL( const QString &url ) +bool KOrganizerIfaceImpl::openURL( const TQString &url ) { return mActionManager->openURL( url ); } -bool KOrganizerIfaceImpl::mergeURL( const QString &url ) +bool KOrganizerIfaceImpl::mergeURL( const TQString &url ) { return mActionManager->mergeURL( url ); } @@ -65,27 +65,27 @@ bool KOrganizerIfaceImpl::saveURL() return mActionManager->saveURL(); } -bool KOrganizerIfaceImpl::saveAsURL( const QString &url ) +bool KOrganizerIfaceImpl::saveAsURL( const TQString &url ) { return mActionManager->saveAsURL( url ); } -QString KOrganizerIfaceImpl::getCurrentURLasString() const +TQString KOrganizerIfaceImpl::getCurrentURLasString() const { return mActionManager->getCurrentURLasString(); } -bool KOrganizerIfaceImpl::deleteIncidence( const QString &uid, bool force ) +bool KOrganizerIfaceImpl::deleteIncidence( const TQString &uid, bool force ) { return mActionManager->deleteIncidence( uid, force ); } -bool KOrganizerIfaceImpl::editIncidence( const QString &uid ) +bool KOrganizerIfaceImpl::editIncidence( const TQString &uid ) { return mActionManager->editIncidence( uid ); } -bool KOrganizerIfaceImpl::addIncidence( const QString &ical ) +bool KOrganizerIfaceImpl::addIncidence( const TQString &ical ) { return mActionManager->addIncidence( ical ); } @@ -95,12 +95,12 @@ bool KOrganizerIfaceImpl::canQueryClose() return (!(mActionManager->queryClose())); } -void KOrganizerIfaceImpl::loadProfile( const QString& path ) +void KOrganizerIfaceImpl::loadProfile( const TQString& path ) { mActionManager->loadProfile( path ); } -void KOrganizerIfaceImpl::saveToProfile( const QString& path ) const +void KOrganizerIfaceImpl::saveToProfile( const TQString& path ) const { mActionManager->saveToProfile( path ); } diff --git a/korganizer/korganizerifaceimpl.h b/korganizer/korganizerifaceimpl.h index b27cd6608..c49d36bb4 100644 --- a/korganizer/korganizerifaceimpl.h +++ b/korganizer/korganizerifaceimpl.h @@ -33,40 +33,40 @@ #include "korganizeriface.h" -#include <qobject.h> +#include <tqobject.h> #include <kdepimmacros.h> class ActionManager; -class KDE_EXPORT KOrganizerIfaceImpl : public QObject, virtual public KOrganizerIface { +class KDE_EXPORT KOrganizerIfaceImpl : public TQObject, virtual public KOrganizerIface { public: KOrganizerIfaceImpl( ActionManager* mActionManager, - QObject* parent=0, const char* name=0 ); + TQObject* parent=0, const char* name=0 ); ~KOrganizerIfaceImpl(); - bool openURL( const QString &url ); - bool mergeURL( const QString &url ); + bool openURL( const TQString &url ); + bool mergeURL( const TQString &url ); void closeURL(); bool saveURL(); bool canQueryClose(); - bool saveAsURL( const QString &url ); - QString getCurrentURLasString() const; + bool saveAsURL( const TQString &url ); + TQString getCurrentURLasString() const; - bool editIncidence( const QString &uid ); + bool editIncidence( const TQString &uid ); /** @reimp from KOrganizerIface::deleteIncidence() */ - bool deleteIncidence( const QString &uid ) { return deleteIncidence( uid, false ); } + bool deleteIncidence( const TQString &uid ) { return deleteIncidence( uid, false ); } /** @reimp from KOrganizerIface::deleteIncidence() */ - bool deleteIncidence( const QString &uid, bool force ); + bool deleteIncidence( const TQString &uid, bool force ); /** @reimp from KOrganizerIface::addIncidence() */ - bool addIncidence( const QString &iCal ); + bool addIncidence( const TQString &iCal ); /** @reimp from KOrganizerIface::loadProfile() */ - void loadProfile( const QString& path ); + void loadProfile( const TQString& path ); /** @reimp from KOrganizerIface::saveToProfile() */ - void saveToProfile( const QString& path ) const; + void saveToProfile( const TQString& path ) const; private: ActionManager* mActionManager; diff --git a/korganizer/kotimelineview.cpp b/korganizer/kotimelineview.cpp index 24f981a53..ac40e2a31 100644 --- a/korganizer/kotimelineview.cpp +++ b/korganizer/kotimelineview.cpp @@ -26,7 +26,7 @@ #include <libkcal/calendar.h> #include <libkcal/calendarresources.h> -#include <qlayout.h> +#include <tqlayout.h> #include <kdgantt/KDGanttViewTaskItem.h> #include <kdgantt/KDGanttViewSubwidgets.h> @@ -41,12 +41,12 @@ using namespace KOrg; using namespace KCal; -KOTimelineView::KOTimelineView(Calendar *calendar, QWidget *parent, +KOTimelineView::KOTimelineView(Calendar *calendar, TQWidget *parent, const char *name) : KOEventView(calendar, parent, name), mEventPopup( 0 ) { - QVBoxLayout* vbox = new QVBoxLayout(this); + TQVBoxLayout* vbox = new TQVBoxLayout(this); mGantt = new KDGanttView(this); mGantt->setCalendarMode( true ); mGantt->setShowLegendButton( false ); @@ -62,18 +62,18 @@ KOTimelineView::KOTimelineView(Calendar *calendar, QWidget *parent, vbox->addWidget( mGantt ); - connect( mGantt, SIGNAL(gvCurrentChanged(KDGanttViewItem*)), - SLOT(itemSelected(KDGanttViewItem*)) ); - connect( mGantt, SIGNAL(itemDoubleClicked(KDGanttViewItem*)), - SLOT(itemDoubleClicked(KDGanttViewItem*)) ); - connect( mGantt, SIGNAL(itemRightClicked(KDGanttViewItem*)), - SLOT(itemRightClicked(KDGanttViewItem*)) ); - connect( mGantt, SIGNAL(gvItemMoved(KDGanttViewItem*)), - SLOT(itemMoved(KDGanttViewItem*)) ); - connect( mGantt, SIGNAL(rescaling(KDGanttView::Scale)), - SLOT(overscale(KDGanttView::Scale)) ); - connect( mGantt, SIGNAL( dateTimeDoubleClicked( const QDateTime& ) ), - SLOT( newEventWithHint( const QDateTime& ) ) ); + connect( mGantt, TQT_SIGNAL(gvCurrentChanged(KDGanttViewItem*)), + TQT_SLOT(itemSelected(KDGanttViewItem*)) ); + connect( mGantt, TQT_SIGNAL(itemDoubleClicked(KDGanttViewItem*)), + TQT_SLOT(itemDoubleClicked(KDGanttViewItem*)) ); + connect( mGantt, TQT_SIGNAL(itemRightClicked(KDGanttViewItem*)), + TQT_SLOT(itemRightClicked(KDGanttViewItem*)) ); + connect( mGantt, TQT_SIGNAL(gvItemMoved(KDGanttViewItem*)), + TQT_SLOT(itemMoved(KDGanttViewItem*)) ); + connect( mGantt, TQT_SIGNAL(rescaling(KDGanttView::Scale)), + TQT_SLOT(overscale(KDGanttView::Scale)) ); + connect( mGantt, TQT_SIGNAL( dateTimeDoubleClicked( const TQDateTime& ) ), + TQT_SLOT( newEventWithHint( const TQDateTime& ) ) ); } KOTimelineView::~KOTimelineView() @@ -100,13 +100,13 @@ int KOTimelineView::currentDateCount() } /*virtual*/ -void KOTimelineView::showDates(const QDate& start, const QDate& end) +void KOTimelineView::showDates(const TQDate& start, const TQDate& end) { mStartDate = start; mEndDate = end; - mHintDate = QDateTime(); - mGantt->setHorizonStart( QDateTime(start) ); - mGantt->setHorizonEnd( QDateTime(end.addDays(1)) ); + mHintDate = TQDateTime(); + mGantt->setHorizonStart( TQDateTime(start) ); + mGantt->setHorizonEnd( TQDateTime(end.addDays(1)) ); mGantt->setMinorScaleCount( 1 ); mGantt->setScale( KDGanttView::Hour ); mGantt->setMinimumScale( KDGanttView::Hour ); @@ -121,20 +121,20 @@ void KOTimelineView::showDates(const QDate& start, const QDate& end) CalendarResources *calres = dynamic_cast<CalendarResources*>( calendar() ); if ( !calres ) { item = new TimelineItem( i18n("Calendar"), mGantt ); - mCalendarItemMap[0][QString()] = item; + mCalendarItemMap[0][TQString()] = item; } else { CalendarResourceManager *manager = calres->resourceManager(); for ( CalendarResourceManager::ActiveIterator it = manager->activeBegin(); it != manager->activeEnd(); ++it ) { - QColor resourceColor = *KOPrefs::instance()->resourceColor( (*it)->identifier() ); + TQColor resourceColor = *KOPrefs::instance()->resourceColor( (*it)->identifier() ); if ( (*it)->canHaveSubresources() ) { - QStringList subResources = (*it)->subresources(); - for ( QStringList::ConstIterator subit = subResources.constBegin(); subit != subResources.constEnd(); ++subit ) { - QString type = (*it)->subresourceType( *subit ); + TQStringList subResources = (*it)->subresources(); + for ( TQStringList::ConstIterator subit = subResources.constBegin(); subit != subResources.constEnd(); ++subit ) { + TQString type = (*it)->subresourceType( *subit ); if ( !(*it)->subresourceActive( *subit ) || (!type.isEmpty() && type != "event") ) continue; item = new TimelineItem( (*it)->labelForSubresource( *subit ), mGantt ); resourceColor = *KOPrefs::instance()->resourceColor( (*it)->identifier() ); - QColor subrescol = *KOPrefs::instance()->resourceColor( *subit ); + TQColor subrescol = *KOPrefs::instance()->resourceColor( *subit ); if ( subrescol.isValid() ) resourceColor = subrescol; if ( resourceColor.isValid() ) @@ -145,14 +145,14 @@ void KOTimelineView::showDates(const QDate& start, const QDate& end) item = new TimelineItem( (*it)->resourceName(), mGantt ); if ( resourceColor.isValid() ) item->setColors( resourceColor, resourceColor, resourceColor ); - mCalendarItemMap[*it][QString()] = item; + mCalendarItemMap[*it][TQString()] = item; } } } // add incidences Event::List events; - for ( QDate day = start; day <= end; day = day.addDays( 1 ) ) { + for ( TQDate day = start; day <= end; day = day.addDays( 1 ) ) { events = calendar()->events( day, EventSortStartDate, SortDirectionAscending ); for ( Event::List::ConstIterator it = events.constBegin(); it != events.constEnd(); ++it ) { insertIncidence( *it, day ); @@ -210,7 +210,7 @@ void KOTimelineView::itemDoubleClicked( KDGanttViewItem *item ) void KOTimelineView::itemRightClicked( KDGanttViewItem *item ) { - mHintDate = mGantt->getDateTimeForCoordX( QCursor::pos().x(), true ); + mHintDate = mGantt->getDateTimeForCoordX( TQCursor::pos().x(), true ); TimelineSubItem *tlitem = dynamic_cast<TimelineSubItem*>( item ); if ( !tlitem ) { showNewEventPopup(); @@ -218,10 +218,10 @@ void KOTimelineView::itemRightClicked( KDGanttViewItem *item ) } if ( !mEventPopup ) mEventPopup = eventPopup(); - mEventPopup->showIncidencePopup( tlitem->incidence(), QDate() ); + mEventPopup->showIncidencePopup( tlitem->incidence(), TQDate() ); } -bool KOTimelineView::eventDurationHint(QDateTime & startDt, QDateTime & endDt, bool & allDay) +bool KOTimelineView::eventDurationHint(TQDateTime & startDt, TQDateTime & endDt, bool & allDay) { startDt = mHintDate; endDt = mHintDate.addSecs( 2 * 60 * 60 ); @@ -230,7 +230,7 @@ bool KOTimelineView::eventDurationHint(QDateTime & startDt, QDateTime & endDt, b } //slot -void KOTimelineView::newEventWithHint( const QDateTime& dt ) +void KOTimelineView::newEventWithHint( const TQDateTime& dt ) { mHintDate = dt; emit newEventSignal( dt ); @@ -241,22 +241,22 @@ TimelineItem * KOTimelineView::calendarItemForIncidence(KCal::Incidence * incide CalendarResources *calres = dynamic_cast<CalendarResources*>( calendar() ); TimelineItem *item = 0; if ( !calres ) { - item = mCalendarItemMap[0][QString()]; + item = mCalendarItemMap[0][TQString()]; } else { ResourceCalendar *res = calres->resource( incidence ); if ( !res ) return 0; if ( res->canHaveSubresources() ) { - QString subRes = res->subresourceIdentifier( incidence ); + TQString subRes = res->subresourceIdentifier( incidence ); item = mCalendarItemMap[res][subRes]; } else { - item = mCalendarItemMap[res][QString()]; + item = mCalendarItemMap[res][TQString()]; } } return item; } -void KOTimelineView::insertIncidence(KCal::Incidence * incidence, const QDate &day ) +void KOTimelineView::insertIncidence(KCal::Incidence * incidence, const TQDate &day ) { TimelineItem *item = calendarItemForIncidence( incidence ); if ( !item ) { @@ -265,13 +265,13 @@ void KOTimelineView::insertIncidence(KCal::Incidence * incidence, const QDate &d } if ( incidence->doesRecur() ) { - QValueList<QDateTime> l = incidence->startDateTimesForDate( day ); + TQValueList<TQDateTime> l = incidence->startDateTimesForDate( day ); if ( l.isEmpty() ) { // strange, but seems to happen for some recurring events... - item->insertIncidence( incidence, QDateTime( day, incidence->dtStart().time() ), - QDateTime( day, incidence->dtEnd().time() ) ); + item->insertIncidence( incidence, TQDateTime( day, incidence->dtStart().time() ), + TQDateTime( day, incidence->dtEnd().time() ) ); } else { - for ( QValueList<QDateTime>::ConstIterator it = l.constBegin(); + for ( TQValueList<TQDateTime>::ConstIterator it = l.constBegin(); it != l.constEnd(); ++it ) { item->insertIncidence( incidence, *it, incidence->endDateForStart( *it ) ); } @@ -288,8 +288,8 @@ void KOTimelineView::insertIncidence(KCal::Incidence * incidence) if ( !event ) return; if ( incidence->doesRecur() ) - insertIncidence( incidence, QDate() ); - for ( QDate day = mStartDate; day <= mEndDate; day = day.addDays( 1 ) ) { + insertIncidence( incidence, TQDate() ); + for ( TQDate day = mStartDate; day <= mEndDate; day = day.addDays( 1 ) ) { Event::List events = calendar()->events( day, EventSortStartDate, SortDirectionAscending ); for ( Event::List::ConstIterator it = events.constBegin(); it != events.constEnd(); ++it ) { if ( events.contains( event ) ) @@ -305,8 +305,8 @@ void KOTimelineView::removeIncidence(KCal::Incidence * incidence) item->removeIncidence( incidence ); } else { // try harder, the incidence might already be removed from the resource - typedef QMap<QString, KOrg::TimelineItem*> M2_t; - typedef QMap<KCal::ResourceCalendar*, M2_t> M1_t; + typedef TQMap<TQString, KOrg::TimelineItem*> M2_t; + typedef TQMap<KCal::ResourceCalendar*, M2_t> M1_t; for ( M1_t::ConstIterator it1 = mCalendarItemMap.constBegin(); it1 != mCalendarItemMap.constEnd(); ++it1 ) { for ( M2_t::ConstIterator it2 = it1.data().constBegin(); it2 != it1.data().constEnd(); ++it2 ) { if ( it2.data() ) { @@ -324,9 +324,9 @@ void KOTimelineView::itemMoved(KDGanttViewItem * item) return; Incidence *i = tlit->incidence(); mChanger->beginChange( i ); - QDateTime newStart = tlit->startTime(); + TQDateTime newStart = tlit->startTime(); if ( i->doesFloat() ) - newStart = QDateTime( newStart.date() ); + newStart = TQDateTime( newStart.date() ); int delta = tlit->originalStart().secsTo( newStart ); i->setDtStart( i->dtStart().addSecs( delta ) ); int duration = tlit->startTime().secsTo( tlit->endTime() ); diff --git a/korganizer/kotimelineview.h b/korganizer/kotimelineview.h index c1bfb89ee..5c3ec6a7c 100644 --- a/korganizer/kotimelineview.h +++ b/korganizer/kotimelineview.h @@ -26,7 +26,7 @@ #include <koeventview.h> #include <kdgantt/KDGanttView.h> -#include <qmap.h> +#include <tqmap.h> class KDGanttViewItem; @@ -45,25 +45,25 @@ class KOTimelineView : public KOEventView { Q_OBJECT public: - KOTimelineView(Calendar *calendar, QWidget *parent = 0, + KOTimelineView(Calendar *calendar, TQWidget *parent = 0, const char *name = 0); ~KOTimelineView(); virtual KCal::ListBase<KCal::Incidence> selectedIncidences(); virtual KCal::DateList selectedDates(); virtual int currentDateCount(); - virtual void showDates(const QDate&, const QDate&); + virtual void showDates(const TQDate&, const TQDate&); virtual void showIncidences(const KCal::ListBase<KCal::Incidence>&); virtual void updateView(); virtual void changeIncidenceDisplay(KCal::Incidence* incidence, int mode); virtual int maxDatesHint() { return 0; } - virtual bool eventDurationHint(QDateTime &startDt, QDateTime &endDt, bool &allDay); + virtual bool eventDurationHint(TQDateTime &startDt, TQDateTime &endDt, bool &allDay); private: KOrg::TimelineItem* calendarItemForIncidence( KCal::Incidence* incidence ); void insertIncidence( KCal::Incidence* incidence ); - void insertIncidence( KCal::Incidence* incidence, const QDate &day ); + void insertIncidence( KCal::Incidence* incidence, const TQDate &day ); void removeIncidence( KCal::Incidence* incidence ); private slots: @@ -72,14 +72,14 @@ class KOTimelineView : public KOEventView void itemRightClicked( KDGanttViewItem *item ); void itemMoved( KDGanttViewItem *item ); void overscale( KDGanttView::Scale scale ); - void newEventWithHint( const QDateTime & ); + void newEventWithHint( const TQDateTime & ); private: KDGanttView* mGantt; - QMap<KCal::ResourceCalendar*, QMap<QString, KOrg::TimelineItem*> > mCalendarItemMap; + TQMap<KCal::ResourceCalendar*, TQMap<TQString, KOrg::TimelineItem*> > mCalendarItemMap; KOEventPopupMenu *mEventPopup; - QDate mStartDate, mEndDate; - QDateTime mHintDate; + TQDate mStartDate, mEndDate; + TQDateTime mHintDate; }; #endif diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp index a4e5f11c8..fe749c9c9 100644 --- a/korganizer/kotodoeditor.cpp +++ b/korganizer/kotodoeditor.cpp @@ -24,11 +24,11 @@ without including the source code for Qt in the source distribution. */ -#include <qtooltip.h> -#include <qframe.h> -#include <qpixmap.h> -#include <qlayout.h> -#include <qdatetime.h> +#include <tqtooltip.h> +#include <tqframe.h> +#include <tqpixmap.h> +#include <tqlayout.h> +#include <tqdatetime.h> #include <kiconloader.h> #include <klocale.h> @@ -51,8 +51,8 @@ #include "kotodoeditor.h" #include "kocore.h" -KOTodoEditor::KOTodoEditor( Calendar *calendar, QWidget *parent ) : - KOIncidenceEditor( QString::null, calendar, parent ) +KOTodoEditor::KOTodoEditor( Calendar *calendar, TQWidget *parent ) : + KOIncidenceEditor( TQString::null, calendar, parent ) { mTodo = 0; mCalendar = 0; @@ -72,16 +72,16 @@ void KOTodoEditor::init() setupAttendeesTab(); // setupAttachmentsTab(); - connect( mGeneral, SIGNAL( dateTimeStrChanged( const QString & ) ), - mRecurrence, SLOT( setDateTimeStr( const QString & ) ) ); - connect( mGeneral, SIGNAL( signalDateTimeChanged( const QDateTime &, const QDateTime & ) ), - mRecurrence, SLOT( setDateTimes( const QDateTime &, const QDateTime & ) ) ); + connect( mGeneral, TQT_SIGNAL( dateTimeStrChanged( const TQString & ) ), + mRecurrence, TQT_SLOT( setDateTimeStr( const TQString & ) ) ); + connect( mGeneral, TQT_SIGNAL( signalDateTimeChanged( const TQDateTime &, const TQDateTime & ) ), + mRecurrence, TQT_SLOT( setDateTimes( const TQDateTime &, const TQDateTime & ) ) ); - connect( mGeneral, SIGNAL( openCategoryDialog() ), - SIGNAL( editCategories() ) ); + connect( mGeneral, TQT_SIGNAL( openCategoryDialog() ), + TQT_SIGNAL( editCategories() ) ); - connect( mDetails, SIGNAL(updateAttendeeSummary(int)), - mGeneral, SLOT(updateAttendeeSummary(int)) ); + connect( mDetails, TQT_SIGNAL(updateAttendeeSummary(int)), + mGeneral, TQT_SLOT(updateAttendeeSummary(int)) ); } void KOTodoEditor::reload() @@ -94,25 +94,25 @@ void KOTodoEditor::setupGeneral() mGeneral = new KOEditorGeneralTodo(this); if (KOPrefs::instance()->mCompactDialogs) { - QFrame *topFrame = addPage(i18n("General")); + TQFrame *topFrame = addPage(i18n("General")); - QBoxLayout *topLayout = new QVBoxLayout(topFrame); + TQBoxLayout *topLayout = new TQVBoxLayout(topFrame); topLayout->setMargin(marginHint()); topLayout->setSpacing(spacingHint()); mGeneral->initHeader( topFrame, topLayout ); mGeneral->initTime(topFrame,topLayout); - QHBoxLayout *priorityLayout = new QHBoxLayout( topLayout ); + TQHBoxLayout *priorityLayout = new TQHBoxLayout( topLayout ); mGeneral->initPriority(topFrame,priorityLayout); topLayout->addStretch(1); - QFrame *topFrame2 = addPage(i18n("Details")); + TQFrame *topFrame2 = addPage(i18n("Details")); - QBoxLayout *topLayout2 = new QVBoxLayout(topFrame2); + TQBoxLayout *topLayout2 = new TQVBoxLayout(topFrame2); topLayout2->setMargin(marginHint()); topLayout2->setSpacing(spacingHint()); - QHBoxLayout *completionLayout = new QHBoxLayout( topLayout2 ); + TQHBoxLayout *completionLayout = new TQHBoxLayout( topLayout2 ); mGeneral->initCompletion(topFrame2,completionLayout); mGeneral->initAlarm(topFrame,topLayout); @@ -120,23 +120,23 @@ void KOTodoEditor::setupGeneral() mGeneral->initSecrecy( topFrame2, topLayout2 ); mGeneral->initDescription(topFrame2,topLayout2); } else { - QFrame *topFrame = addPage(i18n("&General")); + TQFrame *topFrame = addPage(i18n("&General")); - QBoxLayout *topLayout = new QVBoxLayout(topFrame); + TQBoxLayout *topLayout = new TQVBoxLayout(topFrame); topLayout->setSpacing(spacingHint()); mGeneral->initHeader( topFrame, topLayout ); mGeneral->initTime(topFrame,topLayout); mGeneral->initStatus(topFrame,topLayout); - QBoxLayout *alarmLineLayout = new QHBoxLayout(topLayout); + TQBoxLayout *alarmLineLayout = new TQHBoxLayout(topLayout); mGeneral->initAlarm(topFrame,alarmLineLayout); alarmLineLayout->addStretch( 1 ); mGeneral->initDescription(topFrame,topLayout); mGeneral->initAttachments(topFrame,topLayout); - connect( mGeneral, SIGNAL( openURL( const KURL& ) ), - this, SLOT( openURL( const KURL& ) ) ); - connect( this, SIGNAL( signalAddAttachments( const QStringList&, const QStringList&, bool ) ), - mGeneral, SLOT( addAttachments( const QStringList&, const QStringList&, bool ) ) ); + connect( mGeneral, TQT_SIGNAL( openURL( const KURL& ) ), + this, TQT_SLOT( openURL( const KURL& ) ) ); + connect( this, TQT_SIGNAL( signalAddAttachments( const TQStringList&, const TQStringList&, bool ) ), + mGeneral, TQT_SLOT( addAttachments( const TQStringList&, const TQStringList&, bool ) ) ); } mGeneral->enableAlarm( true ); @@ -145,16 +145,16 @@ void KOTodoEditor::setupGeneral() void KOTodoEditor::setupRecurrence() { - QFrame *topFrame = addPage( i18n("Rec&urrence") ); + TQFrame *topFrame = addPage( i18n("Rec&urrence") ); - QBoxLayout *topLayout = new QVBoxLayout( topFrame ); + TQBoxLayout *topLayout = new TQVBoxLayout( topFrame ); mRecurrence = new KOEditorRecurrence( topFrame ); topLayout->addWidget( mRecurrence ); mRecurrence->setEnabled( false ); - connect(mGeneral,SIGNAL(dueDateEditToggle( bool ) ), - mRecurrence, SLOT( setEnabled( bool ) ) ); + connect(mGeneral,TQT_SIGNAL(dueDateEditToggle( bool ) ), + mRecurrence, TQT_SLOT( setEnabled( bool ) ) ); } void KOTodoEditor::editIncidence(Incidence *incidence, Calendar *calendar) @@ -183,7 +183,7 @@ void KOTodoEditor::newTodo() loadDefaults(); } -void KOTodoEditor::setTexts( const QString &summary, const QString &description ) +void KOTodoEditor::setTexts( const TQString &summary, const TQString &description ) { if ( description.isEmpty() && summary.contains("\n") ) { mGeneral->setDescription( summary ); @@ -200,7 +200,7 @@ void KOTodoEditor::setTexts( const QString &summary, const QString &description void KOTodoEditor::loadDefaults() { kdDebug(5850) << k_funcinfo << endl; - setDates( QDateTime::currentDateTime().addDays(7), true, 0 ); + setDates( TQDateTime::currentDateTime().addDays(7), true, 0 ); mGeneral->toggleAlarm( true ); } @@ -256,7 +256,7 @@ void KOTodoEditor::deleteTodo() reject(); } -void KOTodoEditor::setDates( const QDateTime &due, bool allDay, Todo *relatedEvent ) +void KOTodoEditor::setDates( const TQDateTime &due, bool allDay, Todo *relatedEvent ) { mRelatedTodo = relatedEvent; @@ -274,7 +274,7 @@ void KOTodoEditor::setDates( const QDateTime &due, bool allDay, Todo *relatedEve if ( mTodo ) mRecurrence->setDefaults( mTodo->dtStart(), due, false ); else - mRecurrence->setDefaults( QDateTime::currentDateTime(), due, false ); + mRecurrence->setDefaults( TQDateTime::currentDateTime(), due, false ); } void KOTodoEditor::readTodo( Todo *todo, Calendar *calendar ) @@ -346,14 +346,14 @@ void KOTodoEditor::loadTemplate( /*const*/ CalendarLocal& cal ) } } -void KOTodoEditor::slotSaveTemplate( const QString &templateName ) +void KOTodoEditor::slotSaveTemplate( const TQString &templateName ) { Todo *todo = new Todo; writeTodo( todo ); saveAsTemplate( todo, templateName ); } -QStringList& KOTodoEditor::templates() const +TQStringList& KOTodoEditor::templates() const { return KOPrefs::instance()->mTodoTemplates; } diff --git a/korganizer/kotodoeditor.h b/korganizer/kotodoeditor.h index 2451ea807..2abaa9e51 100644 --- a/korganizer/kotodoeditor.h +++ b/korganizer/kotodoeditor.h @@ -41,7 +41,7 @@ class KOTodoEditor : public KOIncidenceEditor /** Constructs a new todo editor. */ - KOTodoEditor( Calendar *calendar, QWidget *parent ); + KOTodoEditor( Calendar *calendar, TQWidget *parent ); virtual ~KOTodoEditor(); void init(); @@ -58,12 +58,12 @@ class KOTodoEditor : public KOIncidenceEditor summary contains multiple lines, the summary will be used as description and only the first line of summary will be used as the summary. */ - void setTexts( const QString &summary, const QString &description = QString::null ); + void setTexts( const TQString &summary, const TQString &description = TQString::null ); /** Edit an existing todo. */ void editIncidence(Incidence *incidence, Calendar* calendar); /** Set widgets to default values */ - void setDates( const QDateTime &due, bool allDay = true, Todo *relatedTodo = 0 ); + void setDates( const TQDateTime &due, bool allDay = true, Todo *relatedTodo = 0 ); /** Read event object and setup widgets accordingly */ void readTodo(Todo *todo, Calendar *calendar); /** Write event settings to event object */ @@ -81,12 +81,12 @@ class KOTodoEditor : public KOIncidenceEditor protected slots: void loadDefaults(); void deleteTodo(); - void slotSaveTemplate( const QString & ); + void slotSaveTemplate( const TQString & ); protected: void loadTemplate( /*const*/ CalendarLocal& ); - QStringList& templates() const; - QString type() { return "Todo"; } + TQStringList& templates() const; + TQString type() { return "Todo"; } void setupGeneral(); void setupRecurrence(); int msgItemDelete(); diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index f43ca2f69..3736bf29c 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp @@ -23,11 +23,11 @@ without including the source code for Qt in the source distribution. */ -#include <qlayout.h> -#include <qheader.h> -#include <qcursor.h> -#include <qlabel.h> -#include <qtimer.h> +#include <tqlayout.h> +#include <tqheader.h> +#include <tqcursor.h> +#include <tqlabel.h> +#include <tqtimer.h> #include <kdebug.h> #include <klocale.h> @@ -63,16 +63,16 @@ using namespace KOrg; #include "calprinter.h" #endif -KOTodoListViewToolTip::KOTodoListViewToolTip (QWidget* parent, +KOTodoListViewToolTip::KOTodoListViewToolTip (TQWidget* parent, KOTodoListView* lv ) - :QToolTip(parent) + :TQToolTip(parent) { todolist=lv; } -void KOTodoListViewToolTip::maybeTip( const QPoint & pos) +void KOTodoListViewToolTip::maybeTip( const TQPoint & pos) { - QRect r; + TQRect r; int headerPos; int col=todolist->header()->sectionAt(todolist->contentsX() + pos.x()); KOTodoViewItem *i=(KOTodoViewItem *)todolist->itemAt(pos); @@ -88,7 +88,7 @@ void KOTodoListViewToolTip::maybeTip( const QPoint & pos) r.setRight(headerPos + todolist->header()->sectionSize(col)); /* Show the tip */ - QString tipText( IncidenceFormatter::toolTipString( i->todo() ) );; + TQString tipText( IncidenceFormatter::toolTipString( i->todo() ) );; if ( !tipText.isEmpty() ) { tip(r, tipText); } @@ -98,7 +98,7 @@ void KOTodoListViewToolTip::maybeTip( const QPoint & pos) -KOTodoListView::KOTodoListView( QWidget *parent, const char *name ) +KOTodoListView::KOTodoListView( TQWidget *parent, const char *name ) : KListView( parent, name ), mCalendar( 0 ), mChanger( 0 ) { mOldCurrent = 0; @@ -120,14 +120,14 @@ void KOTodoListView::setCalendar( Calendar *cal ) viewport()->setAcceptDrops( mCalendar ); } -bool KOTodoListView::event(QEvent *e) +bool KOTodoListView::event(TQEvent *e) { int tmp=0; KOTodoViewItem *i; /* Checks for an ApplicationPaletteChange event and updates * the small Progress bars to make therm have the right colors. */ - if(e->type()==QEvent::ApplicationPaletteChange) + if(e->type()==TQEvent::ApplicationPaletteChange) { KListView::event(e); @@ -142,15 +142,15 @@ bool KOTodoListView::event(QEvent *e) } - return (KListView::event(e) || e->type()==QEvent::ApplicationPaletteChange); + return (KListView::event(e) || e->type()==TQEvent::ApplicationPaletteChange); } -void KOTodoListView::contentsDragEnterEvent(QDragEnterEvent *e) +void KOTodoListView::contentsDragEnterEvent(TQDragEnterEvent *e) { #ifndef KORG_NODND // kdDebug(5850) << "KOTodoListView::contentsDragEnterEvent" << endl; if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && - !QTextDrag::canDecode( e ) ) { + !TQTextDrag::canDecode( e ) ) { e->ignore(); return; } @@ -159,13 +159,13 @@ void KOTodoListView::contentsDragEnterEvent(QDragEnterEvent *e) #endif } -void KOTodoListView::contentsDragMoveEvent(QDragMoveEvent *e) +void KOTodoListView::contentsDragMoveEvent(TQDragMoveEvent *e) { #ifndef KORG_NODND // kdDebug(5850) << "KOTodoListView::contentsDragMoveEvent" << endl; if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && - !QTextDrag::canDecode( e ) ) { + !TQTextDrag::canDecode( e ) ) { e->ignore(); return; } @@ -174,7 +174,7 @@ void KOTodoListView::contentsDragMoveEvent(QDragMoveEvent *e) #endif } -void KOTodoListView::contentsDragLeaveEvent( QDragLeaveEvent * ) +void KOTodoListView::contentsDragLeaveEvent( TQDragLeaveEvent * ) { #ifndef KORG_NODND // kdDebug(5850) << "KOTodoListView::contentsDragLeaveEvent" << endl; @@ -184,14 +184,14 @@ void KOTodoListView::contentsDragLeaveEvent( QDragLeaveEvent * ) #endif } -void KOTodoListView::contentsDropEvent( QDropEvent *e ) +void KOTodoListView::contentsDropEvent( TQDropEvent *e ) { #ifndef KORG_NODND kdDebug(5850) << "KOTodoListView::contentsDropEvent" << endl; if ( !mCalendar || !mChanger || ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && - !QTextDrag::canDecode( e ) ) ) { + !TQTextDrag::canDecode( e ) ) ) { e->ignore(); return; } @@ -244,7 +244,7 @@ void KOTodoListView::contentsDropEvent( QDropEvent *e ) } } else { - QString text; + TQString text; KOTodoViewItem *todoi = dynamic_cast<KOTodoViewItem *>(itemAt( contentsToViewport(e->pos()) )); if ( ! todoi ) { // Not dropped on a todo item: @@ -252,8 +252,8 @@ void KOTodoListView::contentsDropEvent( QDropEvent *e ) kdDebug( 5850 ) << "KOTodoListView::contentsDropEvent(): Not dropped on a todo item" << endl; kdDebug( 5850 ) << "TODO: Create a new todo with the given data" << endl; // FIXME: Create a new todo with the given text/contact/whatever - } else if ( QTextDrag::decode(e, text) ) { - //QListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) ); + } else if ( TQTextDrag::decode(e, text) ) { + //TQListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) ); kdDebug(5850) << "Dropped : " << text << endl; Todo*todo = todoi->todo(); if( mChanger->beginChange( todo ) ) { @@ -262,12 +262,12 @@ void KOTodoListView::contentsDropEvent( QDropEvent *e ) if( text.startsWith( "file:" ) ) { todo->addAttachment( new Attachment( text ) ); } else { - QStringList emails = KPIM::splitEmailAddrList( text ); - for(QStringList::ConstIterator it = emails.begin();it!=emails.end();++it) { + TQStringList emails = KPIM::splitEmailAddrList( text ); + for(TQStringList::ConstIterator it = emails.begin();it!=emails.end();++it) { kdDebug(5850) << " Email: " << (*it) << endl; int pos = (*it).find("<"); - QString name = (*it).left(pos); - QString email = (*it).mid(pos); + TQString name = (*it).left(pos); + TQString email = (*it).mid(pos); if (!email.isEmpty() && todoi) { todo->addAttendee( new Attendee( name, email ) ); } @@ -288,11 +288,11 @@ void KOTodoListView::contentsDropEvent( QDropEvent *e ) #endif } -void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) +void KOTodoListView::contentsMousePressEvent(TQMouseEvent* e) { - QListView::contentsMousePressEvent(e); - QPoint p(contentsToViewport(e->pos())); - QListViewItem *i = itemAt(p); + TQListView::contentsMousePressEvent(e); + TQPoint p(contentsToViewport(e->pos())); + TQListViewItem *i = itemAt(p); if (i) { // if the user clicked into the root decoration of the item, don't // try to start a drag! @@ -308,15 +308,15 @@ void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) } } -void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) +void KOTodoListView::contentsMouseMoveEvent(TQMouseEvent* e) { #ifndef KORG_NODND // kdDebug(5850) << "KOTodoListView::contentsMouseMoveEvent()" << endl; - QListView::contentsMouseMoveEvent(e); + TQListView::contentsMouseMoveEvent(e); if (mMousePressed && (mPressPos - e->pos()).manhattanLength() > - QApplication::startDragDistance()) { + TQApplication::startDragDistance()) { mMousePressed = false; - QListViewItem *item = itemAt(contentsToViewport(mPressPos)); + TQListViewItem *item = itemAt(contentsToViewport(mPressPos)); if ( item && mCalendar ) { // kdDebug(5850) << "Start Drag for item " << item->text(0) << endl; DndFactory factory( mCalendar ); @@ -326,33 +326,33 @@ void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) kdDebug(5850) << "KOTodoListView::contentsMouseMoveEvent(): Delete drag source" << endl; } /* - QString source = fullPath(item); - if ( QFile::exists(source) ) { + TQString source = fullPath(item); + if ( TQFile::exists(source) ) { KURL url; url.setPath(source); KURLDrag* ud = KURLDrag::newDrag(KURL::List(url), viewport()); if ( ud->drag() ) - QMessageBox::information( this, "Drag source", - QString("Delete ")+source, "Not implemented" ); + TQMessageBox::information( this, "Drag source", + TQString("Delete ")+source, "Not implemented" ); */ } } #endif } -void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e) +void KOTodoListView::contentsMouseReleaseEvent(TQMouseEvent *e) { - QListView::contentsMouseReleaseEvent(e); + TQListView::contentsMouseReleaseEvent(e); mMousePressed = false; } -void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e) +void KOTodoListView::contentsMouseDoubleClickEvent(TQMouseEvent *e) { if (!e) return; - QPoint vp = contentsToViewport(e->pos()); + TQPoint vp = contentsToViewport(e->pos()); - QListViewItem *item = itemAt(vp); + TQListViewItem *item = itemAt(vp); if (!item) return; @@ -361,13 +361,13 @@ void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e) ///////////////////////////////////////////////////////////////////////////// -KOTodoView::KOTodoView( Calendar *calendar, QWidget *parent, const char* name) +KOTodoView::KOTodoView( Calendar *calendar, TQWidget *parent, const char* name) : KOrg::BaseView( calendar, parent, name ) { - QBoxLayout *topLayout = new QVBoxLayout( this ); + TQBoxLayout *topLayout = new TQVBoxLayout( this ); - QLabel *title = new QLabel( i18n("To-dos:"), this ); - title->setFrameStyle( QFrame::Panel | QFrame::Raised ); + TQLabel *title = new TQLabel( i18n("To-dos:"), this ); + title->setFrameStyle( TQFrame::Panel | TQFrame::Raised ); topLayout->addWidget( title ); mQuickAdd = new KPIM::ClickLineEdit( this, i18n( "Click to add a new to-do" ) ); @@ -402,17 +402,17 @@ KOTodoView::KOTodoView( Calendar *calendar, QWidget *parent, const char* name) mTodoListView->setItemsRenameable( true ); mTodoListView->setRenameable( 0 ); - mTodoListView->setColumnWidthMode( eSummaryColumn, QListView::Manual ); - mTodoListView->setColumnWidthMode( eRecurColumn, QListView::Manual ); - mTodoListView->setColumnWidthMode( ePriorityColumn, QListView::Manual ); - mTodoListView->setColumnWidthMode( ePercentColumn, QListView::Manual ); - mTodoListView->setColumnWidthMode( eDueDateColumn, QListView::Manual ); - mTodoListView->setColumnWidthMode( eCategoriesColumn, QListView::Manual ); + mTodoListView->setColumnWidthMode( eSummaryColumn, TQListView::Manual ); + mTodoListView->setColumnWidthMode( eRecurColumn, TQListView::Manual ); + mTodoListView->setColumnWidthMode( ePriorityColumn, TQListView::Manual ); + mTodoListView->setColumnWidthMode( ePercentColumn, TQListView::Manual ); + mTodoListView->setColumnWidthMode( eDueDateColumn, TQListView::Manual ); + mTodoListView->setColumnWidthMode( eCategoriesColumn, TQListView::Manual ); #if 0 - mTodoListView->setColumnWidthMode( eDescriptionColumn, QListView::Manual ); + mTodoListView->setColumnWidthMode( eDescriptionColumn, TQListView::Manual ); #endif - mPriorityPopupMenu = new QPopupMenu( this ); + mPriorityPopupMenu = new TQPopupMenu( this ); mPriority[ mPriorityPopupMenu->insertItem( i18n("Unspecified priority", "unspecified") ) ] = 0; mPriority[ mPriorityPopupMenu->insertItem( i18n( "1 (highest)") ) ] = 1; mPriority[ mPriorityPopupMenu->insertItem( i18n( "2" ) ) ] = 2; @@ -423,16 +423,16 @@ KOTodoView::KOTodoView( Calendar *calendar, QWidget *parent, const char* name) mPriority[ mPriorityPopupMenu->insertItem( i18n( "7" ) ) ] = 7; mPriority[ mPriorityPopupMenu->insertItem( i18n( "8" ) ) ] = 8; mPriority[ mPriorityPopupMenu->insertItem( i18n( "9 (lowest)" ) ) ] = 9; - connect( mPriorityPopupMenu, SIGNAL( activated( int ) ), - SLOT( setNewPriority( int ) )); + connect( mPriorityPopupMenu, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( setNewPriority( int ) )); - mPercentageCompletedPopupMenu = new QPopupMenu(this); + mPercentageCompletedPopupMenu = new TQPopupMenu(this); for (int i = 0; i <= 100; i+=10) { - QString label = QString ("%1 %").arg (i); + TQString label = TQString ("%1 %").arg (i); mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i; } - connect( mPercentageCompletedPopupMenu, SIGNAL( activated( int ) ), - SLOT( setNewPercentage( int ) ) ); + connect( mPercentageCompletedPopupMenu, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( setNewPercentage( int ) ) ); mMovePopupMenu = new KDatePickerPopup( KDatePickerPopup::NoDate | @@ -444,76 +444,76 @@ KOTodoView::KOTodoView( Calendar *calendar, QWidget *parent, const char* name) KDatePickerPopup::Words ); - connect( mMovePopupMenu, SIGNAL( dateChanged( QDate )), - SLOT( setNewDate( QDate ) ) ); - connect( mCopyPopupMenu, SIGNAL( dateChanged( QDate )), - SLOT( copyTodoToDate( QDate ) ) ); + connect( mMovePopupMenu, TQT_SIGNAL( dateChanged( TQDate )), + TQT_SLOT( setNewDate( TQDate ) ) ); + connect( mCopyPopupMenu, TQT_SIGNAL( dateChanged( TQDate )), + TQT_SLOT( copyTodoToDate( TQDate ) ) ); - mItemPopupMenu = new QPopupMenu(this); + mItemPopupMenu = new TQPopupMenu(this); mItemPopupMenu->insertItem(i18n("&Show"), this, - SLOT (showTodo())); + TQT_SLOT (showTodo())); mItemPopupMenu->insertItem(i18n("&Edit..."), this, - SLOT (editTodo()), 0, ePopupEdit ); + TQT_SLOT (editTodo()), 0, ePopupEdit ); #ifndef KORG_NOPRINTER - mItemPopupMenu->insertItem(KOGlobals::self()->smallIcon("printer1"), i18n("&Print..."), this, SLOT( printTodo() ) ); + mItemPopupMenu->insertItem(KOGlobals::self()->smallIcon("printer1"), i18n("&Print..."), this, TQT_SLOT( printTodo() ) ); #endif mItemPopupMenu->insertItem(KOGlobals::self()->smallIconSet("editdelete"), i18n("&Delete"), this, - SLOT (deleteTodo()), 0, ePopupDelete ); + TQT_SLOT (deleteTodo()), 0, ePopupDelete ); mItemPopupMenu->insertSeparator(); mItemPopupMenu->insertItem(KOGlobals::self()->smallIconSet("todo"), i18n("New &To-do..."), this, - SLOT (newTodo())); + TQT_SLOT (newTodo())); mItemPopupMenu->insertItem(i18n("New Su&b-to-do..."), this, - SLOT (newSubTodo())); + TQT_SLOT (newSubTodo())); mItemPopupMenu->insertItem( i18n("&Make this To-do Independent"), this, - SIGNAL( unSubTodoSignal() ), 0, ePopupUnSubTodo ); + TQT_SIGNAL( unSubTodoSignal() ), 0, ePopupUnSubTodo ); mItemPopupMenu->insertItem( i18n("Make all Sub-to-dos &Independent"), this, - SIGNAL( unAllSubTodoSignal() ), 0, ePopupUnAllSubTodo ); + TQT_SIGNAL( unAllSubTodoSignal() ), 0, ePopupUnAllSubTodo ); mItemPopupMenu->insertSeparator(); mItemPopupMenu->insertItem( i18n("&Copy To"), mCopyPopupMenu, ePopupCopyTo ); mItemPopupMenu->insertItem(i18n("&Move To"), mMovePopupMenu, ePopupMoveTo ); mItemPopupMenu->insertSeparator(); mItemPopupMenu->insertItem(i18n("delete completed to-dos","Pur&ge Completed"), - this, SLOT( purgeCompleted() ) ); + this, TQT_SLOT( purgeCompleted() ) ); - connect( mMovePopupMenu, SIGNAL( dateChanged( QDate ) ), - mItemPopupMenu, SLOT( hide() ) ); - connect( mCopyPopupMenu, SIGNAL( dateChanged( QDate ) ), - mItemPopupMenu, SLOT( hide() ) ); + connect( mMovePopupMenu, TQT_SIGNAL( dateChanged( TQDate ) ), + mItemPopupMenu, TQT_SLOT( hide() ) ); + connect( mCopyPopupMenu, TQT_SIGNAL( dateChanged( TQDate ) ), + mItemPopupMenu, TQT_SLOT( hide() ) ); - mPopupMenu = new QPopupMenu(this); + mPopupMenu = new TQPopupMenu(this); mPopupMenu->insertItem(KOGlobals::self()->smallIconSet("todo"), i18n("&New To-do..."), this, - SLOT (newTodo())); + TQT_SLOT (newTodo())); mPopupMenu->insertItem(i18n("delete completed to-dos","&Purge Completed"), - this, SLOT(purgeCompleted())); + this, TQT_SLOT(purgeCompleted())); mDocPrefs = new DocPrefs( name ); // Double clicking conflicts with opening/closing the subtree - connect( mTodoListView, SIGNAL( doubleClicked( QListViewItem *, - const QPoint &, int ) ), - SLOT( editItem( QListViewItem *, const QPoint &, int ) ) ); - connect( mTodoListView, SIGNAL( returnPressed( QListViewItem * ) ), - SLOT( editItem( QListViewItem * ) ) ); - connect( mTodoListView, SIGNAL( contextMenuRequested( QListViewItem *, - const QPoint &, int ) ), - SLOT( popupMenu( QListViewItem *, const QPoint &, int ) ) ); - connect( mTodoListView, SIGNAL( expanded( QListViewItem * ) ), - SLOT( itemStateChanged( QListViewItem * ) ) ); - connect( mTodoListView, SIGNAL( collapsed( QListViewItem * ) ), - SLOT( itemStateChanged( QListViewItem * ) ) ); + connect( mTodoListView, TQT_SIGNAL( doubleClicked( TQListViewItem *, + const TQPoint &, int ) ), + TQT_SLOT( editItem( TQListViewItem *, const TQPoint &, int ) ) ); + connect( mTodoListView, TQT_SIGNAL( returnPressed( TQListViewItem * ) ), + TQT_SLOT( editItem( TQListViewItem * ) ) ); + connect( mTodoListView, TQT_SIGNAL( contextMenuRequested( TQListViewItem *, + const TQPoint &, int ) ), + TQT_SLOT( popupMenu( TQListViewItem *, const TQPoint &, int ) ) ); + connect( mTodoListView, TQT_SIGNAL( expanded( TQListViewItem * ) ), + TQT_SLOT( itemStateChanged( TQListViewItem * ) ) ); + connect( mTodoListView, TQT_SIGNAL( collapsed( TQListViewItem * ) ), + TQT_SLOT( itemStateChanged( TQListViewItem * ) ) ); #if 0 - connect(mTodoListView,SIGNAL(selectionChanged(QListViewItem *)), - SLOT(selectionChanged(QListViewItem *))); - connect(mTodoListView,SIGNAL(clicked(QListViewItem *)), - SLOT(selectionChanged(QListViewItem *))); - connect(mTodoListView,SIGNAL(pressed(QListViewItem *)), - SLOT(selectionChanged(QListViewItem *))); + connect(mTodoListView,TQT_SIGNAL(selectionChanged(TQListViewItem *)), + TQT_SLOT(selectionChanged(TQListViewItem *))); + connect(mTodoListView,TQT_SIGNAL(clicked(TQListViewItem *)), + TQT_SLOT(selectionChanged(TQListViewItem *))); + connect(mTodoListView,TQT_SIGNAL(pressed(TQListViewItem *)), + TQT_SLOT(selectionChanged(TQListViewItem *))); #endif - connect( mTodoListView, SIGNAL(selectionChanged() ), - SLOT( processSelectionChange() ) ); - connect( mQuickAdd, SIGNAL( returnPressed () ), - SLOT( addQuickTodo() ) ); + connect( mTodoListView, TQT_SIGNAL(selectionChanged() ), + TQT_SLOT( processSelectionChange() ) ); + connect( mQuickAdd, TQT_SIGNAL( returnPressed () ), + TQT_SLOT( addQuickTodo() ) ); } KOTodoView::~KOTodoView() @@ -546,7 +546,7 @@ void KOTodoView::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; @@ -575,7 +575,7 @@ void KOTodoView::updateView() processSelectionChange(); } -void KOTodoView::restoreItemState( QListViewItem *item ) +void KOTodoView::restoreItemState( TQListViewItem *item ) { while( item ) { KOTodoViewItem *todoItem = (KOTodoViewItem *)item; @@ -586,7 +586,7 @@ void KOTodoView::restoreItemState( QListViewItem *item ) } -QMap<Todo *,KOTodoViewItem *>::ConstIterator +TQMap<Todo *,KOTodoViewItem *>::ConstIterator KOTodoView::insertTodoItem(Todo *todo) { // kdDebug(5850) << "KOTodoView::insertTodoItem(): " << todo->getSummary() << endl; @@ -599,7 +599,7 @@ QMap<Todo *,KOTodoViewItem *>::ConstIterator mTodoMap.insert(todo,0); // kdDebug(5850) << " has Related" << endl; - QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; + TQMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; itemIterator = mTodoMap.find(relatedTodo); if (itemIterator == mTodoMap.end()) { // kdDebug(5850) << " related not yet in list" << endl; @@ -645,7 +645,7 @@ bool KOTodoView::scheduleRemoveTodoItem( KOTodoViewItem *todoItem ) { if ( todoItem ) { mItemsToDelete.append( todoItem ); - QTimer::singleShot( 0, this, SLOT( removeTodoItems() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( removeTodoItems() ) ); return true; } else return false; @@ -728,17 +728,17 @@ void KOTodoView::changeIncidenceDisplay(Incidence *incidence, int action) } break; default: - QTimer::singleShot( 0, this, SLOT( updateView() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( updateView() ) ); } } else { - // use a QTimer here, because when marking todos finished using + // use a TQTimer here, because when marking todos finished using // the checkbox, this slot gets called, but we cannot update the views // because we're still inside KOTodoViewItem::stateChange - QTimer::singleShot(0,this,SLOT(updateView())); + TQTimer::singleShot(0,this,TQT_SLOT(updateView())); } } -void KOTodoView::showDates(const QDate &, const QDate &) +void KOTodoView::showDates(const TQDate &, const TQDate &) { } @@ -756,29 +756,29 @@ CalPrinterBase::PrintType KOTodoView::printType() } } -void KOTodoView::editItem( QListViewItem *item ) +void KOTodoView::editItem( TQListViewItem *item ) { if (item) emit editIncidenceSignal( static_cast<KOTodoViewItem *>( item )->todo() ); } -void KOTodoView::editItem( QListViewItem *item, const QPoint &, int ) +void KOTodoView::editItem( TQListViewItem *item, const TQPoint &, int ) { editItem( item ); } -void KOTodoView::showItem( QListViewItem *item ) +void KOTodoView::showItem( TQListViewItem *item ) { if (item) emit showIncidenceSignal( static_cast<KOTodoViewItem *>( item )->todo() ); } -void KOTodoView::showItem( QListViewItem *item, const QPoint &, int ) +void KOTodoView::showItem( TQListViewItem *item, const TQPoint &, int ) { showItem( item ); } -void KOTodoView::popupMenu( QListViewItem *item, const QPoint &, int column ) +void KOTodoView::popupMenu( TQListViewItem *item, const TQPoint &, int column ) { mActiveItem = static_cast<KOTodoViewItem *>( item ); if ( mActiveItem && mActiveItem->todo() && @@ -792,45 +792,45 @@ void KOTodoView::popupMenu( QListViewItem *item, const QPoint &, int column ) mItemPopupMenu->setItemEnabled( ePopupUnAllSubTodo, editable ); if ( editable ) { - QDate date = mActiveItem->todo()->dtDue().date(); + TQDate date = mActiveItem->todo()->dtDue().date(); if ( mActiveItem->todo()->hasDueDate () ) { mMovePopupMenu->datePicker()->setDate( date ); } else { - mMovePopupMenu->datePicker()->setDate( QDate::currentDate() ); + mMovePopupMenu->datePicker()->setDate( TQDate::currentDate() ); } switch ( column ) { case ePriorityColumn: - mPriorityPopupMenu->popup( QCursor::pos() ); + mPriorityPopupMenu->popup( TQCursor::pos() ); break; case ePercentColumn: { - mPercentageCompletedPopupMenu->popup( QCursor::pos() ); + mPercentageCompletedPopupMenu->popup( TQCursor::pos() ); break; } case eDueDateColumn: - mMovePopupMenu->popup( QCursor::pos() ); + mMovePopupMenu->popup( TQCursor::pos() ); break; case eCategoriesColumn: - getCategoryPopupMenu( mActiveItem )->popup( QCursor::pos() ); + getCategoryPopupMenu( mActiveItem )->popup( TQCursor::pos() ); break; default: mCopyPopupMenu->datePicker()->setDate( date ); - mCopyPopupMenu->datePicker()->setDate( QDate::currentDate() ); + mCopyPopupMenu->datePicker()->setDate( TQDate::currentDate() ); mItemPopupMenu->setItemEnabled( ePopupUnSubTodo, mActiveItem->todo()->relatedTo() ); mItemPopupMenu->setItemEnabled( ePopupUnAllSubTodo, !mActiveItem->todo()->relations().isEmpty() ); - mItemPopupMenu->popup( QCursor::pos() ); + mItemPopupMenu->popup( TQCursor::pos() ); } } else { - mItemPopupMenu->popup( QCursor::pos() ); + mItemPopupMenu->popup( TQCursor::pos() ); } - } else mPopupMenu->popup( QCursor::pos() ); + } else mPopupMenu->popup( TQCursor::pos() ); } void KOTodoView::newTodo() { kdDebug() << k_funcinfo << endl; - emit newTodoSignal( QDate::currentDate().addDays(7) ); + emit newTodoSignal( TQDate::currentDate().addDays(7) ); } void KOTodoView::newSubTodo() @@ -855,13 +855,13 @@ void KOTodoView::printTodo() #ifndef KORG_NOPRINTER KOCoreHelper helper; CalPrinter printer( this, BaseView::calendar(), &helper ); - connect( this, SIGNAL(configChanged()), &printer, SLOT(updateConfig()) ); + connect( this, TQT_SIGNAL(configChanged()), &printer, TQT_SLOT(updateConfig()) ); Incidence::List selectedIncidences; selectedIncidences.append( mActiveItem->todo() ); printer.print( KOrg::CalPrinterBase::Incidence, - QDate(), QDate(), selectedIncidences ); + TQDate(), TQDate(), selectedIncidences ); #endif } @@ -899,7 +899,7 @@ void KOTodoView::setNewPercentage( KOTodoViewItem *item, int percentage ) Todo *oldTodo = todo->clone(); /* Old code to make sub-items's percentage related to this one's: - QListViewItem *myChild = firstChild(); + TQListViewItem *myChild = firstChild(); KOTodoViewItem *item; while( myChild ) { item = static_cast<KOTodoViewItem*>(myChild); @@ -907,10 +907,10 @@ void KOTodoView::setNewPercentage( KOTodoViewItem *item, int percentage ) myChild = myChild->nextSibling(); }*/ if ( percentage == 100 ) { - todo->setCompleted( QDateTime::currentDateTime() ); + todo->setCompleted( TQDateTime::currentDateTime() ); // If the todo does recur, it doesn't get set as completed. However, the // item is still checked. Uncheck it again. - if ( !todo->isCompleted() ) item->setState( QCheckListItem::Off ); + if ( !todo->isCompleted() ) item->setState( TQCheckListItem::Off ); else todo->setPercentComplete( percentage ); } else { todo->setCompleted( false ); @@ -934,7 +934,7 @@ void KOTodoView::setNewPercentage( int index ) setNewPercentage( mActiveItem, mPercentage[index] ); } -void KOTodoView::setNewDate( QDate date ) +void KOTodoView::setNewDate( TQDate date ) { if ( !mActiveItem || !mChanger ) return; Todo *todo = mActiveItem->todo(); @@ -943,7 +943,7 @@ void KOTodoView::setNewDate( QDate date ) if ( !todo->isReadOnly() && mChanger->beginChange( todo ) ) { Todo *oldTodo = todo->clone(); - QDateTime dt; + TQDateTime dt; dt.setDate( date ); if ( !todo->doesFloat() ) @@ -964,9 +964,9 @@ void KOTodoView::setNewDate( QDate date ) } } -void KOTodoView::copyTodoToDate( QDate date ) +void KOTodoView::copyTodoToDate( TQDate date ) { - QDateTime dt( date ); + TQDateTime dt( date ); if ( mActiveItem && mChanger ) { Todo *newTodo = mActiveItem->todo()->clone(); @@ -984,13 +984,13 @@ void KOTodoView::copyTodoToDate( QDate date ) } } -QPopupMenu *KOTodoView::getCategoryPopupMenu( KOTodoViewItem *todoItem ) +TQPopupMenu *KOTodoView::getCategoryPopupMenu( KOTodoViewItem *todoItem ) { - QPopupMenu *tempMenu = new QPopupMenu( this ); - QStringList checkedCategories = todoItem->todo()->categories(); + TQPopupMenu *tempMenu = new TQPopupMenu( this ); + TQStringList checkedCategories = todoItem->todo()->categories(); tempMenu->setCheckable( true ); - QStringList::Iterator it; + TQStringList::Iterator it; for ( it = KOPrefs::instance()->mCustomCategories.begin(); it != KOPrefs::instance()->mCustomCategories.end(); ++it ) { @@ -1000,8 +1000,8 @@ QPopupMenu *KOTodoView::getCategoryPopupMenu( KOTodoViewItem *todoItem ) tempMenu->setItemChecked( index, true ); } - connect ( tempMenu, SIGNAL( activated( int ) ), - SLOT( changedCategories( int ) ) ); + connect ( tempMenu, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( changedCategories( int ) ) ); return tempMenu; } @@ -1014,7 +1014,7 @@ void KOTodoView::changedCategories(int index) if ( !todo->isReadOnly() && mChanger->beginChange( todo ) ) { Todo *oldTodo = todo->clone(); - QStringList categories = todo->categories (); + TQStringList categories = todo->categories (); if ( categories.find( mCategory[index] ) != categories.end() ) categories.remove( mCategory[index] ); else @@ -1030,14 +1030,14 @@ void KOTodoView::changedCategories(int index) } } -void KOTodoView::setDocumentId( const QString &id ) +void KOTodoView::setDocumentId( const TQString &id ) { kdDebug(5850) << "KOTodoView::setDocumentId()" << endl; mDocPrefs->setDoc( id ); } -void KOTodoView::itemStateChanged( QListViewItem *item ) +void KOTodoView::itemStateChanged( TQListViewItem *item ) { if (!item) return; @@ -1052,24 +1052,24 @@ void KOTodoView::setNewPercentageDelayed( KOTodoViewItem *item, int percentage ) { mPercentChangedMap.append( qMakePair( item, percentage ) ); - QTimer::singleShot( 0, this, SLOT( processDelayedNewPercentage() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( processDelayedNewPercentage() ) ); } void KOTodoView::processDelayedNewPercentage() { - QValueList< QPair< KOTodoViewItem *, int> >::Iterator it; + TQValueList< QPair< KOTodoViewItem *, int> >::Iterator it; for ( it = mPercentChangedMap.begin(); it != mPercentChangedMap.end(); ++it ) setNewPercentage( (*it).first, (*it).second ); mPercentChangedMap.clear(); } -void KOTodoView::saveLayout(KConfig *config, const QString &group) const +void KOTodoView::saveLayout(KConfig *config, const TQString &group) const { mTodoListView->saveLayout(config,group); } -void KOTodoView::restoreLayout(KConfig *config, const QString &group) +void KOTodoView::restoreLayout(KConfig *config, const TQString &group) { mTodoListView->restoreLayout(config,group); } @@ -1110,7 +1110,7 @@ void KOTodoView::addQuickTodo() delete todo; return; } - mQuickAdd->setText( QString::null ); + mQuickAdd->setText( TQString::null ); } } diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h index aee9037ea..881d92358 100644 --- a/korganizer/kotodoview.h +++ b/korganizer/kotodoview.h @@ -25,8 +25,8 @@ #ifndef KOTODOVIEW_H #define KOTODOVIEW_H -#include <qmap.h> -#include <qtooltip.h> +#include <tqmap.h> +#include <tqtooltip.h> #include <klistview.h> @@ -58,10 +58,10 @@ using namespace KOrg; class KOTodoListViewToolTip : public QToolTip { public: - KOTodoListViewToolTip( QWidget *parent, KOTodoListView *lv ); + KOTodoListViewToolTip( TQWidget *parent, KOTodoListView *lv ); protected: - void maybeTip( const QPoint &pos ); + void maybeTip( const TQPoint &pos ); private: KOTodoListView *todolist; @@ -72,7 +72,7 @@ class KOTodoListView : public KListView { Q_OBJECT public: - KOTodoListView( QWidget *parent = 0, const char *name = 0 ); + KOTodoListView( TQWidget *parent = 0, const char *name = 0 ); ~KOTodoListView(); void setCalendar( Calendar * ); @@ -80,25 +80,25 @@ class KOTodoListView : public KListView void setIncidenceChanger( IncidenceChangerBase *changer ) { mChanger = changer; } protected: - virtual bool event( QEvent * ); + virtual bool event( TQEvent * ); - void contentsDragEnterEvent( QDragEnterEvent * ); - void contentsDragMoveEvent( QDragMoveEvent * ); - void contentsDragLeaveEvent( QDragLeaveEvent * ); - void contentsDropEvent( QDropEvent * ); + void contentsDragEnterEvent( TQDragEnterEvent * ); + void contentsDragMoveEvent( TQDragMoveEvent * ); + void contentsDragLeaveEvent( TQDragLeaveEvent * ); + void contentsDropEvent( TQDropEvent * ); - void contentsMousePressEvent( QMouseEvent * ); - void contentsMouseMoveEvent( QMouseEvent * ); - void contentsMouseReleaseEvent( QMouseEvent * ); - void contentsMouseDoubleClickEvent( QMouseEvent * ); + void contentsMousePressEvent( TQMouseEvent * ); + void contentsMouseMoveEvent( TQMouseEvent * ); + void contentsMouseReleaseEvent( TQMouseEvent * ); + void contentsMouseDoubleClickEvent( TQMouseEvent * ); private: Calendar *mCalendar; KOrg::IncidenceChangerBase *mChanger; - QPoint mPressPos; + TQPoint mPressPos; bool mMousePressed; - QListViewItem *mOldCurrent; + TQListViewItem *mOldCurrent; KOTodoListViewToolTip *tooltip; }; @@ -113,7 +113,7 @@ class KOTodoView : public KOrg::BaseView { Q_OBJECT public: - KOTodoView( Calendar *cal, QWidget *parent = 0, const char *name = 0 ); + KOTodoView( Calendar *cal, TQWidget *parent = 0, const char *name = 0 ); ~KOTodoView(); void setCalendar( Calendar * ); @@ -128,12 +128,12 @@ class KOTodoView : public KOrg::BaseView CalPrinterBase::PrintType printType(); - void setDocumentId( const QString & ); + void setDocumentId( const TQString & ); - void saveLayout( KConfig *config, const QString &group ) const; - void restoreLayout( KConfig *config, const QString &group ); + void saveLayout( KConfig *config, const TQString &group ) const; + void restoreLayout( KConfig *config, const TQString &group ); /** Create a popup menu to set categories */ - QPopupMenu *getCategoryPopupMenu( KOTodoViewItem *todoItem ); + TQPopupMenu *getCategoryPopupMenu( KOTodoViewItem *todoItem ); void setIncidenceChanger( IncidenceChangerBase *changer ); public slots: @@ -142,16 +142,16 @@ class KOTodoView : 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 clearSelection(); - void editItem( QListViewItem *item, const QPoint &, int ); - void editItem( QListViewItem *item ); - void showItem( QListViewItem *item, const QPoint &, int ); - void showItem( QListViewItem *item ); - void popupMenu( QListViewItem *item, const QPoint &, int ); + void editItem( TQListViewItem *item, const TQPoint &, int ); + void editItem( TQListViewItem *item ); + void showItem( TQListViewItem *item, const TQPoint &, int ); + void showItem( TQListViewItem *item ); + void popupMenu( TQListViewItem *item, const TQPoint &, int ); void newTodo(); void newSubTodo(); void showTodo(); @@ -163,13 +163,13 @@ class KOTodoView : public KOrg::BaseView void setNewPriority( int ); void setNewPercentage( int ); - void setNewDate( QDate ); - void copyTodoToDate( QDate ); + void setNewDate( TQDate ); + void copyTodoToDate( TQDate ); void changedCategories( int ); void purgeCompleted(); - void itemStateChanged( QListViewItem * ); + void itemStateChanged( TQListViewItem * ); void setNewPercentageDelayed( KOTodoViewItem *item, int percentage ); void processDelayedNewPercentage(); @@ -190,38 +190,38 @@ class KOTodoView : public KOrg::BaseView * the TodoEditor approach is rather unscaling in the long * run. * Korganizer keeps it in memory and we need to update - * 1. make KOTodoViewItem a QObject again? + * 1. make KOTodoViewItem a TQObject again? * 2. add a public method for setting one todo modified? * 3. add a private method for setting a todo modified + friend here? * -- zecke 2002-07-08 */ friend class KOTodoViewItem; - QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem( Todo *todo ); + TQMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem( Todo *todo ); bool scheduleRemoveTodoItem( KOTodoViewItem *todoItem ); - void restoreItemState( QListViewItem * ); + void restoreItemState( TQListViewItem * ); KOTodoListView *mTodoListView; - QPopupMenu *mItemPopupMenu; - QPopupMenu *mPopupMenu; - QPopupMenu *mPriorityPopupMenu; - QPopupMenu *mPercentageCompletedPopupMenu; - QPopupMenu *mCategoryPopupMenu; + TQPopupMenu *mItemPopupMenu; + TQPopupMenu *mPopupMenu; + TQPopupMenu *mPriorityPopupMenu; + TQPopupMenu *mPercentageCompletedPopupMenu; + TQPopupMenu *mCategoryPopupMenu; KDatePickerPopup *mMovePopupMenu; KDatePickerPopup *mCopyPopupMenu; - QMap<int, int> mPercentage; - QMap<int, int> mPriority; - QMap<int, QString> mCategory; + TQMap<int, int> mPercentage; + TQMap<int, int> mPriority; + TQMap<int, TQString> mCategory; KOTodoViewItem *mActiveItem; - QMap<Todo *,KOTodoViewItem *> mTodoMap; - QPtrList<KOTodoViewItem> mItemsToDelete; - QValueList< QPair<KOTodoViewItem *, int> > mPercentChangedMap; + TQMap<Todo *,KOTodoViewItem *> mTodoMap; + TQPtrList<KOTodoViewItem> mItemsToDelete; + TQValueList< QPair<KOTodoViewItem *, int> > mPercentChangedMap; DocPrefs *mDocPrefs; - QString mCurrentDoc; + TQString mCurrentDoc; KPIM::ClickLineEdit *mQuickAdd; public: diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp index bb5f08c52..7e5541fa3 100644 --- a/korganizer/kotodoviewitem.cpp +++ b/korganizer/kotodoviewitem.cpp @@ -24,26 +24,26 @@ without including the source code for Qt in the source distribution. */ -#include <qpainter.h> +#include <tqpainter.h> #include <klocale.h> #include <kdebug.h> -#include <qpainter.h> -#include <qpixmap.h> +#include <tqpainter.h> +#include <tqpixmap.h> #include "kotodoviewitem.h" #include "kotodoview.h" #include "koprefs.h" #include "koglobals.h" -KOTodoViewItem::KOTodoViewItem( QListView *parent, Todo *todo, KOTodoView *kotodo) - : QCheckListItem( parent , "", CheckBox ), mTodo( todo ), mTodoView( kotodo ) +KOTodoViewItem::KOTodoViewItem( TQListView *parent, Todo *todo, KOTodoView *kotodo) + : TQCheckListItem( parent , "", CheckBox ), mTodo( todo ), mTodoView( kotodo ) { construct(); } KOTodoViewItem::KOTodoViewItem( KOTodoViewItem *parent, Todo *todo, KOTodoView *kotodo ) - : QCheckListItem( parent, "", CheckBox ), mTodo( todo ), mTodoView( kotodo ) + : TQCheckListItem( parent, "", CheckBox ), mTodo( todo ), mTodoView( kotodo ) { construct(); } @@ -60,11 +60,11 @@ inline int KOTodoViewItem::compareDueDates( const KOTodoViewItem *b ) const return b->mEffectiveDueDate.secsTo( mEffectiveDueDate ); } -int KOTodoViewItem::compare( QListViewItem *it, int col, bool ascending ) const +int KOTodoViewItem::compare( TQListViewItem *it, int col, bool ascending ) const { KOTodoViewItem *i = dynamic_cast<KOTodoViewItem *>( it ); if ( !i ) - return QListViewItem::compare( it, col, ascending ); + return TQListViewItem::compare( it, col, ascending ); // throw completed todos to the bottom if ( mTodo->isCompleted() && !i->todo()->isCompleted() ) @@ -97,15 +97,15 @@ int KOTodoViewItem::compare( QListViewItem *it, int col, bool ascending ) const return mTodo->description().localeAwareCompare( i->todo()->description() ); default: Q_ASSERT( false && "unknown column to compare" ); - return QListViewItem::compare( it, col, ascending ); + return TQListViewItem::compare( it, col, ascending ); } } #if QT_VERSION >= 300 -void KOTodoViewItem::paintBranches(QPainter *p,const QColorGroup & cg,int w, +void KOTodoViewItem::paintBranches(TQPainter *p,const TQColorGroup & cg,int w, int y,int h) { - QListViewItem::paintBranches(p,cg,w,y,h); + TQListViewItem::paintBranches(p,cg,w,y,h); } #else #endif @@ -117,19 +117,19 @@ void KOTodoViewItem::construct() setOn( mTodo->isCompleted() ); setText( KOTodoView::eSummaryColumn, mTodo->summary()); - static const QPixmap recurPxmp = KOGlobals::self()->smallIcon("recur"); + static const TQPixmap recurPxmp = KOGlobals::self()->smallIcon("recur"); if ( mTodo->doesRecur() ) setPixmap( KOTodoView::eRecurColumn, recurPxmp ); if ( mTodo->priority()==0 ) { setText( KOTodoView::ePriorityColumn, i18n("--") ); } else { - setText( KOTodoView::ePriorityColumn, QString::number(mTodo->priority()) ); + setText( KOTodoView::ePriorityColumn, TQString::number(mTodo->priority()) ); } - setText( KOTodoView::ePercentColumn, QString::number(mTodo->percentComplete()) ); + setText( KOTodoView::ePercentColumn, TQString::number(mTodo->percentComplete()) ); if (mTodo->hasDueDate()) { - QString dtStr = mTodo->dtDueDateStr(); + TQString dtStr = mTodo->dtDueDateStr(); if (!mTodo->doesFloat()) { dtStr += " " + mTodo->dtDueTimeStr(); } @@ -154,7 +154,7 @@ void KOTodoViewItem::construct() if (pos < 0) { setText( KOTodoView::eDescriptionColumn, "" ); } else { - QString str = mTodo->description().mid(pos+1); + TQString str = mTodo->description().mid(pos+1); str.stripWhiteSpace(); setText( KOTodoView::eDescriptionColumn, str ); } @@ -195,12 +195,12 @@ bool KOTodoViewItem::isAlternate() { KOTodoViewItem *item; bool previous = true; - if (QListViewItem::parent()) + if (TQListViewItem::parent()) { - item = dynamic_cast<KOTodoViewItem *>(QListViewItem::parent()); + item = dynamic_cast<KOTodoViewItem *>(TQListViewItem::parent()); if (item) previous = item->m_odd; - item = dynamic_cast<KOTodoViewItem *>(QListViewItem::parent()->firstChild()); + item = dynamic_cast<KOTodoViewItem *>(TQListViewItem::parent()->firstChild()); } else { @@ -222,24 +222,24 @@ bool KOTodoViewItem::isAlternate() #endif } -void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment) +void KOTodoViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment) { - QColorGroup _cg = cg; + TQColorGroup _cg = cg; // If no todo is set, just don't paint anything... if ( !mTodo ) return; #ifndef KORG_NOLVALTERNATION if (isAlternate()) - _cg.setColor(QColorGroup::Base, static_cast< KOTodoListView* >(listView())->alternateBackground()); + _cg.setColor(TQColorGroup::Base, static_cast< KOTodoListView* >(listView())->alternateBackground()); if (mTodo->hasDueDate()) { - if (mTodo->dtDue().date()==QDate::currentDate() && + if (mTodo->dtDue().date()==TQDate::currentDate() && !mTodo->isCompleted()) { - _cg.setColor(QColorGroup::Base, KOPrefs::instance()->mTodoDueTodayColor); - _cg.setColor(QColorGroup::Text, getTextColor(KOPrefs::instance()->mTodoDueTodayColor)); + _cg.setColor(TQColorGroup::Base, KOPrefs::instance()->mTodoDueTodayColor); + _cg.setColor(TQColorGroup::Text, getTextColor(KOPrefs::instance()->mTodoDueTodayColor)); } - if (mTodo->dtDue().date() < QDate::currentDate() && + if (mTodo->dtDue().date() < TQDate::currentDate() && !mTodo->isCompleted()) { - _cg.setColor(QColorGroup::Base, KOPrefs::instance()->mTodoOverdueColor); - _cg.setColor(QColorGroup::Text, getTextColor(KOPrefs::instance()->mTodoOverdueColor)); + _cg.setColor(TQColorGroup::Base, KOPrefs::instance()->mTodoOverdueColor); + _cg.setColor(TQColorGroup::Text, getTextColor(KOPrefs::instance()->mTodoOverdueColor)); } } #endif @@ -257,6 +257,6 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i KGlobalSettings::highlightColor() ); p->restore(); } else { - QCheckListItem::paintCell(p, _cg, column, width, alignment); + TQCheckListItem::paintCell(p, _cg, column, width, alignment); } } diff --git a/korganizer/kotodoviewitem.h b/korganizer/kotodoviewitem.h index 5cb362af9..80b3b9617 100644 --- a/korganizer/kotodoviewitem.h +++ b/korganizer/kotodoviewitem.h @@ -26,10 +26,10 @@ #ifndef KOTODOVIEWITEM_H #define KOTODOVIEWITEM_H -#include <qmap.h> -#include <qlistview.h> -#include <qpalette.h> -#include <qdatetime.h> +#include <tqmap.h> +#include <tqlistview.h> +#include <tqpalette.h> +#include <tqdatetime.h> namespace KCal { class Todo; @@ -55,7 +55,7 @@ class KOTodoViewItem : public QCheckListItem @param todo is the todo to have the item display information for. @param kotodo is a pointer to the KOTodoView object. */ - KOTodoViewItem(QListView *parent, Todo *todo, KOTodoView *kotodo); + KOTodoViewItem(TQListView *parent, Todo *todo, KOTodoView *kotodo); KOTodoViewItem(KOTodoViewItem *parent, Todo *todo, KOTodoView *kotodo); virtual ~KOTodoViewItem() {} @@ -64,13 +64,13 @@ class KOTodoViewItem : public QCheckListItem Todo *todo() const { return mTodo; } bool isAlternate(); - int compare( QListViewItem *i, int col, bool ascending ) const; - virtual void paintCell(QPainter *p, const QColorGroup &cg, + int compare( TQListViewItem *i, int col, bool ascending ) const; + virtual void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment); protected: #if QT_VERSION >= 300 - void paintBranches(QPainter *p,const QColorGroup & cg,int w,int y,int h); + void paintBranches(TQPainter *p,const TQColorGroup & cg,int w,int y,int h); #else #endif virtual void stateChange(bool); @@ -78,7 +78,7 @@ class KOTodoViewItem : public QCheckListItem private: Todo *mTodo; KOTodoView *mTodoView; - QDateTime mEffectiveDueDate; + TQDateTime mEffectiveDueDate; int compareDueDates( const KOTodoViewItem *b ) const; uint m_odd : 1; diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index d7929039e..f086e1924 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp @@ -23,8 +23,8 @@ without including the source code for Qt in the source distribution. */ -#include <qwidgetstack.h> -#include <qtabwidget.h> +#include <tqwidgetstack.h> +#include <tqtabwidget.h> #include <kconfig.h> #include <kglobal.h> @@ -47,7 +47,7 @@ #include "koviewmanager.moc" KOViewManager::KOViewManager( CalendarView *mainView ) : - QObject(), mMainView( mainView ) + TQObject(), mMainView( mainView ) { mCurrentView = 0; @@ -77,7 +77,7 @@ KOrg::BaseView *KOViewManager::currentView() void KOViewManager::readSettings(KConfig *config) { config->setGroup("General"); - QString view = config->readEntry("Current View"); + TQString view = config->readEntry("Current View"); if (view == "WhatsNext") showWhatsNextView(); else if (view == "Month") showMonthView(); @@ -92,7 +92,7 @@ void KOViewManager::writeSettings(KConfig *config) { config->setGroup("General"); - QString view; + TQString view; if (mCurrentView == mWhatsNextView) view = "WhatsNext"; else if (mCurrentView == mMonthView) view = "Month"; else if (mCurrentView == mListView) view = "List"; @@ -156,7 +156,7 @@ void KOViewManager::updateView() if ( mCurrentView ) mCurrentView->updateView(); } -void KOViewManager::updateView(const QDate &start, const QDate &end) +void KOViewManager::updateView(const TQDate &start, const TQDate &end) { // kdDebug(5850) << "KOViewManager::updateView()" << endl; @@ -170,58 +170,58 @@ void KOViewManager::connectView(KOrg::BaseView *view) if (!view) return; // selecting an incidence - connect( view, SIGNAL( incidenceSelected( Incidence * ) ), - mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); + connect( view, TQT_SIGNAL( incidenceSelected( Incidence * ) ), + mMainView, TQT_SLOT( processMainViewSelection( Incidence * ) ) ); // showing/editing/deleting an incidence. The calendar view takes care of the action. - connect(view, SIGNAL(showIncidenceSignal(Incidence *)), - mMainView, SLOT(showIncidence(Incidence *))); - connect(view, SIGNAL(editIncidenceSignal(Incidence *)), - mMainView, SLOT(editIncidence(Incidence *))); - connect(view, SIGNAL(deleteIncidenceSignal(Incidence *)), - mMainView, SLOT(deleteIncidence(Incidence *))); - connect(view, SIGNAL(copyIncidenceSignal(Incidence *)), - mMainView, SLOT(copyIncidence(Incidence *))); - connect(view, SIGNAL(cutIncidenceSignal(Incidence *)), - mMainView, SLOT(cutIncidence(Incidence *))); - connect(view, SIGNAL(pasteIncidenceSignal()), - mMainView, SLOT(pasteIncidence())); - connect(view, SIGNAL(toggleAlarmSignal(Incidence *)), - mMainView, SLOT(toggleAlarm(Incidence *))); - connect(view,SIGNAL(dissociateOccurrenceSignal( Incidence *, const QDate & )), - mMainView, SLOT(dissociateOccurrence( Incidence *, const QDate & ))); - connect(view,SIGNAL(dissociateFutureOccurrenceSignal( Incidence *, const QDate & )), - mMainView, SLOT(dissociateFutureOccurrence( Incidence *, const QDate & ))); + connect(view, TQT_SIGNAL(showIncidenceSignal(Incidence *)), + mMainView, TQT_SLOT(showIncidence(Incidence *))); + connect(view, TQT_SIGNAL(editIncidenceSignal(Incidence *)), + mMainView, TQT_SLOT(editIncidence(Incidence *))); + connect(view, TQT_SIGNAL(deleteIncidenceSignal(Incidence *)), + mMainView, TQT_SLOT(deleteIncidence(Incidence *))); + connect(view, TQT_SIGNAL(copyIncidenceSignal(Incidence *)), + mMainView, TQT_SLOT(copyIncidence(Incidence *))); + connect(view, TQT_SIGNAL(cutIncidenceSignal(Incidence *)), + mMainView, TQT_SLOT(cutIncidence(Incidence *))); + connect(view, TQT_SIGNAL(pasteIncidenceSignal()), + mMainView, TQT_SLOT(pasteIncidence())); + connect(view, TQT_SIGNAL(toggleAlarmSignal(Incidence *)), + mMainView, TQT_SLOT(toggleAlarm(Incidence *))); + connect(view,TQT_SIGNAL(dissociateOccurrenceSignal( Incidence *, const TQDate & )), + mMainView, TQT_SLOT(dissociateOccurrence( Incidence *, const TQDate & ))); + connect(view,TQT_SIGNAL(dissociateFutureOccurrenceSignal( Incidence *, const TQDate & )), + mMainView, TQT_SLOT(dissociateFutureOccurrence( Incidence *, const TQDate & ))); // signals to create new incidences - connect( view, SIGNAL( newEventSignal() ), - mMainView, SLOT( newEvent() ) ); - connect( view, SIGNAL( newEventSignal( const QDateTime & ) ), - mMainView, SLOT( newEvent( const QDateTime & ) ) ); - connect( view, SIGNAL( newEventSignal( const QDateTime &, const QDateTime & ) ), - mMainView, SLOT( newEvent( const QDateTime &, const QDateTime & ) ) ); - connect( view, SIGNAL( newEventSignal( const QDate & ) ), - mMainView, SLOT( newEvent( const QDate & ) ) ); - connect( view, SIGNAL( newTodoSignal( const QDate & ) ), - mMainView, SLOT( newTodo( const QDate & ) ) ); - connect( view, SIGNAL( newSubTodoSignal( Todo * ) ), - mMainView, SLOT( newSubTodo( Todo *) ) ); - connect( view, SIGNAL( newJournalSignal( const QDate & ) ), - mMainView, SLOT( newJournal( const QDate & ) ) ); + connect( view, TQT_SIGNAL( newEventSignal() ), + mMainView, TQT_SLOT( newEvent() ) ); + connect( view, TQT_SIGNAL( newEventSignal( const TQDateTime & ) ), + mMainView, TQT_SLOT( newEvent( const TQDateTime & ) ) ); + connect( view, TQT_SIGNAL( newEventSignal( const TQDateTime &, const TQDateTime & ) ), + mMainView, TQT_SLOT( newEvent( const TQDateTime &, const TQDateTime & ) ) ); + connect( view, TQT_SIGNAL( newEventSignal( const TQDate & ) ), + mMainView, TQT_SLOT( newEvent( const TQDate & ) ) ); + connect( view, TQT_SIGNAL( newTodoSignal( const TQDate & ) ), + mMainView, TQT_SLOT( newTodo( const TQDate & ) ) ); + connect( view, TQT_SIGNAL( newSubTodoSignal( Todo * ) ), + mMainView, TQT_SLOT( newSubTodo( Todo *) ) ); + connect( view, TQT_SIGNAL( newJournalSignal( const TQDate & ) ), + mMainView, TQT_SLOT( newJournal( const TQDate & ) ) ); // reload settings - connect(mMainView, SIGNAL(configChanged()), view, SLOT(updateConfig())); + connect(mMainView, TQT_SIGNAL(configChanged()), view, TQT_SLOT(updateConfig())); // Notifications about added, changed and deleted incidences - connect( mMainView, SIGNAL( dayPassed( const QDate & ) ), - view, SLOT( dayPassed( const QDate & ) ) ); - connect( view, SIGNAL( startMultiModify( const QString & ) ), - mMainView, SLOT( startMultiModify( const QString & ) ) ); - connect( view, SIGNAL( endMultiModify() ), - mMainView, SLOT( endMultiModify() ) ); - - connect( mMainView, SIGNAL( newIncidenceChanger( IncidenceChangerBase* ) ), - view, SLOT( setIncidenceChanger( IncidenceChangerBase * ) ) ); + connect( mMainView, TQT_SIGNAL( dayPassed( const TQDate & ) ), + view, TQT_SLOT( dayPassed( const TQDate & ) ) ); + connect( view, TQT_SIGNAL( startMultiModify( const TQString & ) ), + mMainView, TQT_SLOT( startMultiModify( const TQString & ) ) ); + connect( view, TQT_SIGNAL( endMultiModify() ), + mMainView, TQT_SLOT( endMultiModify() ) ); + + connect( mMainView, TQT_SIGNAL( newIncidenceChanger( IncidenceChangerBase* ) ), + view, TQT_SLOT( setIncidenceChanger( IncidenceChangerBase * ) ) ); view->setIncidenceChanger( mMainView->incidenceChanger() ); } @@ -230,12 +230,12 @@ void KOViewManager::connectTodoView( KOTodoView* todoView ) if (!todoView) return; // SIGNALS/SLOTS FOR TODO VIEW - connect( todoView, SIGNAL( purgeCompletedSignal() ), - mMainView, SLOT( purgeCompleted() ) ); - connect( todoView, SIGNAL( unSubTodoSignal() ), - mMainView, SLOT( todo_unsub() ) ); - connect( todoView, SIGNAL( unAllSubTodoSignal() ), - mMainView, SLOT( makeSubTodosIndependents() ) ); + connect( todoView, TQT_SIGNAL( purgeCompletedSignal() ), + mMainView, TQT_SLOT( purgeCompleted() ) ); + connect( todoView, TQT_SIGNAL( unSubTodoSignal() ), + mMainView, TQT_SLOT( todo_unsub() ) ); + connect( todoView, TQT_SIGNAL( unAllSubTodoSignal() ), + mMainView, TQT_SLOT( makeSubTodosIndependents() ) ); } void KOViewManager::zoomInHorizontally() @@ -290,11 +290,11 @@ void KOViewManager::showAgendaView() const bool showMerged = showBoth || KOPrefs::instance()->agendaViewCalendarDisplay() == KOPrefs::CalendarsMerged; const bool showSideBySide = showBoth || KOPrefs::instance()->agendaViewCalendarDisplay() == KOPrefs::CalendarsSideBySide; - QWidget *parent = mMainView->viewStack(); + TQWidget *parent = mMainView->viewStack(); if ( !mAgendaViewTabs && showBoth ) { - mAgendaViewTabs = new QTabWidget( mMainView->viewStack() ); - connect( mAgendaViewTabs, SIGNAL( currentChanged( QWidget* ) ), - this, SLOT( currentAgendaViewTabChanged( QWidget* ) ) ); + mAgendaViewTabs = new TQTabWidget( mMainView->viewStack() ); + connect( mAgendaViewTabs, TQT_SIGNAL( currentChanged( TQWidget* ) ), + this, TQT_SLOT( currentAgendaViewTabChanged( TQWidget* ) ) ); parent = mAgendaViewTabs; } @@ -303,13 +303,13 @@ void KOViewManager::showAgendaView() addView(mAgendaView); - connect(mAgendaView, SIGNAL( toggleExpand() ), - mMainView, SLOT( toggleExpand() ) ); - connect(mMainView, SIGNAL( calendarViewExpanded( bool ) ), - mAgendaView, SLOT( setExpandedButton( bool ) ) ); + connect(mAgendaView, TQT_SIGNAL( toggleExpand() ), + mMainView, TQT_SLOT( toggleExpand() ) ); + connect(mMainView, TQT_SIGNAL( calendarViewExpanded( bool ) ), + mAgendaView, TQT_SLOT( setExpandedButton( bool ) ) ); - connect( mAgendaView,SIGNAL( zoomViewHorizontally(const QDate &, int )), - mMainView->dateNavigator(),SLOT( selectDates( const QDate &, int ) ) ); + connect( mAgendaView,TQT_SIGNAL( zoomViewHorizontally(const TQDate &, int )), + mMainView->dateNavigator(),TQT_SLOT( selectDates( const TQDate &, int ) ) ); mAgendaView->readSettings(); } @@ -320,13 +320,13 @@ void KOViewManager::showAgendaView() addView(mAgendaSideBySideView); -/* connect(mAgendaSideBySideView, SIGNAL( toggleExpand() ), - mMainView, SLOT( toggleExpand() ) ); - connect(mMainView, SIGNAL( calendarViewExpanded( bool ) ), - mAgendaSideBySideView, SLOT( setExpandedButton( bool ) ) ); +/* connect(mAgendaSideBySideView, TQT_SIGNAL( toggleExpand() ), + mMainView, TQT_SLOT( toggleExpand() ) ); + connect(mMainView, TQT_SIGNAL( calendarViewExpanded( bool ) ), + mAgendaSideBySideView, TQT_SLOT( setExpandedButton( bool ) ) ); - connect( mAgendaSideBySideView,SIGNAL( zoomViewHorizontally(const QDate &, int )), - mMainView->dateNavigator(),SLOT( selectDates( const QDate &, int ) ) );*/ + connect( mAgendaSideBySideView,TQT_SIGNAL( zoomViewHorizontally(const TQDate &, int )), + mMainView->dateNavigator(),TQT_SLOT( selectDates( const TQDate &, int ) ) );*/ } if ( showBoth && mAgendaViewTabs ) { @@ -370,7 +370,7 @@ void KOViewManager::showWeekView() void KOViewManager::showNextXView() { showAgendaView(); - mMainView->dateNavigator()->selectDates( QDate::currentDate(), + mMainView->dateNavigator()->selectDates( TQDate::currentDate(), KOPrefs::instance()->mNextXDays ); } @@ -437,9 +437,9 @@ Incidence *KOViewManager::currentSelection() return incidenceList.first(); } -QDate KOViewManager::currentSelectionDate() +TQDate KOViewManager::currentSelectionDate() { - QDate qd; + TQDate qd; if (mCurrentView) { DateList qvl = mCurrentView->selectedDates(); if (!qvl.isEmpty()) qd = qvl.first(); @@ -447,13 +447,13 @@ QDate KOViewManager::currentSelectionDate() return qd; } -void KOViewManager::setDocumentId( const QString &id ) +void KOViewManager::setDocumentId( const TQString &id ) { if (mTodoView) mTodoView->setDocumentId( id ); } -QWidget* KOViewManager::widgetForView( KOrg::BaseView* view ) const +TQWidget* KOViewManager::widgetForView( KOrg::BaseView* view ) const { const bool showBoth = KOPrefs::instance()->agendaViewCalendarDisplay() == KOPrefs::AllCalendarViews; if ( (view == mAgendaView || view == mAgendaSideBySideView) && mAgendaViewTabs && showBoth ) { @@ -463,7 +463,7 @@ QWidget* KOViewManager::widgetForView( KOrg::BaseView* view ) const } -void KOViewManager::currentAgendaViewTabChanged( QWidget* widget ) +void KOViewManager::currentAgendaViewTabChanged( TQWidget* widget ) { showView( static_cast<KOrg::BaseView*>( widget ) ); } diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h index 4a401d189..58faf6369 100644 --- a/korganizer/koviewmanager.h +++ b/korganizer/koviewmanager.h @@ -25,7 +25,7 @@ #ifndef KOVIEWMANAGER_H #define KOVIEWMANAGER_H -#include <qobject.h> +#include <tqobject.h> class QWidget; class QTabWidget; @@ -69,10 +69,10 @@ class KOViewManager : public QObject KOrg::BaseView *currentView(); - void setDocumentId( const QString & ); + void setDocumentId( const TQString & ); void updateView(); - void updateView( const QDate &start, const QDate &end ); + void updateView( const TQDate &start, const TQDate &end ); void raiseCurrentView(); @@ -80,7 +80,7 @@ class KOViewManager : public QObject void addView( KOrg::BaseView * ); Incidence *currentSelection(); - QDate currentSelectionDate(); + TQDate currentSelectionDate(); KOAgendaView *agendaView() const { return mAgendaView; } KOrg::MultiAgendaView *multiAgendaView() const { return mAgendaSideBySideView; } @@ -111,9 +111,9 @@ class KOViewManager : public QObject void resourcesChanged(); private slots: - void currentAgendaViewTabChanged( QWidget* ); + void currentAgendaViewTabChanged( TQWidget* ); private: - QWidget* widgetForView( KOrg::BaseView* ) const; + TQWidget* widgetForView( KOrg::BaseView* ) const; CalendarView *mMainView; KOAgendaView *mAgendaView; @@ -128,7 +128,7 @@ class KOViewManager : public QObject KOrg::BaseView *mCurrentView; KOrg::BaseView *mLastEventView; - QTabWidget *mAgendaViewTabs; + TQTabWidget *mAgendaViewTabs; }; #endif diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp index d4b6618aa..351972199 100644 --- a/korganizer/kowhatsnextview.cpp +++ b/korganizer/kowhatsnextview.cpp @@ -22,11 +22,11 @@ without including the source code for Qt in the source distribution. */ -#include <qlayout.h> -#include <qtextbrowser.h> -#include <qtextcodec.h> -#include <qfileinfo.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqtextbrowser.h> +#include <tqtextcodec.h> +#include <tqfileinfo.h> +#include <tqlabel.h> #include <kglobal.h> #include <klocale.h> @@ -44,7 +44,7 @@ using namespace KOrg; -void WhatsNextTextBrowser::setSource(const QString& n) +void WhatsNextTextBrowser::setSource(const TQString& n) { kdDebug(5850) << "WhatsNextTextBrowser::setSource(): " << n << endl; @@ -55,23 +55,23 @@ void WhatsNextTextBrowser::setSource(const QString& n) emit showIncidence(n); return; } else { - QTextBrowser::setSource(n); + TQTextBrowser::setSource(n); } } -KOWhatsNextView::KOWhatsNextView(Calendar *calendar, QWidget *parent, +KOWhatsNextView::KOWhatsNextView(Calendar *calendar, TQWidget *parent, const char *name) : KOrg::BaseView(calendar, parent, name) { -// QLabel *dateLabel = -// new QLabel(KGlobal::locale()->formatDate(QDate::currentDate()),this); +// TQLabel *dateLabel = +// new TQLabel(KGlobal::locale()->formatDate(TQDate::currentDate()),this); // dateLabel->setMargin(2); // dateLabel->setAlignment(AlignCenter); mView = new WhatsNextTextBrowser(this); - connect(mView,SIGNAL(showIncidence(const QString &)),SLOT(showIncidence(const QString &))); + connect(mView,TQT_SIGNAL(showIncidence(const TQString &)),TQT_SLOT(showIncidence(const TQString &))); - QBoxLayout *topLayout = new QVBoxLayout(this); + TQBoxLayout *topLayout = new TQVBoxLayout(this); // topLayout->addWidget(dateLabel); topLayout->addWidget(mView); } @@ -88,7 +88,7 @@ int KOWhatsNextView::currentDateCount() void KOWhatsNextView::updateView() { KIconLoader kil("kdepim"); - QString *ipath = new QString(); + TQString *ipath = new TQString(); kil.loadIcon("kdepim",KIcon::NoGroup,32,KIcon::DefaultState,ipath); mText = "<table width=\"100%\">\n"; @@ -111,7 +111,7 @@ void KOWhatsNextView::updateView() mText+="</h2>\n"; Event::List events; - for ( QDate date = mStartDate; date <= mEndDate; date = date.addDays( 1 ) ) + for ( TQDate date = mStartDate; date <= mEndDate; date = date.addDays( 1 ) ) events += calendar()->events(date, EventSortStartDate, SortDirectionAscending); if (events.count() > 0) { @@ -133,9 +133,9 @@ void KOWhatsNextView::updateView() // given time span. Recurrence *recur = ev->recurrence(); int duration = ev->dtStart().secsTo( ev->dtEnd() ); - QDateTime start = recur->getPreviousDateTime( - QDateTime( mStartDate, QTime() ) ); - QDateTime end = start.addSecs( duration ); + TQDateTime start = recur->getPreviousDateTime( + TQDateTime( mStartDate, TQTime() ) ); + TQDateTime end = start.addSecs( duration ); if ( end.date() >= mStartDate ) { appendEvent( ev, start, end ); } @@ -180,9 +180,9 @@ void KOWhatsNextView::updateView() mText += "</ul>\n"; } - QStringList myEmails( KOPrefs::instance()->allEmails() ); + TQStringList myEmails( KOPrefs::instance()->allEmails() ); int replies = 0; - events = calendar()->events( QDate::currentDate(), QDate(2975,12,6) ); + events = calendar()->events( TQDate::currentDate(), TQDate(2975,12,6) ); Event::List::ConstIterator it2; for( it2 = events.begin(); it2 != events.end(); ++it2 ) { Event *ev = *it2; @@ -237,7 +237,7 @@ void KOWhatsNextView::updateView() mView->setText(mText); } -void KOWhatsNextView::showDates( const QDate &start, const QDate &end ) +void KOWhatsNextView::showDates( const TQDate &start, const TQDate &end ) { mStartDate = start; mEndDate = end; @@ -261,8 +261,8 @@ void KOWhatsNextView::changeIncidenceDisplay(Incidence *, int action) } } -void KOWhatsNextView::appendEvent( Incidence *ev, const QDateTime &start, - const QDateTime &end ) +void KOWhatsNextView::appendEvent( Incidence *ev, const TQDateTime &start, + const TQDateTime &end ) { kdDebug(5850) << "KOWhatsNextView::appendEvent(): " << ev->uid() << endl; @@ -270,10 +270,10 @@ void KOWhatsNextView::appendEvent( Incidence *ev, const QDateTime &start, // if (!ev->doesFloat()) { if (ev->type()=="Event") { Event *event = static_cast<Event *>(ev); - QDateTime starttime( start ); + TQDateTime starttime( start ); if ( !starttime.isValid() ) starttime = event->dtStart(); - QDateTime endtime( end ); + TQDateTime endtime( end ); if ( !endtime.isValid() ) endtime = starttime.addSecs( event->dtStart().secsTo( event->dtEnd() ) ); @@ -319,7 +319,7 @@ void KOWhatsNextView::appendTodo( Incidence *ev ) mText += "</li>\n"; } -void KOWhatsNextView::showIncidence( const QString &uid ) +void KOWhatsNextView::showIncidence( const TQString &uid ) { kdDebug(5850) << "KOWhatsNextView::showIncidence(): " << uid << endl; Incidence *incidence = 0; diff --git a/korganizer/kowhatsnextview.h b/korganizer/kowhatsnextview.h index 7632fd028..54daf616c 100644 --- a/korganizer/kowhatsnextview.h +++ b/korganizer/kowhatsnextview.h @@ -24,7 +24,7 @@ #ifndef KOWHATSNEXTVIEW_H #define KOWHATSNEXTVIEW_H -#include <qtextbrowser.h> +#include <tqtextbrowser.h> #include <korganizer/baseview.h> @@ -32,15 +32,15 @@ class QListView; class KOEventViewerDialog; -class WhatsNextTextBrowser : public QTextBrowser { +class WhatsNextTextBrowser : public TQTextBrowser { Q_OBJECT public: - WhatsNextTextBrowser(QWidget *parent) : QTextBrowser(parent) {} + WhatsNextTextBrowser(TQWidget *parent) : TQTextBrowser(parent) {} - void setSource(const QString &); + void setSource(const TQString &); signals: - void showIncidence(const QString &uid); + void showIncidence(const TQString &uid); }; @@ -51,7 +51,7 @@ class KOWhatsNextView : public KOrg::BaseView { Q_OBJECT public: - KOWhatsNextView(Calendar *calendar, QWidget *parent = 0, + KOWhatsNextView(Calendar *calendar, TQWidget *parent = 0, const char *name = 0); ~KOWhatsNextView(); @@ -61,24 +61,24 @@ class KOWhatsNextView : public KOrg::BaseView public slots: virtual void updateView(); - virtual void showDates(const QDate &start, const QDate &end); + virtual void showDates(const TQDate &start, const TQDate &end); virtual void showIncidences( const Incidence::List &incidenceList ); void changeIncidenceDisplay(Incidence *, int); protected: - void appendEvent( Incidence *, const QDateTime &start = QDateTime(), - const QDateTime &end = QDateTime() ); + void appendEvent( Incidence *, const TQDateTime &start = TQDateTime(), + const TQDateTime &end = TQDateTime() ); void appendTodo( Incidence * ); private slots: - void showIncidence(const QString &); + void showIncidence(const TQString &); private: - QTextBrowser *mView; - QString mText; - QDate mStartDate; - QDate mEndDate; + TQTextBrowser *mView; + TQString mText; + TQDate mStartDate; + TQDate mEndDate; Incidence::List mTodos; }; diff --git a/korganizer/kowindowlist.cpp b/korganizer/kowindowlist.cpp index 8af857cb4..ddb3d680a 100644 --- a/korganizer/kowindowlist.cpp +++ b/korganizer/kowindowlist.cpp @@ -29,7 +29,7 @@ #include "kowindowlist.moc" KOWindowList::KOWindowList( const char *name ) - : QObject( 0, name ), mDefaultWindow( 0 ) + : TQObject( 0, name ), mDefaultWindow( 0 ) { // kdDebug(5850) << "KOWindowList::KOWindowList()" << endl; } diff --git a/korganizer/kowindowlist.h b/korganizer/kowindowlist.h index b8fc3190f..97ce2d1f2 100644 --- a/korganizer/kowindowlist.h +++ b/korganizer/kowindowlist.h @@ -24,7 +24,7 @@ #ifndef KOWINDOWLIST_H #define KOWINDOWLIST_H -#include <qobject.h> +#include <tqobject.h> namespace KOrg { class MainWindow; @@ -78,7 +78,7 @@ class KOWindowList : public QObject void removeWindow( KOrg::MainWindow * ); private: - QPtrList<KOrg::MainWindow> mWindowList; // list of all existing KOrganizer instances + TQPtrList<KOrg::MainWindow> mWindowList; // list of all existing KOrganizer instances KOrg::MainWindow *mDefaultWindow; }; diff --git a/korganizer/mailscheduler.cpp b/korganizer/mailscheduler.cpp index bbd3daee5..0c0ddb966 100644 --- a/korganizer/mailscheduler.cpp +++ b/korganizer/mailscheduler.cpp @@ -22,9 +22,9 @@ without including the source code for Qt in the source distribution. */ -#include <qdir.h> -#include <qfile.h> -#include <qregexp.h> +#include <tqdir.h> +#include <tqfile.h> +#include <tqregexp.h> #include <klocale.h> #include <kstandarddirs.h> @@ -52,9 +52,9 @@ MailScheduler::~MailScheduler() } bool MailScheduler::publish( IncidenceBase *incidence, - const QString &recipients ) + const TQString &recipients ) { - QString messageText = mFormat->createScheduleMessage( incidence, + TQString messageText = mFormat->createScheduleMessage( incidence, Scheduler::Publish ); KOMailClient mailer; return mailer.mailTo( incidence, recipients, messageText ); @@ -62,9 +62,9 @@ bool MailScheduler::publish( IncidenceBase *incidence, bool MailScheduler::performTransaction( IncidenceBase *incidence, Method method, - const QString &recipients ) + const TQString &recipients ) { - QString messageText = mFormat->createScheduleMessage( incidence, method ); + TQString messageText = mFormat->createScheduleMessage( incidence, method ); KOMailClient mailer; return mailer.mailTo( incidence, recipients, messageText ); @@ -73,7 +73,7 @@ bool MailScheduler::performTransaction( IncidenceBase *incidence, bool MailScheduler::performTransaction( IncidenceBase *incidence, Method method ) { - QString messageText = mFormat->createScheduleMessage( incidence, method ); + TQString messageText = mFormat->createScheduleMessage( incidence, method ); KOMailClient mailer; bool status; @@ -83,7 +83,7 @@ bool MailScheduler::performTransaction( IncidenceBase *incidence, method == Declinecounter ) { status = mailer.mailAttendees( incidence, messageText ); } else { - QString subject; + TQString subject; Incidence *inc = dynamic_cast<Incidence*>( incidence ); if ( inc && method == Counter ) subject = i18n( "Counter proposal: %1" ).arg( inc->summary() ); @@ -92,23 +92,23 @@ bool MailScheduler::performTransaction( IncidenceBase *incidence, return status; } -QPtrList<ScheduleMessage> MailScheduler::retrieveTransactions() +TQPtrList<ScheduleMessage> MailScheduler::retrieveTransactions() { - QString incomingDirName = locateLocal( "data", "korganizer/income" ); + TQString incomingDirName = locateLocal( "data", "korganizer/income" ); kdDebug(5850) << "MailScheduler::retrieveTransactions: dir: " << incomingDirName << endl; - QPtrList<ScheduleMessage> messageList; + TQPtrList<ScheduleMessage> messageList; - QDir incomingDir( incomingDirName ); - QStringList incoming = incomingDir.entryList( QDir::Files ); - QStringList::ConstIterator it; + TQDir incomingDir( incomingDirName ); + TQStringList incoming = incomingDir.entryList( TQDir::Files ); + TQStringList::ConstIterator it; for( it = incoming.begin(); it != incoming.end(); ++it ) { kdDebug(5850) << "-- File: " << (*it) << endl; - QFile f( incomingDirName + "/" + (*it) ); + TQFile f( incomingDirName + "/" + (*it) ); bool inserted = false; - QMap<IncidenceBase*, QString>::Iterator iter; + TQMap<IncidenceBase*, TQString>::Iterator iter; for ( iter = mEventMap.begin(); iter != mEventMap.end(); ++iter ) { if ( iter.data() == incomingDirName + "/" + (*it) ) inserted = true; @@ -119,11 +119,11 @@ QPtrList<ScheduleMessage> MailScheduler::retrieveTransactions() << "MailScheduler::retrieveTransactions(): Can't open file'" << (*it) << "'" << endl; } else { - QTextStream t( &f ); - t.setEncoding( QTextStream::Latin1 ); - QString messageString = t.read(); - messageString.replace( QRegExp( "\n[ \t]"), "" ); - messageString = QString::fromUtf8( messageString.latin1() ); + TQTextStream t( &f ); + t.setEncoding( TQTextStream::Latin1 ); + TQString messageString = t.read(); + messageString.replace( TQRegExp( "\n[ \t]"), "" ); + messageString = TQString::fromUtf8( messageString.latin1() ); ScheduleMessage *mess = mFormat->parseScheduleMessage( mCalendar, messageString ); if ( mess) { @@ -133,7 +133,7 @@ QPtrList<ScheduleMessage> MailScheduler::retrieveTransactions() messageList.append( mess ); mEventMap[ mess->event() ] = incomingDirName + "/" + (*it); } else { - QString errorMessage; + TQString errorMessage; if ( mFormat->exception() ) { errorMessage = mFormat->exception()->message(); } @@ -151,7 +151,7 @@ QPtrList<ScheduleMessage> MailScheduler::retrieveTransactions() bool MailScheduler::deleteTransaction( IncidenceBase *incidence ) { bool status; - QFile f( mEventMap[incidence] ); + TQFile f( mEventMap[incidence] ); mEventMap.remove( incidence ); if ( !f.exists() ) { status = false; @@ -161,7 +161,7 @@ bool MailScheduler::deleteTransaction( IncidenceBase *incidence ) return status; } -QString MailScheduler::freeBusyDir() +TQString MailScheduler::freeBusyDir() { return locateLocal( "data", "korganizer/freebusy" ); } diff --git a/korganizer/mailscheduler.h b/korganizer/mailscheduler.h index 50a60dcff..7553ee74d 100644 --- a/korganizer/mailscheduler.h +++ b/korganizer/mailscheduler.h @@ -24,9 +24,9 @@ #ifndef MAILSCHEDULER_H #define MAILSCHEDULER_H -#include <qptrlist.h> -#include <qmap.h> -#include <qstring.h> +#include <tqptrlist.h> +#include <tqmap.h> +#include <tqstring.h> #include <libkcal/imipscheduler.h> @@ -42,22 +42,22 @@ class MailScheduler : public IMIPScheduler MailScheduler( Calendar * ); virtual ~MailScheduler(); - bool publish ( IncidenceBase *incidence, const QString &recipients ); + bool publish ( IncidenceBase *incidence, const TQString &recipients ); bool performTransaction( IncidenceBase *incidence, Method method ); bool performTransaction( IncidenceBase *incidence, Method method, - const QString &recipients ); - QPtrList<ScheduleMessage> retrieveTransactions(); + const TQString &recipients ); + TQPtrList<ScheduleMessage> retrieveTransactions(); bool deleteTransaction( IncidenceBase *incidence ); /** Returns the directory where the free-busy information is stored */ - virtual QString freeBusyDir(); + virtual TQString freeBusyDir(); /** Accepts a counter proposal */ bool acceptCounterProposal( Incidence *incidence ); private: - QMap<IncidenceBase *, QString> mEventMap; + TQMap<IncidenceBase *, TQString> mEventMap; }; } diff --git a/korganizer/multiagendaview.cpp b/korganizer/multiagendaview.cpp index e2a7281e8..fb5cd6255 100644 --- a/korganizer/multiagendaview.cpp +++ b/korganizer/multiagendaview.cpp @@ -27,68 +27,68 @@ #include <kglobalsettings.h> -#include <qlayout.h> -#include <qvbox.h> -#include <qobjectlist.h> +#include <tqlayout.h> +#include <tqvbox.h> +#include <tqobjectlist.h> #define FOREACH_VIEW(av) \ -for(QValueList<KOAgendaView*>::ConstIterator it = mAgendaViews.constBegin(); \ +for(TQValueList<KOAgendaView*>::ConstIterator it = mAgendaViews.constBegin(); \ it != mAgendaViews.constEnd();) \ for(KOAgendaView* av = (it != mAgendaViews.constEnd() ? (*it) : 0); \ it != mAgendaViews.constEnd(); ++it, av = (*it) ) using namespace KOrg; -MultiAgendaView::MultiAgendaView(Calendar * cal, QWidget * parent, const char *name ) : +MultiAgendaView::MultiAgendaView(Calendar * cal, TQWidget * parent, const char *name ) : AgendaView( cal, parent, name ), mLastMovedSplitter( 0 ), mUpdateOnShow( false ), mPendingChanges( true ) { - QBoxLayout *topLevelLayout = new QHBoxLayout( this ); + TQBoxLayout *topLevelLayout = new TQHBoxLayout( this ); - QFontMetrics fm( font() ); + TQFontMetrics fm( font() ); int topLabelHeight = 2 * fm.height(); - QVBox *topSideBox = new QVBox( this ); - QWidget *topSideSpacer = new QWidget( topSideBox ); + TQVBox *topSideBox = new TQVBox( this ); + TQWidget *topSideSpacer = new TQWidget( topSideBox ); topSideSpacer->setFixedHeight( topLabelHeight ); - mLeftSplitter = new QSplitter( Qt::Vertical, topSideBox ); + mLeftSplitter = new TQSplitter( Qt::Vertical, topSideBox ); mLeftSplitter->setOpaqueResize( KGlobalSettings::opaqueResize() ); - QLabel *label = new QLabel( i18n("All Day"), mLeftSplitter ); + TQLabel *label = new TQLabel( i18n("All Day"), mLeftSplitter ); label->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::WordBreak ); - QVBox *sideBox = new QVBox( mLeftSplitter ); + TQVBox *sideBox = new TQVBox( mLeftSplitter ); EventIndicator *eiSpacer = new EventIndicator( EventIndicator::Top, sideBox ); eiSpacer->changeColumns( 0 ); mTimeLabels = new TimeLabels( 24, sideBox ); eiSpacer = new EventIndicator( EventIndicator::Bottom, sideBox ); eiSpacer->changeColumns( 0 ); - mLeftBottomSpacer = new QWidget( topSideBox ); + mLeftBottomSpacer = new TQWidget( topSideBox ); topLevelLayout->addWidget( topSideBox ); - mScrollView = new QScrollView( this ); - mScrollView->setResizePolicy( QScrollView::Manual ); - mScrollView->setVScrollBarMode( QScrollView::AlwaysOff ); - mScrollView->setFrameShape( QFrame::NoFrame ); + mScrollView = new TQScrollView( this ); + mScrollView->setResizePolicy( TQScrollView::Manual ); + mScrollView->setVScrollBarMode( TQScrollView::AlwaysOff ); + mScrollView->setFrameShape( TQFrame::NoFrame ); topLevelLayout->addWidget( mScrollView, 100 ); - mTopBox = new QHBox( mScrollView->viewport() ); + mTopBox = new TQHBox( mScrollView->viewport() ); mScrollView->addChild( mTopBox ); - topSideBox = new QVBox( this ); - topSideSpacer = new QWidget( topSideBox ); + topSideBox = new TQVBox( this ); + topSideSpacer = new TQWidget( topSideBox ); topSideSpacer->setFixedHeight( topLabelHeight ); - mRightSplitter = new QSplitter( Qt::Vertical, topSideBox ); + mRightSplitter = new TQSplitter( Qt::Vertical, topSideBox ); mRightSplitter->setOpaqueResize( KGlobalSettings::opaqueResize() ); - new QWidget( mRightSplitter ); - sideBox = new QVBox( mRightSplitter ); + new TQWidget( mRightSplitter ); + sideBox = new TQVBox( mRightSplitter ); eiSpacer = new EventIndicator( EventIndicator::Top, sideBox ); eiSpacer->setFixedHeight( eiSpacer->minimumHeight() ); eiSpacer->changeColumns( 0 ); - mScrollBar = new QScrollBar( Qt::Vertical, sideBox ); + mScrollBar = new TQScrollBar( Qt::Vertical, sideBox ); eiSpacer = new EventIndicator( EventIndicator::Bottom, sideBox ); eiSpacer->setFixedHeight( eiSpacer->minimumHeight() ); eiSpacer->changeColumns( 0 ); - mRightBottomSpacer = new QWidget( topSideBox ); + mRightBottomSpacer = new TQWidget( topSideBox ); topLevelLayout->addWidget( topSideBox ); recreateViews(); @@ -113,9 +113,9 @@ void MultiAgendaView::recreateViews() CalendarResourceManager *manager = calres->resourceManager(); for ( CalendarResourceManager::ActiveIterator it = manager->activeBegin(); it != manager->activeEnd(); ++it ) { if ( (*it)->canHaveSubresources() ) { - QStringList subResources = (*it)->subresources(); - for ( QStringList::ConstIterator subit = subResources.constBegin(); subit != subResources.constEnd(); ++subit ) { - QString type = (*it)->subresourceType( *subit ); + TQStringList subResources = (*it)->subresources(); + for ( TQStringList::ConstIterator subit = subResources.constBegin(); subit != subResources.constEnd(); ++subit ) { + TQString type = (*it)->subresourceType( *subit ); if ( !(*it)->subresourceActive( *subit ) || (!type.isEmpty() && type != "event") ) continue; addView( (*it)->labelForSubresource( *subit ), *it, *subit ); @@ -131,19 +131,19 @@ void MultiAgendaView::recreateViews() return; setupViews(); - QTimer::singleShot( 0, this, SLOT(slotResizeScrollView()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(slotResizeScrollView()) ); mTimeLabels->updateConfig(); - QScrollBar *scrollBar = mAgendaViews.first()->agenda()->verticalScrollBar(); + TQScrollBar *scrollBar = mAgendaViews.first()->agenda()->verticalScrollBar(); mScrollBar->setMinValue( scrollBar->minValue() ); mScrollBar->setMaxValue( scrollBar->maxValue() ); mScrollBar->setLineStep( scrollBar->lineStep() ); mScrollBar->setPageStep( scrollBar->pageStep() ); mScrollBar->setValue( scrollBar->value() ); - connect( mTimeLabels->verticalScrollBar(), SIGNAL(valueChanged(int)), - mScrollBar, SLOT(setValue(int)) ); - connect( mScrollBar, SIGNAL(valueChanged(int)), - mTimeLabels, SLOT(positionChanged(int)) ); + connect( mTimeLabels->verticalScrollBar(), TQT_SIGNAL(valueChanged(int)), + mScrollBar, TQT_SLOT(setValue(int)) ); + connect( mScrollBar, TQT_SIGNAL(valueChanged(int)), + mTimeLabels, TQT_SLOT(positionChanged(int)) ); installSplitterEventFilter( mLeftSplitter ); installSplitterEventFilter( mRightSplitter ); @@ -152,7 +152,7 @@ void MultiAgendaView::recreateViews() void MultiAgendaView::deleteViews() { - for ( QValueList<QWidget*>::ConstIterator it = mAgendaWidgets.constBegin(); + for ( TQValueList<TQWidget*>::ConstIterator it = mAgendaWidgets.constBegin(); it != mAgendaWidgets.constEnd(); ++it ) { delete *it; } @@ -164,53 +164,53 @@ void MultiAgendaView::deleteViews() void MultiAgendaView::setupViews() { FOREACH_VIEW( agenda ) { - connect( agenda, SIGNAL( newEventSignal() ), - SIGNAL( newEventSignal() ) ); - connect( agenda, SIGNAL( editIncidenceSignal( Incidence * ) ), - SIGNAL( editIncidenceSignal( Incidence * ) ) ); - connect( agenda, SIGNAL( showIncidenceSignal( Incidence * ) ), - SIGNAL( showIncidenceSignal( Incidence * ) ) ); - connect( agenda, SIGNAL( deleteIncidenceSignal( Incidence * ) ), - SIGNAL( deleteIncidenceSignal( Incidence * ) ) ); - connect( agenda, SIGNAL( startMultiModify( const QString & ) ), - SIGNAL( startMultiModify( const QString & ) ) ); - connect( agenda, SIGNAL( endMultiModify() ), - SIGNAL( endMultiModify() ) ); - - connect( agenda, SIGNAL( incidenceSelected( Incidence * ) ), - SIGNAL( incidenceSelected( Incidence * ) ) ); - - connect( agenda, SIGNAL(cutIncidenceSignal(Incidence*)), - SIGNAL(cutIncidenceSignal(Incidence*)) ); - connect( agenda, SIGNAL(copyIncidenceSignal(Incidence*)), - SIGNAL(copyIncidenceSignal(Incidence*)) ); - connect( agenda, SIGNAL(pasteIncidenceSignal()), - SIGNAL(pasteIncidenceSignal()) ); - connect( agenda, SIGNAL(toggleAlarmSignal(Incidence*)), - SIGNAL(toggleAlarmSignal(Incidence*)) ); - connect( agenda, SIGNAL(dissociateOccurrenceSignal(Incidence*, const QDate&)), - SIGNAL(dissociateOccurrenceSignal(Incidence*, const QDate&)) ); - connect( agenda, SIGNAL(dissociateFutureOccurrenceSignal(Incidence*, const QDate&)), - SIGNAL(dissociateFutureOccurrenceSignal(Incidence*, const QDate&)) ); - - connect( agenda, SIGNAL(newEventSignal(const QDate&)), - SIGNAL(newEventSignal(const QDate&)) ); - connect( agenda, SIGNAL(newEventSignal(const QDateTime&)), - SIGNAL(newEventSignal(const QDateTime&)) ); - connect( agenda, SIGNAL(newEventSignal(const QDateTime&, const QDateTime&)), - SIGNAL(newEventSignal(const QDateTime&, const QDateTime&)) ); - connect( agenda, SIGNAL(newTodoSignal(const QDate&)), - SIGNAL(newTodoSignal(const QDate&)) ); - - connect( agenda, SIGNAL(incidenceSelected(Incidence*)), - SLOT(slotSelectionChanged()) ); - - connect( agenda, SIGNAL(timeSpanSelectionChanged()), - SLOT(slotClearTimeSpanSelection()) ); - - disconnect( agenda->agenda(), SIGNAL(zoomView(const int,const QPoint&,const Qt::Orientation)), agenda, 0 ); - connect( agenda->agenda(), SIGNAL(zoomView(const int,const QPoint&,const Qt::Orientation)), - SLOT(zoomView(const int,const QPoint&,const Qt::Orientation)) ); + connect( agenda, TQT_SIGNAL( newEventSignal() ), + TQT_SIGNAL( newEventSignal() ) ); + connect( agenda, TQT_SIGNAL( editIncidenceSignal( Incidence * ) ), + TQT_SIGNAL( editIncidenceSignal( Incidence * ) ) ); + connect( agenda, TQT_SIGNAL( showIncidenceSignal( Incidence * ) ), + TQT_SIGNAL( showIncidenceSignal( Incidence * ) ) ); + connect( agenda, TQT_SIGNAL( deleteIncidenceSignal( Incidence * ) ), + TQT_SIGNAL( deleteIncidenceSignal( Incidence * ) ) ); + connect( agenda, TQT_SIGNAL( startMultiModify( const TQString & ) ), + TQT_SIGNAL( startMultiModify( const TQString & ) ) ); + connect( agenda, TQT_SIGNAL( endMultiModify() ), + TQT_SIGNAL( endMultiModify() ) ); + + connect( agenda, TQT_SIGNAL( incidenceSelected( Incidence * ) ), + TQT_SIGNAL( incidenceSelected( Incidence * ) ) ); + + connect( agenda, TQT_SIGNAL(cutIncidenceSignal(Incidence*)), + TQT_SIGNAL(cutIncidenceSignal(Incidence*)) ); + connect( agenda, TQT_SIGNAL(copyIncidenceSignal(Incidence*)), + TQT_SIGNAL(copyIncidenceSignal(Incidence*)) ); + connect( agenda, TQT_SIGNAL(pasteIncidenceSignal()), + TQT_SIGNAL(pasteIncidenceSignal()) ); + connect( agenda, TQT_SIGNAL(toggleAlarmSignal(Incidence*)), + TQT_SIGNAL(toggleAlarmSignal(Incidence*)) ); + connect( agenda, TQT_SIGNAL(dissociateOccurrenceSignal(Incidence*, const TQDate&)), + TQT_SIGNAL(dissociateOccurrenceSignal(Incidence*, const TQDate&)) ); + connect( agenda, TQT_SIGNAL(dissociateFutureOccurrenceSignal(Incidence*, const TQDate&)), + TQT_SIGNAL(dissociateFutureOccurrenceSignal(Incidence*, const TQDate&)) ); + + connect( agenda, TQT_SIGNAL(newEventSignal(const TQDate&)), + TQT_SIGNAL(newEventSignal(const TQDate&)) ); + connect( agenda, TQT_SIGNAL(newEventSignal(const TQDateTime&)), + TQT_SIGNAL(newEventSignal(const TQDateTime&)) ); + connect( agenda, TQT_SIGNAL(newEventSignal(const TQDateTime&, const TQDateTime&)), + TQT_SIGNAL(newEventSignal(const TQDateTime&, const TQDateTime&)) ); + connect( agenda, TQT_SIGNAL(newTodoSignal(const TQDate&)), + TQT_SIGNAL(newTodoSignal(const TQDate&)) ); + + connect( agenda, TQT_SIGNAL(incidenceSelected(Incidence*)), + TQT_SLOT(slotSelectionChanged()) ); + + connect( agenda, TQT_SIGNAL(timeSpanSelectionChanged()), + TQT_SLOT(slotClearTimeSpanSelection()) ); + + disconnect( agenda->agenda(), TQT_SIGNAL(zoomView(const int,const TQPoint&,const Qt::Orientation)), agenda, 0 ); + connect( agenda->agenda(), TQT_SIGNAL(zoomView(const int,const TQPoint&,const Qt::Orientation)), + TQT_SLOT(zoomView(const int,const TQPoint&,const Qt::Orientation)) ); } FOREACH_VIEW( agenda ) { @@ -218,9 +218,9 @@ void MultiAgendaView::setupViews() } int minWidth = 0; - for ( QValueList<QWidget*>::ConstIterator it = mAgendaWidgets.constBegin(); it != mAgendaWidgets.constEnd(); ++it ) + for ( TQValueList<TQWidget*>::ConstIterator it = mAgendaWidgets.constBegin(); it != mAgendaWidgets.constEnd(); ++it ) minWidth = QMAX( minWidth, (*it)->minimumSizeHint().width() ); - for ( QValueList<QWidget*>::ConstIterator it = mAgendaWidgets.constBegin(); it != mAgendaWidgets.constEnd(); ++it ) + for ( TQValueList<TQWidget*>::ConstIterator it = mAgendaWidgets.constBegin(); it != mAgendaWidgets.constEnd(); ++it ) (*it)->setMinimumWidth( minWidth ); } @@ -253,7 +253,7 @@ int MultiAgendaView::currentDateCount() return 0; } -void MultiAgendaView::showDates(const QDate & start, const QDate & end) +void MultiAgendaView::showDates(const TQDate & start, const TQDate & end) { mStartDate = start; mEndDate = end; @@ -296,7 +296,7 @@ void MultiAgendaView::slotSelectionChanged() } } -bool MultiAgendaView::eventDurationHint(QDateTime & startDt, QDateTime & endDt, bool & allDay) +bool MultiAgendaView::eventDurationHint(TQDateTime & startDt, TQDateTime & endDt, bool & allDay) { FOREACH_VIEW( agenda ) { bool valid = agenda->eventDurationHint( startDt, endDt, allDay ); @@ -314,7 +314,7 @@ void MultiAgendaView::slotClearTimeSpanSelection() } } -void MultiAgendaView::setTypeAheadReceiver(QObject * o) +void MultiAgendaView::setTypeAheadReceiver(TQObject * o) { FOREACH_VIEW( agenda ) agenda->setTypeAheadReceiver( o ); @@ -326,35 +326,35 @@ void MultiAgendaView::finishTypeAhead() agenda->finishTypeAhead(); } -void MultiAgendaView::addView( const QString &label, KCal::ResourceCalendar * res, const QString & subRes ) +void MultiAgendaView::addView( const TQString &label, KCal::ResourceCalendar * res, const TQString & subRes ) { - QVBox *box = new QVBox( mTopBox ); - QLabel *l = new QLabel( label, box ); + TQVBox *box = new TQVBox( mTopBox ); + TQLabel *l = new TQLabel( label, box ); l->setAlignment( AlignVCenter | AlignHCenter ); KOAgendaView* av = new KOAgendaView( calendar(), box, 0, true ); av->setResource( res, subRes ); av->setIncidenceChanger( mChanger ); - av->agenda()->setVScrollBarMode( QScrollView::AlwaysOff ); + av->agenda()->setVScrollBarMode( TQScrollView::AlwaysOff ); mAgendaViews.append( av ); mAgendaWidgets.append( box ); box->show(); mTimeLabels->setAgenda( av->agenda() ); - connect( av->agenda()->verticalScrollBar(), SIGNAL(valueChanged(int)), - mTimeLabels, SLOT(positionChanged(int)) ); - connect( mTimeLabels->verticalScrollBar(), SIGNAL(valueChanged(int)), - av, SLOT(setContentsPos(int)) ); + connect( av->agenda()->verticalScrollBar(), TQT_SIGNAL(valueChanged(int)), + mTimeLabels, TQT_SLOT(positionChanged(int)) ); + connect( mTimeLabels->verticalScrollBar(), TQT_SIGNAL(valueChanged(int)), + av, TQT_SLOT(setContentsPos(int)) ); installSplitterEventFilter( av->splitter() ); } -void MultiAgendaView::resizeEvent(QResizeEvent * ev) +void MultiAgendaView::resizeEvent(TQResizeEvent * ev) { resizeScrollView( ev->size() ); AgendaView::resizeEvent( ev ); } -void MultiAgendaView::resizeScrollView(const QSize & size) +void MultiAgendaView::resizeScrollView(const TQSize & size) { const int widgetWidth = size.width() - mTimeLabels->width() - mScrollBar->width(); int width = QMAX( mTopBox->sizeHint().width(), widgetWidth ); @@ -387,12 +387,12 @@ void MultiAgendaView::updateConfig() agenda->updateConfig(); } -// KDE4: not needed anymore, QSplitter has a moved signal there -bool MultiAgendaView::eventFilter(QObject * obj, QEvent * event) +// KDE4: not needed anymore, TQSplitter has a moved signal there +bool MultiAgendaView::eventFilter(TQObject * obj, TQEvent * event) { - if ( obj->className() == QCString("QSplitterHandle") ) { - if ( (event->type() == QEvent::MouseMove && KGlobalSettings::opaqueResize()) - || event->type() == QEvent::MouseButtonRelease ) { + if ( obj->className() == TQCString("QSplitterHandle") ) { + if ( (event->type() == TQEvent::MouseMove && KGlobalSettings::opaqueResize()) + || event->type() == TQEvent::MouseButtonRelease ) { FOREACH_VIEW( agenda ) { if ( agenda->splitter() == obj->parent() ) mLastMovedSplitter = agenda->splitter(); @@ -401,7 +401,7 @@ bool MultiAgendaView::eventFilter(QObject * obj, QEvent * event) mLastMovedSplitter = mLeftSplitter; else if ( mRightSplitter == obj->parent() ) mLastMovedSplitter = mRightSplitter; - QTimer::singleShot( 0, this, SLOT(resizeSplitters()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(resizeSplitters()) ); } } return AgendaView::eventFilter( obj, event ); @@ -422,7 +422,7 @@ void MultiAgendaView::resizeSplitters() mRightSplitter->setSizes( mLastMovedSplitter->sizes() ); } -void MultiAgendaView::zoomView( const int delta, const QPoint & pos, const Qt::Orientation ori ) +void MultiAgendaView::zoomView( const int delta, const TQPoint & pos, const Qt::Orientation ori ) { if ( ori == Qt::Vertical ) { if ( delta > 0 ) { @@ -441,16 +441,16 @@ void MultiAgendaView::zoomView( const int delta, const QPoint & pos, const Qt::O mTimeLabels->repaint(); } -// KDE4: not needed, use existing QSplitter signals instead -void MultiAgendaView::installSplitterEventFilter(QSplitter * splitter) +// KDE4: not needed, use existing TQSplitter signals instead +void MultiAgendaView::installSplitterEventFilter(TQSplitter * splitter) { - QObjectList *objlist = splitter->queryList( "QSplitterHandle" ); + TQObjectList *objlist = splitter->queryList( "QSplitterHandle" ); // HACK: when not being visible, the splitter handle is sometimes not found // for unknown reasons, so trigger an update when we are shown again if ( objlist->count() == 0 && !isVisible() ) mUpdateOnShow = true; - QObjectListIt it( *objlist ); - QObject *obj; + TQObjectListIt it( *objlist ); + TQObject *obj; while ( (obj = it.current()) != 0 ) { obj->removeEventFilter( this ); obj->installEventFilter( this ); diff --git a/korganizer/multiagendaview.h b/korganizer/multiagendaview.h index 8145dd66b..01b74ce74 100644 --- a/korganizer/multiagendaview.h +++ b/korganizer/multiagendaview.h @@ -41,7 +41,7 @@ class MultiAgendaView : public AgendaView { Q_OBJECT public: - explicit MultiAgendaView( Calendar* cal, QWidget *parent = 0, const char *name = 0 ); + explicit MultiAgendaView( Calendar* cal, TQWidget *parent = 0, const char *name = 0 ); ~MultiAgendaView(); Incidence::List selectedIncidences(); @@ -49,12 +49,12 @@ class MultiAgendaView : public AgendaView int currentDateCount(); int maxDatesHint(); - bool eventDurationHint(QDateTime &startDt, QDateTime &endDt, bool &allDay); + bool eventDurationHint(TQDateTime &startDt, TQDateTime &endDt, bool &allDay); - void setTypeAheadReceiver( QObject *o ); + void setTypeAheadReceiver( TQObject *o ); public slots: - void showDates( const QDate &start, const QDate &end ); + void showDates( const TQDate &start, const TQDate &end ); void showIncidences( const Incidence::List &incidenceList ); void updateView(); void changeIncidenceDisplay( Incidence *incidence, int mode ); @@ -69,35 +69,35 @@ class MultiAgendaView : public AgendaView void resourcesChanged(); protected: - void resizeEvent( QResizeEvent *ev ); - bool eventFilter( QObject *obj, QEvent *event ); + void resizeEvent( TQResizeEvent *ev ); + bool eventFilter( TQObject *obj, TQEvent *event ); private: - void addView( const QString &label, KCal::ResourceCalendar *res, const QString &subRes = QString::null ); + void addView( const TQString &label, KCal::ResourceCalendar *res, const TQString &subRes = TQString::null ); void deleteViews(); void recreateViews(); void setupViews(); - void resizeScrollView( const QSize &size ); - void installSplitterEventFilter( QSplitter *splitter ); + void resizeScrollView( const TQSize &size ); + void installSplitterEventFilter( TQSplitter *splitter ); private slots: void slotSelectionChanged(); void slotClearTimeSpanSelection(); void resizeSplitters(); - void zoomView( const int delta, const QPoint &pos, const Qt::Orientation ori ); + void zoomView( const int delta, const TQPoint &pos, const Qt::Orientation ori ); void slotResizeScrollView(); private: - QValueList<KOAgendaView*> mAgendaViews; - QValueList<QWidget*> mAgendaWidgets; - QHBox *mTopBox; - QScrollView *mScrollView; + TQValueList<KOAgendaView*> mAgendaViews; + TQValueList<TQWidget*> mAgendaWidgets; + TQHBox *mTopBox; + TQScrollView *mScrollView; TimeLabels *mTimeLabels; - QSplitter *mLeftSplitter, *mRightSplitter; - QSplitter *mLastMovedSplitter; - QScrollBar *mScrollBar; - QWidget *mLeftBottomSpacer, *mRightBottomSpacer; - QDate mStartDate, mEndDate; + TQSplitter *mLeftSplitter, *mRightSplitter; + TQSplitter *mLastMovedSplitter; + TQScrollBar *mScrollBar; + TQWidget *mLeftBottomSpacer, *mRightBottomSpacer; + TQDate mStartDate, mEndDate; bool mUpdateOnShow; bool mPendingChanges; }; diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp index dd7b45ea6..0ece74c57 100644 --- a/korganizer/navigatorbar.cpp +++ b/korganizer/navigatorbar.cpp @@ -22,13 +22,13 @@ without including the source code for Qt in the source distribution. */ -#include <qstring.h> -#include <qtooltip.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qframe.h> -#include <qpopupmenu.h> -#include <qlabel.h> +#include <tqstring.h> +#include <tqtooltip.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqframe.h> +#include <tqpopupmenu.h> +#include <tqlabel.h> #include <kdebug.h> #include <klocale.h> @@ -42,73 +42,73 @@ #include "navigatorbar.h" -ActiveLabel::ActiveLabel( QWidget *parent, const char *name ) - : QLabel( parent, name ) +ActiveLabel::ActiveLabel( TQWidget *parent, const char *name ) + : TQLabel( parent, name ) { } -void ActiveLabel::mouseReleaseEvent( QMouseEvent * ) +void ActiveLabel::mouseReleaseEvent( TQMouseEvent * ) { emit clicked(); } -NavigatorBar::NavigatorBar( QWidget *parent, const char *name ) - : QWidget( parent, name ), mHasMinWidth( false ) +NavigatorBar::NavigatorBar( TQWidget *parent, const char *name ) + : TQWidget( parent, name ), mHasMinWidth( false ) { - QFont tfont = font(); + TQFont tfont = font(); tfont.setPointSize( 10 ); tfont.setBold( false ); bool isRTL = KOGlobals::self()->reverseLayout(); - QPixmap pix; + TQPixmap pix; // Create backward navigation buttons - mPrevYear = new QPushButton( this ); + mPrevYear = new TQPushButton( this ); pix = KOGlobals::self()->smallIcon( isRTL ? "2rightarrow" : "2leftarrow" ); mPrevYear->setPixmap( pix ); - mPrevYear->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); - QToolTip::add( mPrevYear, i18n("Previous year") ); + mPrevYear->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ); + TQToolTip::add( mPrevYear, i18n("Previous year") ); pix = KOGlobals::self()->smallIcon( isRTL ? "1rightarrow" : "1leftarrow"); - mPrevMonth = new QPushButton( this ); + mPrevMonth = new TQPushButton( this ); mPrevMonth->setPixmap( pix ); - mPrevMonth->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); - QToolTip::add( mPrevMonth, i18n("Previous month") ); + mPrevMonth->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ); + TQToolTip::add( mPrevMonth, i18n("Previous month") ); // Create forward navigation buttons pix = KOGlobals::self()->smallIcon( isRTL ? "1leftarrow" : "1rightarrow"); - mNextMonth = new QPushButton( this ); + mNextMonth = new TQPushButton( this ); mNextMonth->setPixmap( pix ); - mNextMonth->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); - QToolTip::add( mNextMonth, i18n("Next month") ); + mNextMonth->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ); + TQToolTip::add( mNextMonth, i18n("Next month") ); pix = KOGlobals::self()->smallIcon( isRTL ? "2leftarrow" : "2rightarrow"); - mNextYear = new QPushButton( this ); + mNextYear = new TQPushButton( this ); mNextYear->setPixmap( pix ); - mNextYear->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); - QToolTip::add( mNextYear, i18n("Next year") ); + mNextYear->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ); + TQToolTip::add( mNextYear, i18n("Next year") ); // Create month name button mMonth = new ActiveLabel( this ); mMonth->setFont( tfont ); mMonth->setAlignment( AlignCenter ); mMonth->setMinimumHeight( mPrevYear->sizeHint().height() ); - QToolTip::add( mMonth, i18n("Select a month") ); + TQToolTip::add( mMonth, i18n("Select a month") ); // set up control frame layout - QBoxLayout *ctrlLayout = new QHBoxLayout( this, 0, 4 ); + TQBoxLayout *ctrlLayout = new TQHBoxLayout( this, 0, 4 ); ctrlLayout->addWidget( mPrevYear, 3 ); ctrlLayout->addWidget( mPrevMonth, 3 ); ctrlLayout->addWidget( mMonth, 3 ); ctrlLayout->addWidget( mNextMonth, 3 ); ctrlLayout->addWidget( mNextYear, 3 ); - connect( mPrevYear, SIGNAL( clicked() ), SIGNAL( goPrevYear() ) ); - connect( mPrevMonth, SIGNAL( clicked() ), SIGNAL( goPrevMonth() ) ); - connect( mNextMonth, SIGNAL( clicked() ), SIGNAL( goNextMonth() ) ); - connect( mNextYear, SIGNAL( clicked() ), SIGNAL( goNextYear() ) ); - connect( mMonth, SIGNAL( clicked() ), SLOT( selectMonth() ) ); + connect( mPrevYear, TQT_SIGNAL( clicked() ), TQT_SIGNAL( goPrevYear() ) ); + connect( mPrevMonth, TQT_SIGNAL( clicked() ), TQT_SIGNAL( goPrevMonth() ) ); + connect( mNextMonth, TQT_SIGNAL( clicked() ), TQT_SIGNAL( goNextMonth() ) ); + connect( mNextYear, TQT_SIGNAL( clicked() ), TQT_SIGNAL( goNextYear() ) ); + connect( mMonth, TQT_SIGNAL( clicked() ), TQT_SLOT( selectMonth() ) ); } NavigatorBar::~NavigatorBar() @@ -148,7 +148,7 @@ void NavigatorBar::selectDates( const KCal::DateList &dateList ) int maxwidth = 0; for( i = 1; i <= calSys->monthsInYear( mDate ); ++i ) { - int w = QFontMetrics( mMonth->font() ).width( QString("%1 8888") + int w = TQFontMetrics( mMonth->font() ).width( TQString("%1 8888") .arg( calSys->monthName( i, calSys->year( mDate ) ) ) ); if ( w > maxwidth ) maxwidth = w; } @@ -171,7 +171,7 @@ void NavigatorBar::selectMonth() int i, month, months = calSys->monthsInYear( mDate ); - QPopupMenu *popup = new QPopupMenu( mMonth ); + TQPopupMenu *popup = new TQPopupMenu( mMonth ); for ( i = 1; i <= months; i++ ) popup->insertItem( calSys->monthName( i, calSys->year( mDate ) ), i ); @@ -179,7 +179,7 @@ void NavigatorBar::selectMonth() popup->setActiveItem( calSys->month( mDate ) - 1 ); popup->setMinimumWidth( mMonth->width() ); - if ( ( month = popup->exec( mMonth->mapToGlobal( QPoint( 0, 0 ) ), + if ( ( month = popup->exec( mMonth->mapToGlobal( TQPoint( 0, 0 ) ), calSys->month( mDate ) - 1 ) ) == -1 ) { delete popup; return; // canceled diff --git a/korganizer/navigatorbar.h b/korganizer/navigatorbar.h index 171c6b408..88dfeeff5 100644 --- a/korganizer/navigatorbar.h +++ b/korganizer/navigatorbar.h @@ -26,7 +26,7 @@ #include <libkcal/incidencebase.h> -#include <qlabel.h> +#include <tqlabel.h> class QPushButton; class QFrame; @@ -35,13 +35,13 @@ class ActiveLabel : public QLabel { Q_OBJECT public: - ActiveLabel( QWidget *parent, const char *name = 0 ); + ActiveLabel( TQWidget *parent, const char *name = 0 ); signals: void clicked(); protected: - void mouseReleaseEvent ( QMouseEvent * e ); + void mouseReleaseEvent ( TQMouseEvent * e ); }; @@ -49,7 +49,7 @@ class NavigatorBar: public QWidget { Q_OBJECT public: - NavigatorBar( QWidget *parent = 0, const char *name = 0 ); + NavigatorBar( TQWidget *parent = 0, const char *name = 0 ); ~NavigatorBar(); void showButtons( bool left, bool right ); @@ -70,13 +70,13 @@ class NavigatorBar: public QWidget private: bool mHasMinWidth; - QDate mDate; + TQDate mDate; - QPushButton *mPrevYear; - QPushButton *mPrevMonth; + TQPushButton *mPrevYear; + TQPushButton *mPrevMonth; ActiveLabel *mMonth; - QPushButton *mNextMonth; - QPushButton *mNextYear; + TQPushButton *mNextMonth; + TQPushButton *mNextYear; }; #endif diff --git a/korganizer/plugins/datenums/configdialog.cpp b/korganizer/plugins/datenums/configdialog.cpp index d26a1fd86..3766e2ffd 100644 --- a/korganizer/plugins/datenums/configdialog.cpp +++ b/korganizer/plugins/datenums/configdialog.cpp @@ -18,10 +18,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qlayout.h> -#include <qlabel.h> -#include <qvbuttongroup.h> -#include <qradiobutton.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqvbuttongroup.h> +#include <tqradiobutton.h> #include <klocale.h> #include <kmessagebox.h> @@ -34,20 +34,20 @@ #include "configdialog.h" #include "configdialog.moc" -ConfigDialog::ConfigDialog(QWidget *parent) +ConfigDialog::ConfigDialog(TQWidget *parent) : KDialogBase(Plain,i18n("Configure Day Numbers"),Ok|Cancel,Ok,parent) { - QFrame *topFrame = plainPage(); - QVBoxLayout *topLayout = new QVBoxLayout(topFrame,0,spacingHint()); + TQFrame *topFrame = plainPage(); + TQVBoxLayout *topLayout = new TQVBoxLayout(topFrame,0,spacingHint()); -// QLabel *label = new QLabel(i18n("Show date numbers:"),topFrame); +// TQLabel *label = new TQLabel(i18n("Show date numbers:"),topFrame); // topLayout->addWidget(label); - mDayNumGroup = new QVButtonGroup( i18n("Show Date Number"), topFrame ); + mDayNumGroup = new TQVButtonGroup( i18n("Show Date Number"), topFrame ); topLayout->addWidget( mDayNumGroup ); - new QRadioButton( i18n("Show day number"), mDayNumGroup ); - new QRadioButton( i18n("Show days to end of year"), mDayNumGroup ); - new QRadioButton( i18n("Show both"), mDayNumGroup ); + new TQRadioButton( i18n("Show day number"), mDayNumGroup ); + new TQRadioButton( i18n("Show days to end of year"), mDayNumGroup ); + new TQRadioButton( i18n("Show both"), mDayNumGroup ); load(); } diff --git a/korganizer/plugins/datenums/configdialog.h b/korganizer/plugins/datenums/configdialog.h index 15efaf049..cef3e013b 100644 --- a/korganizer/plugins/datenums/configdialog.h +++ b/korganizer/plugins/datenums/configdialog.h @@ -27,7 +27,7 @@ class ConfigDialog : public KDialogBase { Q_OBJECT public: - ConfigDialog(QWidget *parent=0); + ConfigDialog(TQWidget *parent=0); virtual ~ConfigDialog(); protected: @@ -38,7 +38,7 @@ class ConfigDialog : public KDialogBase void slotOk(); private: - QButtonGroup *mDayNumGroup; + TQButtonGroup *mDayNumGroup; }; #endif diff --git a/korganizer/plugins/datenums/datenums.cpp b/korganizer/plugins/datenums/datenums.cpp index a849f39f3..af022837e 100644 --- a/korganizer/plugins/datenums/datenums.cpp +++ b/korganizer/plugins/datenums/datenums.cpp @@ -40,7 +40,7 @@ Datenums::Datenums() mDateNum = config.readNumEntry( "ShowDayNumbers", 0 ); } -void Datenums::configure(QWidget *parent) +void Datenums::configure(TQWidget *parent) { ConfigDialog *dlg = new ConfigDialog(parent); dlg->exec(); @@ -48,12 +48,12 @@ void Datenums::configure(QWidget *parent) } -QString Datenums::shortText(const QDate &date) +TQString Datenums::shortText(const TQDate &date) { int doy = KOGlobals::self()->calendarSystem()->dayOfYear(date); switch (mDateNum) { case 1: // only days until end of year - return QString::number( KOGlobals::self()->calendarSystem()->daysInYear(date) - doy ); + return TQString::number( KOGlobals::self()->calendarSystem()->daysInYear(date) - doy ); break; case 2: // both day of year and days till end of year return i18n("dayOfYear / daysTillEndOfYear", "%1 / %2").arg( doy ) @@ -61,12 +61,12 @@ QString Datenums::shortText(const QDate &date) break; case 0: // only day of year default: - return QString::number( doy ); + return TQString::number( doy ); } - return QString::number( doy ); + return TQString::number( doy ); } -QString Datenums::info() +TQString Datenums::info() { return i18n("This plugin provides numbers of days and weeks."); } diff --git a/korganizer/plugins/datenums/datenums.h b/korganizer/plugins/datenums/datenums.h index af3e46473..f9ca7783a 100644 --- a/korganizer/plugins/datenums/datenums.h +++ b/korganizer/plugins/datenums/datenums.h @@ -19,7 +19,7 @@ #ifndef KORG_DATENUMS_H #define KORG_DATENUMS_H -#include <qstring.h> +#include <tqstring.h> #include <calendar/calendardecoration.h> @@ -30,10 +30,10 @@ class Datenums : public CalendarDecoration { Datenums(); ~Datenums() {} - void configure(QWidget *parent); - QString shortText(const QDate &); + void configure(TQWidget *parent); + TQString shortText(const TQDate &); - QString info(); + TQString info(); protected: int mDateNum; }; diff --git a/korganizer/plugins/exchange/exchange.cpp b/korganizer/plugins/exchange/exchange.cpp index 86377f046..3d3719ed4 100644 --- a/korganizer/plugins/exchange/exchange.cpp +++ b/korganizer/plugins/exchange/exchange.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> @@ -69,29 +69,29 @@ Exchange::Exchange(KOrg::MainWindow *parent, const char *name) : setXMLFile("plugins/exchangeui.rc"); - new KAction(i18n("&Download..."), 0, this, SLOT(download()), + new KAction(i18n("&Download..."), 0, this, TQT_SLOT(download()), actionCollection(), "exchange_download"); - KAction *action = new KAction(i18n("&Upload Event..."), 0, this, SLOT(upload()), + KAction *action = new KAction(i18n("&Upload Event..."), 0, this, TQT_SLOT(upload()), actionCollection(), "exchange_upload"); - QObject::connect(mainWindow()->view(),SIGNAL(incidenceSelected(Incidence *)), - this, SLOT(slotIncidenceSelected(Incidence *))); + TQObject::connect(mainWindow()->view(),TQT_SIGNAL(incidenceSelected(Incidence *)), + this, TQT_SLOT(slotIncidenceSelected(Incidence *))); action->setEnabled( false ); - QObject::connect(this,SIGNAL(enableIncidenceActions(bool)), - action,SLOT(setEnabled(bool))); + TQObject::connect(this,TQT_SIGNAL(enableIncidenceActions(bool)), + action,TQT_SLOT(setEnabled(bool))); - action = new KAction(i18n("De&lete Event"), 0, this, SLOT(remove()), + action = new KAction(i18n("De&lete Event"), 0, this, TQT_SLOT(remove()), actionCollection(), "exchange_delete"); - QObject::connect(this,SIGNAL(enableIncidenceActions(bool)), - action,SLOT(setEnabled(bool))); + TQObject::connect(this,TQT_SIGNAL(enableIncidenceActions(bool)), + action,TQT_SLOT(setEnabled(bool))); action->setEnabled( false ); - new KAction(i18n("&Configure..."), 0, this, SLOT(configure()), + new KAction(i18n("&Configure..."), 0, this, TQT_SLOT(configure()), actionCollection(), "exchange_configure"); - connect( this, SIGNAL( calendarChanged() ), mainWindow()->view(), SLOT( updateView() ) ); - connect( this, SIGNAL( calendarChanged(const QDate &, const QDate &)), - mainWindow()->view(), SLOT(updateView(const QDate &, const QDate &)) ); + connect( this, TQT_SIGNAL( calendarChanged() ), mainWindow()->view(), TQT_SLOT( updateView() ) ); + connect( this, TQT_SIGNAL( calendarChanged(const TQDate &, const TQDate &)), + mainWindow()->view(), TQT_SLOT(updateView(const TQDate &, const TQDate &)) ); } Exchange::~Exchange() @@ -99,12 +99,12 @@ Exchange::~Exchange() kdDebug(5850) << "Exchange Plugin destructor" << endl; } -QString Exchange::info() +TQString Exchange::info() { return i18n("This plugin imports and export calendar events from/to a Microsoft Exchange 2000 Server."); } -QString Exchange::shortInfo() +TQString Exchange::shortInfo() { return i18n("Exchange Plugin"); } @@ -118,11 +118,11 @@ void Exchange::download() { ExchangeDialog dialog( mainWindow()->view()->startDate(), mainWindow()->view()->endDate() ); - if (dialog.exec() != QDialog::Accepted ) + if (dialog.exec() != TQDialog::Accepted ) return; - QDate start = dialog.m_start->date(); - QDate end = dialog.m_end->date(); + TQDate start = dialog.m_start->date(); + TQDate end = dialog.m_end->date(); KCal::Calendar* calendar = mainWindow()->view()->calendar(); @@ -183,13 +183,13 @@ void Exchange::configure() kdDebug(5850) << "Exchange::configure" << endl; ExchangeConfig dialog( mAccount ); - if (dialog.exec() == QDialog::Accepted ) + if (dialog.exec() == TQDialog::Accepted ) mAccount->save( "Calendar/Exchange Plugin" ); } -void Exchange::showError( int error, const QString& moreInfo /* = QString::null */ ) +void Exchange::showError( int error, const TQString& moreInfo /* = TQString::null */ ) { - QString errorText; + TQString errorText; switch( error ) { case KPIM::ExchangeClient::ResultOK: errorText = i18n( "No Error" ); diff --git a/korganizer/plugins/exchange/exchange.h b/korganizer/plugins/exchange/exchange.h index a145bd12f..22a15f1c7 100644 --- a/korganizer/plugins/exchange/exchange.h +++ b/korganizer/plugins/exchange/exchange.h @@ -19,8 +19,8 @@ #ifndef KORG_EXCHANGE_H #define KORG_EXCHANGE_H -#include <qstring.h> -#include <qdatetime.h> +#include <tqstring.h> +#include <tqdatetime.h> #include <korganizer/part.h> @@ -39,14 +39,14 @@ class Exchange : public KOrg::Part { Exchange( KOrg::MainWindow *, const char *name ); ~Exchange(); - QString info(); + TQString info(); // This method is used for the category of the key bindings - QString shortInfo(); + TQString shortInfo(); signals: void enableIncidenceActions( bool ); void calendarChanged(); - void calendarChanged(const QDate&start,const QDate&end); + void calendarChanged(const TQDate&start,const TQDate&end); private slots: void download(); @@ -58,7 +58,7 @@ class Exchange : public KOrg::Part { private: void test2(); - void showError( int error, const QString& moreInfo = QString::null ); + void showError( int error, const TQString& moreInfo = TQString::null ); KPIM::ExchangeClient *mClient; KPIM::ExchangeAccount* mAccount; diff --git a/korganizer/plugins/exchange/exchangeconfig.cpp b/korganizer/plugins/exchange/exchangeconfig.cpp index e75265caa..fe01324ac 100644 --- a/korganizer/plugins/exchange/exchangeconfig.cpp +++ b/korganizer/plugins/exchange/exchangeconfig.cpp @@ -17,9 +17,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qlayout.h> -#include <qlabel.h> -#include <qcombobox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcombobox.h> #include <kapplication.h> #include <kconfig.h> @@ -31,7 +31,7 @@ #include "exchangeconfig.h" -ExchangeConfig::ExchangeConfig( KPIM::ExchangeAccount* account, QWidget* parent ) +ExchangeConfig::ExchangeConfig( KPIM::ExchangeAccount* account, TQWidget* parent ) : KDialogBase(Plain,i18n("Exchange Plugin"),Ok|Cancel,Ok,parent) { mAccount = account; @@ -39,38 +39,38 @@ ExchangeConfig::ExchangeConfig( KPIM::ExchangeAccount* account, QWidget* parent kdDebug(5850) << "Creating ExchangeConfig with account: " << account->host() << ":" << account->account() << endl; - QFrame *topFrame = plainPage(); - QGridLayout *topLayout = new QGridLayout( topFrame, 5, 3, 3 ); + TQFrame *topFrame = plainPage(); + TQGridLayout *topLayout = new TQGridLayout( topFrame, 5, 3, 3 ); m_host = new KLineEdit( mAccount->host(), topFrame ); - topLayout->addWidget( new QLabel( i18n( "Exchange server:" ), topFrame ), 0, 0 ); + topLayout->addWidget( new TQLabel( i18n( "Exchange server:" ), topFrame ), 0, 0 ); topLayout->addWidget( m_host, 0, 1 ); m_port = new KLineEdit( mAccount->port(), topFrame ); - topLayout->addWidget( new QLabel( i18n( "Port:" ), topFrame ), 1, 0 ); + topLayout->addWidget( new TQLabel( i18n( "Port:" ), topFrame ), 1, 0 ); topLayout->addWidget( m_port, 1, 1 ); m_user = new KLineEdit( mAccount->account(), topFrame ); - topLayout->addWidget( new QLabel( i18n( "User:" ), topFrame ), 2, 0 ); + topLayout->addWidget( new TQLabel( i18n( "User:" ), topFrame ), 2, 0 ); topLayout->addWidget( m_user, 2, 1 ); - connect( m_user, SIGNAL(textChanged(const QString&)), this, SLOT(slotUserChanged(const QString&)) ); + connect( m_user, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotUserChanged(const TQString&)) ); m_password = new KLineEdit( mAccount->password(), topFrame ); - topLayout->addWidget( new QLabel( i18n( "Password:" ), topFrame ), 3, 0 ); + topLayout->addWidget( new TQLabel( i18n( "Password:" ), topFrame ), 3, 0 ); topLayout->addWidget( m_password, 3, 1 ); - m_password->setEchoMode( QLineEdit::Password ); + m_password->setEchoMode( TQLineEdit::Password ); - m_autoMailbox = new QCheckBox( i18n( "Determine mailbox automatically" ), topFrame ); + m_autoMailbox = new TQCheckBox( i18n( "Determine mailbox automatically" ), topFrame ); topLayout->addMultiCellWidget( m_autoMailbox, 4, 4, 0, 1 ); - connect( m_autoMailbox, SIGNAL(toggled(bool)), this, SLOT(slotToggleAuto(bool)) ); + connect( m_autoMailbox, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggleAuto(bool)) ); m_mailbox= new KLineEdit( mAccount->mailbox(), topFrame ); - topLayout->addWidget( new QLabel( i18n( "Mailbox URL:" ), topFrame ), 5, 0 ); + topLayout->addWidget( new TQLabel( i18n( "Mailbox URL:" ), topFrame ), 5, 0 ); topLayout->addWidget( m_mailbox, 5, 1 ); - m_tryFindMailbox = new QPushButton( "&Find", topFrame ); + m_tryFindMailbox = new TQPushButton( "&Find", topFrame ); topLayout->addWidget( m_tryFindMailbox, 5, 2 ); - connect( m_tryFindMailbox, SIGNAL(clicked()), this, SLOT(slotFindClicked()) ); + connect( m_tryFindMailbox, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotFindClicked()) ); kapp->config()->setGroup( "Calendar/Exchange Plugin" ); bool autoChecked = kapp->config()->readBoolEntry( "auto-mailbox", true ); @@ -90,7 +90,7 @@ void ExchangeConfig::slotToggleAuto( bool on ) // } } -void ExchangeConfig::slotUserChanged( const QString& /*text*/ ) +void ExchangeConfig::slotUserChanged( const TQString& /*text*/ ) { // if ( m_mailboxEqualsUser->isChecked() ) { // m_mailbox->setText( "webdav://" + m_host->text() + "/exchange/" + text ); @@ -100,7 +100,7 @@ void ExchangeConfig::slotUserChanged( const QString& /*text*/ ) void ExchangeConfig::slotOk() { if ( m_autoMailbox->isChecked() ) { - QString mailbox = mAccount->tryFindMailbox( m_host->text(), m_port->text(), m_user->text(), m_password->text() ); + TQString mailbox = mAccount->tryFindMailbox( m_host->text(), m_port->text(), m_user->text(), m_password->text() ); if ( mailbox.isNull() ) { kdWarning() << "Could not find Exchange mailbox URL, incomplete settings!"<< endl; KMessageBox::sorry( this, "Could not determine mailbox URL" ); @@ -124,7 +124,7 @@ void ExchangeConfig::slotOk() void ExchangeConfig::slotFindClicked() { - QString mailbox = mAccount->tryFindMailbox( m_host->text(), m_port->text(), m_user->text(), m_password->text() ); + TQString mailbox = mAccount->tryFindMailbox( m_host->text(), m_port->text(), m_user->text(), m_password->text() ); if ( mailbox.isNull() ) { KMessageBox::sorry( this, "Could not determine mailbox URL" ); } else { diff --git a/korganizer/plugins/exchange/exchangeconfig.h b/korganizer/plugins/exchange/exchangeconfig.h index ba974ba26..0e18bfe2e 100644 --- a/korganizer/plugins/exchange/exchangeconfig.h +++ b/korganizer/plugins/exchange/exchangeconfig.h @@ -19,8 +19,8 @@ #ifndef EXCHANGECONFIG_H #define EXCHANGECONFIG_H -#include <qcheckbox.h> -#include <qpushbutton.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> #include <kdialogbase.h> #include <klineedit.h> //#include <kpassdlg.h> @@ -31,7 +31,7 @@ class ExchangeConfig : public KDialogBase { Q_OBJECT public: - ExchangeConfig(KPIM::ExchangeAccount* account, QWidget *parent=0); + ExchangeConfig(KPIM::ExchangeAccount* account, TQWidget *parent=0); virtual ~ExchangeConfig(); // protected: @@ -40,7 +40,7 @@ class ExchangeConfig : public KDialogBase protected slots: void slotToggleAuto( bool on ); - void slotUserChanged( const QString& text ); + void slotUserChanged( const TQString& text ); void slotFindClicked(); void slotOk(); @@ -50,9 +50,9 @@ class ExchangeConfig : public KDialogBase KLineEdit *m_host; KLineEdit *m_port; KLineEdit *m_user; - QCheckBox *m_autoMailbox; + TQCheckBox *m_autoMailbox; KLineEdit *m_mailbox; - QPushButton* m_tryFindMailbox; + TQPushButton* m_tryFindMailbox; KLineEdit *m_password; }; diff --git a/korganizer/plugins/exchange/exchangedialog.cpp b/korganizer/plugins/exchange/exchangedialog.cpp index 249b07a91..de56a3a19 100644 --- a/korganizer/plugins/exchange/exchangedialog.cpp +++ b/korganizer/plugins/exchange/exchangedialog.cpp @@ -17,9 +17,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qlayout.h> -#include <qlabel.h> -#include <qcombobox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcombobox.h> #include <klocale.h> #include <kmessagebox.h> @@ -30,20 +30,20 @@ #include "exchangedialog.h" -ExchangeDialog::ExchangeDialog( const QDate &_start, const QDate &_end, QWidget *parent) +ExchangeDialog::ExchangeDialog( const TQDate &_start, const TQDate &_end, TQWidget *parent) : KDialogBase(Plain,i18n("Exchange Plugin"),Ok|Cancel,Ok,parent) { - QFrame *topFrame = plainPage(); - QGridLayout *topLayout = new QGridLayout( topFrame, 2, 2, 3 ); + TQFrame *topFrame = plainPage(); + TQGridLayout *topLayout = new TQGridLayout( topFrame, 2, 2, 3 ); - QLabel *label = new QLabel(i18n("Start date:"),topFrame); + TQLabel *label = new TQLabel(i18n("Start date:"),topFrame); topLayout->addWidget(label, 0, 0); m_start = new KDateWidget( _start, topFrame ); topLayout->addWidget( m_start, 0, 1 ); m_end = new KDateWidget( _end, topFrame ); - topLayout->addWidget( new QLabel( i18n( "End date:" ), topFrame ), 1, 0 ); + topLayout->addWidget( new TQLabel( i18n( "End date:" ), topFrame ), 1, 0 ); topLayout->addWidget( m_end, 1, 1 ); } diff --git a/korganizer/plugins/exchange/exchangedialog.h b/korganizer/plugins/exchange/exchangedialog.h index 440d48fd9..bd0e2f26a 100644 --- a/korganizer/plugins/exchange/exchangedialog.h +++ b/korganizer/plugins/exchange/exchangedialog.h @@ -28,7 +28,7 @@ class ExchangeDialog : public KDialogBase { Q_OBJECT public: - ExchangeDialog( const QDate &start, const QDate &end, QWidget *parent=0); + ExchangeDialog( const TQDate &start, const TQDate &end, TQWidget *parent=0); virtual ~ExchangeDialog(); protected slots: diff --git a/korganizer/plugins/hebrew/configdialog.cpp b/korganizer/plugins/hebrew/configdialog.cpp index aad50a680..6298151ac 100644 --- a/korganizer/plugins/hebrew/configdialog.cpp +++ b/korganizer/plugins/hebrew/configdialog.cpp @@ -19,33 +19,33 @@ #include "configdialog.h" #include "configdialog.moc" #include <klocale.h> -#include <qlayout.h> +#include <tqlayout.h> #include <kapplication.h> #include <kglobal.h> #include <kconfig.h> #include <kstandarddirs.h> #include <ksimpleconfig.h> -ConfigDialog::ConfigDialog(QWidget * parent):KDialogBase(Plain, i18n("Configure Holidays"), Ok|Cancel, Ok, +ConfigDialog::ConfigDialog(TQWidget * parent):KDialogBase(Plain, i18n("Configure Holidays"), Ok|Cancel, Ok, parent) { - QFrame *topFrame = plainPage(); - QVBoxLayout *topLayout = - new QVBoxLayout(topFrame, 0, spacingHint()); + TQFrame *topFrame = plainPage(); + TQVBoxLayout *topLayout = + new TQVBoxLayout(topFrame, 0, spacingHint()); - israel_box = new QCheckBox(topFrame); + israel_box = new TQCheckBox(topFrame); israel_box->setText(i18n("Use Israeli holidays")); topLayout->addWidget(israel_box); - parsha_box = new QCheckBox(topFrame); + parsha_box = new TQCheckBox(topFrame); parsha_box->setText(i18n("Show weekly parsha")); topLayout->addWidget(parsha_box); - omer_box = new QCheckBox(topFrame); + omer_box = new TQCheckBox(topFrame); omer_box->setText(i18n("Show day of Omer")); topLayout->addWidget(omer_box); - chol_box = new QCheckBox(topFrame); + chol_box = new TQCheckBox(topFrame); chol_box->setText(i18n("Show Chol HaMoed")); topLayout->addWidget(chol_box); diff --git a/korganizer/plugins/hebrew/configdialog.h b/korganizer/plugins/hebrew/configdialog.h index 1d0d18115..1638f75c3 100644 --- a/korganizer/plugins/hebrew/configdialog.h +++ b/korganizer/plugins/hebrew/configdialog.h @@ -20,7 +20,7 @@ #define CONFIGDIALOG_H #include <kdialogbase.h> -#include <qcheckbox.h> +#include <tqcheckbox.h> /** @author Jonathan Singer @@ -29,7 +29,7 @@ class ConfigDialog:public KDialogBase { Q_OBJECT public: - ConfigDialog(QWidget * parent = 0); + ConfigDialog(TQWidget * parent = 0); virtual ~ ConfigDialog(); protected: @@ -39,10 +39,10 @@ protected: protected slots: void slotOk(); private: - QCheckBox * omer_box; - QCheckBox *parsha_box; - QCheckBox *israel_box; - QCheckBox *chol_box; + TQCheckBox * omer_box; + TQCheckBox *parsha_box; + TQCheckBox *israel_box; + TQCheckBox *chol_box; }; diff --git a/korganizer/plugins/hebrew/converter.h b/korganizer/plugins/hebrew/converter.h index 8a3bc8baf..430f10eb1 100644 --- a/korganizer/plugins/hebrew/converter.h +++ b/korganizer/plugins/hebrew/converter.h @@ -11,8 +11,8 @@ #ifndef CONVERTER_H #define CONVERTER_H -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> struct DateResult { @@ -67,8 +67,8 @@ public: private: - static QStringList HebrewMonthNames; - static QStringList SecularMonthNames; + static TQStringList HebrewMonthNames; + static TQStringList SecularMonthNames; }; diff --git a/korganizer/plugins/hebrew/hebrew.cpp b/korganizer/plugins/hebrew/hebrew.cpp index 4c557d00d..9fb0f2fbf 100644 --- a/korganizer/plugins/hebrew/hebrew.cpp +++ b/korganizer/plugins/hebrew/hebrew.cpp @@ -43,7 +43,7 @@ public: K_EXPORT_COMPONENT_FACTORY( libkorg_hebrew, HebrewFactory ) -QString Hebrew::shortText(const QDate & date) +TQString Hebrew::shortText(const TQDate & date) { KConfig config("korganizerrc", true, false); // Open read-only, no kdeglobals @@ -55,7 +55,7 @@ QString Hebrew::shortText(const QDate & date) Holiday::ParshaP = config.readBoolEntry("Parsha", true); Holiday::CholP = config.readBoolEntry("Chol_HaMoed", true); Holiday::OmerP = config.readBoolEntry("Omer", true); - QString *label_text = new QString(); + TQString *label_text = new TQString(); int day = date.day(); int month = date.month(); @@ -74,14 +74,14 @@ QString Hebrew::shortText(const QDate & date) int hebrew_kvia = result.kvia; int hebrew_day_number = result.hebrew_day_number; - QStringList holidays = + TQStringList holidays = Holiday::FindHoliday(hebrew_month, hebrew_day, hebrew_day_of_week + 1, hebrew_kvia, hebrew_leap_year_p, IsraelP, hebrew_day_number, hebrew_year); KCalendarSystem *cal = KCalendarSystemFactory::create("hebrew"); - *label_text = QString("%1 %2").arg(cal->dayString(date, false)) + *label_text = TQString("%1 %2").arg(cal->dayString(date, false)) .arg(cal->monthName(date)); if (holidays.count()) @@ -97,13 +97,13 @@ QString Hebrew::shortText(const QDate & date) return *label_text; } -QString Hebrew::info() +TQString Hebrew::info() { return i18n("This plugin provides the date in the Jewish calendar."); } -void Hebrew::configure(QWidget * parent) +void Hebrew::configure(TQWidget * parent) { ConfigDialog *dlg = new ConfigDialog(parent); //parent? diff --git a/korganizer/plugins/hebrew/hebrew.h b/korganizer/plugins/hebrew/hebrew.h index 1153c1012..c337f7ef4 100644 --- a/korganizer/plugins/hebrew/hebrew.h +++ b/korganizer/plugins/hebrew/hebrew.h @@ -19,8 +19,8 @@ #ifndef KORG_HEBREW_H #define KORG_HEBREW_H -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> #include <calendar/calendardecoration.h> using namespace KOrg; @@ -34,10 +34,10 @@ public: ~Hebrew() { } - void configure(QWidget * parent); - QString shortText(const QDate &); + void configure(TQWidget * parent); + TQString shortText(const TQDate &); - QString info(); + TQString info(); static bool IsraelP; private: diff --git a/korganizer/plugins/hebrew/holiday.cpp b/korganizer/plugins/hebrew/holiday.cpp index 732a00447..9b5ea3f11 100644 --- a/korganizer/plugins/hebrew/holiday.cpp +++ b/korganizer/plugins/hebrew/holiday.cpp @@ -15,7 +15,7 @@ bool Holiday::CholP; bool Holiday::OmerP; bool Holiday::ParshaP; -QStringList Holiday::holidays; +TQStringList Holiday::holidays; int Holiday::HolidayFlags; Holiday::Holiday() @@ -413,7 +413,7 @@ QStringList } /* Return a string corresponding to the nth day of the Omer */ -QString Holiday::Sfirah(int day) +TQString Holiday::Sfirah(int day) { /*static char buffer[40]; char *endings[] = {"th", "st", "nd", "rd"}; @@ -422,7 +422,7 @@ QString Holiday::Sfirah(int day) if ( ((day >= 11) && (day <= 19)) || (remainder > 3)) remainder = 0; sprintf(buffer, "%d%s day Omer", day, endings[remainder]); return buffer; */ - QString buffer; + TQString buffer; buffer.setNum(day); buffer + i18n(" Omer"); // Fix this to original function diff --git a/korganizer/plugins/hebrew/holiday.h b/korganizer/plugins/hebrew/holiday.h index 6c8c61d9d..f73083fd7 100644 --- a/korganizer/plugins/hebrew/holiday.h +++ b/korganizer/plugins/hebrew/holiday.h @@ -11,8 +11,8 @@ #ifndef HOLIDAY_H #define HOLIDAY_H -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> #include <parsha.h> /** @author Jonathan Singer @@ -24,12 +24,12 @@ public: Holiday(); ~Holiday(); - static QStringList FindHoliday(int month, int day, int weekday, + static TQStringList FindHoliday(int month, int day, int weekday, int kvia, bool leap_year_p, bool israel_p, int day_number, int year); - static QString Sfirah(int); + static TQString Sfirah(int); static bool CholP; static bool OmerP; @@ -37,7 +37,7 @@ public: private: - static QStringList holidays; + static TQStringList holidays; static int HolidayFlags; //supposed to be extern //parsha Parsha_lookup; diff --git a/korganizer/plugins/hebrew/parsha.cpp b/korganizer/plugins/hebrew/parsha.cpp index 21fdf8a4e..d8ff2dd6f 100644 --- a/korganizer/plugins/hebrew/parsha.cpp +++ b/korganizer/plugins/hebrew/parsha.cpp @@ -11,7 +11,7 @@ #include "parsha.h" #include <klocale.h> -QStringList Parsha::parshiot_names; +TQStringList Parsha::parshiot_names; Parsha::Parsha() { @@ -243,7 +243,7 @@ QString } - QString buffer; + TQString buffer; if (array == NULL) /* Something is terribly wrong. */ diff --git a/korganizer/plugins/hebrew/parsha.h b/korganizer/plugins/hebrew/parsha.h index aac2625ff..59099b0ef 100644 --- a/korganizer/plugins/hebrew/parsha.h +++ b/korganizer/plugins/hebrew/parsha.h @@ -11,8 +11,8 @@ #ifndef PARSHA_H #define PARSHA_H -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> /** @author Jonathan Singer @@ -23,11 +23,11 @@ public: Parsha(); ~Parsha(); - static QString FindParshaName(int daynumber, int kvia, bool leap_p, + static TQString FindParshaName(int daynumber, int kvia, bool leap_p, bool israel_p); private: - static QStringList parshiot_names; + static TQStringList parshiot_names; }; #endif diff --git a/korganizer/plugins/printing/journal/journalprint.cpp b/korganizer/plugins/printing/journal/journalprint.cpp index 31b1b10b6..551f23a9d 100644 --- a/korganizer/plugins/printing/journal/journalprint.cpp +++ b/korganizer/plugins/printing/journal/journalprint.cpp @@ -33,7 +33,7 @@ #include <kconfig.h> #include <kdebug.h> -#include <qbuttongroup.h> +#include <tqbuttongroup.h> #include "calprintjournalconfig_base.h" @@ -50,7 +50,7 @@ K_EXPORT_COMPONENT_FACTORY( libkorg_journalprint, JournalPrintFactory ) * Print Journal **************************************************************/ -QWidget *CalPrintJournal::createConfigWidget( QWidget *w ) +TQWidget *CalPrintJournal::createConfigWidget( TQWidget *w ) { return new CalPrintJournalConfig_Base( w ); } @@ -96,7 +96,7 @@ void CalPrintJournal::saveConfig() } } -void CalPrintJournal::setDateRange( const QDate& from, const QDate& to ) +void CalPrintJournal::setDateRange( const TQDate& from, const TQDate& to ) { CalPrintPluginBase::setDateRange( from, to ); CalPrintJournalConfig_Base *cfg = @@ -107,7 +107,7 @@ void CalPrintJournal::setDateRange( const QDate& from, const QDate& to ) } } -void CalPrintJournal::print( QPainter &p, int width, int height ) +void CalPrintJournal::print( TQPainter &p, int width, int height ) { int x=0, y=0; Journal::List journals( mCalendar->journals() ); @@ -116,14 +116,14 @@ void CalPrintJournal::print( QPainter &p, int width, int height ) journals.clear(); Journal::List::Iterator it = allJournals.begin(); for ( ; it != allJournals.end(); ++it ) { - QDate dt = (*it)->dtStart().date(); + TQDate dt = (*it)->dtStart().date(); if ( mFromDate <= dt && dt <= mToDate ) { journals.append( *it ); } } } - drawHeader( p, i18n("Journal entries"), QDate(), QDate(), QRect( 0, 0, width, headerHeight() ) ); + drawHeader( p, i18n("Journal entries"), TQDate(), TQDate(), TQRect( 0, 0, width, headerHeight() ) ); y = headerHeight() + 15; Journal::List::Iterator it = journals.begin(); diff --git a/korganizer/plugins/printing/journal/journalprint.h b/korganizer/plugins/printing/journal/journalprint.h index fb91759f1..f1c0db44c 100644 --- a/korganizer/plugins/printing/journal/journalprint.h +++ b/korganizer/plugins/printing/journal/journalprint.h @@ -40,19 +40,19 @@ class CalPrintJournal : public CalPrintPluginBase public: CalPrintJournal():CalPrintPluginBase() {} virtual ~CalPrintJournal() {} - virtual QString description() { return i18n("Print &journal"); } - virtual QString info() { return i18n("Prints all journals for a given date range"); } + virtual TQString description() { return i18n("Print &journal"); } + virtual TQString info() { return i18n("Prints all journals for a given date range"); } virtual int sortID() { return CalPrinterBase::Journallist; } virtual bool enabled() { return true; } - virtual QWidget *createConfigWidget( QWidget* ); + virtual TQWidget *createConfigWidget( TQWidget* ); public: - virtual void print(QPainter &p, int width, int height); + virtual void print(TQPainter &p, int width, int height); virtual void readSettingsWidget(); virtual void setSettingsWidget(); virtual void loadConfig(); virtual void saveConfig(); - virtual void setDateRange( const QDate& from, const QDate& to ); + virtual void setDateRange( const TQDate& from, const TQDate& to ); protected: bool mUseDateRange; diff --git a/korganizer/plugins/printing/list/listprint.cpp b/korganizer/plugins/printing/list/listprint.cpp index 0221f1c67..4a90bfb5b 100644 --- a/korganizer/plugins/printing/list/listprint.cpp +++ b/korganizer/plugins/printing/list/listprint.cpp @@ -34,7 +34,7 @@ #include <kconfig.h> #include <kdebug.h> -#include <qbuttongroup.h> +#include <tqbuttongroup.h> #include "calprintlistconfig_base.h" @@ -52,7 +52,7 @@ K_EXPORT_COMPONENT_FACTORY( libkorg_listprint, ListPrintFactory ) * Print Day **************************************************************/ -QWidget *CalPrintList::createConfigWidget( QWidget *w ) +TQWidget *CalPrintList::createConfigWidget( TQWidget *w ) { return new CalPrintListConfig_Base( w ); } @@ -98,7 +98,7 @@ void CalPrintList::saveConfig() } } -void CalPrintList::setDateRange( const QDate& from, const QDate& to ) +void CalPrintList::setDateRange( const TQDate& from, const TQDate& to ) { CalPrintPluginBase::setDateRange( from, to ); CalPrintListConfig_Base *cfg = @@ -109,7 +109,7 @@ void CalPrintList::setDateRange( const QDate& from, const QDate& to ) } } -void CalPrintList::print( QPainter &p, int width, int height ) +void CalPrintList::print( TQPainter &p, int width, int height ) { } diff --git a/korganizer/plugins/printing/list/listprint.h b/korganizer/plugins/printing/list/listprint.h index dc370ba86..561e0d467 100644 --- a/korganizer/plugins/printing/list/listprint.h +++ b/korganizer/plugins/printing/list/listprint.h @@ -39,18 +39,18 @@ class CalPrintList : public CalPrintPluginBase public: CalPrintList():CalPrintPluginBase() {} virtual ~CalPrintList() {} - virtual QString description() { return i18n("Print list"); } - virtual QString info() { return i18n("Prints a list of events and to-dos"); } + virtual TQString description() { return i18n("Print list"); } + virtual TQString info() { return i18n("Prints a list of events and to-dos"); } virtual int sortID() { return 950; } - virtual QWidget *createConfigWidget( QWidget* ); + virtual TQWidget *createConfigWidget( TQWidget* ); public: - virtual void print(QPainter &p, int width, int height); + virtual void print(TQPainter &p, int width, int height); virtual void readSettingsWidget(); virtual void setSettingsWidget(); virtual void loadConfig(); virtual void saveConfig(); - virtual void setDateRange( const QDate& from, const QDate& to ); + virtual void setDateRange( const TQDate& from, const TQDate& to ); protected: bool mUseDateRange; diff --git a/korganizer/plugins/printing/whatsnext/whatsnextprint.cpp b/korganizer/plugins/printing/whatsnext/whatsnextprint.cpp index 48dd30436..b5d43ae97 100644 --- a/korganizer/plugins/printing/whatsnext/whatsnextprint.cpp +++ b/korganizer/plugins/printing/whatsnext/whatsnextprint.cpp @@ -34,7 +34,7 @@ #include <kconfig.h> #include <kdebug.h> -#include <qbuttongroup.h> +#include <tqbuttongroup.h> #include "calprintwhatsnextconfig_base.h" @@ -51,7 +51,7 @@ K_EXPORT_COMPONENT_FACTORY( libkorg_whatsnextprint, WhatsNextPrintFactory ) * Print What's Next **************************************************************/ -QWidget *CalPrintWhatsNext::createConfigWidget( QWidget *w ) +TQWidget *CalPrintWhatsNext::createConfigWidget( TQWidget *w ) { return new CalPrintWhatsNextConfig_Base( w ); } @@ -97,7 +97,7 @@ void CalPrintWhatsNext::saveConfig() } } -void CalPrintWhatsNext::setDateRange( const QDate& from, const QDate& to ) +void CalPrintWhatsNext::setDateRange( const TQDate& from, const TQDate& to ) { CalPrintPluginBase::setDateRange( from, to ); CalPrintWhatsNextConfig_Base *cfg = @@ -108,7 +108,7 @@ void CalPrintWhatsNext::setDateRange( const QDate& from, const QDate& to ) } } -void CalPrintWhatsNext::print( QPainter &p, int width, int height ) +void CalPrintWhatsNext::print( TQPainter &p, int width, int height ) { } diff --git a/korganizer/plugins/printing/whatsnext/whatsnextprint.h b/korganizer/plugins/printing/whatsnext/whatsnextprint.h index bdba1f71b..fb9ee66ee 100644 --- a/korganizer/plugins/printing/whatsnext/whatsnextprint.h +++ b/korganizer/plugins/printing/whatsnext/whatsnextprint.h @@ -39,18 +39,18 @@ class CalPrintWhatsNext : public CalPrintPluginBase public: CalPrintWhatsNext():CalPrintPluginBase() {} virtual ~CalPrintWhatsNext() {} - virtual QString description() { return i18n("Print What's Next"); } - virtual QString info() { return i18n("Prints a list of all upcoming events and todos."); } + virtual TQString description() { return i18n("Print What's Next"); } + virtual TQString info() { return i18n("Prints a list of all upcoming events and todos."); } virtual int sortID() { return 50; } - virtual QWidget *createConfigWidget( QWidget* ); + virtual TQWidget *createConfigWidget( TQWidget* ); public: - virtual void print(QPainter &p, int width, int height); + virtual void print(TQPainter &p, int width, int height); virtual void readSettingsWidget(); virtual void setSettingsWidget(); virtual void loadConfig(); virtual void saveConfig(); - virtual void setDateRange( const QDate& from, const QDate& to ); + virtual void setDateRange( const TQDate& from, const TQDate& to ); protected: bool mUseDateRange; diff --git a/korganizer/plugins/printing/year/yearprint.cpp b/korganizer/plugins/printing/year/yearprint.cpp index d71cd9f08..5f3a9dc68 100644 --- a/korganizer/plugins/printing/year/yearprint.cpp +++ b/korganizer/plugins/printing/year/yearprint.cpp @@ -34,10 +34,10 @@ #include <kcalendarsystem.h> #include <klocale.h> -#include <qcheckbox.h> -#include <qspinbox.h> -#include <qcombobox.h> -#include <qpainter.h> +#include <tqcheckbox.h> +#include <tqspinbox.h> +#include <tqcombobox.h> +#include <tqpainter.h> class YearPrintFactory : public KOrg::PrintPluginFactory { public: @@ -51,7 +51,7 @@ K_EXPORT_COMPONENT_FACTORY( libkorg_yearlyprint, YearPrintFactory ) * Print Year **************************************************************/ -QWidget *CalPrintYear::createConfigWidget( QWidget *w ) +TQWidget *CalPrintYear::createConfigWidget( TQWidget *w ) { return new CalPrintYearConfig_Base( w ); } @@ -74,7 +74,7 @@ void CalPrintYear::setSettingsWidget() dynamic_cast<CalPrintYearConfig_Base*>( mConfigWidget ); if ( cfg ) { const KCalendarSystem *calsys = calendarSystem(); - QDate start; + TQDate start; calsys->setYMD( start, mYear, 1, 1 ); int months = calsys->monthsInYear( start ); int pages=0, prevPages=0; @@ -82,12 +82,12 @@ void CalPrintYear::setSettingsWidget() pages = (months-1)/i + 1; if ( pages != prevPages ) { prevPages = pages; - cfg->mPages->insertItem( QString::number( pages ), 0 ); + cfg->mPages->insertItem( TQString::number( pages ), 0 ); } } cfg->mYear->setValue( mYear ); - cfg->mPages->setCurrentText( QString::number( mPages ) ); + cfg->mPages->setCurrentText( TQString::number( mPages ) ); cfg->mSubDays->setCurrentItem( (mSubDaysEvents==Text)?0:1 ); cfg->mHolidays->setCurrentItem( (mHolidaysEvents==Text)?0:1 ); @@ -125,7 +125,7 @@ KPrinter::Orientation CalPrintYear::defaultOrientation() } -void CalPrintYear::setDateRange( const QDate& from, const QDate& to ) +void CalPrintYear::setDateRange( const TQDate& from, const TQDate& to ) { CalPrintPluginBase::setDateRange( from, to ); CalPrintYearConfig_Base *cfg = @@ -135,21 +135,21 @@ void CalPrintYear::setDateRange( const QDate& from, const QDate& to ) } } -void CalPrintYear::print( QPainter &p, int width, int height ) +void CalPrintYear::print( TQPainter &p, int width, int height ) { kdDebug()<<"CalPrintYear::print, width: "<<width<<", height: "<<height<<endl; - QRect headerBox( 0, 0, width, headerHeight() ); + TQRect headerBox( 0, 0, width, headerHeight() ); kdDebug()<<"headerBox: "<<headerBox<<endl; const KCalendarSystem *calsys = calendarSystem(); KLocale *locale = KGlobal::locale(); if ( !calsys || !locale ) return; - QDate start; + TQDate start; calsys->setYMD( start, mYear, 1, 1 ); // Determine the nr of months and the max nr of days per month (dependent on // calendar system!!!!) - QDate temp( start ); + TQDate temp( start ); int months = calsys->monthsInYear( start ); int maxdays = 1; for ( int i = 1; i< months; ++i ) { @@ -167,9 +167,9 @@ kdDebug()<<"headerBox: "<<headerBox<<endl; if ( page > 0 ) { mPrinter->newPage(); } - QDate end( calsys->addMonths( start, monthsPerPage ) ); + TQDate end( calsys->addMonths( start, monthsPerPage ) ); end = calsys->addDays( end, -1 ); - QString title; + TQString title; if ( orientation() == KPrinter::Landscape ) { title = i18n("date from - to", "%1 - %2"); } else { @@ -181,7 +181,7 @@ kdDebug()<<"headerBox: "<<headerBox<<endl; calsys->addMonths( start, -1), calsys->addMonths( start, monthsPerPage ), headerBox ); - QRect monthesBox( headerBox ); + TQRect monthesBox( headerBox ); monthesBox.setTop( monthesBox.bottom() + padding() ); monthesBox.setBottom( height ); @@ -192,7 +192,7 @@ kdDebug()<<"headerBox: "<<headerBox<<endl; if ( ++thismonth > months ) break; int xstart = int(j*monthwidth + 0.5); int xend = int((j+1)*monthwidth + 0.5); - QRect monthBox( xstart, monthesBox.top(), xend-xstart, monthesBox.height() ); + TQRect monthBox( xstart, monthesBox.top(), xend-xstart, monthesBox.height() ); drawMonth( p, temp, monthBox, maxdays, mSubDaysEvents, mHolidaysEvents ); temp = calsys->addMonths( temp, 1 ); diff --git a/korganizer/plugins/printing/year/yearprint.h b/korganizer/plugins/printing/year/yearprint.h index 3191150b2..f993e5dab 100644 --- a/korganizer/plugins/printing/year/yearprint.h +++ b/korganizer/plugins/printing/year/yearprint.h @@ -39,20 +39,20 @@ class CalPrintYear : public CalPrintPluginBase public: CalPrintYear():CalPrintPluginBase() {} virtual ~CalPrintYear() {} - virtual QString description() { return i18n("Print &Year"); } - virtual QString info() { return i18n("Prints a calendar for an entire year"); } + virtual TQString description() { return i18n("Print &Year"); } + virtual TQString info() { return i18n("Prints a calendar for an entire year"); } virtual int sortID() { return 900; } virtual bool enabled() { return true; } - virtual QWidget *createConfigWidget( QWidget* ); + virtual TQWidget *createConfigWidget( TQWidget* ); virtual KPrinter::Orientation defaultOrientation(); public: - virtual void print(QPainter &p, int width, int height); + virtual void print(TQPainter &p, int width, int height); virtual void readSettingsWidget(); virtual void setSettingsWidget(); virtual void loadConfig(); virtual void saveConfig(); - virtual void setDateRange( const QDate& from, const QDate& to ); + virtual void setDateRange( const TQDate& from, const TQDate& to ); protected: int mYear; 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(); diff --git a/korganizer/plugins/timespanview/kotimespanview.cpp b/korganizer/plugins/timespanview/kotimespanview.cpp index 507438a6a..eec3ab461 100644 --- a/korganizer/plugins/timespanview/kotimespanview.cpp +++ b/korganizer/plugins/timespanview/kotimespanview.cpp @@ -22,7 +22,7 @@ without including the source code for Qt in the source distribution. */ -#include <qlayout.h> +#include <tqlayout.h> #include <kconfig.h> #include <kstandarddirs.h> @@ -35,16 +35,16 @@ #include "kotimespanview.h" #include "kotimespanview.moc" -KOTimeSpanView::KOTimeSpanView(Calendar *calendar, QWidget *parent, +KOTimeSpanView::KOTimeSpanView(Calendar *calendar, TQWidget *parent, const char *name) : KOEventView( calendar, parent, name ) { - QBoxLayout *topLayout = new QVBoxLayout( this ); + TQBoxLayout *topLayout = new TQVBoxLayout( this ); mTimeSpanWidget = new TimeSpanWidget( this ); topLayout->addWidget( mTimeSpanWidget ); - connect( mTimeSpanWidget, SIGNAL( dateRangeChanged() ), SLOT( updateView() ) ); + connect( mTimeSpanWidget, TQT_SIGNAL( dateRangeChanged() ), TQT_SLOT( updateView() ) ); } KOTimeSpanView::~KOTimeSpanView() @@ -58,7 +58,7 @@ void KOTimeSpanView::readSettings() KConfig config( "korganizerrc", true, false); // Open read-only, no kdeglobals config.setGroup("Views"); - QValueList<int> sizes = config.readIntListEntry("Separator TimeSpanView"); + TQValueList<int> sizes = config.readIntListEntry("Separator TimeSpanView"); if (sizes.count() == 2) { mTimeSpanWidget->setSplitterSizes(sizes); } @@ -70,7 +70,7 @@ void KOTimeSpanView::writeSettings(KConfig *config) config->setGroup("Views"); - QValueList<int> list = mTimeSpanWidget->splitterSizes(); + TQValueList<int> list = mTimeSpanWidget->splitterSizes(); config->writeEntry("Separator TimeSpanView",list); } @@ -97,15 +97,15 @@ void KOTimeSpanView::updateView() mTimeSpanWidget->endDateTime().date() ); } -void KOTimeSpanView::showDates(const QDate &start, const QDate &end) +void KOTimeSpanView::showDates(const TQDate &start, const TQDate &end) { - QDate s = start.addDays( -2 ); - QDate e = end.addDays( 2 ); + TQDate s = start.addDays( -2 ); + TQDate e = end.addDays( 2 ); insertItems( s, e ); } -void KOTimeSpanView::insertItems(const QDate &start, const QDate &end) +void KOTimeSpanView::insertItems(const TQDate &start, const TQDate &end) { mTimeSpanWidget->clear(); mTimeSpanWidget->setDateRange( start, end ); diff --git a/korganizer/plugins/timespanview/kotimespanview.h b/korganizer/plugins/timespanview/kotimespanview.h index 142ba75f4..d115b630b 100644 --- a/korganizer/plugins/timespanview/kotimespanview.h +++ b/korganizer/plugins/timespanview/kotimespanview.h @@ -33,7 +33,7 @@ class KOTimeSpanView : public KOEventView { Q_OBJECT public: - KOTimeSpanView( Calendar *calendar, QWidget *parent = 0, + KOTimeSpanView( Calendar *calendar, TQWidget *parent = 0, const char *name = 0 ); ~KOTimeSpanView(); @@ -47,13 +47,13 @@ class KOTimeSpanView : public KOEventView public slots: virtual void updateView(); - virtual void showDates( const QDate &start, const QDate &end ); + virtual void showDates( const TQDate &start, const TQDate &end ); virtual void showIncidences( const Incidence::List &incidenceList ); void changeIncidenceDisplay(Incidence *, int); private: - void insertItems( const QDate &start, const QDate & end ); + void insertItems( const TQDate &start, const TQDate & end ); TimeSpanWidget *mTimeSpanWidget; }; diff --git a/korganizer/plugins/timespanview/lineview.cpp b/korganizer/plugins/timespanview/lineview.cpp index 26779bdb3..93a2f0bfa 100644 --- a/korganizer/plugins/timespanview/lineview.cpp +++ b/korganizer/plugins/timespanview/lineview.cpp @@ -22,7 +22,7 @@ without including the source code for Qt in the source distribution. */ -#include <qpainter.h> +#include <tqpainter.h> #include <kdebug.h> @@ -31,8 +31,8 @@ #include "lineview.h" #include "lineview.moc" -LineView::LineView( QWidget *parent, const char *name ) : - QScrollView( parent, name ) +LineView::LineView( TQWidget *parent, const char *name ) : + TQScrollView( parent, name ) { mPixelWidth = 1000; @@ -71,7 +71,7 @@ void LineView::clear() update(); } -void LineView::drawContents(QPainter* p, int cx, int cy, int cw, int ch) +void LineView::drawContents(TQPainter* p, int cx, int cy, int cw, int ch) { // kdDebug(5850) << "LineView::drawContents()" << endl; @@ -112,7 +112,7 @@ void LineView::drawContents(QPainter* p, int cx, int cy, int cw, int ch) if ( cbottom > (cy+ch) ) cbottom = cy+ch; // kdDebug(5850) << " drawContents(): ctop: " << ctop << " cbottom: " // << cbottom << " s: " << s << " e: " << e << endl; - p->fillRect( s, ctop, e - s + 1, cbottom - ctop + 1, QBrush("red") ); + p->fillRect( s, ctop, e - s + 1, cbottom - ctop + 1, TQBrush("red") ); } } } diff --git a/korganizer/plugins/timespanview/lineview.h b/korganizer/plugins/timespanview/lineview.h index 0bb1788a7..e98d905b0 100644 --- a/korganizer/plugins/timespanview/lineview.h +++ b/korganizer/plugins/timespanview/lineview.h @@ -24,14 +24,14 @@ #ifndef LINEVIEW_H #define LINEVIEW_H -#include <qscrollview.h> -#include <qptrlist.h> +#include <tqscrollview.h> +#include <tqptrlist.h> class LineView : public QScrollView { Q_OBJECT public: - LineView( QWidget *parent = 0, const char *name = 0 ); + LineView( TQWidget *parent = 0, const char *name = 0 ); virtual ~LineView(); int pixelWidth(); @@ -41,7 +41,7 @@ class LineView : public QScrollView void clear(); protected: - void drawContents(QPainter* p, int cx, int cy, int cw, int ch); + void drawContents(TQPainter* p, int cx, int cy, int cw, int ch); private: struct Line { @@ -51,7 +51,7 @@ class LineView : public QScrollView int end; }; - QPtrList<Line> mLines; + TQPtrList<Line> mLines; int mPixelWidth; }; diff --git a/korganizer/plugins/timespanview/timeline.cpp b/korganizer/plugins/timespanview/timeline.cpp index 0d679e192..19ed75818 100644 --- a/korganizer/plugins/timespanview/timeline.cpp +++ b/korganizer/plugins/timespanview/timeline.cpp @@ -22,15 +22,15 @@ without including the source code for Qt in the source distribution. */ -#include <qpainter.h> +#include <tqpainter.h> #include <kdebug.h> #include "timeline.h" #include "timeline.moc" -TimeLine::TimeLine( QWidget *parent, const char *name ) : - QScrollView( parent, name ) +TimeLine::TimeLine( TQWidget *parent, const char *name ) : + TQScrollView( parent, name ) { mPixelWidth = 1000; @@ -46,7 +46,7 @@ TimeLine::~TimeLine() { } -void TimeLine::drawContents(QPainter* p, int cx, int cy, int cw, int ch) +void TimeLine::drawContents(TQPainter* p, int cx, int cy, int cw, int ch) { int spacingX = mDaySpacing; int offsetX = mDayOffset; @@ -59,14 +59,14 @@ void TimeLine::drawContents(QPainter* p, int cx, int cy, int cw, int ch) while (x < cx + cw) { // kdDebug(5850) << " x: " << x << endl; p->drawLine(x,cy,x,cy+ch); - p->drawText( x + 5, 15, QString::number( mStartDate.addDays( cell + 1 ).date().day() ) ); + p->drawText( x + 5, 15, TQString::number( mStartDate.addDays( cell + 1 ).date().day() ) ); x += spacingX; cell++; } } -void TimeLine::setDateRange( const QDateTime &start, const QDateTime &end ) +void TimeLine::setDateRange( const TQDateTime &start, const TQDateTime &end ) { mStartDate = start; mEndDate = end; @@ -75,7 +75,7 @@ void TimeLine::setDateRange( const QDateTime &start, const QDateTime &end ) mDaySpacing = 60 * 60 * 24 / mSecsPerPixel; - mDayOffset = QDateTime( mStartDate.date() ).secsTo( mStartDate ) / mSecsPerPixel; + mDayOffset = TQDateTime( mStartDate.date() ).secsTo( mStartDate ) / mSecsPerPixel; kdDebug(5850) << "TimeLines::setDateRange(): mDaySpacing: " << mDaySpacing << " mDayOffset: " << mDayOffset << " mSecsPerPixel: " << mSecsPerPixel << endl; @@ -83,5 +83,5 @@ void TimeLine::setDateRange( const QDateTime &start, const QDateTime &end ) void TimeLine::setContentsPos( int pos ) { - QScrollView::setContentsPos ( pos, 0 ); + TQScrollView::setContentsPos ( pos, 0 ); } diff --git a/korganizer/plugins/timespanview/timeline.h b/korganizer/plugins/timespanview/timeline.h index 7c9bd8689..031763f72 100644 --- a/korganizer/plugins/timespanview/timeline.h +++ b/korganizer/plugins/timespanview/timeline.h @@ -24,27 +24,27 @@ #ifndef TIMELINE_H #define TIMELINE_H -#include <qscrollview.h> -#include <qdatetime.h> +#include <tqscrollview.h> +#include <tqdatetime.h> class TimeLine : public QScrollView { Q_OBJECT public: - TimeLine( QWidget *parent = 0, const char *name = 0 ); + TimeLine( TQWidget *parent = 0, const char *name = 0 ); virtual ~TimeLine(); - void setDateRange( const QDateTime &start, const QDateTime &end ); + void setDateRange( const TQDateTime &start, const TQDateTime &end ); public slots: void setContentsPos( int pos ); protected: - void drawContents(QPainter* p, int cx, int cy, int cw, int ch); + void drawContents(TQPainter* p, int cx, int cy, int cw, int ch); private: - QDateTime mStartDate; - QDateTime mEndDate; + TQDateTime mStartDate; + TQDateTime mEndDate; int mPixelWidth; int mDaySpacing; diff --git a/korganizer/plugins/timespanview/timespanview.cpp b/korganizer/plugins/timespanview/timespanview.cpp index be95a2c8d..24a45abb1 100644 --- a/korganizer/plugins/timespanview/timespanview.cpp +++ b/korganizer/plugins/timespanview/timespanview.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> @@ -51,7 +51,7 @@ TimespanView::TimespanView(KOrg::MainWindow *parent, const char *name) : setXMLFile( "plugins/timespanviewui.rc" ); - new KAction( i18n("&Timespan"), "timespan", 0, this, SLOT( showView() ), + new KAction( i18n("&Timespan"), "timespan", 0, this, TQT_SLOT( showView() ), actionCollection(), "view_timespan" ); } @@ -59,12 +59,12 @@ TimespanView::~TimespanView() { } -QString TimespanView::info() +TQString TimespanView::info() { return i18n("This plugin provides a Gantt-like Timespan view."); } -QString TimespanView::shortInfo() +TQString TimespanView::shortInfo() { return i18n( "Timespan View Plugin" ); } diff --git a/korganizer/plugins/timespanview/timespanview.h b/korganizer/plugins/timespanview/timespanview.h index e88e140c5..cb2d17f70 100644 --- a/korganizer/plugins/timespanview/timespanview.h +++ b/korganizer/plugins/timespanview/timespanview.h @@ -29,8 +29,8 @@ class TimespanView : public KOrg::Part { TimespanView(KOrg::MainWindow *, const char *); ~TimespanView(); - QString info(); - QString shortInfo(); + TQString info(); + TQString shortInfo(); private slots: void showView(); diff --git a/korganizer/plugins/timespanview/timespanwidget.cpp b/korganizer/plugins/timespanview/timespanwidget.cpp index 23d781f45..0e8f0c4b9 100644 --- a/korganizer/plugins/timespanview/timespanwidget.cpp +++ b/korganizer/plugins/timespanview/timespanwidget.cpp @@ -22,11 +22,11 @@ without including the source code for Qt in the source distribution. */ -#include <qsplitter.h> -#include <qlistview.h> -#include <qlayout.h> -#include <qheader.h> -#include <qpushbutton.h> +#include <tqsplitter.h> +#include <tqlistview.h> +#include <tqlayout.h> +#include <tqheader.h> +#include <tqpushbutton.h> #include <klocale.h> #include <kdebug.h> @@ -39,19 +39,19 @@ #include "timespanwidget.h" #include "timespanwidget.moc" -TimeSpanWidget::TimeSpanWidget( QWidget *parent, const char *name ) : - QWidget( parent, name ) +TimeSpanWidget::TimeSpanWidget( TQWidget *parent, const char *name ) : + TQWidget( parent, name ) { - QBoxLayout *topLayout = new QVBoxLayout( this ); + TQBoxLayout *topLayout = new TQVBoxLayout( this ); - mSplitter = new QSplitter( this ); + mSplitter = new TQSplitter( this ); topLayout->addWidget( mSplitter ); - mList = new QListView( mSplitter ); + mList = new TQListView( mSplitter ); mList->addColumn( i18n("Summary") ); - QWidget *rightPane = new QWidget( mSplitter ); - QBoxLayout *rightPaneLayout = new QVBoxLayout( rightPane ); + TQWidget *rightPane = new TQWidget( mSplitter ); + TQBoxLayout *rightPaneLayout = new TQVBoxLayout( rightPane ); mTimeLine = new TimeLine( rightPane ); mTimeLine->setFixedHeight( mList->header()->height() ); @@ -60,44 +60,44 @@ TimeSpanWidget::TimeSpanWidget( QWidget *parent, const char *name ) : mLineView = new LineView( rightPane ); rightPaneLayout->addWidget( mLineView ); - QBoxLayout *buttonLayout = new QHBoxLayout( rightPaneLayout ); + TQBoxLayout *buttonLayout = new TQHBoxLayout( rightPaneLayout ); - QPushButton *zoomInButton = new QPushButton( i18n("Zoom In"), rightPane ); - connect( zoomInButton, SIGNAL( clicked() ), SLOT( zoomIn() ) ); + TQPushButton *zoomInButton = new TQPushButton( i18n("Zoom In"), rightPane ); + connect( zoomInButton, TQT_SIGNAL( clicked() ), TQT_SLOT( zoomIn() ) ); buttonLayout->addWidget( zoomInButton ); - QPushButton *zoomOutButton = new QPushButton( i18n("Zoom Out"), rightPane ); - connect( zoomOutButton, SIGNAL( clicked() ), SLOT( zoomOut() ) ); + TQPushButton *zoomOutButton = new TQPushButton( i18n("Zoom Out"), rightPane ); + connect( zoomOutButton, TQT_SIGNAL( clicked() ), TQT_SLOT( zoomOut() ) ); buttonLayout->addWidget( zoomOutButton ); - QPushButton *centerButton = new QPushButton( i18n("Center View"), rightPane ); - connect( centerButton, SIGNAL( clicked() ), SLOT( centerView() ) ); + TQPushButton *centerButton = new TQPushButton( i18n("Center View"), rightPane ); + connect( centerButton, TQT_SIGNAL( clicked() ), TQT_SLOT( centerView() ) ); buttonLayout->addWidget( centerButton ); - connect(mLineView->horizontalScrollBar(),SIGNAL(valueChanged(int)), - mTimeLine,SLOT(setContentsPos(int))); + connect(mLineView->horizontalScrollBar(),TQT_SIGNAL(valueChanged(int)), + mTimeLine,TQT_SLOT(setContentsPos(int))); } TimeSpanWidget::~TimeSpanWidget() { } -QValueList<int> TimeSpanWidget::splitterSizes() +TQValueList<int> TimeSpanWidget::splitterSizes() { return mSplitter->sizes(); } -void TimeSpanWidget::setSplitterSizes( QValueList<int> sizes ) +void TimeSpanWidget::setSplitterSizes( TQValueList<int> sizes ) { mSplitter->setSizes( sizes ); } void TimeSpanWidget::addItem( KCal::Event *event ) { - new QListViewItem( mList, event->summary() ); + new TQListViewItem( mList, event->summary() ); - QDateTime startDt = event->dtStart(); - QDateTime endDt = event->dtEnd(); + TQDateTime startDt = event->dtStart(); + TQDateTime endDt = event->dtEnd(); // kdDebug(5850) << "TimeSpanWidget::addItem(): start: " << startDt.toString() // << " end: " << endDt.toString() << endl; @@ -130,7 +130,7 @@ void TimeSpanWidget::updateView() #endif } -void TimeSpanWidget::setDateRange( const QDateTime &start, const QDateTime &end ) +void TimeSpanWidget::setDateRange( const TQDateTime &start, const TQDateTime &end ) { mStartDate = start; mEndDate = end; @@ -140,12 +140,12 @@ void TimeSpanWidget::setDateRange( const QDateTime &start, const QDateTime &end mSecsPerPixel = mStartDate.secsTo( mEndDate ) / mLineView->pixelWidth(); } -QDateTime TimeSpanWidget::startDateTime() +TQDateTime TimeSpanWidget::startDateTime() { return mStartDate; } -QDateTime TimeSpanWidget::endDateTime() +TQDateTime TimeSpanWidget::endDateTime() { return mEndDate; } @@ -168,7 +168,7 @@ void TimeSpanWidget::zoomOut() void TimeSpanWidget::centerView() { - QScrollBar *scrollBar = mLineView->horizontalScrollBar(); + TQScrollBar *scrollBar = mLineView->horizontalScrollBar(); int min = scrollBar->minValue(); int max = scrollBar->maxValue(); scrollBar->setValue( min + (max-min) / 2 ); diff --git a/korganizer/plugins/timespanview/timespanwidget.h b/korganizer/plugins/timespanview/timespanwidget.h index 316437023..38cdea6c8 100644 --- a/korganizer/plugins/timespanview/timespanwidget.h +++ b/korganizer/plugins/timespanview/timespanwidget.h @@ -24,7 +24,7 @@ #ifndef TimeSpanWidget_H #define TimeSpanWidget_H -#include <qwidget.h> +#include <tqwidget.h> namespace KCal { class Event; @@ -39,20 +39,20 @@ class TimeSpanWidget : public QWidget { Q_OBJECT public: - TimeSpanWidget( QWidget *parent=0, const char *name=0 ); + TimeSpanWidget( TQWidget *parent=0, const char *name=0 ); virtual ~TimeSpanWidget(); void addItem( KCal::Event * ); - QValueList<int> splitterSizes(); - void setSplitterSizes( QValueList<int> ); + TQValueList<int> splitterSizes(); + void setSplitterSizes( TQValueList<int> ); void clear(); - void setDateRange( const QDateTime &start, const QDateTime &end ); + void setDateRange( const TQDateTime &start, const TQDateTime &end ); - QDateTime startDateTime(); - QDateTime endDateTime(); + TQDateTime startDateTime(); + TQDateTime endDateTime(); public slots: void updateView(); @@ -65,13 +65,13 @@ class TimeSpanWidget : public QWidget void dateRangeChanged(); private: - QSplitter *mSplitter; - QListView *mList; + TQSplitter *mSplitter; + TQListView *mList; TimeLine *mTimeLine; LineView *mLineView; - QDateTime mStartDate; - QDateTime mEndDate; + TQDateTime mStartDate; + TQDateTime mEndDate; int mSecsPerPixel; }; diff --git a/korganizer/printing/calprintdefaultplugins.cpp b/korganizer/printing/calprintdefaultplugins.cpp index d12df1e26..bc4c62496 100644 --- a/korganizer/printing/calprintdefaultplugins.cpp +++ b/korganizer/printing/calprintdefaultplugins.cpp @@ -26,11 +26,11 @@ #ifndef KORG_NOPRINTER -#include <qpainter.h> -#include <qdatetimeedit.h> -#include <qcheckbox.h> -#include <qlineedit.h> -#include <qbuttongroup.h> +#include <tqpainter.h> +#include <tqdatetimeedit.h> +#include <tqcheckbox.h> +#include <tqlineedit.h> +#include <tqbuttongroup.h> #include <kdebug.h> #include <kconfig.h> @@ -59,7 +59,7 @@ CalPrintIncidence::~CalPrintIncidence() { } -QWidget *CalPrintIncidence::createConfigWidget( QWidget *w ) +TQWidget *CalPrintIncidence::createConfigWidget( TQWidget *w ) { return new CalPrintIncidenceConfig_Base( w ); } @@ -124,9 +124,9 @@ class TimePrintStringsVisitor : public IncidenceBase::Visitor { return incidence->accept( *this ); } - QString mStartCaption, mStartString; - QString mEndCaption, mEndString; - QString mDurationCaption, mDurationString; + TQString mStartCaption, mStartString; + TQString mEndCaption, mEndString; + TQString mDurationCaption, mDurationString; protected: bool visit( Event *event ) { @@ -137,7 +137,7 @@ class TimePrintStringsVisitor : public IncidenceBase::Visitor mStartString = (event->doesFloat()) ? (event->dtStartDateStr(false)) : (event->dtStartStr()); } else { mStartCaption = i18n("No start date"); - mStartString = QString::null; + mStartString = TQString::null; } if ( event->hasEndDate() ) { @@ -154,7 +154,7 @@ class TimePrintStringsVisitor : public IncidenceBase::Visitor } } else { mEndCaption = i18n("No end date"); - mEndString = QString::null; + mEndString = TQString::null; } return true; } @@ -166,7 +166,7 @@ class TimePrintStringsVisitor : public IncidenceBase::Visitor mStartString = (todo->doesFloat()) ? (todo->dtStartDateStr(false)) : (todo->dtStartStr()); } else { mStartCaption = i18n("No start date"); - mStartString = QString::null; + mStartString = TQString::null; } if ( todo->hasDueDate() ) { @@ -174,7 +174,7 @@ class TimePrintStringsVisitor : public IncidenceBase::Visitor mEndString = (todo->doesFloat()) ? (todo->dtDueDateStr(false)) : (todo->dtDueStr()); } else { mEndCaption = i18n("No due date"); - mEndString = QString::null; + mEndString = TQString::null; } return true; } @@ -182,19 +182,19 @@ class TimePrintStringsVisitor : public IncidenceBase::Visitor mStartCaption = i18n("Start date: "); // TODO: Add shortfmt param to dtStartStr, dtEndStr and dtDueStr!!! mStartString = (journal->doesFloat()) ? (journal->dtStartDateStr(false)) : (journal->dtStartStr()); - mEndCaption = QString::null; - mEndString = QString::null; + mEndCaption = TQString::null; + mEndString = TQString::null; return true; } }; -int CalPrintIncidence::printCaptionAndText( QPainter &p, const QRect &box, const QString &caption, const QString &text, QFont captionFont, QFont textFont ) +int CalPrintIncidence::printCaptionAndText( TQPainter &p, const TQRect &box, const TQString &caption, const TQString &text, TQFont captionFont, TQFont textFont ) { - QFontMetrics captionFM( captionFont ); + TQFontMetrics captionFM( captionFont ); int textWd = captionFM.width( caption ); - QRect textRect( box ); + TQRect textRect( box ); - QFont oldFont( p.font() ); + TQFont oldFont( p.font() ); p.setFont( captionFont ); p.drawText( box, Qt::AlignLeft|Qt::AlignTop|Qt::SingleLine, caption ); @@ -207,17 +207,17 @@ int CalPrintIncidence::printCaptionAndText( QPainter &p, const QRect &box, const return textRect.bottom(); } -#include <qfontdatabase.h> -void CalPrintIncidence::print( QPainter &p, int width, int height ) +#include <tqfontdatabase.h> +void CalPrintIncidence::print( TQPainter &p, int width, int height ) { KLocale *local = KGlobal::locale(); - QFont oldFont(p.font()); - QFont textFont( "sans-serif", 11, QFont::Normal ); - QFont captionFont( "sans-serif", 11, QFont::Bold ); + TQFont oldFont(p.font()); + TQFont textFont( "sans-serif", 11, TQFont::Normal ); + TQFont captionFont( "sans-serif", 11, TQFont::Bold ); p.setFont( textFont ); int lineHeight = p.fontMetrics().lineSpacing(); - QString cap, txt; + TQString cap, txt; Incidence::List::ConstIterator it; @@ -257,21 +257,21 @@ void CalPrintIncidence::print( QPainter &p, int width, int height ) // | Categories: _____________________ | // +-----------------------------------+ - QRect box( 0, 0, width, height ); - QRect titleBox( box ); + TQRect box( 0, 0, width, height ); + TQRect titleBox( box ); titleBox.setHeight( headerHeight() ); // Draw summary as header, no small calendars in title bar, expand height if needed - int titleBottom = drawHeader( p, (*it)->summary(), QDate(), QDate(), titleBox, true ); + int titleBottom = drawHeader( p, (*it)->summary(), TQDate(), TQDate(), titleBox, true ); titleBox.setBottom( titleBottom ); - QRect timesBox( titleBox ); + TQRect timesBox( titleBox ); timesBox.setTop( titleBox.bottom() + padding() ); timesBox.setHeight( height / 8 ); TimePrintStringsVisitor stringVis; int h = timesBox.top(); if ( stringVis.act(*it) ) { - QRect textRect( timesBox.left()+padding(), timesBox.top()+padding(), 0, lineHeight ); + TQRect textRect( timesBox.left()+padding(), timesBox.top()+padding(), 0, lineHeight ); textRect.setRight( timesBox.center().x() ); h = printCaptionAndText( p, textRect, stringVis.mStartCaption, stringVis.mStartString, captionFont, textFont ); @@ -282,27 +282,27 @@ void CalPrintIncidence::print( QPainter &p, int width, int height ) if ( (*it)->doesRecur() ) { - QRect recurBox( timesBox.left()+padding(), h+padding(), timesBox.right()-padding(), lineHeight ); + TQRect recurBox( timesBox.left()+padding(), h+padding(), timesBox.right()-padding(), lineHeight ); // TODO: Convert the recurrence to a string and print it out! - QString recurString( "TODO: Convert Repeat to String!" ); + TQString recurString( "TODO: Convert Repeat to String!" ); h = QMAX( printCaptionAndText( p, recurBox, i18n("Repeats: "), recurString, captionFont, textFont ), h ); } - QRect alarmBox( timesBox.left()+padding(), h+padding(), timesBox.right()-padding(), lineHeight ); + TQRect alarmBox( timesBox.left()+padding(), h+padding(), timesBox.right()-padding(), lineHeight ); Alarm::List alarms = (*it)->alarms(); if ( alarms.count() == 0 ) { cap = i18n("No reminders"); - txt = QString::null; + txt = TQString::null; } else { cap = i18n("Reminder: ", "%n reminders: ", alarms.count() ); - QStringList alarmStrings; + TQStringList alarmStrings; KCal::Alarm::List::ConstIterator it; for ( it = alarms.begin(); it != alarms.end(); ++it ) { Alarm *alarm = *it; // Alarm offset, copied from koeditoralarms.cpp: - QString offsetstr; + TQString offsetstr; int offset = 0; if ( alarm->hasStartOffset() ) { offset = alarm->startOffset().asSeconds(); @@ -343,7 +343,7 @@ void CalPrintIncidence::print( QPainter &p, int width, int height ) h = QMAX( printCaptionAndText( p, alarmBox, cap, txt, captionFont, textFont ), h ); - QRect organizerBox( timesBox.left()+padding(), h+padding(), timesBox.right()-padding(), lineHeight ); + TQRect organizerBox( timesBox.left()+padding(), h+padding(), timesBox.right()-padding(), lineHeight ); h = QMAX( printCaptionAndText( p, organizerBox, i18n("Organizer: "), (*it)->organizer().fullName(), captionFont, textFont ), h ); // Finally, draw the frame around the time information... @@ -351,7 +351,7 @@ void CalPrintIncidence::print( QPainter &p, int width, int height ) drawBox( p, BOX_BORDER_WIDTH, timesBox ); - QRect locationBox( timesBox ); + TQRect locationBox( timesBox ); locationBox.setTop( timesBox.bottom() + padding() ); locationBox.setHeight( 0 ); int locationBottom = drawBoxWithCaption( p, locationBox, i18n("Location: "), @@ -360,20 +360,20 @@ void CalPrintIncidence::print( QPainter &p, int width, int height ) // Now start constructing the boxes from the bottom: - QRect categoriesBox( locationBox ); + TQRect categoriesBox( locationBox ); categoriesBox.setBottom( box.bottom() ); categoriesBox.setTop( categoriesBox.bottom() - lineHeight - 2*padding() ); - QRect attendeesBox( box.left(), categoriesBox.top()-padding()-box.height()/9, box.width(), box.height()/9 ); + TQRect attendeesBox( box.left(), categoriesBox.top()-padding()-box.height()/9, box.width(), box.height()/9 ); if ( !mShowAttendees ) { attendeesBox.setTop( categoriesBox.top() ); } - QRect attachmentsBox( box.left(), attendeesBox.top()-padding()-box.height()/9, box.width()*3/4 - padding(), box.height()/9 ); - QRect optionsBox( attachmentsBox.right() + padding(), attachmentsBox.top(), 0, 0 ); + TQRect attachmentsBox( box.left(), attendeesBox.top()-padding()-box.height()/9, box.width()*3/4 - padding(), box.height()/9 ); + TQRect optionsBox( attachmentsBox.right() + padding(), attachmentsBox.top(), 0, 0 ); optionsBox.setRight( box.right() ); optionsBox.setBottom( attachmentsBox.bottom() ); - QRect notesBox( optionsBox.left(), locationBox.bottom() + padding(), optionsBox.width(), 0 ); + TQRect notesBox( optionsBox.left(), locationBox.bottom() + padding(), optionsBox.width(), 0 ); notesBox.setBottom( optionsBox.top() - padding() ); // TODO: Adjust boxes depending on the show options... @@ -385,7 +385,7 @@ void CalPrintIncidence::print( QPainter &p, int width, int height ) // bool mShowAttachments; - QRect descriptionBox( notesBox ); + TQRect descriptionBox( notesBox ); descriptionBox.setLeft( box.left() ); descriptionBox.setRight( mShowOptions?(attachmentsBox.right()):(box.right()) ); @@ -396,9 +396,9 @@ void CalPrintIncidence::print( QPainter &p, int width, int height ) if ( mShowSubitemsNotes ) { if ( (*it)->relations().isEmpty() || (*it)->type() != "Todo" ) { int notesPosition = drawBoxWithCaption( p, notesBox, i18n("Notes:"), - QString::null, /*sameLine=*/false, /*expand=*/false, + TQString::null, /*sameLine=*/false, /*expand=*/false, captionFont, textFont ); - QPen oldPen( p.pen() ); + TQPen oldPen( p.pen() ); p.setPen( Qt::DotLine ); while ( (notesPosition += int(1.5*lineHeight)) < notesBox.bottom() ) { p.drawLine( notesBox.left()+padding(), notesPosition, notesBox.right()-padding(), notesPosition ); @@ -414,19 +414,19 @@ void CalPrintIncidence::print( QPainter &p, int width, int height ) if ( mShowAttachments ) { int attachStart = drawBoxWithCaption( p, attachmentsBox, - i18n("Attachments:"), QString::null, /*sameLine=*/false, + i18n("Attachments:"), TQString::null, /*sameLine=*/false, /*expand=*/false, captionFont, textFont ); // TODO: Print out the attachments somehow } if ( mShowAttendees ) { Attendee::List attendees = (*it)->attendees(); - QString attendeeCaption; + TQString attendeeCaption; if ( attendees.count() == 0 ) attendeeCaption = i18n("No Attendees"); else attendeeCaption = i18n("1 Attendee:", "%n Attendees:", attendees.count() ); - QString attendeeString; + TQString attendeeString; for ( Attendee::List::ConstIterator ait = attendees.begin(); ait != attendees.end(); ++ait ) { if ( !attendeeString.isEmpty() ) attendeeString += "\n"; attendeeString += i18n("Formatting of an attendee: " @@ -441,7 +441,7 @@ void CalPrintIncidence::print( QPainter &p, int width, int height ) } if ( mShowOptions ) { - QString optionsString; + TQString optionsString; if ( !(*it)->statusStr().isEmpty() ) { optionsString += i18n("Status: %1").arg( (*it)->statusStr() ); optionsString += "\n"; @@ -490,7 +490,7 @@ CalPrintDay::~CalPrintDay() { } -QWidget *CalPrintDay::createConfigWidget( QWidget *w ) +TQWidget *CalPrintDay::createConfigWidget( TQWidget *w ) { return new CalPrintDayConfig_Base( w ); } @@ -532,10 +532,10 @@ void CalPrintDay::setSettingsWidget() void CalPrintDay::loadConfig() { if ( mConfig ) { - QDate dt; - QTime tm1( dayStart() ); - QDateTime startTm( dt, tm1 ); - QDateTime endTm( dt, tm1.addSecs( 12 * 60 * 60 ) ); + TQDate dt; + TQTime tm1( dayStart() ); + TQDateTime startTm( dt, tm1 ); + TQDateTime endTm( dt, tm1.addSecs( 12 * 60 * 60 ) ); mStartTime = mConfig->readDateTimeEntry( "Start time", &startTm ).time(); mEndTime = mConfig->readDateTimeEntry( "End time", &endTm ).time(); mIncludeTodos = mConfig->readBoolEntry( "Include todos", false ); @@ -548,14 +548,14 @@ void CalPrintDay::saveConfig() { readSettingsWidget(); if ( mConfig ) { - mConfig->writeEntry( "Start time", QDateTime( QDate(), mStartTime ) ); - mConfig->writeEntry( "End time", QDateTime( QDate(), mEndTime ) ); + mConfig->writeEntry( "Start time", TQDateTime( TQDate(), mStartTime ) ); + mConfig->writeEntry( "End time", TQDateTime( TQDate(), mEndTime ) ); mConfig->writeEntry( "Include todos", mIncludeTodos ); mConfig->writeEntry( "Include all events", mIncludeAllEvents ); } } -void CalPrintDay::setDateRange( const QDate& from, const QDate& to ) +void CalPrintDay::setDateRange( const TQDate& from, const TQDate& to ) { CalPrintPluginBase::setDateRange( from, to ); CalPrintDayConfig_Base *cfg = @@ -566,45 +566,45 @@ void CalPrintDay::setDateRange( const QDate& from, const QDate& to ) } } -void CalPrintDay::print( QPainter &p, int width, int height ) +void CalPrintDay::print( TQPainter &p, int width, int height ) { - QDate curDay( mFromDate ); + TQDate curDay( mFromDate ); do { - QTime curStartTime( mStartTime ); - QTime curEndTime( mEndTime ); + TQTime curStartTime( mStartTime ); + TQTime curEndTime( mEndTime ); // For an invalid time range, simply show one hour, starting at the hour // before the given start time if ( curEndTime <= curStartTime ) { - curStartTime = QTime( curStartTime.hour(), 0, 0 ); + curStartTime = TQTime( curStartTime.hour(), 0, 0 ); curEndTime = curStartTime.addSecs( 3600 ); } KLocale *local = KGlobal::locale(); - QRect headerBox( 0, 0, width, headerHeight() ); - drawHeader( p, local->formatDate( curDay ), curDay, QDate(), headerBox ); + TQRect headerBox( 0, 0, width, headerHeight() ); + drawHeader( p, local->formatDate( curDay ), curDay, TQDate(), headerBox ); Event::List eventList = mCalendar->events( curDay, EventSortStartDate, SortDirectionAscending ); - p.setFont( QFont( "sans-serif", 12 ) ); + p.setFont( TQFont( "sans-serif", 12 ) ); // TODO: Find a good way to determine the height of the all-day box - QRect allDayBox( TIMELINE_WIDTH + padding(), headerBox.bottom() + padding(), + TQRect allDayBox( TIMELINE_WIDTH + padding(), headerBox.bottom() + padding(), 0, height / 20 ); allDayBox.setRight( width ); int allDayHeight = drawAllDayBox( p, eventList, curDay, true, allDayBox ); - QRect dayBox( allDayBox ); + TQRect dayBox( allDayBox ); dayBox.setTop( allDayHeight /*allDayBox.bottom()*/ ); dayBox.setBottom( height ); drawAgendaDayBox( p, eventList, curDay, mIncludeAllEvents, curStartTime, curEndTime, dayBox ); - QRect tlBox( dayBox ); + TQRect tlBox( dayBox ); tlBox.setLeft( 0 ); tlBox.setWidth( TIMELINE_WIDTH ); drawTimeLine( p, curStartTime, curEndTime, tlBox ); @@ -627,7 +627,7 @@ CalPrintWeek::~CalPrintWeek() { } -QWidget *CalPrintWeek::createConfigWidget( QWidget *w ) +TQWidget *CalPrintWeek::createConfigWidget( TQWidget *w ) { return new CalPrintWeekConfig_Base( w ); } @@ -672,10 +672,10 @@ void CalPrintWeek::setSettingsWidget() void CalPrintWeek::loadConfig() { if ( mConfig ) { - QDate dt; - QTime tm1( dayStart() ); - QDateTime startTm( dt, tm1 ); - QDateTime endTm( dt, tm1.addSecs( 43200 ) ); + TQDate dt; + TQTime tm1( dayStart() ); + TQDateTime startTm( dt, tm1 ); + TQDateTime endTm( dt, tm1.addSecs( 43200 ) ); mStartTime = mConfig->readDateTimeEntry( "Start time", &startTm ).time(); mEndTime = mConfig->readDateTimeEntry( "End time", &endTm ).time(); mIncludeTodos = mConfig->readBoolEntry( "Include todos", false ); @@ -688,8 +688,8 @@ void CalPrintWeek::saveConfig() { readSettingsWidget(); if ( mConfig ) { - mConfig->writeEntry( "Start time", QDateTime( QDate(), mStartTime ) ); - mConfig->writeEntry( "End time", QDateTime( QDate(), mEndTime ) ); + mConfig->writeEntry( "Start time", TQDateTime( TQDate(), mStartTime ) ); + mConfig->writeEntry( "End time", TQDateTime( TQDate(), mEndTime ) ); mConfig->writeEntry( "Include todos", mIncludeTodos ); mConfig->writeEntry( "Print type", int( mWeekPrintType ) ); } @@ -702,7 +702,7 @@ KPrinter::Orientation CalPrintWeek::defaultOrientation() else return KPrinter::Landscape; } -void CalPrintWeek::setDateRange( const QDate &from, const QDate &to ) +void CalPrintWeek::setDateRange( const TQDate &from, const TQDate &to ) { CalPrintPluginBase::setDateRange( from, to ); CalPrintWeekConfig_Base *cfg = @@ -713,9 +713,9 @@ void CalPrintWeek::setDateRange( const QDate &from, const QDate &to ) } } -void CalPrintWeek::print( QPainter &p, int width, int height ) +void CalPrintWeek::print( TQPainter &p, int width, int height ) { - QDate curWeek, fromWeek, toWeek; + TQDate curWeek, fromWeek, toWeek; // correct begin and end to first and last day of week int weekdayCol = weekdayColumn( mFromDate.dayOfWeek() ); @@ -726,9 +726,9 @@ void CalPrintWeek::print( QPainter &p, int width, int height ) curWeek = fromWeek.addDays( 6 ); KLocale *local = KGlobal::locale(); - QString line1, line2, title; - QRect headerBox( 0, 0, width, headerHeight() ); - QRect weekBox( headerBox ); + TQString line1, line2, title; + TQRect headerBox( 0, 0, width, headerHeight() ); + TQRect weekBox( headerBox ); weekBox.setTop( headerBox.bottom() + padding() ); weekBox.setBottom( height ); @@ -743,7 +743,7 @@ void CalPrintWeek::print( QPainter &p, int width, int height ) title = i18n("date from-\nto", "%1 -\n%2");; } title = title.arg( line1 ).arg( line2 ); - drawHeader( p, title, curWeek.addDays( -6 ), QDate(), headerBox ); + drawHeader( p, title, curWeek.addDays( -6 ), TQDate(), headerBox ); drawWeek( p, curWeek, weekBox ); curWeek = curWeek.addDays( 7 ); if ( curWeek <= toWeek ) @@ -762,8 +762,8 @@ void CalPrintWeek::print( QPainter &p, int width, int height ) title = i18n("date from -\nto (week number)", "%1 -\n%2 (Week %3)"); } title = title.arg( line1 ).arg( line2 ).arg( curWeek.weekNumber() ); - drawHeader( p, title, curWeek, QDate(), headerBox ); - QRect weekBox( headerBox ); + drawHeader( p, title, curWeek, TQDate(), headerBox ); + TQRect weekBox( headerBox ); weekBox.setTop( headerBox.bottom() + padding() ); weekBox.setBottom( height ); @@ -776,19 +776,19 @@ void CalPrintWeek::print( QPainter &p, int width, int height ) break; case SplitWeek: { - QRect weekBox1( weekBox ); + TQRect weekBox1( weekBox ); // On the left side there are four days (mo-th) plus the timeline, // on the right there are only three days (fr-su) plus the timeline. Don't // use the whole width, but rather give them the same width as on the left. weekBox1.setRight( int( ( width - TIMELINE_WIDTH ) * 3. / 4. + TIMELINE_WIDTH ) ); do { - QDate endLeft( fromWeek.addDays( 3 ) ); + TQDate endLeft( fromWeek.addDays( 3 ) ); int hh = headerHeight(); drawTimeTable( p, fromWeek, endLeft, mStartTime, mEndTime, weekBox ); mPrinter->newPage(); - drawSplitHeaderRight( p, fromWeek, curWeek, QDate(), width, hh ); + drawSplitHeaderRight( p, fromWeek, curWeek, TQDate(), width, hh ); drawTimeTable( p, endLeft.addDays( 1 ), curWeek, mStartTime, mEndTime, weekBox1 ); @@ -817,7 +817,7 @@ CalPrintMonth::~CalPrintMonth() { } -QWidget *CalPrintMonth::createConfigWidget( QWidget *w ) +TQWidget *CalPrintMonth::createConfigWidget( TQWidget *w ) { return new CalPrintMonthConfig_Base( w ); } @@ -827,8 +827,8 @@ void CalPrintMonth::readSettingsWidget() CalPrintMonthConfig_Base *cfg = dynamic_cast<CalPrintMonthConfig_Base *>( mConfigWidget ); if ( cfg ) { - mFromDate = QDate( cfg->mFromYear->value(), cfg->mFromMonth->currentItem()+1, 1 ); - mToDate = QDate( cfg->mToYear->value(), cfg->mToMonth->currentItem()+1, 1 ); + mFromDate = TQDate( cfg->mFromYear->value(), cfg->mFromMonth->currentItem()+1, 1 ); + mToDate = TQDate( cfg->mToYear->value(), cfg->mToMonth->currentItem()+1, 1 ); mWeekNumbers = cfg->mWeekNumbers->isChecked(); mRecurDaily = cfg->mRecurDaily->isChecked(); @@ -874,7 +874,7 @@ void CalPrintMonth::saveConfig() } } -void CalPrintMonth::setDateRange( const QDate &from, const QDate &to ) +void CalPrintMonth::setDateRange( const TQDate &from, const TQDate &to ) { CalPrintPluginBase::setDateRange( from, to ); CalPrintMonthConfig_Base *cfg = @@ -898,9 +898,9 @@ void CalPrintMonth::setDateRange( const QDate &from, const QDate &to ) } } -void CalPrintMonth::print( QPainter &p, int width, int height ) +void CalPrintMonth::print( TQPainter &p, int width, int height ) { - QDate curMonth, fromMonth, toMonth; + TQDate curMonth, fromMonth, toMonth; fromMonth = mFromDate.addDays( -( mFromDate.day() - 1 ) ); toMonth = mToDate.addDays( mToDate.daysInMonth() - mToDate.day() ); @@ -909,15 +909,15 @@ void CalPrintMonth::print( QPainter &p, int width, int height ) const KCalendarSystem *calSys = calendarSystem(); if ( !calSys ) return; - QRect headerBox( 0, 0, width, headerHeight() ); - QRect monthBox( 0, 0, width, height ); + TQRect headerBox( 0, 0, width, headerHeight() ); + TQRect monthBox( 0, 0, width, height ); monthBox.setTop( headerBox.bottom() + padding() ); do { - QString title( i18n("monthname year", "%1 %2") ); + TQString title( i18n("monthname year", "%1 %2") ); title = title.arg( calSys->monthName( curMonth ) ) .arg( curMonth.year() ); - QDate tmp( fromMonth ); + TQDate tmp( fromMonth ); int weekdayCol = weekdayColumn( tmp.dayOfWeek() ); tmp = tmp.addDays( -weekdayCol ); @@ -947,7 +947,7 @@ CalPrintTodos::~CalPrintTodos() { } -QWidget *CalPrintTodos::createConfigWidget( QWidget *w ) +TQWidget *CalPrintTodos::createConfigWidget( TQWidget *w ) { return new CalPrintTodoConfig_Base( w ); } @@ -1051,7 +1051,7 @@ void CalPrintTodos::saveConfig() } } -void CalPrintTodos::print( QPainter &p, int width, int height ) +void CalPrintTodos::print( TQPainter &p, int width, int height ) { // TODO: Find a good way to guarantee a nicely designed output int pospriority = 10; @@ -1062,15 +1062,15 @@ void CalPrintTodos::print( QPainter &p, int width, int height ) int fontHeight = 10; // Draw the First Page Header - drawHeader( p, mPageTitle, mFromDate, QDate(), - QRect( 0, 0, width, headerHeight() ) ); + drawHeader( p, mPageTitle, mFromDate, TQDate(), + TQRect( 0, 0, width, headerHeight() ) ); // Draw the Column Headers int mCurrentLinePos = headerHeight() + 5; - QString outStr; - QFont oldFont( p.font() ); + TQString outStr; + TQFont oldFont( p.font() ); - p.setFont( QFont( "sans-serif", 10, QFont::Bold ) ); + p.setFont( TQFont( "sans-serif", 10, TQFont::Bold ) ); lineSpacing = p.fontMetrics().lineSpacing(); mCurrentLinePos += lineSpacing; if ( mIncludePriority ) { @@ -1103,7 +1103,7 @@ void CalPrintTodos::print( QPainter &p, int width, int height ) posdue = -1; } - p.setFont( QFont( "sans-serif", 10 ) ); + p.setFont( TQFont( "sans-serif", 10 ) ); fontHeight = p.fontMetrics().height(); Todo::List todoList; diff --git a/korganizer/printing/calprintdefaultplugins.h b/korganizer/printing/calprintdefaultplugins.h index 463312ff2..79a909a87 100644 --- a/korganizer/printing/calprintdefaultplugins.h +++ b/korganizer/printing/calprintdefaultplugins.h @@ -42,8 +42,8 @@ class CalPrintIncidence : public CalPrintPluginBase public: CalPrintIncidence(); virtual ~CalPrintIncidence(); - virtual QString description() { return i18n("Print &incidence"); } - virtual QString info() { return i18n("Prints an incidence on one page"); } + virtual TQString description() { return i18n("Print &incidence"); } + virtual TQString info() { return i18n("Prints an incidence on one page"); } virtual int sortID() { return CalPrinterBase::Incidence; } // Enable the Print Incidence option only if there are selected incidences. virtual bool enabled() @@ -54,19 +54,19 @@ class CalPrintIncidence : public CalPrintPluginBase return false; } } - virtual QWidget *createConfigWidget(QWidget*); + virtual TQWidget *createConfigWidget(TQWidget*); virtual KPrinter::Orientation defaultOrientation() { return KPrinter::Portrait; } public: - void print( QPainter &p, int width, int height ); + void print( TQPainter &p, int width, int height ); virtual void readSettingsWidget(); virtual void setSettingsWidget(); virtual void loadConfig(); virtual void saveConfig(); protected: - int printCaptionAndText( QPainter &p, const QRect &box, const QString &caption, - const QString &text, QFont captionFont, QFont textFont ); + int printCaptionAndText( TQPainter &p, const TQRect &box, const TQString &caption, + const TQString &text, TQFont captionFont, TQFont textFont ); protected: @@ -82,22 +82,22 @@ class CalPrintDay : public CalPrintPluginBase public: CalPrintDay(); virtual ~CalPrintDay(); - virtual QString description() { return i18n("Print da&y"); } - virtual QString info() { return i18n("Prints all events of a single day on one page"); } + virtual TQString description() { return i18n("Print da&y"); } + virtual TQString info() { return i18n("Prints all events of a single day on one page"); } virtual int sortID() { return CalPrinterBase::Day; } virtual bool enabled() { return true; } - virtual QWidget *createConfigWidget( QWidget* ); + virtual TQWidget *createConfigWidget( TQWidget* ); public: - void print(QPainter &p, int width, int height); + void print(TQPainter &p, int width, int height); virtual void readSettingsWidget(); virtual void setSettingsWidget(); virtual void loadConfig(); virtual void saveConfig(); - virtual void setDateRange( const QDate& from, const QDate& to ); + virtual void setDateRange( const TQDate& from, const TQDate& to ); protected: - QTime mStartTime, mEndTime; + TQTime mStartTime, mEndTime; bool mIncludeTodos; bool mIncludeAllEvents; }; @@ -107,27 +107,27 @@ class CalPrintWeek : public CalPrintPluginBase public: CalPrintWeek(); virtual ~CalPrintWeek(); - virtual QString description() { return i18n("Print &week"); } - virtual QString info() { return i18n("Prints all events of one week on one page"); } + virtual TQString description() { return i18n("Print &week"); } + virtual TQString info() { return i18n("Prints all events of one week on one page"); } virtual int sortID() { return CalPrinterBase::Week; } virtual bool enabled() { return true; } - virtual QWidget *createConfigWidget(QWidget*); + virtual TQWidget *createConfigWidget(TQWidget*); /** Returns the default orientation for the eWeekPrintType. */ virtual KPrinter::Orientation defaultOrientation(); public: - void print(QPainter &p, int width, int height); + void print(TQPainter &p, int width, int height); virtual void readSettingsWidget(); virtual void setSettingsWidget(); virtual void loadConfig(); virtual void saveConfig(); - virtual void setDateRange( const QDate& from, const QDate& to ); + virtual void setDateRange( const TQDate& from, const TQDate& to ); protected: enum eWeekPrintType { Filofax=0, Timetable, SplitWeek } mWeekPrintType; - QTime mStartTime, mEndTime; + TQTime mStartTime, mEndTime; bool mIncludeTodos; }; @@ -136,20 +136,20 @@ class CalPrintMonth : public CalPrintPluginBase public: CalPrintMonth(); virtual ~CalPrintMonth(); - virtual QString description() { return i18n("Print mont&h"); } - virtual QString info() { return i18n("Prints all events of one month on one page"); } + virtual TQString description() { return i18n("Print mont&h"); } + virtual TQString info() { return i18n("Prints all events of one month on one page"); } virtual int sortID() { return CalPrinterBase::Month; } virtual bool enabled() { return true; } - virtual QWidget *createConfigWidget(QWidget*); + virtual TQWidget *createConfigWidget(TQWidget*); virtual KPrinter::Orientation defaultOrientation() { return KPrinter::Landscape; } public: - void print(QPainter &p, int width, int height); + void print(TQPainter &p, int width, int height); virtual void readSettingsWidget(); virtual void setSettingsWidget(); virtual void loadConfig(); virtual void saveConfig(); - virtual void setDateRange( const QDate& from, const QDate& to ); + virtual void setDateRange( const TQDate& from, const TQDate& to ); protected: bool mWeekNumbers; @@ -163,21 +163,21 @@ class CalPrintTodos : public CalPrintPluginBase public: CalPrintTodos(); virtual ~CalPrintTodos(); - virtual QString description() { return i18n("Print to-&dos"); } - virtual QString info() { return i18n("Prints all to-dos in a (tree-like) list"); } + virtual TQString description() { return i18n("Print to-&dos"); } + virtual TQString info() { return i18n("Prints all to-dos in a (tree-like) list"); } virtual int sortID() { return CalPrinterBase::Todolist; } virtual bool enabled() { return true; } - virtual QWidget *createConfigWidget(QWidget*); + virtual TQWidget *createConfigWidget(TQWidget*); public: - void print( QPainter &p, int width, int height ); + void print( TQPainter &p, int width, int height ); virtual void readSettingsWidget(); virtual void setSettingsWidget(); virtual void loadConfig(); virtual void saveConfig(); protected: - QString mPageTitle; + TQString mPageTitle; enum eTodoPrintType { TodosAll = 0, TodosUnfinished, TodosDueRange diff --git a/korganizer/printing/calprinter.cpp b/korganizer/printing/calprinter.cpp index 066c9c296..0ab61fdac 100644 --- a/korganizer/printing/calprinter.cpp +++ b/korganizer/printing/calprinter.cpp @@ -23,15 +23,15 @@ without including the source code for Qt in the source distribution. */ -#include <qvbuttongroup.h> -#include <qwidgetstack.h> -#include <qradiobutton.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qcombobox.h> -#include <qlabel.h> -#include <qvbox.h> -#include <qsplitter.h> +#include <tqvbuttongroup.h> +#include <tqwidgetstack.h> +#include <tqradiobutton.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqcombobox.h> +#include <tqlabel.h> +#include <tqvbox.h> +#include <tqsplitter.h> #include <kprinter.h> #include <ksimpleconfig.h> @@ -46,8 +46,8 @@ #include "calprintdefaultplugins.h" -CalPrinter::CalPrinter( QWidget *parent, Calendar *calendar, KOrg::CoreHelper *helper ) - : QObject( parent, "CalPrinter" ) +CalPrinter::CalPrinter( TQWidget *parent, Calendar *calendar, KOrg::CoreHelper *helper ) + : TQObject( parent, "CalPrinter" ) { mParent = parent; mConfig = new KSimpleConfig( "korganizer_printing.rc" ); @@ -90,7 +90,7 @@ void CalPrinter::init( Calendar *calendar ) } } -void CalPrinter::setDateRange( const QDate &fd, const QDate &td ) +void CalPrinter::setDateRange( const TQDate &fd, const TQDate &td ) { KOrg::PrintPlugin::List::Iterator it = mPrintPlugins.begin(); for ( ; it != mPrintPlugins.end(); ++it ) { @@ -98,7 +98,7 @@ void CalPrinter::setDateRange( const QDate &fd, const QDate &td ) } } -void CalPrinter::print( int type, const QDate &fd, const QDate &td, +void CalPrinter::print( int type, const TQDate &fd, const TQDate &td, Incidence::List selectedIncidences, bool preview ) { KOrg::PrintPlugin::List::Iterator it = mPrintPlugins.begin(); @@ -111,7 +111,7 @@ void CalPrinter::print( int type, const QDate &fd, const QDate &td, printDialog.setPrintType( type ); setDateRange( fd, td ); - if ( printDialog.exec() == QDialog::Accepted ) { + if ( printDialog.exec() == TQDialog::Accepted ) { mConfig->writeEntry( "Orientation", printDialog.orientation() ); // Save all changes in the dialog @@ -168,33 +168,33 @@ void CalPrinter::updateConfig() /****************************************************************************/ CalPrintDialog::CalPrintDialog( KOrg::PrintPlugin::List plugins, - QWidget *parent, const char *name ) + TQWidget *parent, const char *name ) : KDialogBase( parent, name, /*modal*/true, i18n("Print"), Ok | Cancel ) { - QVBox *page = makeVBoxMainWidget(); + TQVBox *page = makeVBoxMainWidget(); - QSplitter *splitter = new QSplitter( page ); - splitter->setOrientation( QSplitter::Horizontal ); + TQSplitter *splitter = new TQSplitter( page ); + splitter->setOrientation( TQSplitter::Horizontal ); - mTypeGroup = new QVButtonGroup( i18n("Print Style"), splitter, "buttonGroup" ); + mTypeGroup = new TQVButtonGroup( i18n("Print Style"), splitter, "buttonGroup" ); // use the minimal width possible = max width of the radio buttons, not extensible -/* mTypeGroup->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, - (QSizePolicy::SizeType)5, 0, 0, +/* mTypeGroup->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, + (TQSizePolicy::SizeType)5, 0, 0, mTypeGroup->sizePolicy().hasHeightForWidth() ) );*/ - QWidget *splitterRight = new QWidget( splitter, "splitterRight" ); - QGridLayout *splitterRightLayout = new QGridLayout( splitterRight ); + TQWidget *splitterRight = new TQWidget( splitter, "splitterRight" ); + TQGridLayout *splitterRightLayout = new TQGridLayout( splitterRight ); splitterRightLayout->setMargin( marginHint() ); splitterRightLayout->setSpacing( spacingHint() ); - mConfigArea = new QWidgetStack( splitterRight, "configWidgetStack" ); + mConfigArea = new TQWidgetStack( splitterRight, "configWidgetStack" ); splitterRightLayout->addMultiCellWidget( mConfigArea, 0,0, 0,1 ); - QLabel *orientationLabel = new QLabel( i18n("Page &orientation:"), + TQLabel *orientationLabel = new TQLabel( i18n("Page &orientation:"), splitterRight, "orientationLabel" ); splitterRightLayout->addWidget( orientationLabel, 1, 0 ); - mOrientationSelection = new QComboBox( splitterRight, "orientationCombo" ); + mOrientationSelection = new TQComboBox( splitterRight, "orientationCombo" ); mOrientationSelection->insertItem( i18n("Use Default Orientation of Selected Style") ); mOrientationSelection->insertItem( i18n("Use Printer Default") ); mOrientationSelection->insertItem( i18n("Portrait") ); @@ -202,7 +202,7 @@ CalPrintDialog::CalPrintDialog( KOrg::PrintPlugin::List plugins, splitterRightLayout->addWidget( mOrientationSelection, 1, 1 ); // signals and slots connections - connect( mTypeGroup, SIGNAL( clicked( int ) ), SLOT( setPrintType( int ) ) ); + connect( mTypeGroup, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( setPrintType( int ) ) ); orientationLabel->setBuddy( mOrientationSelection ); // First insert the config widgets into the widget stack. This possibly assigns @@ -214,10 +214,10 @@ CalPrintDialog::CalPrintDialog( KOrg::PrintPlugin::List plugins, mPluginIDs[newid] = (*it); } // Insert all plugins with in sorted order; plugins with clashing IDs will be first... - QMap<int, KOrg::PrintPlugin*>::ConstIterator mapit; + TQMap<int, KOrg::PrintPlugin*>::ConstIterator mapit; for ( mapit = mPluginIDs.begin(); mapit != mPluginIDs.end(); ++mapit ) { KOrg::PrintPlugin *p = mapit.data(); - QRadioButton *radioButton = new QRadioButton( p->description(), mTypeGroup ); + TQRadioButton *radioButton = new TQRadioButton( p->description(), mTypeGroup ); radioButton->setEnabled( p->enabled() ); mTypeGroup->insert( radioButton, mapit.key() ); // radioButton->setMinimumHeight( radioButton->sizeHint().height() - 5 ); @@ -266,7 +266,7 @@ void CalPrintDialog::slotOk() { mOrientation = (CalPrinter::ePrintOrientation)mOrientationSelection->currentItem(); - QMap<int, KOrg::PrintPlugin*>::Iterator it = mPluginIDs.begin(); + TQMap<int, KOrg::PrintPlugin*>::Iterator it = mPluginIDs.begin(); for ( ; it != mPluginIDs.end(); ++it ) { if ( it.data() ) it.data()->readSettingsWidget(); diff --git a/korganizer/printing/calprinter.h b/korganizer/printing/calprinter.h index e05073e58..a1cea6a24 100644 --- a/korganizer/printing/calprinter.h +++ b/korganizer/printing/calprinter.h @@ -27,7 +27,7 @@ #ifndef KORG_NOPRINTER -#include <qptrlist.h> +#include <tqptrlist.h> #include <kdialogbase.h> #include <korganizer/baseview.h> #include <korganizer/printplugin.h> @@ -50,7 +50,7 @@ class QLabel; different formats (day, week, month). It also provides a way for setting up the printer and remembering these preferences. */ -class KDE_EXPORT CalPrinter : public QObject, public KOrg::CalPrinterBase +class KDE_EXPORT CalPrinter : public TQObject, public KOrg::CalPrinterBase { Q_OBJECT @@ -67,7 +67,7 @@ class KDE_EXPORT CalPrinter : public QObject, public KOrg::CalPrinterBase \param cal calendar to be printed \param helper is a pointer to the KOrg::CoreHelper object */ - CalPrinter( QWidget *par, Calendar *cal, KOrg::CoreHelper *helper ); + CalPrinter( TQWidget *par, Calendar *cal, KOrg::CoreHelper *helper ); virtual ~CalPrinter(); void init( Calendar *calendar ); @@ -78,7 +78,7 @@ class KDE_EXPORT CalPrinter : public QObject, public KOrg::CalPrinterBase \param start Start date \param end End date */ - void setDateRange( const QDate &start, const QDate &end ); + void setDateRange( const TQDate &start, const TQDate &end ); public slots: void updateConfig(); @@ -87,7 +87,7 @@ class KDE_EXPORT CalPrinter : public QObject, public KOrg::CalPrinterBase void doPrint( KOrg::PrintPlugin *selectedStyle, CalPrinter::ePrintOrientation dlgorientation, bool preview = false ); public: - void print( int type, const QDate &fd, const QDate &td, + void print( int type, const TQDate &fd, const TQDate &td, Incidence::List selectedIncidences = Incidence::List(), bool preview = false ); Calendar *calendar() const; @@ -98,7 +98,7 @@ class KDE_EXPORT CalPrinter : public QObject, public KOrg::CalPrinterBase private: Calendar *mCalendar; - QWidget *mParent; + TQWidget *mParent; KConfig *mConfig; KOrg::CoreHelper *mCoreHelper; }; @@ -108,7 +108,7 @@ class CalPrintDialog : public KDialogBase Q_OBJECT public: CalPrintDialog( KOrg::PrintPlugin::List plugins, - QWidget *parent = 0, const char *name = 0 ); + TQWidget *parent = 0, const char *name = 0 ); virtual ~CalPrintDialog(); KOrg::PrintPlugin *selectedPlugin(); void setOrientation( CalPrinter::ePrintOrientation orientation ); @@ -122,11 +122,11 @@ class CalPrintDialog : public KDialogBase void slotOk(); private: - QVButtonGroup *mTypeGroup; - QWidgetStack *mConfigArea; - QMap<int, KOrg::PrintPlugin*> mPluginIDs; - QString mPreviewText; - QComboBox *mOrientationSelection; + TQVButtonGroup *mTypeGroup; + TQWidgetStack *mConfigArea; + TQMap<int, KOrg::PrintPlugin*> mPluginIDs; + TQString mPreviewText; + TQComboBox *mOrientationSelection; CalPrinter::ePrintOrientation mOrientation; }; diff --git a/korganizer/printing/calprintpluginbase.cpp b/korganizer/printing/calprintpluginbase.cpp index 44739db48..6f6762032 100644 --- a/korganizer/printing/calprintpluginbase.cpp +++ b/korganizer/printing/calprintpluginbase.cpp @@ -23,10 +23,10 @@ without including the source code for Qt in the source distribution. */ -#include <qpainter.h> -#include <qlayout.h> -#include <qframe.h> -#include <qlabel.h> +#include <tqpainter.h> +#include <tqlayout.h> +#include <tqframe.h> +#include <tqlabel.h> #include <kdebug.h> #include <kconfig.h> @@ -48,10 +48,10 @@ inline int round(const double x) class CalPrintPluginBase::TodoParentStart { public: - TodoParentStart( QRect pt = QRect(), bool page = true ) + TodoParentStart( TQRect pt = TQRect(), bool page = true ) : mRect( pt ), mSamePage( page ) {} - QRect mRect; + TQRect mRect; bool mSamePage; }; @@ -64,17 +64,17 @@ class CalPrintPluginBase::TodoParentStart class PrintCellItem : public KOrg::CellItem { public: - PrintCellItem( Event *event, const QDateTime &start, const QDateTime &end ) + PrintCellItem( Event *event, const TQDateTime &start, const TQDateTime &end ) : mEvent( event ), mStart( start), mEnd( end ) { } Event *event() const { return mEvent; } - QString label() const { return mEvent->summary(); } + TQString label() const { return mEvent->summary(); } - QDateTime start() const { return mStart; } - QDateTime end() const { return mEnd; } + TQDateTime start() const { return mStart; } + TQDateTime end() const { return mEnd; } /** Calculate the start and end date/time of the recurrence that happens on the given day */ @@ -96,7 +96,7 @@ class PrintCellItem : public KOrg::CellItem private: Event *mEvent; - QDateTime mStart, mEnd; + TQDateTime mStart, mEnd; }; @@ -118,21 +118,21 @@ CalPrintPluginBase::~CalPrintPluginBase() -QWidget *CalPrintPluginBase::createConfigWidget( QWidget *w ) +TQWidget *CalPrintPluginBase::createConfigWidget( TQWidget *w ) { - QFrame *wdg = new QFrame( w ); - QVBoxLayout *layout = new QVBoxLayout( wdg ); + TQFrame *wdg = new TQFrame( w ); + TQVBoxLayout *layout = new TQVBoxLayout( wdg ); - QLabel *title = new QLabel( description(), wdg ); - QFont titleFont( title->font() ); + TQLabel *title = new TQLabel( description(), wdg ); + TQFont titleFont( title->font() ); titleFont.setPointSize( 20 ); titleFont.setBold( true ); title->setFont( titleFont ); layout->addWidget( title ); - layout->addWidget( new QLabel( info(), wdg ) ); + layout->addWidget( new TQLabel( info(), wdg ) ); layout->addSpacing( 20 ); - layout->addWidget( new QLabel( i18n("This printing style does not " + layout->addWidget( new TQLabel( i18n("This printing style does not " "have any configuration options."), wdg ) ); layout->addStretch(); @@ -143,7 +143,7 @@ void CalPrintPluginBase::doPrint( KPrinter *printer ) { if ( !printer ) return; mPrinter = printer; - QPainter p; + TQPainter p; mPrinter->setColorMode( mUseColors?(KPrinter::Color):(KPrinter::GrayScale) ); @@ -155,7 +155,7 @@ void CalPrintPluginBase::doPrint( KPrinter *printer ) p.setViewport( margins, margins, p.viewport().width() - 2*margins, p.viewport().height() - 2*margins ); -// QRect vp( p.viewport() ); +// TQRect vp( p.viewport() ); // vp.setRight( vp.right()*2 ); // vp.setBottom( vp.bottom()*2 ); // p.setWindow( vp ); @@ -175,7 +175,7 @@ void CalPrintPluginBase::doLoadConfig() if ( mConfig ) { KConfigGroupSaver saver( mConfig, description() ); mConfig->sync(); - QDateTime currDate( QDate::currentDate() ); + TQDateTime currDate( TQDate::currentDate() ); mFromDate = mConfig->readDateTimeEntry( "FromDate", &currDate ).date(); mToDate = mConfig->readDateTimeEntry( "ToDate" ).date(); mUseColors = mConfig->readBoolEntry( "UseColors", true ); @@ -191,8 +191,8 @@ void CalPrintPluginBase::doSaveConfig() if ( mConfig ) { KConfigGroupSaver saver( mConfig, description() ); saveConfig(); - mConfig->writeEntry( "FromDate", QDateTime( mFromDate ) ); - mConfig->writeEntry( "ToDate", QDateTime( mToDate ) ); + mConfig->writeEntry( "FromDate", TQDateTime( mFromDate ) ); + mConfig->writeEntry( "ToDate", TQDateTime( mToDate ) ); mConfig->writeEntry( "UseColors", mUseColors ); mConfig->sync(); } else { @@ -226,50 +226,50 @@ KPrinter::Orientation CalPrintPluginBase::orientation() const -QTime CalPrintPluginBase::dayStart() +TQTime CalPrintPluginBase::dayStart() { - QTime start( 8,0,0 ); + TQTime start( 8,0,0 ); if ( mCoreHelper ) start = mCoreHelper->dayStart(); return start; } -void CalPrintPluginBase::setCategoryColors( QPainter &p, Incidence *incidence ) +void CalPrintPluginBase::setCategoryColors( TQPainter &p, Incidence *incidence ) { - QColor bgColor = categoryBgColor( incidence ); + TQColor bgColor = categoryBgColor( incidence ); if ( bgColor.isValid() ) p.setBrush( bgColor ); - QColor tColor( textColor( bgColor ) ); + TQColor tColor( textColor( bgColor ) ); if ( tColor.isValid() ) p.setPen( tColor ); } -QColor CalPrintPluginBase::categoryBgColor( Incidence *incidence ) +TQColor CalPrintPluginBase::categoryBgColor( Incidence *incidence ) { if (mCoreHelper && incidence) return mCoreHelper->categoryColor( incidence->categories() ); else - return QColor(); + return TQColor(); } -QColor CalPrintPluginBase::textColor( const QColor &color ) +TQColor CalPrintPluginBase::textColor( const TQColor &color ) { - return (mCoreHelper)?(mCoreHelper->textColor( color )):QColor(); + return (mCoreHelper)?(mCoreHelper->textColor( color )):TQColor(); } -bool CalPrintPluginBase::isWorkingDay( const QDate &dt ) +bool CalPrintPluginBase::isWorkingDay( const TQDate &dt ) { return (mCoreHelper)?( mCoreHelper->isWorkingDay( dt ) ):true; } -QString CalPrintPluginBase::holidayString( const QDate &dt ) +TQString CalPrintPluginBase::holidayString( const TQDate &dt ) { - return (mCoreHelper)?(mCoreHelper->holidayString(dt)):(QString::null); + return (mCoreHelper)?(mCoreHelper->holidayString(dt)):(TQString::null); } -Event *CalPrintPluginBase::holiday( const QDate &dt ) +Event *CalPrintPluginBase::holiday( const TQDate &dt ) { - QString hstring( holidayString( dt ) ); + TQString hstring( holidayString( dt ) ); if ( !hstring.isEmpty() ) { Event*holiday=new Event(); holiday->setSummary( hstring ); @@ -344,41 +344,41 @@ void CalPrintPluginBase::setBorderWidth( const int borderwidth ) -void CalPrintPluginBase::drawBox( QPainter &p, int linewidth, const QRect &rect ) +void CalPrintPluginBase::drawBox( TQPainter &p, int linewidth, const TQRect &rect ) { - QPen pen( p.pen() ); - QPen oldpen( pen ); + TQPen pen( p.pen() ); + TQPen oldpen( pen ); pen.setWidth( linewidth ); p.setPen( pen ); p.drawRect( rect ); p.setPen( oldpen ); } -void CalPrintPluginBase::drawShadedBox( QPainter &p, int linewidth, const QBrush &brush, const QRect &rect ) +void CalPrintPluginBase::drawShadedBox( TQPainter &p, int linewidth, const TQBrush &brush, const TQRect &rect ) { - QBrush oldbrush( p.brush() ); + TQBrush oldbrush( p.brush() ); p.setBrush( brush ); drawBox( p, linewidth, rect ); p.setBrush( oldbrush ); } -void CalPrintPluginBase::printEventString( QPainter &p, const QRect &box, const QString &str, int flags ) +void CalPrintPluginBase::printEventString( TQPainter &p, const TQRect &box, const TQString &str, int flags ) { - QRect newbox( box ); + TQRect newbox( box ); newbox.addCoords( 3, 1, -1, -1 ); p.drawText( newbox, (flags==-1)?(Qt::AlignTop | Qt::AlignJustify | Qt::BreakAnywhere):flags, str ); } -void CalPrintPluginBase::showEventBox( QPainter &p, const QRect &box, Incidence *incidence, const QString &str, int flags ) +void CalPrintPluginBase::showEventBox( TQPainter &p, const TQRect &box, Incidence *incidence, const TQString &str, int flags ) { - QPen oldpen( p.pen() ); - QBrush oldbrush( p.brush() ); - QColor bgColor( categoryBgColor( incidence ) ); + TQPen oldpen( p.pen() ); + TQBrush oldbrush( p.brush() ); + TQColor bgColor( categoryBgColor( incidence ) ); if ( mUseColors & bgColor.isValid() ) { p.setBrush( bgColor ); } else { - p.setBrush( QColor( 232, 232, 232 ) ); + p.setBrush( TQColor( 232, 232, 232 ) ); } drawBox( p, EVENT_BORDER_WIDTH, box ); @@ -391,21 +391,21 @@ void CalPrintPluginBase::showEventBox( QPainter &p, const QRect &box, Incidence } -void CalPrintPluginBase::drawSubHeaderBox(QPainter &p, const QString &str, - const QRect &box ) +void CalPrintPluginBase::drawSubHeaderBox(TQPainter &p, const TQString &str, + const TQRect &box ) { - drawShadedBox( p, BOX_BORDER_WIDTH, QColor( 232, 232, 232 ), box ); - QFont oldfont( p.font() ); - p.setFont( QFont( "sans-serif", 10, QFont::Bold ) ); + drawShadedBox( p, BOX_BORDER_WIDTH, TQColor( 232, 232, 232 ), box ); + TQFont oldfont( p.font() ); + p.setFont( TQFont( "sans-serif", 10, TQFont::Bold ) ); p.drawText( box, Qt::AlignCenter | Qt::AlignVCenter, str ); p.setFont( oldfont ); } -void CalPrintPluginBase::drawVerticalBox( QPainter &p, const QRect &box, const QString &str ) +void CalPrintPluginBase::drawVerticalBox( TQPainter &p, const TQRect &box, const TQString &str ) { p.save(); p.rotate( -90 ); - QRect rotatedBox( -box.top()-box.height(), box.left(), box.height(), box.width() ); + TQRect rotatedBox( -box.top()-box.height(), box.left(), box.height(), box.width() ); showEventBox( p, rotatedBox, 0, str, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine ); p.restore(); @@ -417,20 +417,20 @@ void CalPrintPluginBase::drawVerticalBox( QPainter &p, const QRect &box, const Q // Return value: If expand, bottom of the printed box, otherwise vertical end // of the printed contents inside the box. -int CalPrintPluginBase::drawBoxWithCaption( QPainter &p, const QRect &allbox, - const QString &caption, const QString &contents, bool sameLine, bool expand, const QFont &captionFont, const QFont &textFont ) +int CalPrintPluginBase::drawBoxWithCaption( TQPainter &p, const TQRect &allbox, + const TQString &caption, const TQString &contents, bool sameLine, bool expand, const TQFont &captionFont, const TQFont &textFont ) { - QFont oldFont( p.font() ); -// QFont captionFont( "sans-serif", 11, QFont::Bold ); -// QFont textFont( "sans-serif", 11, QFont::Normal ); -// QFont captionFont( "Tahoma", 11, QFont::Bold ); -// QFont textFont( "Tahoma", 11, QFont::Normal ); + TQFont oldFont( p.font() ); +// TQFont captionFont( "sans-serif", 11, TQFont::Bold ); +// TQFont textFont( "sans-serif", 11, TQFont::Normal ); +// TQFont captionFont( "Tahoma", 11, TQFont::Bold ); +// TQFont textFont( "Tahoma", 11, TQFont::Normal ); - QRect box( allbox ); + TQRect box( allbox ); // Bounding rectangle for caption, single-line, clip on the right - QRect captionBox( box.left() + padding(), box.top() + padding(), 0, 0 ); + TQRect captionBox( box.left() + padding(), box.top() + padding(), 0, 0 ); p.setFont( captionFont ); captionBox = p.boundingRect( captionBox, Qt::AlignLeft | Qt::AlignTop | Qt::SingleLine, caption ); p.setFont( oldFont ); @@ -440,7 +440,7 @@ int CalPrintPluginBase::drawBoxWithCaption( QPainter &p, const QRect &allbox, box.setBottom( captionBox.bottom() + padding() ); // Bounding rectangle for the contents (if any), word break, clip on the bottom - QRect textBox( captionBox ); + TQRect textBox( captionBox ); if ( !contents.isEmpty() ) { if ( sameLine ) { textBox.setLeft( captionBox.right() + padding() ); @@ -480,8 +480,8 @@ int CalPrintPluginBase::drawBoxWithCaption( QPainter &p, const QRect &allbox, /////////////////////////////////////////////////////////////////////////////// -int CalPrintPluginBase::drawHeader( QPainter &p, QString title, - const QDate &month1, const QDate &month2, const QRect &allbox, bool expand ) +int CalPrintPluginBase::drawHeader( TQPainter &p, TQString title, + const TQDate &month1, const TQDate &month2, const TQRect &allbox, bool expand ) { // print previous month for month view, print current for to-do, day and week int smallMonthWidth = (allbox.width()/4) - 10; @@ -490,17 +490,17 @@ int CalPrintPluginBase::drawHeader( QPainter &p, QString title, int right = allbox.right(); if ( month1.isValid() ) right -= (20+smallMonthWidth); if ( month2.isValid() ) right -= (20+smallMonthWidth); - QRect box( allbox ); - QRect textRect( allbox ); + TQRect box( allbox ); + TQRect textRect( allbox ); textRect.addCoords( 5, 0, 0, 0 ); textRect.setRight( right ); - QFont oldFont( p.font() ); - QFont newFont("sans-serif", (textRect.height()<60)?16:18, QFont::Bold); + TQFont oldFont( p.font() ); + TQFont newFont("sans-serif", (textRect.height()<60)?16:18, TQFont::Bold); if ( expand ) { p.setFont( newFont ); - QRect boundingR = p.boundingRect( textRect, Qt::AlignLeft | Qt::AlignVCenter | Qt::WordBreak, title ); + TQRect boundingR = p.boundingRect( textRect, Qt::AlignLeft | Qt::AlignVCenter | Qt::WordBreak, title ); p.setFont( oldFont ); int h = boundingR.height(); if ( h > allbox.height() ) { @@ -509,15 +509,15 @@ int CalPrintPluginBase::drawHeader( QPainter &p, QString title, } } - drawShadedBox( p, BOX_BORDER_WIDTH, QColor( 232, 232, 232 ), box ); + drawShadedBox( p, BOX_BORDER_WIDTH, TQColor( 232, 232, 232 ), box ); - QRect monthbox( box.right()-10-smallMonthWidth, box.top(), smallMonthWidth, box.height() ); + TQRect monthbox( box.right()-10-smallMonthWidth, box.top(), smallMonthWidth, box.height() ); if (month2.isValid()) { - drawSmallMonth( p, QDate(month2.year(), month2.month(), 1), monthbox ); + drawSmallMonth( p, TQDate(month2.year(), month2.month(), 1), monthbox ); monthbox.moveBy( -20 - smallMonthWidth, 0 ); } if (month1.isValid()) { - drawSmallMonth( p, QDate(month1.year(), month1.month(), 1), monthbox ); + drawSmallMonth( p, TQDate(month1.year(), month1.month(), 1), monthbox ); monthbox.moveBy( -20 - smallMonthWidth, 0 ); } @@ -530,38 +530,38 @@ int CalPrintPluginBase::drawHeader( QPainter &p, QString title, } -void CalPrintPluginBase::drawSmallMonth(QPainter &p, const QDate &qd, - const QRect &box ) +void CalPrintPluginBase::drawSmallMonth(TQPainter &p, const TQDate &qd, + const TQRect &box ) { int weekdayCol = weekdayColumn( qd.dayOfWeek() ); int month = qd.month(); - QDate monthDate(QDate(qd.year(), qd.month(), 1)); + TQDate monthDate(TQDate(qd.year(), qd.month(), 1)); // correct begin of week - QDate monthDate2( monthDate.addDays( -weekdayCol ) ); + TQDate monthDate2( monthDate.addDays( -weekdayCol ) ); double cellWidth = double(box.width())/double(7); int rownr = 3 + ( qd.daysInMonth() + weekdayCol - 1 ) / 7; // 3 Pixel after month name, 2 after day names, 1 after the calendar double cellHeight = (box.height() - 5) / rownr; - QFont oldFont( p.font() ); - p.setFont(QFont("sans-serif", int(cellHeight-1), QFont::Normal)); + TQFont oldFont( p.font() ); + p.setFont(TQFont("sans-serif", int(cellHeight-1), TQFont::Normal)); // draw the title if ( mCalSys ) { - QRect titleBox( box ); + TQRect titleBox( box ); titleBox.setHeight( int(cellHeight+1) ); p.drawText( titleBox, Qt::AlignTop | Qt::AlignHCenter, mCalSys->monthName( qd ) ); } // draw days of week - QRect wdayBox( box ); + TQRect wdayBox( box ); wdayBox.setTop( int( box.top() + 3 + cellHeight ) ); wdayBox.setHeight( int(2*cellHeight)-int(cellHeight) ); if ( mCalSys ) { for (int col = 0; col < 7; ++col) { - QString tmpStr = mCalSys->weekDayName( monthDate2 )[0].upper(); + TQString tmpStr = mCalSys->weekDayName( monthDate2 )[0].upper(); wdayBox.setLeft( int(box.left() + col*cellWidth) ); wdayBox.setRight( int(box.left() + (col+1)*cellWidth) ); p.drawText( wdayBox, Qt::AlignCenter, tmpStr ); @@ -577,10 +577,10 @@ void CalPrintPluginBase::drawSmallMonth(QPainter &p, const QDate &qd, for ( int row = 0; row < (rownr-2); row++ ) { for ( int col = 0; col < 7; col++ ) { if ( monthDate.month() == month ) { - QRect dayRect( int( box.left() + col*cellWidth ), int( calStartY + row*cellHeight ), 0, 0 ); + TQRect dayRect( int( box.left() + col*cellWidth ), int( calStartY + row*cellHeight ), 0, 0 ); dayRect.setRight( int( box.left() + (col+1)*cellWidth ) ); dayRect.setBottom( int( calStartY + (row+1)*cellHeight ) ); - p.drawText( dayRect, Qt::AlignCenter, QString::number( monthDate.day() ) ); + p.drawText( dayRect, Qt::AlignCenter, TQString::number( monthDate.day() ) ); } monthDate = monthDate.addDays(1); } @@ -598,12 +598,12 @@ void CalPrintPluginBase::drawSmallMonth(QPainter &p, const QDate &qd, * This routine draws a header box over the main part of the calendar * containing the days of the week. */ -void CalPrintPluginBase::drawDaysOfWeek(QPainter &p, - const QDate &fromDate, const QDate &toDate, const QRect &box ) +void CalPrintPluginBase::drawDaysOfWeek(TQPainter &p, + const TQDate &fromDate, const TQDate &toDate, const TQRect &box ) { double cellWidth = double(box.width()) / double(fromDate.daysTo( toDate )+1); - QDate cellDate( fromDate ); - QRect dateBox( box ); + TQDate cellDate( fromDate ); + TQRect dateBox( box ); int i = 0; while ( cellDate <= toDate ) { @@ -616,16 +616,16 @@ void CalPrintPluginBase::drawDaysOfWeek(QPainter &p, } -void CalPrintPluginBase::drawDaysOfWeekBox(QPainter &p, const QDate &qd, - const QRect &box ) +void CalPrintPluginBase::drawDaysOfWeekBox(TQPainter &p, const TQDate &qd, + const TQRect &box ) { - drawSubHeaderBox( p, (mCalSys)?(mCalSys->weekDayName( qd )):(QString::null), box ); + drawSubHeaderBox( p, (mCalSys)?(mCalSys->weekDayName( qd )):(TQString::null), box ); } -void CalPrintPluginBase::drawTimeLine(QPainter &p, - const QTime &fromTime, const QTime &toTime, - const QRect &box) +void CalPrintPluginBase::drawTimeLine(TQPainter &p, + const TQTime &fromTime, const TQTime &toTime, + const TQRect &box) { drawBox( p, BOX_BORDER_WIDTH, box ); @@ -636,46 +636,46 @@ void CalPrintPluginBase::drawTimeLine(QPainter &p, // TODO: Don't use half of the width, but less, for the minutes! int xcenter = box.left()+box.width()/2; - QTime curTime( fromTime ); - QTime endTime( toTime ); + TQTime curTime( fromTime ); + TQTime endTime( toTime ); if ( fromTime.minute() > 30 ) - curTime = QTime( fromTime.hour()+1, 0, 0 ); + curTime = TQTime( fromTime.hour()+1, 0, 0 ); else if ( fromTime.minute() > 0 ) { - curTime = QTime( fromTime.hour(), 30, 0 ); + curTime = TQTime( fromTime.hour(), 30, 0 ); float yy = currY + minlen*(float)fromTime.secsTo( curTime )/60.; p.drawLine( xcenter, (int)yy, box.right(), (int)yy ); - curTime = QTime( fromTime.hour()+1, 0, 0 ); + curTime = TQTime( fromTime.hour()+1, 0, 0 ); } currY += ( float( fromTime.secsTo(curTime)*minlen ) / 60. ); while ( curTime < endTime ) { p.drawLine( box.left(), (int)currY, box.right(), (int)currY ); int newY=(int)(currY+cellHeight/2.); - QString numStr; + TQString numStr; if ( newY < box.bottom() ) { - QFont oldFont( p.font() ); + TQFont oldFont( p.font() ); // draw the time: if ( !KGlobal::locale()->use12Clock() ) { p.drawLine( xcenter, (int)newY, box.right(), (int)newY); numStr.setNum(curTime.hour()); if (cellHeight > 30) { - p.setFont(QFont("sans-serif", 16, QFont::Bold)); + p.setFont(TQFont("sans-serif", 16, TQFont::Bold)); } else { - p.setFont(QFont("sans-serif", 12, QFont::Bold)); + p.setFont(TQFont("sans-serif", 12, TQFont::Bold)); } p.drawText( box.left()+2, (int)currY+2, box.width()/2-2, (int)cellHeight, Qt::AlignTop | Qt::AlignRight, numStr); - p.setFont(QFont("sans-serif", 10, QFont::Normal)); + p.setFont(TQFont("sans-serif", 10, TQFont::Normal)); p.drawText( xcenter, (int)currY+2, box.width()/2+2, (int)(cellHeight/2)-3, Qt::AlignTop | Qt::AlignLeft, "00"); } else { p.drawLine( box.left(), (int)newY, box.right(), (int)newY); - QTime time( curTime.hour(), 0 ); + TQTime time( curTime.hour(), 0 ); numStr = KGlobal::locale()->formatTime( time ); if ( box.width() < 60 ) { - p.setFont(QFont("sans-serif", 8, QFont::Bold)); // for weekprint + p.setFont(TQFont("sans-serif", 8, TQFont::Bold)); // for weekprint } else { - p.setFont(QFont("sans-serif", 12, QFont::Bold)); // for dayprint + p.setFont(TQFont("sans-serif", 12, TQFont::Bold)); // for dayprint } p.drawText(box.left()+2, (int)currY+2, box.width()-4, (int)cellHeight/2-3, Qt::AlignTop|Qt::AlignLeft, numStr); @@ -697,14 +697,14 @@ void CalPrintPluginBase::drawTimeLine(QPainter &p, be the total height used for the all-day events. If !expandable, only one cell will be used, and multiple events are concatenated using ", ". */ -int CalPrintPluginBase::drawAllDayBox(QPainter &p, Event::List &eventList, - const QDate &qd, bool expandable, const QRect &box ) +int CalPrintPluginBase::drawAllDayBox(TQPainter &p, Event::List &eventList, + const TQDate &qd, bool expandable, const TQRect &box ) { Event::List::Iterator it, itold; int offset=box.top(); - QString multiDayStr; + TQString multiDayStr; Event*hd = holiday( qd ); if ( hd ) eventList.prepend( hd ); @@ -719,7 +719,7 @@ int CalPrintPluginBase::drawAllDayBox(QPainter &p, Event::List &eventList, if ( currEvent && currEvent->doesFloat() ) { // set the colors according to the categories if ( expandable ) { - QRect eventBox( box ); + TQRect eventBox( box ); eventBox.setTop( offset ); showEventBox( p, eventBox, currEvent, currEvent->summary() ); offset += box.height(); @@ -733,10 +733,10 @@ int CalPrintPluginBase::drawAllDayBox(QPainter &p, Event::List &eventList, if ( hd ) delete hd; int ret = box.height(); - QRect eventBox( box ); + TQRect eventBox( box ); if (!expandable) { if (!multiDayStr.isEmpty()) { - drawShadedBox( p, BOX_BORDER_WIDTH, QColor( 128, 128, 128 ), eventBox ); + drawShadedBox( p, BOX_BORDER_WIDTH, TQColor( 128, 128, 128 ), eventBox ); printEventString( p, eventBox, multiDayStr ); } else { drawBox( p, BOX_BORDER_WIDTH, eventBox ); @@ -750,17 +750,17 @@ int CalPrintPluginBase::drawAllDayBox(QPainter &p, Event::List &eventList, } -void CalPrintPluginBase::drawAgendaDayBox( QPainter &p, Event::List &events, - const QDate &qd, bool expandable, - QTime &fromTime, QTime &toTime, - const QRect &oldbox ) +void CalPrintPluginBase::drawAgendaDayBox( TQPainter &p, Event::List &events, + const TQDate &qd, bool expandable, + TQTime &fromTime, TQTime &toTime, + const TQRect &oldbox ) { if ( !isWorkingDay( qd ) ) { - drawShadedBox( p, BOX_BORDER_WIDTH, QColor( 232, 232, 232 ), oldbox ); + drawShadedBox( p, BOX_BORDER_WIDTH, TQColor( 232, 232, 232 ), oldbox ); } else { drawBox( p, BOX_BORDER_WIDTH, oldbox ); } - QRect box( oldbox ); + TQRect box( oldbox ); // Account for the border with and cut away that margin from the interior // box.setRight( box.right()-BOX_BORDER_WIDTH ); @@ -780,7 +780,7 @@ void CalPrintPluginBase::drawAgendaDayBox( QPainter &p, Event::List &events, // Show at least one hour // if ( fromTime.secsTo( toTime ) < 3600 ) { -// fromTime = QTime( fromTime.hour(), 0, 0 ); +// fromTime = TQTime( fromTime.hour(), 0, 0 ); // toTime = fromTime.addSecs( 3600 ); // } @@ -791,7 +791,7 @@ void CalPrintPluginBase::drawAgendaDayBox( QPainter &p, Event::List &events, float currY = box.top(); // print grid: - QTime curTime( QTime( fromTime.hour(), 0, 0 ) ); + TQTime curTime( TQTime( fromTime.hour(), 0, 0 ) ); currY += fromTime.secsTo( curTime ) * minlen / 60; while ( curTime < toTime && curTime.isValid() ) { @@ -800,8 +800,8 @@ void CalPrintPluginBase::drawAgendaDayBox( QPainter &p, Event::List &events, currY += cellHeight / 2; if ( ( currY > box.top() ) && ( currY < box.bottom() ) ) { // enough space for half-hour line - QPen oldPen( p.pen() ); - p.setPen( QColor( 192, 192, 192 ) ); + TQPen oldPen( p.pen() ); + p.setPen( TQColor( 192, 192, 192 ) ); p.drawLine( box.left(), int( currY ), box.right(), int( currY ) ); p.setPen( oldPen ); } @@ -811,31 +811,31 @@ void CalPrintPluginBase::drawAgendaDayBox( QPainter &p, Event::List &events, currY += cellHeight / 2; } - QDateTime startPrintDate = QDateTime( qd, fromTime ); - QDateTime endPrintDate = QDateTime( qd, toTime ); + TQDateTime startPrintDate = TQDateTime( qd, fromTime ); + TQDateTime endPrintDate = TQDateTime( qd, toTime ); // Calculate horizontal positions and widths of events taking into account // overlapping events - QPtrList<KOrg::CellItem> cells; + TQPtrList<KOrg::CellItem> cells; cells.setAutoDelete( true ); Event::List::ConstIterator itEvents; for( itEvents = events.begin(); itEvents != events.end(); ++itEvents ) { - QValueList<QDateTime> times = (*itEvents)->startDateTimesForDate( qd ); - for ( QValueList<QDateTime>::ConstIterator it = times.begin(); + TQValueList<TQDateTime> times = (*itEvents)->startDateTimesForDate( qd ); + for ( TQValueList<TQDateTime>::ConstIterator it = times.begin(); it != times.end(); ++it ) { cells.append( new PrintCellItem( *itEvents, (*it), (*itEvents)->endDateForStart( *it ) ) ); } } - QPtrListIterator<KOrg::CellItem> it1( cells ); + TQPtrListIterator<KOrg::CellItem> it1( cells ); for( it1.toFirst(); it1.current(); ++it1 ) { KOrg::CellItem *placeItem = it1.current(); KOrg::CellItem::placeItem( cells, placeItem ); } -// p.setFont( QFont( "sans-serif", 10 ) ); +// p.setFont( TQFont( "sans-serif", 10 ) ); for( it1.toFirst(); it1.current(); ++it1 ) { PrintCellItem *placeItem = static_cast<PrintCellItem *>( it1.current() ); @@ -846,16 +846,16 @@ void CalPrintPluginBase::drawAgendaDayBox( QPainter &p, Event::List &events, -void CalPrintPluginBase::drawAgendaItem( PrintCellItem *item, QPainter &p, - const QDateTime &startPrintDate, - const QDateTime &endPrintDate, - float minlen, const QRect &box ) +void CalPrintPluginBase::drawAgendaItem( PrintCellItem *item, TQPainter &p, + const TQDateTime &startPrintDate, + const TQDateTime &endPrintDate, + float minlen, const TQRect &box ) { Event *event = item->event(); // start/end of print area for event - QDateTime startTime = item->start(); - QDateTime endTime = item->end(); + TQDateTime startTime = item->start(); + TQDateTime endTime = item->end(); if ( ( startTime < endPrintDate && endTime > startPrintDate ) || ( endTime > startPrintDate && startTime < endPrintDate ) ) { if ( startTime < startPrintDate ) startTime = startPrintDate; @@ -866,18 +866,18 @@ void CalPrintPluginBase::drawAgendaItem( PrintCellItem *item, QPainter &p, minlen / 60. ); int currentHeight = int( box.top() + startPrintDate.secsTo( endTime ) * minlen / 60. ) - currentYPos; - QRect eventBox( currentX, currentYPos, currentWidth, currentHeight ); + TQRect eventBox( currentX, currentYPos, currentWidth, currentHeight ); showEventBox( p, eventBox, event, event->summary() ); } } //TODO TODO TODO -void CalPrintPluginBase::drawDayBox( QPainter &p, const QDate &qd, - const QRect &box, +void CalPrintPluginBase::drawDayBox( TQPainter &p, const TQDate &qd, + const TQRect &box, bool fullDate, bool printRecurDaily, bool printRecurWeekly ) { - QString dayNumStr; - QString ampm; + TQString dayNumStr; + TQString ampm; const KLocale*local = KGlobal::locale(); @@ -890,33 +890,33 @@ void CalPrintPluginBase::drawDayBox( QPainter &p, const QDate &qd, .arg( qd.day() ); // dayNumStr = local->formatDate(qd); } else { - dayNumStr = QString::number( qd.day() ); + dayNumStr = TQString::number( qd.day() ); } - QRect subHeaderBox( box ); + TQRect subHeaderBox( box ); subHeaderBox.setHeight( mSubHeaderHeight ); drawShadedBox( p, BOX_BORDER_WIDTH, p.backgroundColor(), box ); - drawShadedBox( p, 0, QColor( 232, 232, 232 ), subHeaderBox ); + drawShadedBox( p, 0, TQColor( 232, 232, 232 ), subHeaderBox ); drawBox( p, BOX_BORDER_WIDTH, box ); - QString hstring( holidayString( qd ) ); - QFont oldFont( p.font() ); + TQString hstring( holidayString( qd ) ); + TQFont oldFont( p.font() ); - QRect headerTextBox( subHeaderBox ); + TQRect headerTextBox( subHeaderBox ); headerTextBox.setLeft( subHeaderBox.left()+5 ); headerTextBox.setRight( subHeaderBox.right()-5 ); if (!hstring.isEmpty()) { - p.setFont( QFont( "sans-serif", 8, QFont::Bold, true ) ); + p.setFont( TQFont( "sans-serif", 8, TQFont::Bold, true ) ); p.drawText( headerTextBox, Qt::AlignLeft | Qt::AlignVCenter, hstring ); } - p.setFont(QFont("sans-serif", 10, QFont::Bold)); + p.setFont(TQFont("sans-serif", 10, TQFont::Bold)); p.drawText( headerTextBox, Qt::AlignRight | Qt::AlignVCenter, dayNumStr); Event::List eventList = mCalendar->events( qd, EventSortStartDate, SortDirectionAscending ); - QString text; - p.setFont( QFont( "sans-serif", 8 ) ); + TQString text; + p.setFont( TQFont( "sans-serif", 8 ) ); int textY=mSubHeaderHeight+3; // gives the relative y-coord of the next printed entry Event::List::ConstIterator it; @@ -954,19 +954,19 @@ void CalPrintPluginBase::drawDayBox( QPainter &p, const QDate &qd, } // TODO TODO TODO -void CalPrintPluginBase::drawIncidence( QPainter &p, const QRect &dayBox, const QString &time, const QString &summary, int &textY ) +void CalPrintPluginBase::drawIncidence( TQPainter &p, const TQRect &dayBox, const TQString &time, const TQString &summary, int &textY ) { kdDebug(5850) << "summary = " << summary << endl; int flags = Qt::AlignLeft; - QFontMetrics fm = p.fontMetrics(); - QRect timeBound = p.boundingRect( dayBox.x() + 5, dayBox.y() + textY, + TQFontMetrics fm = p.fontMetrics(); + TQRect timeBound = p.boundingRect( dayBox.x() + 5, dayBox.y() + textY, dayBox.width() - 10, fm.lineSpacing(), flags, time ); p.drawText( timeBound, flags, time ); int summaryWidth = time.isEmpty() ? 0 : timeBound.width() + 4; - QRect summaryBound = QRect( dayBox.x() + 5 + summaryWidth, dayBox.y() + textY, + TQRect summaryBound = TQRect( dayBox.x() + 5 + summaryWidth, dayBox.y() + textY, dayBox.width() - summaryWidth -5, dayBox.height() ); KWordWrap *ww = KWordWrap::formatText( fm, summaryBound, flags, summary ); @@ -980,9 +980,9 @@ void CalPrintPluginBase::drawIncidence( QPainter &p, const QRect &dayBox, const /////////////////////////////////////////////////////////////////////////////// -void CalPrintPluginBase::drawWeek(QPainter &p, const QDate &qd, const QRect &box ) +void CalPrintPluginBase::drawWeek(TQPainter &p, const TQDate &qd, const TQRect &box ) { - QDate weekDate = qd; + TQDate weekDate = qd; bool portrait = ( box.height() > box.width() ); int cellWidth, cellHeight; int vcells; @@ -1003,40 +1003,40 @@ void CalPrintPluginBase::drawWeek(QPainter &p, const QDate &qd, const QRect &box // Saturday and sunday share a cell, so we have to special-case sunday int hpos = ((i<6)?i:(i-1)) / vcells; int vpos = ((i<6)?i:(i-1)) % vcells; - QRect dayBox( box.left()+cellWidth*hpos, box.top()+cellHeight*vpos + ((i==6)?(cellHeight/2):0), + TQRect dayBox( box.left()+cellWidth*hpos, box.top()+cellHeight*vpos + ((i==6)?(cellHeight/2):0), cellWidth, (i<5)?(cellHeight):(cellHeight/2) ); drawDayBox(p, weekDate, dayBox, true); } // for i through all weekdays } -void CalPrintPluginBase::drawTimeTable(QPainter &p, - const QDate &fromDate, const QDate &toDate, - QTime &fromTime, QTime &toTime, - const QRect &box) +void CalPrintPluginBase::drawTimeTable(TQPainter &p, + const TQDate &fromDate, const TQDate &toDate, + TQTime &fromTime, TQTime &toTime, + const TQRect &box) { // timeline is 1 hour: int alldayHeight = (int)( 3600.*box.height()/(fromTime.secsTo(toTime)+3600.) ); int timelineWidth = TIMELINE_WIDTH; - QRect dowBox( box ); + TQRect dowBox( box ); dowBox.setLeft( box.left() + timelineWidth ); dowBox.setHeight( mSubHeaderHeight ); drawDaysOfWeek( p, fromDate, toDate, dowBox ); - QRect tlBox( box ); + TQRect tlBox( box ); tlBox.setWidth( timelineWidth ); tlBox.setTop( dowBox.bottom() + BOX_BORDER_WIDTH + alldayHeight ); drawTimeLine( p, fromTime, toTime, tlBox ); // draw each day - QDate curDate(fromDate); + TQDate curDate(fromDate); int i=0; double cellWidth = double(dowBox.width()) / double(fromDate.daysTo(toDate)+1); while (curDate<=toDate) { - QRect allDayBox( dowBox.left()+int(i*cellWidth), dowBox.bottom() + BOX_BORDER_WIDTH, + TQRect allDayBox( dowBox.left()+int(i*cellWidth), dowBox.bottom() + BOX_BORDER_WIDTH, int((i+1)*cellWidth)-int(i*cellWidth), alldayHeight ); - QRect dayBox( allDayBox ); + TQRect dayBox( allDayBox ); dayBox.setTop( tlBox.top() ); dayBox.setBottom( box.bottom() ); Event::List eventList = mCalendar->events(curDate, @@ -1057,33 +1057,33 @@ class MonthEventStruct { public: MonthEventStruct() : event(0) {} - MonthEventStruct( const QDateTime &s, const QDateTime &e, Event *ev) + MonthEventStruct( const TQDateTime &s, const TQDateTime &e, Event *ev) { event = ev; start = s; end = e; if ( event->doesFloat() ) { - start = QDateTime( start.date(), QTime(0,0,0) ); - end = QDateTime( end.date().addDays(1), QTime(0,0,0) ).addSecs(-1); + start = TQDateTime( start.date(), TQTime(0,0,0) ); + end = TQDateTime( end.date().addDays(1), TQTime(0,0,0) ).addSecs(-1); } } bool operator<(const MonthEventStruct &mes) { return start < mes.start; } - QDateTime start; - QDateTime end; + TQDateTime start; + TQDateTime end; Event *event; }; -void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &box, int maxdays, int subDailyFlags, int holidaysFlags ) +void CalPrintPluginBase::drawMonth( TQPainter &p, const TQDate &dt, const TQRect &box, int maxdays, int subDailyFlags, int holidaysFlags ) { const KCalendarSystem *calsys = calendarSystem(); - QRect subheaderBox( box ); + TQRect subheaderBox( box ); subheaderBox.setHeight( subHeaderHeight() ); - QRect borderBox( box ); + TQRect borderBox( box ); borderBox.setTop( subheaderBox.bottom()+1 ); drawSubHeaderBox( p, calsys->monthName(dt), subheaderBox ); // correct for half the border width int correction = (BOX_BORDER_WIDTH/*-1*/)/2; - QRect daysBox( borderBox ); + TQRect daysBox( borderBox ); daysBox.addCoords( correction, correction, -correction, -correction ); int daysinmonth = calsys->daysInMonth( dt ); @@ -1092,43 +1092,43 @@ void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &b int d; float dayheight = float(daysBox.height()) / float( maxdays ); - QColor holidayColor( 240, 240, 240 ); - QColor workdayColor( 255, 255, 255 ); + TQColor holidayColor( 240, 240, 240 ); + TQColor workdayColor( 255, 255, 255 ); int dayNrWidth = p.fontMetrics().width( "99" ); // Fill the remaining space (if a month has less days than others) with a crossed-out pattern if ( daysinmonth<maxdays ) { - QRect dayBox( box.left(), daysBox.top() + round(dayheight*daysinmonth), box.width(), 0 ); + TQRect dayBox( box.left(), daysBox.top() + round(dayheight*daysinmonth), box.width(), 0 ); dayBox.setBottom( daysBox.bottom() ); p.fillRect( dayBox, Qt::DiagCrossPattern ); } // Backgrounded boxes for each day, plus day numbers - QBrush oldbrush( p.brush() ); + TQBrush oldbrush( p.brush() ); for ( d = 0; d < daysinmonth; ++d ) { - QDate day; + TQDate day; calsys->setYMD( day, dt.year(), dt.month(), d+1 ); - QRect dayBox( daysBox.left()/*+rand()%50*/, daysBox.top() + round(dayheight*d), daysBox.width()/*-rand()%50*/, 0 ); + TQRect dayBox( daysBox.left()/*+rand()%50*/, daysBox.top() + round(dayheight*d), daysBox.width()/*-rand()%50*/, 0 ); // FIXME: When using a border width of 0 for event boxes, don't let the rectangles overlap, i.e. subtract 1 from the top or bottom! dayBox.setBottom( daysBox.top()+round(dayheight*(d+1)) - 1 ); p.setBrush( isWorkingDay( day )?workdayColor:holidayColor ); p.drawRect( dayBox ); - QRect dateBox( dayBox ); + TQRect dateBox( dayBox ); dateBox.setWidth( dayNrWidth+3 ); p.drawText( dateBox, Qt::AlignRight | Qt::AlignVCenter | Qt::SingleLine, - QString::number(d+1) ); + TQString::number(d+1) ); } p.setBrush( oldbrush ); int xstartcont = box.left() + dayNrWidth + 5; - QDate start, end; + TQDate start, end; calsys->setYMD( start, dt.year(), dt.month(), 1 ); end = calsys->addMonths( start, 1 ); end = calsys->addDays( end, -1 ); Event::List events = mCalendar->events( start, end ); - QMap<int, QStringList> textEvents; - QPtrList<KOrg::CellItem> timeboxItems; + TQMap<int, TQStringList> textEvents; + TQPtrList<KOrg::CellItem> timeboxItems; timeboxItems.setAutoDelete( true ); @@ -1141,13 +1141,13 @@ void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &b // Holidays Event::List holidays; holidays.setAutoDelete( true ); - for ( QDate d(start); d <= end; d = d.addDays(1) ) { + for ( TQDate d(start); d <= end; d = d.addDays(1) ) { Event *e = holiday( d ); if ( e ) { holidays.append( e ); if ( holidaysFlags & TimeBoxes ) { - timeboxItems.append( new PrintCellItem( e, QDateTime(d, QTime(0,0,0) ), - QDateTime( d.addDays(1), QTime(0,0,0) ) ) ); + timeboxItems.append( new PrintCellItem( e, TQDateTime(d, TQTime(0,0,0) ), + TQDateTime( d.addDays(1), TQTime(0,0,0) ) ) ); } if ( holidaysFlags & Text ) { textEvents[ d.day() ] << e->summary(); @@ -1155,7 +1155,7 @@ void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &b } } - QValueList<MonthEventStruct> monthentries; + TQValueList<MonthEventStruct> monthentries; for ( Event::List::ConstIterator evit = events.begin(); evit != events.end(); ++evit ) { @@ -1165,8 +1165,8 @@ void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &b if ( e->recursOn( start ) ) { // This occurrence has possibly started before the beginning of the // month, so obtain the start date before the beginning of the month - QValueList<QDateTime> starttimes = e->startDateTimesForDate( start ); - QValueList<QDateTime>::ConstIterator it = starttimes.begin(); + TQValueList<TQDateTime> starttimes = e->startDateTimesForDate( start ); + TQValueList<TQDateTime>::ConstIterator it = starttimes.begin(); for ( ; it != starttimes.end(); ++it ) { monthentries.append( MonthEventStruct( *it, e->endDateForStart( *it ), e ) ); } @@ -1176,13 +1176,13 @@ void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &b // also return events that have started earlier. These start dates // however, have already been treated! Recurrence *recur = e->recurrence(); - QDate d1( start.addDays(1) ); + TQDate d1( start.addDays(1) ); while ( d1 <= end ) { if ( recur->recursOn(d1) ) { TimeList times( recur->recurTimesOn( d1 ) ); for ( TimeList::ConstIterator it = times.begin(); it != times.end(); ++it ) { - QDateTime d1start( d1, *it ); + TQDateTime d1start( d1, *it ); monthentries.append( MonthEventStruct( d1start, e->endDateForStart( d1start ), e ) ); } } @@ -1194,8 +1194,8 @@ void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &b } qHeapSort( monthentries ); - QValueList<MonthEventStruct>::ConstIterator mit = monthentries.begin(); - QDateTime endofmonth( end, QTime(0,0,0) ); + TQValueList<MonthEventStruct>::ConstIterator mit = monthentries.begin(); + TQDateTime endofmonth( end, TQTime(0,0,0) ); endofmonth = endofmonth.addDays(1); for ( ; mit != monthentries.end(); ++mit ) { if ( (*mit).start.date() == (*mit).end.date() ) { @@ -1209,8 +1209,8 @@ void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &b } } else { // Multi-day events are always shown as time line boxes - QDateTime thisstart( (*mit).start ); - QDateTime thisend( (*mit).end ); + TQDateTime thisstart( (*mit).start ); + TQDateTime thisend( (*mit).end ); if ( thisstart.date()<start ) thisstart = start; if ( thisend>endofmonth ) thisend = endofmonth; timeboxItems.append( new PrintCellItem( (*mit).event, thisstart, thisend ) ); @@ -1218,22 +1218,22 @@ void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &b } // For Multi-day events, line them up nicely so that the boxes don't overlap - QPtrListIterator<KOrg::CellItem> it1( timeboxItems ); + TQPtrListIterator<KOrg::CellItem> it1( timeboxItems ); for( it1.toFirst(); it1.current(); ++it1 ) { KOrg::CellItem *placeItem = it1.current(); KOrg::CellItem::placeItem( timeboxItems, placeItem ); } - QDateTime starttime( start, QTime( 0, 0, 0 ) ); + TQDateTime starttime( start, TQTime( 0, 0, 0 ) ); int newxstartcont = xstartcont; - QFont oldfont( p.font() ); - p.setFont( QFont( "sans-serif", 7 ) ); + TQFont oldfont( p.font() ); + p.setFont( TQFont( "sans-serif", 7 ) ); for( it1.toFirst(); it1.current(); ++it1 ) { PrintCellItem *placeItem = static_cast<PrintCellItem *>( it1.current() ); int minsToStart = starttime.secsTo( placeItem->start() )/60; int minsToEnd = starttime.secsTo( placeItem->end() )/60; - QRect eventBox( xstartcont + placeItem->subCell()*17, + TQRect eventBox( xstartcont + placeItem->subCell()*17, daysBox.top() + round( double( minsToStart*daysBox.height()) / double(maxdays*24*60) ), 14, 0 ); eventBox.setBottom( daysBox.top() + round( double( minsToEnd*daysBox.height()) / double(maxdays*24*60) ) ); @@ -1245,9 +1245,9 @@ void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &b // For Single-day events, simply print their summaries into the remaining // space of the day's cell for ( int d=0; d<daysinmonth; ++d ) { - QStringList dayEvents( textEvents[d+1] ); - QString txt = dayEvents.join(", "); - QRect dayBox( xstartcont, daysBox.top()+round(dayheight*d), 0, 0 ); + TQStringList dayEvents( textEvents[d+1] ); + TQString txt = dayEvents.join(", "); + TQRect dayBox( xstartcont, daysBox.top()+round(dayheight*d), 0, 0 ); dayBox.setRight( box.right() ); dayBox.setBottom( daysBox.top()+round(dayheight*(d+1)) ); printEventString(p, dayBox, txt, Qt::AlignTop | Qt::AlignLeft | Qt::BreakAnywhere ); @@ -1260,15 +1260,15 @@ void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &b /////////////////////////////////////////////////////////////////////////////// -void CalPrintPluginBase::drawMonthTable(QPainter &p, const QDate &qd, bool weeknumbers, +void CalPrintPluginBase::drawMonthTable(TQPainter &p, const TQDate &qd, bool weeknumbers, bool recurDaily, bool recurWeekly, - const QRect &box) + const TQRect &box) { int yoffset = mSubHeaderHeight; int xoffset = 0; - QDate monthDate(QDate(qd.year(), qd.month(), 1)); - QDate monthFirst(monthDate); - QDate monthLast(monthDate.addMonths(1).addDays(-1)); + TQDate monthDate(TQDate(qd.year(), qd.month(), 1)); + TQDate monthFirst(monthDate); + TQDate monthLast(monthDate.addMonths(1).addDays(-1)); int weekdayCol = weekdayColumn( monthDate.dayOfWeek() ); @@ -1291,26 +1291,26 @@ void CalPrintPluginBase::drawMonthTable(QPainter &p, const QDate &qd, bool weekn } if (weeknumbers) { - QFont oldFont(p.font()); - QFont newFont(p.font()); + TQFont oldFont(p.font()); + TQFont newFont(p.font()); newFont.setPointSize(6); p.setFont(newFont); - QDate weekDate(monthDate); + TQDate weekDate(monthDate); for (int row = 0; row<rows; ++row ) { int calWeek = weekDate.weekNumber(); - QRect rc( box.left(), rowedges[row], coledges[0] - 3 - box.left(), rowedges[row+1]-rowedges[row] ); - p.drawText( rc, Qt::AlignRight | Qt::AlignVCenter, QString::number( calWeek ) ); + TQRect rc( box.left(), rowedges[row], coledges[0] - 3 - box.left(), rowedges[row+1]-rowedges[row] ); + p.drawText( rc, Qt::AlignRight | Qt::AlignVCenter, TQString::number( calWeek ) ); weekDate = weekDate.addDays( 7 ); } p.setFont( oldFont ); } - QRect daysOfWeekBox( box ); + TQRect daysOfWeekBox( box ); daysOfWeekBox.setHeight( mSubHeaderHeight ); daysOfWeekBox.setLeft( box.left()+xoffset ); drawDaysOfWeek( p, monthDate, monthDate.addDays( 6 ), daysOfWeekBox ); - QColor back = p.backgroundColor(); + TQColor back = p.backgroundColor(); bool darkbg = false; for ( int row = 0; row < rows; ++row ) { for ( int col = 0; col < 7; ++col ) { @@ -1319,7 +1319,7 @@ void CalPrintPluginBase::drawMonthTable(QPainter &p, const QDate &qd, bool weekn p.setBackgroundColor( back.dark( 120 ) ); darkbg = true; } - QRect dayBox( coledges[col], rowedges[row], coledges[col+1]-coledges[col], rowedges[row+1]-rowedges[row] ); + TQRect dayBox( coledges[col], rowedges[row], coledges[col+1]-coledges[col], rowedges[row+1]-rowedges[row] ); drawDayBox(p, monthDate, dayBox, false, recurDaily, recurWeekly ); if ( darkbg ) { p.setBackgroundColor( back ); @@ -1333,7 +1333,7 @@ void CalPrintPluginBase::drawMonthTable(QPainter &p, const QDate &qd, bool weekn /////////////////////////////////////////////////////////////////////////////// -void CalPrintPluginBase::drawTodo( int &count, Todo *todo, QPainter &p, +void CalPrintPluginBase::drawTodo( int &count, Todo *todo, TQPainter &p, TodoSortField sortField, SortDirection sortDir, bool connectSubTodos, bool strikeoutCompleted, bool desc, int posPriority, int posSummary, @@ -1342,14 +1342,14 @@ void CalPrintPluginBase::drawTodo( int &count, Todo *todo, QPainter &p, int pageHeight, const Todo::List &todoList, TodoParentStart *r ) { - QString outStr; + TQString outStr; const KLocale *local = KGlobal::locale(); - QRect rect; + TQRect rect; TodoParentStart startpt; // This list keeps all starting points of the parent to-dos so the connection // lines of the tree can easily be drawn (needed if a new page is started) - static QPtrList<TodoParentStart> startPoints; + static TQPtrList<TodoParentStart> startPoints; if ( level < 1 ) { startPoints.clear(); } @@ -1407,7 +1407,7 @@ void CalPrintPluginBase::drawTodo( int &count, Todo *todo, QPainter &p, rect.setHeight(18); // Draw a checkbox - p.setBrush( QBrush( Qt::NoBrush ) ); + p.setBrush( TQBrush( Qt::NoBrush ) ); p.drawRect( rect ); if ( todo->isCompleted() ) { // cross out the rectangle for completed to-dos @@ -1442,10 +1442,10 @@ void CalPrintPluginBase::drawTodo( int &count, Todo *todo, QPainter &p, rect = p.boundingRect( lhs, rect.top(), (rhs-(left + rect.width() + 5)), -1, Qt::WordBreak, outStr ); - QRect newrect; + TQRect newrect; //FIXME: the following code prints underline rather than strikeout text #if 0 - QFont f( p.font() ); + TQFont f( p.font() ); if ( todo->isCompleted() && strikeoutCompleted ) { f.setStrikeOut( true ); p.setFont( f ); @@ -1484,10 +1484,10 @@ void CalPrintPluginBase::drawTodo( int &count, Todo *todo, QPainter &p, //first, draw the progress bar int progress = (int)(( lwidth*todo->percentComplete())/100.0 + 0.5); - p.setBrush( QBrush( Qt::NoBrush ) ); + p.setBrush( TQBrush( Qt::NoBrush ) ); p.drawRect( posPercentComplete, y+3, lwidth, lheight ); if ( progress > 0 ) { - p.setBrush( QColor( 128, 128, 128 ) ); + p.setBrush( TQColor( 128, 128, 128 ) ); p.drawRect( posPercentComplete, y+3, progress, lheight ); } @@ -1563,14 +1563,14 @@ int CalPrintPluginBase::weekdayColumn( int weekday ) return ( weekday + 7 - KGlobal::locale()->weekStartDay() ) % 7; } -void CalPrintPluginBase::drawJournalField( QPainter &p, QString field, QString text, +void CalPrintPluginBase::drawJournalField( TQPainter &p, TQString field, TQString text, int x, int &y, int width, int pageHeight ) { if ( text.isEmpty() ) return; - QString entry( field.arg( text ) ); + TQString entry( field.arg( text ) ); - QRect rect( p.boundingRect( x, y, width, -1, Qt::WordBreak, entry) ); + TQRect rect( p.boundingRect( x, y, width, -1, Qt::WordBreak, entry) ); if ( rect.bottom() > pageHeight) { // Start new page... // FIXME: If it's a multi-line text, draw a few lines on this page, and the @@ -1579,18 +1579,18 @@ void CalPrintPluginBase::drawJournalField( QPainter &p, QString field, QString t mPrinter->newPage(); rect = p.boundingRect( x, y, width, -1, Qt::WordBreak, entry); } - QRect newrect; + TQRect newrect; p.drawText( rect, Qt::WordBreak, entry, -1, &newrect ); y = newrect.bottom() + 7; } -void CalPrintPluginBase::drawJournal( Journal * journal, QPainter &p, int x, int &y, +void CalPrintPluginBase::drawJournal( Journal * journal, TQPainter &p, int x, int &y, int width, int pageHeight ) { - QFont oldFont( p.font() ); - p.setFont( QFont( "sans-serif", 15 ) ); - QString headerText; - QString dateText( KGlobal::locale()-> + TQFont oldFont( p.font() ); + p.setFont( TQFont( "sans-serif", 15 ) ); + TQString headerText; + TQString dateText( KGlobal::locale()-> formatDate( journal->dtStart().date(), false ) ); if ( journal->summary().isEmpty() ) { @@ -1601,14 +1601,14 @@ void CalPrintPluginBase::drawJournal( Journal * journal, QPainter &p, int x, int .arg( dateText ); } - QRect rect( p.boundingRect( x, y, width, -1, Qt::WordBreak, headerText) ); + TQRect rect( p.boundingRect( x, y, width, -1, Qt::WordBreak, headerText) ); if ( rect.bottom() > pageHeight) { // Start new page... y=0; mPrinter->newPage(); rect = p.boundingRect( x, y, width, -1, Qt::WordBreak, headerText ); } - QRect newrect; + TQRect newrect; p.drawText( rect, Qt::WordBreak, headerText, -1, &newrect ); p.setFont( oldFont ); @@ -1623,17 +1623,17 @@ void CalPrintPluginBase::drawJournal( Journal * journal, QPainter &p, int x, int } -void CalPrintPluginBase::drawSplitHeaderRight( QPainter &p, const QDate &fd, - const QDate &td, - const QDate &, +void CalPrintPluginBase::drawSplitHeaderRight( TQPainter &p, const TQDate &fd, + const TQDate &td, + const TQDate &, int width, int ) { - QFont oldFont( p.font() ); + TQFont oldFont( p.font() ); - QPen oldPen( p.pen() ); - QPen pen( Qt::black, 4 ); + TQPen oldPen( p.pen() ); + TQPen pen( Qt::black, 4 ); - QString title; + TQString title; if ( mCalSys ) { if ( fd.month() == td.month() ) { title = i18n("Date range: Month dayStart - dayEnd", "%1 %2 - %3") @@ -1649,7 +1649,7 @@ void CalPrintPluginBase::drawSplitHeaderRight( QPainter &p, const QDate &fd, } } - QFont serifFont("Times", 30); + TQFont serifFont("Times", 30); p.setFont(serifFont); int lineSpacing = p.fontMetrics().lineSpacing(); @@ -1662,9 +1662,9 @@ void CalPrintPluginBase::drawSplitHeaderRight( QPainter &p, const QDate &fd, p.drawLine(300, lineSpacing * 1, width, lineSpacing * 1); p.setPen( oldPen ); - p.setFont(QFont("Times", 20, QFont::Bold, TRUE)); + p.setFont(TQFont("Times", 20, TQFont::Bold, TRUE)); int newlineSpacing = p.fontMetrics().lineSpacing(); - title += QString::number(fd.year()); + title += TQString::number(fd.year()); p.drawText( 0, lineSpacing * 1 + 4, width, newlineSpacing, Qt::AlignRight | Qt::AlignTop, title ); diff --git a/korganizer/printing/calprintpluginbase.h b/korganizer/printing/calprintpluginbase.h index 9312d0042..226998f85 100644 --- a/korganizer/printing/calprintpluginbase.h +++ b/korganizer/printing/calprintpluginbase.h @@ -28,7 +28,7 @@ #ifndef KORG_NOPRINTER -#include <qdatetime.h> +#include <tqdatetime.h> #include <kprinter.h> #include <kdepimmacros.h> #include <libkcal/calendar.h> @@ -77,16 +77,16 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin /** Returns widget for configuring the print format. */ - virtual QWidget *createConfigWidget( QWidget * ); + virtual TQWidget *createConfigWidget( TQWidget * ); /** Actually do the printing. - \param p QPainter the print result is painted to + \param p TQPainter the print result is painted to \param width Width of printable area \param height Height of printable area */ - virtual void print( QPainter &p, int width, int height ) = 0; + virtual void print( TQPainter &p, int width, int height ) = 0; /** Start printing. */ @@ -117,12 +117,12 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin void setUseColors( bool useColors ); /** Helper functions to hide the KOrg::CoreHelper */ - QColor categoryBgColor( Incidence *incidence ); - QColor textColor( const QColor &color ); - QTime dayStart(); - bool isWorkingDay( const QDate &dt ); - QString holidayString( const QDate &dt ); - Event *holiday( const QDate &dt ); + TQColor categoryBgColor( Incidence *incidence ); + TQColor textColor( const TQColor &color ); + TQTime dayStart(); + bool isWorkingDay( const TQDate &dt ); + TQString holidayString( const TQDate &dt ); + Event *holiday( const TQDate &dt ); /** Determines the column of the given weekday ( 1=Monday, 7=Sunday ), taking the @@ -130,7 +130,7 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin \param weekday Index of the weekday */ static int weekdayColumn( int weekday ); - void setCategoryColors( QPainter &p, Incidence *incidence ); + void setCategoryColors( TQPainter &p, Incidence *incidence ); KPrinter::Orientation orientation() const; @@ -168,7 +168,7 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin \param linewidth The border width of the box \param rect The rectangle of the box */ - static void drawBox( QPainter &p, int linewidth, const QRect &rect ); + static void drawBox( TQPainter &p, int linewidth, const TQRect &rect ); /** Draw a shaded box with given width at the given coordinates. \param p The printer to be used @@ -176,16 +176,16 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin \param brush The brush to fill the box \param rect The rectangle of the box */ - static void drawShadedBox( QPainter &p, int linewidth, const QBrush &brush, const QRect &rect ); + static void drawShadedBox( TQPainter &p, int linewidth, const TQBrush &brush, const TQRect &rect ); /** Print the given string (event summary) in the given rectangle. Margins and justification (centered or not) are automatically adjusted. - \param p QPainter of the printout + \param p TQPainter of the printout \param box Coordinates of the surrounding event box \param str The text to be printed in the box */ - void printEventString( QPainter &p, const QRect &box, const QString &str, int flags = -1 ); + void printEventString( TQPainter &p, const TQRect &box, const TQString &str, int flags = -1 ); /** Print the box for the given event with the given string. @@ -195,27 +195,27 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin color will be deduced, if applicable. \param str The string to print inside the box */ - void showEventBox( QPainter &p, const QRect &box, Incidence *incidence, const QString &str, int flags = -1 ); + void showEventBox( TQPainter &p, const TQRect &box, Incidence *incidence, const TQString &str, int flags = -1 ); /** Draw a subheader box with a shaded background and the given string - \param p QPainter of the printout + \param p TQPainter of the printout \param str Text to be printed inside the box \param box Coordinates of the box */ - void drawSubHeaderBox(QPainter &p, const QString &str, const QRect &box ); + void drawSubHeaderBox(TQPainter &p, const TQString &str, const TQRect &box ); /** Draw an event box with vertical text. - \param p QPainter of the printout + \param p TQPainter of the printout \param box Coordinates of the box \param str ext to be printed inside the box */ - void drawVerticalBox( QPainter &p, const QRect &box, const QString &str ); + void drawVerticalBox( TQPainter &p, const TQRect &box, const TQString &str ); /** Draw a component box with a heading (printed in bold). - \param p QPainter of the printout + \param p TQPainter of the printout \param box Coordinates of the box \param caption Caption string to be printed inside the box \param contents Normal text contents of the box. If contents.isNull(), @@ -233,20 +233,20 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin the contents, use the return value as the top-value of your custom contents in that case. */ - int drawBoxWithCaption( QPainter &p, const QRect &box, const QString &caption, - const QString &contents, - bool sameLine, bool expand, const QFont &captionFont, const QFont &textFont ); + int drawBoxWithCaption( TQPainter &p, const TQRect &box, const TQString &caption, + const TQString &contents, + bool sameLine, bool expand, const TQFont &captionFont, const TQFont &textFont ); /** - Draw the gray header bar of the printout to the QPainter. + Draw the gray header bar of the printout to the TQPainter. It prints the given text and optionally one or two small - month views, as specified by the two QDate. The printed + month views, as specified by the two TQDate. The printed text can also contain a line feed. If month2 is invalid, only the month that contains month1 is printed. E.g. the filofax week view draws just the current month, while the month view draws the previous and the next month. - \param p QPainter of the printout + \param p TQPainter of the printout \param title The string printed as the title of the page (e.g. the date, date range or todo list title) \param month1 Date specifying the month for the left one of @@ -264,51 +264,51 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin is box.bottom, otherwise it is larger than box.bottom and matches the y-coordinate of the surrounding rectangle. */ - int drawHeader( QPainter &p, QString title, - const QDate &month1, const QDate &month2, - const QRect &box, bool expand = false ); + int drawHeader( TQPainter &p, TQString title, + const TQDate &month1, const TQDate &month2, + const TQRect &box, bool expand = false ); /** Draw a small calendar with the days of a month into the given area. Used for example in the title bar of the sheet. - \param p QPainter of the printout + \param p TQPainter of the printout \param qd Arbitrary Date within the month to be printed. \param box coordinates of the small calendar */ - void drawSmallMonth( QPainter &p, const QDate &qd, const QRect &box ); + void drawSmallMonth( TQPainter &p, const TQDate &qd, const TQRect &box ); /** Draw a horizontal bar with the weekday names of the given date range in the given area of the painter. This is used for the weekday-bar on top of the timetable view and the month view. - \param p QPainter of the printout + \param p TQPainter of the printout \param fromDate First date of the printed dates \param toDate Last date of the printed dates \param box coordinates of the box for the days of the week */ - void drawDaysOfWeek( QPainter &p, - const QDate &fromDate, const QDate &toDate, - const QRect &box ); + void drawDaysOfWeek( TQPainter &p, + const TQDate &fromDate, const TQDate &toDate, + const TQRect &box ); /** Draw a single weekday name in a box inside the given area of the painter. This is called in a loop by drawDaysOfWeek. - \param p QPainter of the printout + \param p TQPainter of the printout \param qd Date of the printed day \param box coordinates of the weekbox */ - void drawDaysOfWeekBox( QPainter &p, const QDate &qd, const QRect &box ); + void drawDaysOfWeekBox( TQPainter &p, const TQDate &qd, const TQRect &box ); /** Draw a (vertical) time scale from time fromTime to toTime inside the given area of the painter. Every hour will have a one-pixel line over the whole width, every half-hour the line will only span the left half of the width. This is used in the day and timetable print styles - \param p QPainter of the printout + \param p TQPainter of the printout \param fromTime Start time of the time range to display \param toTime End time of the time range to display \param box coordinates of the timeline */ - void drawTimeLine( QPainter &p, - const QTime &fromTime, const QTime &toTime, - const QRect &box ); + void drawTimeLine( TQPainter &p, + const TQTime &fromTime, const TQTime &toTime, + const TQRect &box ); /** Draw the all-day box for the agenda print view (the box on top which @@ -316,7 +316,7 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin height is the cell height of a single cell, and the returned height will be the total height used for the all-day events. If !expandable, only one cell will be used, and multiple events are concatenated using ", ". - \param p QPainter of the printout + \param p TQPainter of the printout \param eventList The list of all-day events that are supposed to be printed inside this box \param qd The date of the currently printed day @@ -328,13 +328,13 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin \param box coordinates of the all day box. \return The height used for the all-day box. */ - int drawAllDayBox( QPainter &p, Event::List &eventList, - const QDate &qd, bool expandable, - const QRect &box ); + int drawAllDayBox( TQPainter &p, Event::List &eventList, + const TQDate &qd, bool expandable, + const TQRect &box ); /** Draw the agenda box for the day print style (the box showing all events of that day). Also draws a grid with half-hour spacing of the grid lines. - \param p QPainter of the printout + \param p TQPainter of the printout \param eventList The list of the events that are supposed to be printed inside this box \param qd The date of the currently printed day @@ -350,20 +350,20 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin to include all events if expandable==true \param box coordinates of the agenda day box. */ - void drawAgendaDayBox( QPainter &p, Event::List &eventList, - const QDate &qd, bool expandable, - QTime &fromTime, QTime &toTime, - const QRect &box ); + void drawAgendaDayBox( TQPainter &p, Event::List &eventList, + const TQDate &qd, bool expandable, + TQTime &fromTime, TQTime &toTime, + const TQRect &box ); - void drawAgendaItem( PrintCellItem *item, QPainter &p, - const QDateTime &startPrintDate, - const QDateTime &endPrintDate, - float minlen, const QRect &box ); + void drawAgendaItem( PrintCellItem *item, TQPainter &p, + const TQDateTime &startPrintDate, + const TQDateTime &endPrintDate, + float minlen, const TQRect &box ); /** Draw the box containing a list of all events of the given day (with their times, of course). Used in the Filofax and the month print style. - \param p QPainter of the printout + \param p TQPainter of the printout \param qd The date of the currently printed day. All events of the calendar that appear on that day will be printed. \param box coordinates of the day box. @@ -372,8 +372,8 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin \param printRecurDaily Whether daily recurring incidences should be printed. \param printRecurWeekly Whether weekly recurring incidences should be printed. */ - void drawDayBox( QPainter &p, const QDate &qd, - const QRect &box, + void drawDayBox( TQPainter &p, const TQDate &qd, + const TQRect &box, bool fullDate = false, bool printRecurDaily = true, bool printRecurWeekly = true ); /** @@ -381,12 +381,12 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin three days of the week will be shown in the first column (using drawDayBox), the remaining four in the second column, where the last two days of the week (typically Saturday and Sunday) only get half the height of the other day boxes. - \param p QPainter of the printout + \param p TQPainter of the printout \param qd Arbitrary date within the week to be printed. \param box coordinates of the week box. */ - void drawWeek( QPainter &p, const QDate &qd, - const QRect &box ); + void drawWeek( TQPainter &p, const TQDate &qd, + const TQRect &box ); /** Draw the timetable view of the given time range from fromDate to toDate. On the left side the time scale is printed (using drawTimeLine), then each @@ -395,16 +395,16 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin The first cell of each column contains the all-day events (using drawAllDayBox with expandable=false). The given time range cannot be expanded to include all events. - \param p QPainter of the printout + \param p TQPainter of the printout \param fromDate First day to be included in the page \param toDate Last day to be included in the page \param fromTime Start time of the displayed time range \param toTime End time of the displayed time range \param box coordinates of the time table. */ - void drawTimeTable( QPainter &p, const QDate &fromDate, const QDate &toDate, - QTime &fromTime, QTime &toTime, - const QRect &box ); + void drawTimeTable( TQPainter &p, const TQDate &fromDate, const TQDate &toDate, + TQTime &fromTime, TQTime &toTime, + const TQRect &box ); /** Draw the month table of the month containing the date qd. Each day gets one @@ -412,20 +412,20 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin in a matrix, with the first column being the first day of the week (so it might display some days of the previous and the next month). Above the matrix there is a bar showing the weekdays (drawn using drawDaysOfWeek). - \param p QPainter of the printout + \param p TQPainter of the printout \param qd Arbitrary date within the month to be printed. \param recurDaily Whether daily recurring incidences should be printed. \param recurWeekly Whether weekly recurring incidences should be printed. \param weeknumbers Whether the week numbers are printed left of each row of the matrix \param box coordinates of the month. */ - void drawMonthTable( QPainter &p, const QDate &qd, bool weeknumbers, + void drawMonthTable( TQPainter &p, const TQDate &qd, bool weeknumbers, bool recurDaily, bool recurWeekly, - const QRect &box ); + const TQRect &box ); /** Draw a vertical representation of the month containing the date dt. Each day gets one line. - \param p QPainter of the printout + \param p TQPainter of the printout \param dt Arbitrary date within the month to be printed \param box coordinates of the box reserved for the month \param maxdays Days to print. If a value of -1 is given, the number of days @@ -437,7 +437,7 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin \param holidaysFlags Bitfield consisting of DisplayFlags flags to determine how holidays should be printed. */ - void drawMonth( QPainter &p, const QDate &dt, const QRect &box, int maxdays = -1, int subDailyFlags = TimeBoxes, int holidaysFlags = Text ); + void drawMonth( TQPainter &p, const TQDate &dt, const TQRect &box, int maxdays = -1, int subDailyFlags = TimeBoxes, int holidaysFlags = Text ); /** Internal class representing the start of a todo. @@ -448,7 +448,7 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin Draws single to-do and its (intented) sub-to-dos, optionally connects them by a tree-like line, and optionally shows due date, summary, description and priority. \param count The number of the currently printed to-do (count will be incremented for each to-do drawn) \param todo The to-do to be printed. It's sub-to-dos are recursively drawn, so drawTodo should only be called on the to-dos of the highest level. - \param p QPainter of the printout + \param p TQPainter of the printout \param sortField Specifies on which attribute of the todo you want to sort. \param sortDir Specifies if you want to sort ascending or descending. \param connectSubTodos Whether sub-to-dos shall be connected with their parent by a line (tree-like). @@ -466,7 +466,7 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin \param todoList Contains a list of sub-todos for the specified @p todo . \param r Internal (used when printing sub-to-dos to give information about its parent) */ - void drawTodo( int &count, Todo *todo, QPainter &p, + void drawTodo( int &count, Todo *todo, TQPainter &p, TodoSortField sortField, SortDirection sortDir, bool connectSubTodos, bool strikeoutCompleted, bool desc, int posPriority, int posSummary, int posDueDt, @@ -477,25 +477,25 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin /** Draws single journal item. \param journal The item to be printed. - \param p QPainter of the printout + \param p TQPainter of the printout \param x x-coordinate of the upper left coordinate of the first item \param y y-coordinate of the upper left coordinate of the first item \param width width of the whole list \param pageHeight Total height allowed for the list on a page. If an item would be below that line, a new page is started. */ - void drawJournal( Journal * journal, QPainter &p, int x, int &y, + void drawJournal( Journal * journal, TQPainter &p, int x, int &y, int width, int pageHeight ); - void drawJournalField( QPainter &p, QString field, QString text, + void drawJournalField( TQPainter &p, TQString field, TQString text, int x, int &y, int width, int pageHeight ); - void drawSplitHeaderRight( QPainter &p, const QDate &fd, const QDate &td, - const QDate &cd, int width, int height ); + void drawSplitHeaderRight( TQPainter &p, const TQDate &fd, const TQDate &td, + const TQDate &cd, int width, int height ); protected: - void drawIncidence( QPainter &p, const QRect &dayBox, const QString &time, - const QString &summary, int &textY ); + void drawIncidence( TQPainter &p, const TQRect &dayBox, const TQString &time, + const TQString &summary, int &textY ); protected: bool mUseColors; diff --git a/korganizer/printing/cellitem.cpp b/korganizer/printing/cellitem.cpp index 67e52c58e..73c8aa50b 100644 --- a/korganizer/printing/cellitem.cpp +++ b/korganizer/printing/cellitem.cpp @@ -27,26 +27,26 @@ #include <klocale.h> #include <kdebug.h> -#include <qintdict.h> +#include <tqintdict.h> using namespace KOrg; -QString CellItem::label() const +TQString CellItem::label() const { return i18n("<undefined>"); } -QPtrList<CellItem> CellItem::placeItem( QPtrList<CellItem> cells, +TQPtrList<CellItem> CellItem::placeItem( TQPtrList<CellItem> cells, CellItem *placeItem ) { kdDebug(5855) << "Placing " << placeItem->label() << endl; - QPtrList<KOrg::CellItem> conflictItems; + TQPtrList<KOrg::CellItem> conflictItems; int maxSubCells = 0; - QIntDict<KOrg::CellItem> subCellDict; + TQIntDict<KOrg::CellItem> subCellDict; // Find all items which are in same cell - QPtrListIterator<KOrg::CellItem> it2( cells ); + TQPtrListIterator<KOrg::CellItem> it2( cells ); for( it2.toFirst(); it2.current(); ++it2 ) { KOrg::CellItem *item = it2.current(); if ( item == placeItem ) continue; @@ -83,7 +83,7 @@ QPtrList<CellItem> CellItem::placeItem( QPtrList<CellItem> cells, conflictItems.append( placeItem ); placeItem->setSubCells( maxSubCells ); - QPtrListIterator<KOrg::CellItem> it3( conflictItems ); + TQPtrListIterator<KOrg::CellItem> it3( conflictItems ); for( it3.toFirst(); it3.current(); ++it3 ) { (*it3)->setSubCells( maxSubCells ); } diff --git a/korganizer/printing/cellitem.h b/korganizer/printing/cellitem.h index fa708147e..83759cc8d 100644 --- a/korganizer/printing/cellitem.h +++ b/korganizer/printing/cellitem.h @@ -24,8 +24,8 @@ #ifndef KORG_CELLITEM_H #define KORG_CELLITEM_H -#include <qstring.h> -#include <qptrlist.h> +#include <tqstring.h> +#include <tqptrlist.h> #include <kdepimmacros.h> @@ -47,7 +47,7 @@ class KDE_EXPORT CellItem virtual bool overlaps( CellItem *other ) const = 0; - virtual QString label() const; + virtual TQString label() const; /** Place item \arg placeItem into stripe containing items \arg cells in a @@ -55,7 +55,7 @@ class KDE_EXPORT CellItem \return Placed items */ - static QPtrList<CellItem> placeItem( QPtrList<CellItem> cells, + static TQPtrList<CellItem> placeItem( TQPtrList<CellItem> cells, CellItem *placeItem ); private: diff --git a/korganizer/publishdialog.cpp b/korganizer/publishdialog.cpp index a6d0881eb..ac684069f 100644 --- a/korganizer/publishdialog.cpp +++ b/korganizer/publishdialog.cpp @@ -21,10 +21,10 @@ without including the source code for Qt in the source distribution. */ -#include <qlineedit.h> -#include <qpushbutton.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> #include <kdebug.h> -#include <qlistview.h> +#include <tqlistview.h> #include <kglobal.h> #include <klocale.h> @@ -37,7 +37,7 @@ #include "publishdialog.h" #include "publishdialog_base.h" -PublishDialog::PublishDialog( QWidget* parent, const char* name, +PublishDialog::PublishDialog( TQWidget* parent, const char* name, bool modal ) : KDialogBase( parent, name, modal, i18n("Select Addresses"), Ok|Cancel|Help, Ok, true ) @@ -46,18 +46,18 @@ PublishDialog::PublishDialog( QWidget* parent, const char* name, setMainWidget( mWidget ); mWidget->mNameLineEdit->setEnabled( false ); mWidget->mEmailLineEdit->setEnabled( false ); - connect( mWidget->mAddressListView, SIGNAL( selectionChanged(QListViewItem *) ), - SLOT(updateInput())); - connect( mWidget->mNew, SIGNAL( clicked() ), - SLOT( addItem() ) ); - connect( mWidget->mRemove, SIGNAL( clicked() ), - SLOT( removeItem() ) ); - connect( mWidget->mSelectAddressee, SIGNAL( clicked() ), - SLOT( openAddressbook() ) ); - connect( mWidget->mNameLineEdit, SIGNAL( textChanged(const QString&) ), - SLOT( updateItem() ) ); - connect( mWidget->mEmailLineEdit, SIGNAL( textChanged(const QString&) ), - SLOT( updateItem() ) ); + connect( mWidget->mAddressListView, TQT_SIGNAL( selectionChanged(TQListViewItem *) ), + TQT_SLOT(updateInput())); + connect( mWidget->mNew, TQT_SIGNAL( clicked() ), + TQT_SLOT( addItem() ) ); + connect( mWidget->mRemove, TQT_SIGNAL( clicked() ), + TQT_SLOT( removeItem() ) ); + connect( mWidget->mSelectAddressee, TQT_SIGNAL( clicked() ), + TQT_SLOT( openAddressbook() ) ); + connect( mWidget->mNameLineEdit, TQT_SIGNAL( textChanged(const TQString&) ), + TQT_SLOT( updateItem() ) ); + connect( mWidget->mEmailLineEdit, TQT_SIGNAL( textChanged(const TQString&) ), + TQT_SLOT( updateItem() ) ); } PublishDialog::~PublishDialog() @@ -68,16 +68,16 @@ void PublishDialog::addAttendee( Attendee *attendee ) { mWidget->mNameLineEdit->setEnabled( true ); mWidget->mEmailLineEdit->setEnabled( true ); - QListViewItem *item = new QListViewItem( mWidget->mAddressListView ); + TQListViewItem *item = new TQListViewItem( mWidget->mAddressListView ); item->setText( 0, attendee->name() ); item->setText( 1, attendee->email() ); mWidget->mAddressListView->insertItem( item ); } -QString PublishDialog::addresses() +TQString PublishDialog::addresses() { - QString to = ""; - QListViewItem *item; + TQString to = ""; + TQListViewItem *item; int i, count; count = mWidget->mAddressListView->childCount(); for ( i=0; i<count; i++ ) { @@ -95,7 +95,7 @@ void PublishDialog::addItem() { mWidget->mNameLineEdit->setEnabled( true ); mWidget->mEmailLineEdit->setEnabled( true ); - QListViewItem *item = new QListViewItem( mWidget->mAddressListView ); + TQListViewItem *item = new TQListViewItem( mWidget->mAddressListView ); mWidget->mAddressListView->insertItem( item ); mWidget->mAddressListView->setSelected( item, true ); mWidget->mNameLineEdit->setText( i18n("(EmptyName)") ); @@ -104,7 +104,7 @@ void PublishDialog::addItem() void PublishDialog::removeItem() { - QListViewItem *item; + TQListViewItem *item; item = mWidget->mAddressListView->selectedItem(); if (!item) return; mWidget->mAddressListView->takeItem( item ); @@ -134,7 +134,7 @@ void PublishDialog::openAddressbook() a = addressList[i]; mWidget->mNameLineEdit->setEnabled( true ); mWidget->mEmailLineEdit->setEnabled( true ); - QListViewItem *item = new QListViewItem( mWidget->mAddressListView ); + TQListViewItem *item = new TQListViewItem( mWidget->mAddressListView ); mWidget->mAddressListView->setSelected( item, true ); mWidget->mNameLineEdit->setText( a.realName() ); mWidget->mEmailLineEdit->setText( a.preferredEmail() ); @@ -146,7 +146,7 @@ void PublishDialog::openAddressbook() void PublishDialog::updateItem() { - QListViewItem *item; + TQListViewItem *item; item = mWidget->mAddressListView->selectedItem(); if (!item) return; item->setText( 0, mWidget->mNameLineEdit->text() ); @@ -155,12 +155,12 @@ void PublishDialog::updateItem() void PublishDialog::updateInput() { - QListViewItem *item; + TQListViewItem *item; item = mWidget->mAddressListView->selectedItem(); if (!item) return; mWidget->mNameLineEdit->setEnabled( true ); mWidget->mEmailLineEdit->setEnabled( true ); - QString mail = item->text( 1 ); + TQString mail = item->text( 1 ); mWidget->mNameLineEdit->setText( item->text( 0 ) ); mWidget->mEmailLineEdit->setText( mail ); } diff --git a/korganizer/publishdialog.h b/korganizer/publishdialog.h index cbe6fc809..d7f642059 100644 --- a/korganizer/publishdialog.h +++ b/korganizer/publishdialog.h @@ -35,12 +35,12 @@ class PublishDialog : public KDialogBase { Q_OBJECT public: - PublishDialog(QWidget* parent=0,const char* name=0, + PublishDialog(TQWidget* parent=0,const char* name=0, bool modal=true ); ~PublishDialog(); void addAttendee(Attendee *attendee); - QString addresses(); + TQString addresses(); signals: void numMessagesChanged(int); diff --git a/korganizer/resourceview.cpp b/korganizer/resourceview.cpp index 112a2801b..d4a76f73e 100644 --- a/korganizer/resourceview.cpp +++ b/korganizer/resourceview.cpp @@ -38,15 +38,15 @@ #include <kresources/configdialog.h> #include <libkcal/calendarresources.h> -#include <qhbox.h> -#include <qheader.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qpainter.h> -#include <qpushbutton.h> -#include <qpopupmenu.h> -#include <qtooltip.h> -#include <qwhatsthis.h> +#include <tqhbox.h> +#include <tqheader.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqpainter.h> +#include <tqpushbutton.h> +#include <tqpopupmenu.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> #include "koprefs.h" @@ -58,27 +58,27 @@ ResourceViewFactory::ResourceViewFactory( KCal::CalendarResources *calendar, { } -CalendarViewExtension *ResourceViewFactory::create( QWidget *parent ) +CalendarViewExtension *ResourceViewFactory::create( TQWidget *parent ) { mResourceView = new ResourceView( mCalendar, parent ); - QObject::connect( mResourceView, SIGNAL( resourcesChanged() ), - mView, SLOT( resourcesChanged() ) ); - QObject::connect( mResourceView, SIGNAL( resourcesChanged() ), - mView, SLOT( updateCategories() ) ); + TQObject::connect( mResourceView, TQT_SIGNAL( resourcesChanged() ), + mView, TQT_SLOT( resourcesChanged() ) ); + TQObject::connect( mResourceView, TQT_SIGNAL( resourcesChanged() ), + mView, TQT_SLOT( updateCategories() ) ); - QObject::connect( mCalendar, - SIGNAL( signalResourceAdded( ResourceCalendar * ) ), + TQObject::connect( mCalendar, + TQT_SIGNAL( signalResourceAdded( ResourceCalendar * ) ), mResourceView, - SLOT( addResourceItem( ResourceCalendar * ) ) ); - QObject::connect( mCalendar, - SIGNAL( signalResourceModified( ResourceCalendar * ) ), + TQT_SLOT( addResourceItem( ResourceCalendar * ) ) ); + TQObject::connect( mCalendar, + TQT_SIGNAL( signalResourceModified( ResourceCalendar * ) ), mResourceView, - SLOT( updateResourceItem( ResourceCalendar * ) ) ); - QObject::connect( mCalendar, SIGNAL( signalResourceAdded( ResourceCalendar * ) ), - mView, SLOT( updateCategories() ) ); - QObject::connect( mCalendar, SIGNAL( signalResourceModified( ResourceCalendar * ) ), - mView, SLOT( updateCategories() ) ); + TQT_SLOT( updateResourceItem( ResourceCalendar * ) ) ); + TQObject::connect( mCalendar, TQT_SIGNAL( signalResourceAdded( ResourceCalendar * ) ), + mView, TQT_SLOT( updateCategories() ) ); + TQObject::connect( mCalendar, TQT_SIGNAL( signalResourceModified( ResourceCalendar * ) ), + mView, TQT_SLOT( updateCategories() ) ); return mResourceView; } @@ -90,12 +90,12 @@ ResourceView *ResourceViewFactory::resourceView() const ResourceItem::ResourceItem( ResourceCalendar *resource, ResourceView *view, KListView *parent ) - : QCheckListItem( parent, resource->resourceName(), CheckBox ), + : TQCheckListItem( parent, resource->resourceName(), CheckBox ), mResource( resource ), mView( view ), mBlockStateChange( false ), - mIsSubresource( false ), mResourceIdentifier( QString::null ), + mIsSubresource( false ), mResourceIdentifier( TQString::null ), mSubItemsCreated( false ), mIsStandardResource( false ) { - mResourceColor = QColor(); + mResourceColor = TQColor(); setGuiState(); if ( mResource->isActive() ) { @@ -105,16 +105,16 @@ ResourceItem::ResourceItem( ResourceCalendar *resource, ResourceView *view, void ResourceItem::createSubresourceItems() { - const QStringList subresources = mResource->subresources(); + const TQStringList subresources = mResource->subresources(); if ( !subresources.isEmpty() ) { setOpen( true ); setExpandable( true ); // This resource has subresources - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it=subresources.begin(); it!=subresources.end(); ++it ) { ResourceItem *item = new ResourceItem( mResource, *it, mResource->labelForSubresource( *it ), mView, this ); - QColor resourceColor = *KOPrefs::instance()->resourceColor( *it ); + TQColor resourceColor = *KOPrefs::instance()->resourceColor( *it ); item->setResourceColor( resourceColor ); item->update(); } @@ -123,14 +123,14 @@ void ResourceItem::createSubresourceItems() } ResourceItem::ResourceItem( KCal::ResourceCalendar *resource, - const QString& sub, const QString& label, + const TQString& sub, const TQString& label, ResourceView *view, ResourceItem* parent ) - : QCheckListItem( parent, label, CheckBox ), mResource( resource ), + : TQCheckListItem( parent, label, CheckBox ), mResource( resource ), mView( view ), mBlockStateChange( false ), mIsSubresource( true ), mSubItemsCreated( false ), mIsStandardResource( false ) { - mResourceColor = QColor(); + mResourceColor = TQColor(); mResourceIdentifier = sub; setGuiState(); } @@ -178,11 +178,11 @@ void ResourceItem::update() setGuiState(); } -void ResourceItem::setResourceColor(QColor& color) +void ResourceItem::setResourceColor(TQColor& color) { if ( color.isValid() ) { if ( mResourceColor != color ) { - QPixmap px(height()-4,height()-4); + TQPixmap px(height()-4,height()-4); mResourceColor = color; px.fill(color); setPixmap(0,px); @@ -201,40 +201,40 @@ void ResourceItem::setStandardResource( bool std ) } } -void ResourceItem::paintCell(QPainter *p, const QColorGroup &cg, +void ResourceItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment) { - QFont oldFont = p->font(); - QFont newFont = oldFont; + TQFont oldFont = p->font(); + TQFont newFont = oldFont; newFont.setBold( mIsStandardResource && !mIsSubresource ); p->setFont( newFont ); - QCheckListItem::paintCell( p, cg, column, width, alignment ); + TQCheckListItem::paintCell( p, cg, column, width, alignment ); p->setFont( oldFont ); -/* QColorGroup _cg = cg; +/* TQColorGroup _cg = cg; if(!mResource) return; - _cg.setColor(QColorGroup::Base, getTextColor(mResourceColor));*/ + _cg.setColor(TQColorGroup::Base, getTextColor(mResourceColor));*/ } ResourceView::ResourceView( KCal::CalendarResources *calendar, - QWidget *parent, const char *name ) + TQWidget *parent, const char *name ) : CalendarViewExtension( parent, name ), mCalendar( calendar ) { - QBoxLayout *topLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() ); + TQBoxLayout *topLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint() ); - QHBoxLayout *buttonBox = new QHBoxLayout(); + TQHBoxLayout *buttonBox = new TQHBoxLayout(); buttonBox->setSpacing( KDialog::spacingHint() ); topLayout->addLayout( buttonBox ); - QLabel *calLabel = new QLabel( i18n( "Calendar" ), this ); + TQLabel *calLabel = new TQLabel( i18n( "Calendar" ), this ); buttonBox->addWidget( calLabel ); buttonBox->addStretch( 1 ); - mAddButton = new QPushButton( this, "add" ); + mAddButton = new TQPushButton( this, "add" ); mAddButton->setIconSet( SmallIconSet( "add" ) ); buttonBox->addWidget( mAddButton ); - QToolTip::add( mAddButton, i18n( "Add calendar" ) ); - QWhatsThis::add( mAddButton, + TQToolTip::add( mAddButton, i18n( "Add calendar" ) ); + TQWhatsThis::add( mAddButton, i18n( "<qt><p>Press this button to add a resource to " "KOrganizer.</p>" "<p>Events, journal entries and to-dos are retrieved " @@ -245,18 +245,18 @@ ResourceView::ResourceView( KCal::CalendarResources *calendar, "when creating incidents you will either automatically " "use the default resource or be prompted " "to select the resource to use.</p></qt>" ) ); - mEditButton = new QPushButton( this, "edit" ); + mEditButton = new TQPushButton( this, "edit" ); mEditButton->setIconSet( SmallIconSet( "edit" ) ); buttonBox->addWidget( mEditButton ); - QToolTip::add( mEditButton, i18n( "Edit calendar settings" ) ); - QWhatsThis::add( mEditButton, + TQToolTip::add( mEditButton, i18n( "Edit calendar settings" ) ); + TQWhatsThis::add( mEditButton, i18n( "Press this button to edit the resource currently " "selected on the KOrganizer resources list above." ) ); - mDeleteButton = new QPushButton( this, "del" ); + mDeleteButton = new TQPushButton( this, "del" ); mDeleteButton->setIconSet( SmallIconSet( "remove" ) ); buttonBox->addWidget( mDeleteButton ); - QToolTip::add( mDeleteButton, i18n( "Remove calendar" ) ); - QWhatsThis::add( mDeleteButton, + TQToolTip::add( mDeleteButton, i18n( "Remove calendar" ) ); + TQWhatsThis::add( mDeleteButton, i18n( "Press this button to delete the resource currently " "selected on the KOrganizer resources list above." ) ); mDeleteButton->setDisabled( true ); @@ -264,7 +264,7 @@ ResourceView::ResourceView( KCal::CalendarResources *calendar, mListView = new KListView( this ); mListView->header()->hide(); - QWhatsThis::add( mListView, + TQWhatsThis::add( mListView, i18n( "<qt><p>Select on this list the active KOrganizer " "resources. Check the resource box to make it " "active. Press the \"Add...\" button below to add new " @@ -278,20 +278,20 @@ ResourceView::ResourceView( KCal::CalendarResources *calendar, "use the default resource or be prompted " "to select the resource to use.</p></qt>" ) ); mListView->addColumn( i18n("Calendar") ); - mListView->setResizeMode( QListView::LastColumn ); + mListView->setResizeMode( TQListView::LastColumn ); topLayout->addWidget( mListView ); - connect( mListView, SIGNAL( clicked( QListViewItem * ) ), - SLOT( currentChanged( QListViewItem * ) ) ); - connect( mAddButton, SIGNAL( clicked() ), SLOT( addResource() ) ); - connect( mDeleteButton, SIGNAL( clicked() ), SLOT( removeResource() ) ); - connect( mEditButton, SIGNAL( clicked() ), SLOT( editResource() ) ); - connect( mListView, SIGNAL( doubleClicked ( QListViewItem *, const QPoint &, + connect( mListView, TQT_SIGNAL( clicked( TQListViewItem * ) ), + TQT_SLOT( currentChanged( TQListViewItem * ) ) ); + connect( mAddButton, TQT_SIGNAL( clicked() ), TQT_SLOT( addResource() ) ); + connect( mDeleteButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeResource() ) ); + connect( mEditButton, TQT_SIGNAL( clicked() ), TQT_SLOT( editResource() ) ); + connect( mListView, TQT_SIGNAL( doubleClicked ( TQListViewItem *, const TQPoint &, int ) ), - SLOT( editResource() ) ); - connect( mListView, SIGNAL( contextMenuRequested ( QListViewItem *, - const QPoint &, int ) ), - SLOT( contextMenuRequested( QListViewItem *, const QPoint &, + TQT_SLOT( editResource() ) ); + connect( mListView, TQT_SIGNAL( contextMenuRequested ( TQListViewItem *, + const TQPoint &, int ) ), + TQT_SLOT( contextMenuRequested( TQListViewItem *, const TQPoint &, int ) ) ); updateView(); @@ -325,12 +325,12 @@ void ResourceView::addResource() KCal::CalendarResourceManager *manager = mCalendar->resourceManager(); ResourceItem *i = static_cast<ResourceItem*>( mListView->selectedItem() ); if ( i && ( i->isSubresource() || i->resource()->canHaveSubresources() ) ) { - const QString folderName = KInputDialog::getText( i18n( "Add Subresource" ), - i18n( "Please enter a name for the new subresource" ), QString::null, + const TQString folderName = KInputDialog::getText( i18n( "Add Subresource" ), + i18n( "Please enter a name for the new subresource" ), TQString::null, &ok, this ); if ( !ok ) return; - const QString parentId = i->isSubresource() ? i->resourceIdentifier() : QString:: null; + const TQString parentId = i->isSubresource() ? i->resourceIdentifier() : TQString:: null; if ( !i->resource()->addSubresource( folderName, parentId ) ) { KMessageBox::error( this, i18n("<qt>Unable to create subresource <b>%1</b>.</qt>") .arg( folderName ) ); @@ -338,15 +338,15 @@ void ResourceView::addResource() return; } - QStringList types = manager->resourceTypeNames(); - QStringList descs = manager->resourceTypeDescriptions(); - QString desc = KInputDialog::getItem( i18n( "Resource Configuration" ), + TQStringList types = manager->resourceTypeNames(); + TQStringList descs = manager->resourceTypeDescriptions(); + TQString desc = KInputDialog::getItem( i18n( "Resource Configuration" ), i18n( "Please select type of the new resource:" ), descs, 0, false, &ok, this ); if ( !ok ) return; - QString type = types[ descs.findIndex( desc ) ]; + TQString type = types[ descs.findIndex( desc ) ]; // Create new resource ResourceCalendar *resource = manager->createResource( type ); @@ -358,7 +358,7 @@ void ResourceView::addResource() resource->setResourceName( i18n("%1 resource").arg( type ) ); - KRES::ConfigDialog *dlg = new KRES::ConfigDialog( this, QString("calendar"), resource, + KRES::ConfigDialog *dlg = new KRES::ConfigDialog( this, TQString("calendar"), resource, "KRES::ConfigDialog" ); bool success = true; @@ -401,26 +401,26 @@ void ResourceView::addResourceItem( ResourceCalendar *resource ) // assign a color, but only if this is a resource that actually // hold items at top level if ( !resource->canHaveSubresources() || resource->subresources().isEmpty() ) { - QColor resourceColor = *KOPrefs::instance()->resourceColor(resource->identifier()); + TQColor resourceColor = *KOPrefs::instance()->resourceColor(resource->identifier()); item->setResourceColor(resourceColor); item->update(); } - connect( resource, SIGNAL( signalSubresourceAdded( ResourceCalendar *, - const QString &, - const QString &, - const QString & ) ), - SLOT( slotSubresourceAdded( ResourceCalendar *, const QString &, - const QString &, const QString & ) ) ); + connect( resource, TQT_SIGNAL( signalSubresourceAdded( ResourceCalendar *, + const TQString &, + const TQString &, + const TQString & ) ), + TQT_SLOT( slotSubresourceAdded( ResourceCalendar *, const TQString &, + const TQString &, const TQString & ) ) ); - connect( resource, SIGNAL( signalSubresourceRemoved( ResourceCalendar *, - const QString &, - const QString & ) ), - SLOT( slotSubresourceRemoved( ResourceCalendar *, const QString &, - const QString & ) ) ); + connect( resource, TQT_SIGNAL( signalSubresourceRemoved( ResourceCalendar *, + const TQString &, + const TQString & ) ), + TQT_SLOT( slotSubresourceRemoved( ResourceCalendar *, const TQString &, + const TQString & ) ) ); - connect( resource, SIGNAL( resourceSaved( ResourceCalendar * ) ), - SLOT( closeResource( ResourceCalendar * ) ) ); + connect( resource, TQT_SIGNAL( resourceSaved( ResourceCalendar * ) ), + TQT_SLOT( closeResource( ResourceCalendar * ) ) ); updateResourceList(); emit resourcesChanged(); @@ -428,11 +428,11 @@ void ResourceView::addResourceItem( ResourceCalendar *resource ) // Add a new entry void ResourceView::slotSubresourceAdded( ResourceCalendar *calendar, - const QString& /*type*/, - const QString& resource, - const QString& label) + const TQString& /*type*/, + const TQString& resource, + const TQString& label) { - QListViewItem *i = mListView->findItem( calendar->resourceName(), 0 ); + TQListViewItem *i = mListView->findItem( calendar->resourceName(), 0 ); if ( !i ) // Not found return; @@ -441,14 +441,14 @@ void ResourceView::slotSubresourceAdded( ResourceCalendar *calendar, ResourceItem *item = static_cast<ResourceItem *>( i ); ResourceItem *newItem = new ResourceItem( calendar, resource, label, this, item ); - QColor resourceColor = *KOPrefs::instance()->resourceColor( resource ); + TQColor resourceColor = *KOPrefs::instance()->resourceColor( resource ); newItem->setResourceColor( resourceColor ); } // Remove an entry void ResourceView::slotSubresourceRemoved( ResourceCalendar * /*calendar*/, - const QString &/*type*/, - const QString &resource ) + const TQString &/*type*/, + const TQString &resource ) { delete findItemByIdentifier( resource ); emit resourcesChanged(); @@ -472,7 +472,7 @@ void ResourceView::updateResourceItem( ResourceCalendar *resource ) ResourceItem *ResourceView::currentItem() { - QListViewItem *item = mListView->currentItem(); + TQListViewItem *item = mListView->currentItem(); ResourceItem *rItem = static_cast<ResourceItem *>( item ); return rItem; } @@ -482,7 +482,7 @@ void ResourceView::removeResource() ResourceItem *item = currentItem(); if ( !item ) return; - const QString warningMsg = item->isSubresource() ? + const TQString warningMsg = item->isSubresource() ? i18n("<qt>Do you really want to remove the subresource <b>%1</b>? " "Note that its contents will be completely deleted. This " "operation cannot be undone. </qt>").arg( item->text( 0 ) ) : @@ -524,7 +524,7 @@ void ResourceView::editResource() if (!item) return; ResourceCalendar *resource = item->resource(); - KRES::ConfigDialog dlg( this, QString("calendar"), resource, + KRES::ConfigDialog dlg( this, TQString("calendar"), resource, "KRES::ConfigDialog" ); if ( dlg.exec() ) { @@ -535,7 +535,7 @@ void ResourceView::editResource() emitResourcesChanged(); } -void ResourceView::currentChanged( QListViewItem *item ) +void ResourceView::currentChanged( TQListViewItem *item ) { ResourceItem *i = currentItem(); if ( !item || i->isSubresource() ) { @@ -549,7 +549,7 @@ void ResourceView::currentChanged( QListViewItem *item ) ResourceItem *ResourceView::findItem( ResourceCalendar *r ) { - QListViewItem *item; + TQListViewItem *item; ResourceItem *i = 0; for( item = mListView->firstChild(); item; item = item->nextSibling() ) { i = static_cast<ResourceItem *>( item ); @@ -558,9 +558,9 @@ ResourceItem *ResourceView::findItem( ResourceCalendar *r ) return i; } -ResourceItem *ResourceView::findItemByIdentifier( const QString& id ) +ResourceItem *ResourceView::findItemByIdentifier( const TQString& id ) { - QListViewItem *item; + TQListViewItem *item; ResourceItem *i = 0; for( item = mListView->firstChild(); item; item = item->itemBelow() ) { i = static_cast<ResourceItem *>( item ); @@ -571,44 +571,44 @@ ResourceItem *ResourceView::findItemByIdentifier( const QString& id ) } -void ResourceView::contextMenuRequested ( QListViewItem *i, - const QPoint &pos, int ) +void ResourceView::contextMenuRequested ( TQListViewItem *i, + const TQPoint &pos, int ) { KCal::CalendarResourceManager *manager = mCalendar->resourceManager(); ResourceItem *item = static_cast<ResourceItem *>( i ); - QPopupMenu *menu = new QPopupMenu( this ); - connect( menu, SIGNAL( aboutToHide() ), menu, SLOT( deleteLater() ) ); + TQPopupMenu *menu = new TQPopupMenu( this ); + connect( menu, TQT_SIGNAL( aboutToHide() ), menu, TQT_SLOT( deleteLater() ) ); if ( item ) { int reloadId = menu->insertItem( i18n("Re&load"), this, - SLOT( reloadResource() ) ); + TQT_SLOT( reloadResource() ) ); menu->setItemEnabled( reloadId, item->resource()->isActive() ); int saveId = menu->insertItem( i18n("&Save"), this, - SLOT( saveResource() ) ); + TQT_SLOT( saveResource() ) ); menu->setItemEnabled( saveId, item->resource()->isActive() ); menu->insertSeparator(); - menu->insertItem( i18n("Show &Info"), this, SLOT( showInfo() ) ); + menu->insertItem( i18n("Show &Info"), this, TQT_SLOT( showInfo() ) ); //FIXME: This is better on the resource dialog if ( KOPrefs::instance()->agendaViewColors() != KOPrefs::CategoryOnly ) { - QPopupMenu *assignMenu= new QPopupMenu( menu ); - assignMenu->insertItem( i18n( "&Assign Color" ), this, SLOT( assignColor() ) ); + TQPopupMenu *assignMenu= new TQPopupMenu( menu ); + assignMenu->insertItem( i18n( "&Assign Color" ), this, TQT_SLOT( assignColor() ) ); if ( item->resourceColor().isValid() ) - assignMenu->insertItem( i18n( "&Disable Color" ), this, SLOT( disableColor() ) ); + assignMenu->insertItem( i18n( "&Disable Color" ), this, TQT_SLOT( disableColor() ) ); menu->insertItem( i18n( "Resources Colors" ), assignMenu ); } - menu->insertItem( i18n("&Edit..."), this, SLOT( editResource() ) ); - menu->insertItem( i18n("&Remove"), this, SLOT( removeResource() ) ); + menu->insertItem( i18n("&Edit..."), this, TQT_SLOT( editResource() ) ); + menu->insertItem( i18n("&Remove"), this, TQT_SLOT( removeResource() ) ); if ( item->resource() != manager->standardResource() ) { menu->insertSeparator(); menu->insertItem( i18n("Use as &Default Calendar"), this, - SLOT( setStandard() ) ); + TQT_SLOT( setStandard() ) ); } menu->insertSeparator(); } - menu->insertItem( i18n("&Add..."), this, SLOT( addResource() ) ); + menu->insertItem( i18n("&Add..."), this, TQT_SLOT( addResource() ) ); menu->popup( pos ); } @@ -619,14 +619,14 @@ void ResourceView::assignColor() if ( !item ) return; // A color without initialized is a color invalid - QColor myColor; + TQColor myColor; KCal::ResourceCalendar *cal = item->resource(); - QString identifier = cal->identifier(); + TQString identifier = cal->identifier(); if ( item->isSubresource() ) identifier = item->resourceIdentifier(); - QColor defaultColor =*KOPrefs::instance()->resourceColor( identifier ); + TQColor defaultColor =*KOPrefs::instance()->resourceColor( identifier ); int result = KColorDialog::getColor( myColor,defaultColor); @@ -643,9 +643,9 @@ void ResourceView::disableColor() ResourceItem *item = currentItem(); if ( !item ) return; - QColor colorInvalid; + TQColor colorInvalid; KCal::ResourceCalendar *cal = item->resource(); - QString identifier = cal->identifier(); + TQString identifier = cal->identifier(); if ( item->isSubresource() ) identifier = item->resourceIdentifier(); KOPrefs::instance()->setResourceColor( identifier, colorInvalid ); @@ -658,7 +658,7 @@ void ResourceView::showInfo() ResourceItem *item = currentItem(); if ( !item ) return; - QString txt = "<qt>" + item->resource()->infoText() + "</qt>"; + TQString txt = "<qt>" + item->resource()->infoText() + "</qt>"; KMessageBox::information( this, txt ); } @@ -693,7 +693,7 @@ void ResourceView::setStandard() void ResourceView::updateResourceList() { - QListViewItemIterator it( mListView ); + TQListViewItemIterator it( mListView ); ResourceCalendar* stdRes = mCalendar->resourceManager()->standardResource(); while ( it.current() ) { ResourceItem *item = static_cast<ResourceItem *>( it.current() ); diff --git a/korganizer/resourceview.h b/korganizer/resourceview.h index c8c6a6c66..932c81885 100644 --- a/korganizer/resourceview.h +++ b/korganizer/resourceview.h @@ -28,7 +28,7 @@ #include "calendarview.h" #include <libkcal/resourcecalendar.h> -#include <qlistview.h> +#include <tqlistview.h> namespace KCal { class CalendarResources; @@ -44,7 +44,7 @@ class ResourceViewFactory : public CalendarViewExtension::Factory ResourceViewFactory( KCal::CalendarResources *calendar, CalendarView *view ); - CalendarViewExtension *create( QWidget * ); + CalendarViewExtension *create( TQWidget * ); ResourceView *resourceView() const; @@ -60,35 +60,35 @@ class ResourceItem : public QCheckListItem public: ResourceItem( KCal::ResourceCalendar *resource, ResourceView *view, KListView *parent ); - ResourceItem( KCal::ResourceCalendar *resource, const QString& sub, - const QString& label, ResourceView *view, + ResourceItem( KCal::ResourceCalendar *resource, const TQString& sub, + const TQString& label, ResourceView *view, ResourceItem* parent ); KCal::ResourceCalendar *resource() { return mResource; } - const QString& resourceIdentifier() { return mResourceIdentifier; } + const TQString& resourceIdentifier() { return mResourceIdentifier; } bool isSubresource() const { return mIsSubresource; } void createSubresourceItems(); void setStandardResource( bool std ); void update(); - virtual void paintCell(QPainter *p, const QColorGroup &cg, + virtual void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment); - void setResourceColor(QColor& color); - QColor &resourceColor() {return mResourceColor;} + void setResourceColor(TQColor& color); + TQColor &resourceColor() {return mResourceColor;} protected: void stateChange( bool active ); void setGuiState(); - QColor mResourceColor; + TQColor mResourceColor; private: KCal::ResourceCalendar *mResource; ResourceView *mView; bool mBlockStateChange; bool mIsSubresource; - QString mResourceIdentifier; + TQString mResourceIdentifier; bool mSubItemsCreated; bool mIsStandardResource; }; @@ -100,7 +100,7 @@ class ResourceView : public CalendarViewExtension { Q_OBJECT public: - ResourceView( KCal::CalendarResources *calendar, QWidget *parent = 0, + ResourceView( KCal::CalendarResources *calendar, TQWidget *parent = 0, const char *name = 0 ); ~ResourceView(); @@ -123,22 +123,22 @@ class ResourceView : public CalendarViewExtension protected: ResourceItem *findItem( ResourceCalendar * ); - ResourceItem *findItemByIdentifier( const QString& id ); + ResourceItem *findItemByIdentifier( const TQString& id ); ResourceItem *currentItem(); protected slots: void addResource(); void removeResource(); void editResource(); - void currentChanged( QListViewItem* ); - void slotSubresourceAdded( ResourceCalendar *, const QString &, - const QString &resource,const QString& label ); + void currentChanged( TQListViewItem* ); + void slotSubresourceAdded( ResourceCalendar *, const TQString &, + const TQString &resource,const TQString& label ); - void slotSubresourceRemoved( ResourceCalendar *, const QString &, - const QString & ); + void slotSubresourceRemoved( ResourceCalendar *, const TQString &, + const TQString & ); void closeResource( ResourceCalendar * ); - void contextMenuRequested ( QListViewItem *i, const QPoint &pos, int ); + void contextMenuRequested ( TQListViewItem *i, const TQPoint &pos, int ); void assignColor(); void disableColor(); @@ -153,10 +153,10 @@ class ResourceView : public CalendarViewExtension private: KListView *mListView; KCal::CalendarResources *mCalendar; - QPushButton *mAddButton; - QPushButton *mDeleteButton; - QPushButton *mEditButton; - QPtrList<ResourceCalendar> mResourcesToClose; + TQPushButton *mAddButton; + TQPushButton *mDeleteButton; + TQPushButton *mEditButton; + TQPtrList<ResourceCalendar> mResourcesToClose; }; #endif diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp index 082a6eacc..487296a6d 100644 --- a/korganizer/searchdialog.cpp +++ b/korganizer/searchdialog.cpp @@ -24,12 +24,12 @@ without including the source code for Qt in the source distribution. */ -#include <qlayout.h> -#include <qcheckbox.h> -#include <qgroupbox.h> -#include <qhbuttongroup.h> -#include <qlabel.h> -#include <qlineedit.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqgroupbox.h> +#include <tqhbuttongroup.h> +#include <tqlabel.h> +#include <tqlineedit.h> #include <klocale.h> #include <kmessagebox.h> @@ -45,67 +45,67 @@ #include "searchdialog.h" #include "searchdialog.moc" -SearchDialog::SearchDialog(Calendar *calendar,QWidget *parent) +SearchDialog::SearchDialog(Calendar *calendar,TQWidget *parent) : KDialogBase(Plain,i18n("Find Events"),User1|Close,User1,parent,0,false,false, KGuiItem( i18n("&Find"), "find") ) { mCalendar = calendar; - QFrame *topFrame = plainPage(); - QVBoxLayout *layout = new QVBoxLayout(topFrame,0,spacingHint()); + TQFrame *topFrame = plainPage(); + TQVBoxLayout *layout = new TQVBoxLayout(topFrame,0,spacingHint()); // Search expression - QHBoxLayout *subLayout = new QHBoxLayout(); + TQHBoxLayout *subLayout = new TQHBoxLayout(); layout->addLayout(subLayout); - searchEdit = new QLineEdit( "*", topFrame ); // Find all events by default - searchLabel = new QLabel( searchEdit, i18n("&Search for:"), topFrame ); + searchEdit = new TQLineEdit( "*", topFrame ); // Find all events by default + searchLabel = new TQLabel( searchEdit, i18n("&Search for:"), topFrame ); subLayout->addWidget( searchLabel ); subLayout->addWidget( searchEdit ); searchEdit->setFocus(); - connect( searchEdit, SIGNAL( textChanged( const QString & ) ), - this, SLOT( searchTextChanged( const QString & ) ) ); + connect( searchEdit, TQT_SIGNAL( textChanged( const TQString & ) ), + this, TQT_SLOT( searchTextChanged( const TQString & ) ) ); - QHButtonGroup *itemsGroup = new QHButtonGroup( i18n("Search For"), topFrame ); + TQHButtonGroup *itemsGroup = new TQHButtonGroup( i18n("Search For"), topFrame ); layout->addWidget( itemsGroup ); - mEventsCheck = new QCheckBox( i18n("&Events"), itemsGroup ); - mTodosCheck = new QCheckBox( i18n("To-&dos"), itemsGroup ); - mJournalsCheck = new QCheckBox( i18n("&Journal entries"), itemsGroup ); + mEventsCheck = new TQCheckBox( i18n("&Events"), itemsGroup ); + mTodosCheck = new TQCheckBox( i18n("To-&dos"), itemsGroup ); + mJournalsCheck = new TQCheckBox( i18n("&Journal entries"), itemsGroup ); mEventsCheck->setChecked( true ); mTodosCheck->setChecked( true ); // Date range - QGroupBox *rangeGroup = new QGroupBox( 1, Horizontal, i18n( "Date Range" ), + TQGroupBox *rangeGroup = new TQGroupBox( 1, Horizontal, i18n( "Date Range" ), topFrame ); layout->addWidget( rangeGroup ); - QWidget *rangeWidget = new QWidget( rangeGroup ); - QHBoxLayout *rangeLayout = new QHBoxLayout( rangeWidget, 0, spacingHint() ); + TQWidget *rangeWidget = new TQWidget( rangeGroup ); + TQHBoxLayout *rangeLayout = new TQHBoxLayout( rangeWidget, 0, spacingHint() ); mStartDate = new KDateEdit( rangeWidget ); - rangeLayout->addWidget( new QLabel( mStartDate, i18n("Fr&om:"), rangeWidget ) ); + rangeLayout->addWidget( new TQLabel( mStartDate, i18n("Fr&om:"), rangeWidget ) ); rangeLayout->addWidget( mStartDate ); mEndDate = new KDateEdit( rangeWidget ); - rangeLayout->addWidget( new QLabel( mEndDate, i18n("&To:"), rangeWidget ) ); - mEndDate->setDate( QDate::currentDate().addDays( 365 ) ); + rangeLayout->addWidget( new TQLabel( mEndDate, i18n("&To:"), rangeWidget ) ); + mEndDate->setDate( TQDate::currentDate().addDays( 365 ) ); rangeLayout->addWidget( mEndDate ); - mInclusiveCheck = new QCheckBox( i18n("E&vents have to be completely included"), + mInclusiveCheck = new TQCheckBox( i18n("E&vents have to be completely included"), rangeGroup ); mInclusiveCheck->setChecked( false ); - mIncludeUndatedTodos = new QCheckBox( i18n("Include to-dos &without due date"), rangeGroup ); + mIncludeUndatedTodos = new TQCheckBox( i18n("Include to-dos &without due date"), rangeGroup ); mIncludeUndatedTodos->setChecked( true ); // Subjects to search - QHButtonGroup *subjectGroup = new QHButtonGroup( i18n("Search In"), topFrame ); + TQHButtonGroup *subjectGroup = new TQHButtonGroup( i18n("Search In"), topFrame ); layout->addWidget(subjectGroup); - mSummaryCheck = new QCheckBox( i18n("Su&mmaries"), subjectGroup ); + mSummaryCheck = new TQCheckBox( i18n("Su&mmaries"), subjectGroup ); mSummaryCheck->setChecked( true ); - mDescriptionCheck = new QCheckBox( i18n("Desc&riptions"), subjectGroup ); - mCategoryCheck = new QCheckBox( i18n("Cate&gories"), subjectGroup ); + mDescriptionCheck = new TQCheckBox( i18n("Desc&riptions"), subjectGroup ); + mCategoryCheck = new TQCheckBox( i18n("Cate&gories"), subjectGroup ); // Results list view @@ -117,29 +117,29 @@ SearchDialog::SearchDialog(Calendar *calendar,QWidget *parent) KOGlobals::fitDialogToScreen( this, true ); } - connect( this,SIGNAL(user1Clicked()),SLOT(doSearch())); + connect( this,TQT_SIGNAL(user1Clicked()),TQT_SLOT(doSearch())); // Propagate edit and delete event signals from event list view - connect( listView, SIGNAL( showIncidenceSignal( Incidence * ) ), - SIGNAL( showIncidenceSignal( Incidence *) ) ); - connect( listView, SIGNAL( editIncidenceSignal( Incidence * ) ), - SIGNAL( editIncidenceSignal( Incidence * ) ) ); - connect( listView, SIGNAL( deleteIncidenceSignal( Incidence * ) ), - SIGNAL( deleteIncidenceSignal( Incidence * ) ) ); + connect( listView, TQT_SIGNAL( showIncidenceSignal( Incidence * ) ), + TQT_SIGNAL( showIncidenceSignal( Incidence *) ) ); + connect( listView, TQT_SIGNAL( editIncidenceSignal( Incidence * ) ), + TQT_SIGNAL( editIncidenceSignal( Incidence * ) ) ); + connect( listView, TQT_SIGNAL( deleteIncidenceSignal( Incidence * ) ), + TQT_SIGNAL( deleteIncidenceSignal( Incidence * ) ) ); } SearchDialog::~SearchDialog() { } -void SearchDialog::searchTextChanged( const QString &_text ) +void SearchDialog::searchTextChanged( const TQString &_text ) { enableButton( KDialogBase::User1, !_text.isEmpty() ); } void SearchDialog::doSearch() { - QRegExp re; + TQRegExp re; re.setWildcard( true ); // most people understand these better. re.setCaseSensitive( false ); @@ -166,7 +166,7 @@ void SearchDialog::doSearch() void SearchDialog::updateView() { - QRegExp re; + TQRegExp re; re.setWildcard( true ); // most people understand these better. re.setCaseSensitive( false ); re.setPattern( searchEdit->text() ); @@ -179,10 +179,10 @@ void SearchDialog::updateView() listView->showIncidences( mMatchedEvents ); } -void SearchDialog::search( const QRegExp &re ) +void SearchDialog::search( const TQRegExp &re ) { - QDate startDt = mStartDate->date(); - QDate endDt = mEndDate->date(); + TQDate startDt = mStartDate->date(); + TQDate endDt = mEndDate->date(); Event::List events; if (mEventsCheck->isChecked()) { @@ -204,7 +204,7 @@ void SearchDialog::search( const QRegExp &re ) } } } else { - QDate dt = startDt; + TQDate dt = startDt; while ( dt <= endDt ) { todos += mCalendar->todos( dt ); dt = dt.addDays( 1 ); @@ -214,7 +214,7 @@ void SearchDialog::search( const QRegExp &re ) Journal::List journals; if (mJournalsCheck->isChecked()) { - QDate dt = startDt; + TQDate dt = startDt; while ( dt <= endDt ) { journals += mCalendar->journals( dt ); dt = dt.addDays( 1 ); diff --git a/korganizer/searchdialog.h b/korganizer/searchdialog.h index 3876ba212..c8ba4dea8 100644 --- a/korganizer/searchdialog.h +++ b/korganizer/searchdialog.h @@ -26,7 +26,7 @@ #ifndef SEARCHDIALOG_H #define SEARCHDIALOG_H -#include <qregexp.h> +#include <tqregexp.h> #include <kdialogbase.h> @@ -47,7 +47,7 @@ class SearchDialog : public KDialogBase { Q_OBJECT public: - SearchDialog(Calendar *calendar,QWidget *parent=0); + SearchDialog(Calendar *calendar,TQWidget *parent=0); virtual ~SearchDialog(); void updateView(); @@ -57,7 +57,7 @@ class SearchDialog : public KDialogBase protected slots: void doSearch(); - void searchTextChanged( const QString &_text ); + void searchTextChanged( const TQString &_text ); signals: void showIncidenceSignal(Incidence *); @@ -65,29 +65,29 @@ class SearchDialog : public KDialogBase void deleteIncidenceSignal(Incidence *); private: - void search(const QRegExp &); + void search(const TQRegExp &); Calendar *mCalendar; Incidence::List mMatchedEvents; - QLabel *searchLabel; - QLineEdit *searchEdit; + TQLabel *searchLabel; + TQLineEdit *searchEdit; KOListView *listView; - QCheckBox *mEventsCheck; - QCheckBox *mTodosCheck; - QCheckBox *mJournalsCheck; + TQCheckBox *mEventsCheck; + TQCheckBox *mTodosCheck; + TQCheckBox *mJournalsCheck; KDateEdit *mStartDate; KDateEdit *mEndDate; - QCheckBox *mInclusiveCheck; - QCheckBox *mIncludeUndatedTodos; + TQCheckBox *mInclusiveCheck; + TQCheckBox *mIncludeUndatedTodos; - QCheckBox *mSummaryCheck; - QCheckBox *mDescriptionCheck; - QCheckBox *mCategoryCheck; + TQCheckBox *mSummaryCheck; + TQCheckBox *mDescriptionCheck; + TQCheckBox *mCategoryCheck; }; #endif diff --git a/korganizer/statusdialog.cpp b/korganizer/statusdialog.cpp index 8422957ba..29eb04ef2 100644 --- a/korganizer/statusdialog.cpp +++ b/korganizer/statusdialog.cpp @@ -22,10 +22,10 @@ without including the source code for Qt in the source distribution. */ -#include <qlabel.h> -#include <qstringlist.h> -#include <qlayout.h> -#include <qcombobox.h> +#include <tqlabel.h> +#include <tqstringlist.h> +#include <tqlayout.h> +#include <tqcombobox.h> #include <kdebug.h> #include <klocale.h> @@ -35,32 +35,32 @@ #include "statusdialog.h" #include "statusdialog.moc" -StatusDialog::StatusDialog(QWidget* parent, const char* name) : +StatusDialog::StatusDialog(TQWidget* parent, const char* name) : KDialog(parent,name,true) { setCaption(i18n("Set Your Status")); - QBoxLayout *topLayout = new QVBoxLayout( this ); + TQBoxLayout *topLayout = new TQVBoxLayout( this ); topLayout->setSpacing( spacingHint() ); topLayout->setMargin( marginHint() ); - QBoxLayout *statusLayout = new QHBoxLayout( topLayout ); + TQBoxLayout *statusLayout = new TQHBoxLayout( topLayout ); - QLabel *text = new QLabel(i18n("Set your status"),this); + TQLabel *text = new TQLabel(i18n("Set your status"),this); statusLayout->addWidget( text ); - mStatus = new QComboBox(false,this); + mStatus = new TQComboBox(false,this); mStatus->insertStringList(Attendee::statusList()); statusLayout->addWidget( mStatus ); - QBoxLayout *buttonLayout = new QHBoxLayout( topLayout ); + TQBoxLayout *buttonLayout = new TQHBoxLayout( topLayout ); - QPushButton *ok = new KPushButton(KStdGuiItem::ok(), this); - connect ( ok,SIGNAL(clicked()), this,SLOT(accept()) ); + TQPushButton *ok = new KPushButton(KStdGuiItem::ok(), this); + connect ( ok,TQT_SIGNAL(clicked()), this,TQT_SLOT(accept()) ); buttonLayout->addWidget( ok ); - QPushButton *cancel = new KPushButton(KStdGuiItem::cancel(), this); - connect ( cancel,SIGNAL(clicked()), this,SLOT(reject()) ); + TQPushButton *cancel = new KPushButton(KStdGuiItem::cancel(), this); + connect ( cancel,TQT_SIGNAL(clicked()), this,TQT_SLOT(reject()) ); buttonLayout->addWidget( cancel ); } diff --git a/korganizer/statusdialog.h b/korganizer/statusdialog.h index 66a9d364d..e0bcb4478 100644 --- a/korganizer/statusdialog.h +++ b/korganizer/statusdialog.h @@ -30,13 +30,13 @@ class StatusDialog : public KDialog { Q_OBJECT public: - StatusDialog(QWidget* parent=0,const char* name=0); + StatusDialog(TQWidget* parent=0,const char* name=0); ~StatusDialog(); Attendee::PartStat status(); private: - QComboBox *mStatus; + TQComboBox *mStatus; }; #endif diff --git a/korganizer/stdcalendar.cpp b/korganizer/stdcalendar.cpp index 55b47d56e..83285e183 100644 --- a/korganizer/stdcalendar.cpp +++ b/korganizer/stdcalendar.cpp @@ -53,10 +53,10 @@ StdCalendar::StdCalendar() if ( manager->isEmpty() ) { KConfig config( "korganizerrc" ); config.setGroup( "General" ); - QString fileName = config.readPathEntry( "Active Calendar" ); + TQString fileName = config.readPathEntry( "Active Calendar" ); - QString resourceName; - QString resoruceType; + TQString resourceName; + TQString resoruceType; KCal::ResourceCalendar *defaultResource = 0; if ( !fileName.isEmpty() ) { KURL url( fileName ); diff --git a/korganizer/templatemanagementdialog.cpp b/korganizer/templatemanagementdialog.cpp index 5d31f7fb1..18c82214d 100644 --- a/korganizer/templatemanagementdialog.cpp +++ b/korganizer/templatemanagementdialog.cpp @@ -37,30 +37,30 @@ *******************************************************************************/ #include "templatemanagementdialog.h" -#include <qstringlist.h> -#include <qtimer.h> +#include <tqstringlist.h> +#include <tqtimer.h> #include <kpushbutton.h> #include <kinputdialog.h> #include <klocale.h> #include <kmessagebox.h> -TemplateManagementDialog::TemplateManagementDialog(QWidget *parent, const QStringList &templates ) +TemplateManagementDialog::TemplateManagementDialog(TQWidget *parent, const TQStringList &templates ) :KDialogBase( parent, "template_management_dialog", true, i18n("Manage Templates"), Ok|Cancel, Ok, true , i18n("Apply Template")), - m_templates( templates ), m_newTemplate( QString::null ), m_changed( false ) + m_templates( templates ), m_newTemplate( TQString::null ), m_changed( false ) { m_base = new TemplateManagementDialog_base( this, "template_management_dialog_base" ); setMainWidget( m_base ); - connect( m_base->m_buttonAdd, SIGNAL( clicked() ), - SLOT( slotAddTemplate() ) ); - connect( m_base->m_buttonDelete, SIGNAL( clicked() ), - SLOT( slotDeleteTemplate() ) ); + connect( m_base->m_buttonAdd, TQT_SIGNAL( clicked() ), + TQT_SLOT( slotAddTemplate() ) ); + connect( m_base->m_buttonDelete, TQT_SIGNAL( clicked() ), + TQT_SLOT( slotDeleteTemplate() ) ); m_base->m_listBox->insertStringList( m_templates ); - connect( m_base->m_listBox, SIGNAL( selectionChanged( QListBoxItem * ) ), - SLOT( slotUpdateDeleteButton( QListBoxItem * ) ) ); - connect( m_base->m_buttonApply, SIGNAL( clicked() ), - SLOT( slotApplyTemplate() ) ); + connect( m_base->m_listBox, TQT_SIGNAL( selectionChanged( TQListBoxItem * ) ), + TQT_SLOT( slotUpdateDeleteButton( TQListBoxItem * ) ) ); + connect( m_base->m_buttonApply, TQT_SIGNAL( clicked() ), + TQT_SLOT( slotApplyTemplate() ) ); } @@ -68,14 +68,14 @@ void TemplateManagementDialog::slotAddTemplate() { bool ok; bool duplicate = false; - const QString newTemplate = KInputDialog::getText( i18n("Template Name"), + const TQString newTemplate = KInputDialog::getText( i18n("Template Name"), i18n("Please enter a name for the new template:"), i18n("New Template"), &ok ); if ( newTemplate.isEmpty() || !ok ) return; if ( m_templates.find( newTemplate) != m_templates.end() ) { int rc = KMessageBox::warningContinueCancel( this, i18n("A template with that name already exists, do you want to overwrite it?."), i18n("Duplicate Template Name"), i18n("Overwrite")); if ( rc == KMessageBox::Cancel ) { - QTimer::singleShot(0, this, SLOT( slotAddTemplate() ) ); + TQTimer::singleShot(0, this, TQT_SLOT( slotAddTemplate() ) ); return; } duplicate = true; @@ -96,7 +96,7 @@ void TemplateManagementDialog::slotAddTemplate() void TemplateManagementDialog::slotDeleteTemplate() { - QListBoxItem *const item = m_base->m_listBox->selectedItem(); + TQListBoxItem *const item = m_base->m_listBox->selectedItem(); if ( !item ) return; // can't happen (TM) unsigned int current = m_base->m_listBox->index(item); m_templates.remove( item->text() ); @@ -105,7 +105,7 @@ void TemplateManagementDialog::slotDeleteTemplate() m_base->m_listBox->setSelected(QMAX(current -1, 0), true); } -void TemplateManagementDialog::slotUpdateDeleteButton( QListBoxItem *item ) +void TemplateManagementDialog::slotUpdateDeleteButton( TQListBoxItem *item ) { m_base->m_buttonDelete->setEnabled( item != 0 ); } @@ -114,7 +114,7 @@ void TemplateManagementDialog::slotApplyTemplate() { // Once the user has applied the current template to the event, it makes no sense to add it again m_base->m_buttonAdd->setEnabled( false ); - const QString &cur = m_base->m_listBox->currentText(); + const TQString &cur = m_base->m_listBox->currentText(); if ( !cur.isEmpty() && cur != m_newTemplate ) emit loadTemplate( cur ); } diff --git a/korganizer/templatemanagementdialog.h b/korganizer/templatemanagementdialog.h index 5e0a4a616..fbc4c5125 100644 --- a/korganizer/templatemanagementdialog.h +++ b/korganizer/templatemanagementdialog.h @@ -38,7 +38,7 @@ #ifndef TEMPLATEMANAGEMENTDIALOG_H #define TEMPLATEMANAGEMENTDIALOG_H -#include <qstringlist.h> +#include <tqstringlist.h> #include "template_management_dialog_base.h" @@ -47,30 +47,30 @@ class TemplateManagementDialog: public KDialogBase { Q_OBJECT public: - TemplateManagementDialog( QWidget *parent, const QStringList& templates ); + TemplateManagementDialog( TQWidget *parent, const TQStringList& templates ); signals: /* Emitted whenever the user hits apply, indicating that the currently selected template should be loaded into to the incidence editor which triggered this. */ - void loadTemplate( const QString& templateName ); + void loadTemplate( const TQString& templateName ); /* Emitted whenever the user wants to add teh current incidence as a template with the given name. */ - void saveTemplate( const QString& templateName ); + void saveTemplate( const TQString& templateName ); /* Emitted when the dialog changed the list of templates. Calling code can the replace the list that was handed in with the one this signal transports. */ - void templatesChanged( const QStringList& templates ); + void templatesChanged( const TQStringList& templates ); protected slots: void slotAddTemplate(); void slotDeleteTemplate(); void slotApplyTemplate(); - void slotUpdateDeleteButton( QListBoxItem *item ); + void slotUpdateDeleteButton( TQListBoxItem *item ); void slotOk(); private: TemplateManagementDialog_base *m_base; - QStringList m_templates; - QString m_newTemplate; + TQStringList m_templates; + TQString m_newTemplate; bool m_changed; }; diff --git a/korganizer/timelabels.cpp b/korganizer/timelabels.cpp index ab5967055..0c4956bd4 100644 --- a/korganizer/timelabels.cpp +++ b/korganizer/timelabels.cpp @@ -24,16 +24,16 @@ #include "timelabels.h" -#include <qhbox.h> -#include <qvbox.h> -#include <qlabel.h> -#include <qframe.h> -#include <qlayout.h> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qpainter.h> -#include <qstringlist.h> -#include <qdatetime.h> +#include <tqhbox.h> +#include <tqvbox.h> +#include <tqlabel.h> +#include <tqframe.h> +#include <tqlayout.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqpainter.h> +#include <tqstringlist.h> +#include <tqdatetime.h> #include <kglobal.h> @@ -42,8 +42,8 @@ #include "koprefs.h" #include "koagenda.h" -TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,WFlags f) : - QScrollView(parent,name,f) +TimeLabels::TimeLabels(int rows,TQWidget *parent,const char *name,WFlags f) : + TQScrollView(parent,name,f) { mRows = rows; mMiniWidth = 0; @@ -59,7 +59,7 @@ TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,WFlags f) : viewport()->setBackgroundMode( PaletteBackground ); - mMousePos = new QFrame(this); + mMousePos = new TQFrame(this); mMousePos->setLineWidth(0); mMousePos->setMargin(0); mMousePos->setBackgroundColor(Qt::red); @@ -67,7 +67,7 @@ TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,WFlags f) : addChild(mMousePos, 0, 0); } -void TimeLabels::mousePosChanged(const QPoint &pos) +void TimeLabels::mousePosChanged(const TQPoint &pos) { moveChild(mMousePos, 0, pos.y()); } @@ -91,7 +91,7 @@ void TimeLabels::setCellHeight(double height) Optimization so that only the "dirty" portion of the scroll view is redrawn. Unfortunately, this is not called by default paintEvent() method. */ -void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch) +void TimeLabels::drawContents(TQPainter *p,int cx, int cy, int cw, int ch) { // bug: the parameters cx and cw are the areas that need to be // redrawn, not the area of the widget. unfortunately, this @@ -104,11 +104,11 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch) int cell = ((int)(cy/mCellHeight)); double y = cell * mCellHeight; - QFontMetrics fm = fontMetrics(); - QString hour; - QString suffix = "am"; + TQFontMetrics fm = fontMetrics(); + TQString hour; + TQString suffix = "am"; int timeHeight = fm.ascent(); - QFont nFont = font(); + TQFont nFont = font(); p->setFont( font() ); if (!KGlobal::locale()->use12Clock()) { @@ -121,18 +121,18 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch) int pointS = nFont.pointSize(); while ( pointS > 4 ) { nFont.setPointSize( pointS ); - fm = QFontMetrics( nFont ); + fm = TQFontMetrics( nFont ); if ( fm.ascent() < mCellHeight ) break; -- pointS; } - fm = QFontMetrics( nFont ); + fm = TQFontMetrics( nFont ); timeHeight = fm.ascent(); } //timeHeight -= (timeHeight/4-2); - QFont sFont = nFont; + TQFont sFont = nFont; sFont.setPointSize( sFont.pointSize()/2 ); - QFontMetrics fmS( sFont ); + TQFontMetrics fmS( sFont ); int startW = mMiniWidth - frameWidth()-2 ; int tw2 = fmS.width(suffix); int divTimeHeight = (timeHeight-1) /2 - 1; @@ -183,7 +183,7 @@ void TimeLabels::updateConfig() setFont(KOPrefs::instance()->mTimeBarFont); - QString test = "20"; + TQString test = "20"; if ( KGlobal::locale()->use12Clock() ) test = "12"; mMiniWidth = fontMetrics().width( test ); @@ -192,9 +192,9 @@ void TimeLabels::updateConfig() else { test = "00"; } - QFont sFont = font(); + TQFont sFont = font(); sFont.setPointSize( sFont.pointSize()/2 ); - QFontMetrics fmS( sFont ); + TQFontMetrics fmS( sFont ); mMiniWidth += fmS.width( test ) + frameWidth()*2+4 ; // update geometry restrictions based on new settings setFixedWidth( mMiniWidth ); @@ -226,20 +226,20 @@ void TimeLabels::setAgenda(KOAgenda* agenda) { mAgenda = agenda; - connect(mAgenda, SIGNAL(mousePosSignal(const QPoint &)), this, SLOT(mousePosChanged(const QPoint &))); - connect(mAgenda, SIGNAL(enterAgenda()), this, SLOT(showMousePos())); - connect(mAgenda, SIGNAL(leaveAgenda()), this, SLOT(hideMousePos())); - connect(mAgenda, SIGNAL(gridSpacingYChanged( double ) ), this, SLOT( setCellHeight( double ) ) ); + connect(mAgenda, TQT_SIGNAL(mousePosSignal(const TQPoint &)), this, TQT_SLOT(mousePosChanged(const TQPoint &))); + connect(mAgenda, TQT_SIGNAL(enterAgenda()), this, TQT_SLOT(showMousePos())); + connect(mAgenda, TQT_SIGNAL(leaveAgenda()), this, TQT_SLOT(hideMousePos())); + connect(mAgenda, TQT_SIGNAL(gridSpacingYChanged( double ) ), this, TQT_SLOT( setCellHeight( double ) ) ); } /** This is called in response to repaint() */ -void TimeLabels::paintEvent(QPaintEvent*) +void TimeLabels::paintEvent(TQPaintEvent*) { // kdDebug(5850) << "paintevent..." << endl; // this is another hack! -// QPainter painter(this); - //QString c +// TQPainter painter(this); + //TQString c repaintContents(contentsX(), contentsY(), visibleWidth(), visibleHeight()); } diff --git a/korganizer/timelabels.h b/korganizer/timelabels.h index fe0a1aeb0..84ea5473b 100644 --- a/korganizer/timelabels.h +++ b/korganizer/timelabels.h @@ -25,8 +25,8 @@ #ifndef TIMELABELS_H #define TIMELABELS_H -#include <qscrollview.h> -#include <qlabel.h> +#include <tqscrollview.h> +#include <tqlabel.h> class QHBox; class QPushButton; @@ -40,7 +40,7 @@ class TimeLabels : public QScrollView { Q_OBJECT public: - TimeLabels( int rows, QWidget *parent = 0, const char *name = 0, + TimeLabels( int rows, TQWidget *parent = 0, const char *name = 0, WFlags f = 0 ); /** Calculates the minimum width */ @@ -53,7 +53,7 @@ class TimeLabels : public QScrollView void setAgenda( KOAgenda *agenda ); /** */ - virtual void paintEvent( QPaintEvent *e ); + virtual void paintEvent( TQPaintEvent *e ); public slots: /** update time label positions */ @@ -61,11 +61,11 @@ class TimeLabels : public QScrollView void positionChanged( int pos ); protected: - void drawContents( QPainter *p, int cx, int cy, int cw, int ch ); + void drawContents( TQPainter *p, int cx, int cy, int cw, int ch ); private slots: /** update the position of the marker showing the mouse position */ - void mousePosChanged(const QPoint &pos); + void mousePosChanged(const TQPoint &pos); void showMousePos(); void hideMousePos(); @@ -78,7 +78,7 @@ class TimeLabels : public QScrollView int mMiniWidth; KOAgenda* mAgenda; - QFrame *mMousePos; // shows a marker for the current mouse position in y direction + TQFrame *mMousePos; // shows a marker for the current mouse position in y direction }; #endif diff --git a/korganizer/timelineitem.cpp b/korganizer/timelineitem.cpp index ed057de9d..7240e06d0 100644 --- a/korganizer/timelineitem.cpp +++ b/korganizer/timelineitem.cpp @@ -31,7 +31,7 @@ using namespace KOrg; using namespace KCal; -TimelineItem::TimelineItem( const QString &label, KDGanttView * parent) : +TimelineItem::TimelineItem( const TQString &label, KDGanttView * parent) : KDGanttViewTaskItem( parent ) { setListViewText( 0, label ); @@ -40,9 +40,9 @@ TimelineItem::TimelineItem( const QString &label, KDGanttView * parent) : listView()->setRootIsDecorated( false ); } -void TimelineItem::insertIncidence(KCal::Incidence * incidence, const QDateTime & _start, const QDateTime & _end) +void TimelineItem::insertIncidence(KCal::Incidence * incidence, const TQDateTime & _start, const TQDateTime & _end) { - QDateTime start = incidence->dtStart(), end = incidence->dtEnd(); + TQDateTime start = incidence->dtStart(), end = incidence->dtEnd(); if ( _start.isValid() ) start = _start; if ( _end.isValid() ) @@ -50,14 +50,14 @@ void TimelineItem::insertIncidence(KCal::Incidence * incidence, const QDateTime if ( incidence->doesFloat() ) end = end.addDays( 1 ); - typedef QValueList<TimelineSubItem*> ItemList; + typedef TQValueList<TimelineSubItem*> ItemList; ItemList list = mItemMap[incidence]; for ( ItemList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it ) if ( (*it)->startTime() == start && (*it)->endTime() == end ) return; TimelineSubItem * item = new TimelineSubItem( incidence, this ); - QColor c1, c2, c3; + TQColor c1, c2, c3; colors( c1, c2, c3 ); item->setColors( c1, c2, c3 ); @@ -70,7 +70,7 @@ void TimelineItem::insertIncidence(KCal::Incidence * incidence, const QDateTime void TimelineItem::removeIncidence(KCal::Incidence * incidence) { - typedef QValueList<TimelineSubItem*> ItemList; + typedef TQValueList<TimelineSubItem*> ItemList; ItemList list = mItemMap[incidence]; for ( ItemList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it ) delete *it; @@ -79,10 +79,10 @@ void TimelineItem::removeIncidence(KCal::Incidence * incidence) void TimelineItem::moveItems(KCal::Incidence * incidence, int delta, int duration) { - typedef QValueList<TimelineSubItem*> ItemList; + typedef TQValueList<TimelineSubItem*> ItemList; ItemList list = mItemMap[incidence]; for ( ItemList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it ) { - QDateTime start = (*it)->originalStart(); + TQDateTime start = (*it)->originalStart(); start = start.addSecs( delta ); (*it)->setStartTime( start ); (*it)->setOriginalStart( start ); @@ -128,7 +128,7 @@ void TimelineSubItem::showItem(bool show, int coordY) mLeft = new KDCanvasPolygon( myGanttView->timeTableWidget(), this, Type_is_KDGanttViewItem ); mLeft->setBrush( Qt::black ); } - QPointArray a = QPointArray( 4 ); + TQPointArray a = TQPointArray( 4 ); a.setPoint( 0, 0, -mw -myItemSize/2 - 2 ); a.setPoint( 1, mw, -myItemSize/2 - 2 ); a.setPoint( 2, mw, myItemSize/2 + 2 ); @@ -140,7 +140,7 @@ void TimelineSubItem::showItem(bool show, int coordY) mRight = new KDCanvasPolygon( myGanttView->timeTableWidget(), this, Type_is_KDGanttViewItem ); mRight->setBrush( Qt::black ); } - QPointArray a = QPointArray( 4 ); + TQPointArray a = TQPointArray( 4 ); a.setPoint( 0, -mw, -myItemSize/2 - 2 ); a.setPoint( 1, 0, -myItemSize/2 - mw - 2 ); a.setPoint( 2, 0, myItemSize/2 + mw + 2 ); diff --git a/korganizer/timelineitem.h b/korganizer/timelineitem.h index c4f35af24..2ff3b2e06 100644 --- a/korganizer/timelineitem.h +++ b/korganizer/timelineitem.h @@ -23,8 +23,8 @@ #include <kdgantt/KDGanttViewTaskItem.h> #undef protected -#include <qmap.h> -#include <qvaluelist.h> +#include <tqmap.h> +#include <tqvaluelist.h> class KDGanttView; class KDCanvasPolygon; @@ -42,17 +42,17 @@ class TimelineSubItem; class TimelineItem : public KDGanttViewTaskItem { public: - TimelineItem( const QString &label, KDGanttView* parent ); + TimelineItem( const TQString &label, KDGanttView* parent ); void insertIncidence( KCal::Incidence *incidence, - const QDateTime &start = QDateTime(), - const QDateTime &end = QDateTime() ); + const TQDateTime &start = TQDateTime(), + const TQDateTime &end = TQDateTime() ); void removeIncidence( KCal::Incidence *incidence ); void moveItems( KCal::Incidence* incidence, int delta, int duration ); private: - QMap<KCal::Incidence*, QValueList<TimelineSubItem*> > mItemMap; + TQMap<KCal::Incidence*, TQValueList<TimelineSubItem*> > mItemMap; }; class TimelineSubItem : public KDGanttViewTaskItem @@ -63,15 +63,15 @@ class TimelineSubItem : public KDGanttViewTaskItem KCal::Incidence* incidence() const { return mIncidence; } - QDateTime originalStart() const { return mStart; } - void setOriginalStart( const QDateTime &dt ) { mStart = dt; } + TQDateTime originalStart() const { return mStart; } + void setOriginalStart( const TQDateTime &dt ) { mStart = dt; } private: void showItem( bool show = true, int coordY = 0 ); private: KCal::Incidence *mIncidence; - QDateTime mStart; + TQDateTime mStart; KDCanvasPolygon *mLeft, *mRight; int mMarkerWidth; }; diff --git a/korganizer/timezone.cpp b/korganizer/timezone.cpp index 8fdfcae21..d95ae3cf6 100644 --- a/korganizer/timezone.cpp +++ b/korganizer/timezone.cpp @@ -23,7 +23,7 @@ */ #include <time.h> -#include <qdatetime.h> +#include <tqdatetime.h> #include <kaboutdata.h> #include <kapplication.h> @@ -53,9 +53,9 @@ int main(int argc,char **argv) kdDebug(5850) << "tzname: " << tzname[0] << " " << tzname[1] << endl; kdDebug(5850) << "timezone: " << timezone/3600 << endl; - QTime qtime = QTime::currentTime(); + TQTime qtime = TQTime::currentTime(); - kdDebug(5850) << "QDateTime::currentTime(): " + kdDebug(5850) << "TQDateTime::currentTime(): " << qtime.toString( Qt::ISODate ) << endl; kdDebug(5850) << "KLocale::formatTime(): " diff --git a/korganizer/urihandler.cpp b/korganizer/urihandler.cpp index 6bbd45d2f..4b7c7bdff 100644 --- a/korganizer/urihandler.cpp +++ b/korganizer/urihandler.cpp @@ -35,7 +35,7 @@ #include <kprocess.h> #include <kdebug.h> -bool UriHandler::process( const QString &uri ) +bool UriHandler::process( const TQString &uri ) { kdDebug(5850) << "UriHandler::process(): " << uri << endl; @@ -47,21 +47,21 @@ bool UriHandler::process( const QString &uri ) // parse string, show int colon = uri.find( ':' ); // extract 'number' from 'kmail:<number>/<id>' - QString serialNumberStr = uri.mid( colon + 1 ); + TQString serialNumberStr = uri.mid( colon + 1 ); serialNumberStr = serialNumberStr.left( serialNumberStr.find( '/' ) ); KMailIface_stub kmailIface( "kmail", "KMailIface" ); - kmailIface.showMail( serialNumberStr.toUInt(), QString() ); + kmailIface.showMail( serialNumberStr.toUInt(), TQString() ); return true; } else if ( uri.startsWith( "mailto:" ) ) { - KApplication::kApplication()->invokeMailer( uri.mid(7), QString::null ); + KApplication::kApplication()->invokeMailer( uri.mid(7), TQString::null ); return true; } else if ( uri.startsWith( "uid:" ) ) { DCOPClient *client = KApplication::kApplication()->dcopClient(); - const QByteArray noParamData; - const QByteArray paramData; - QByteArray replyData; - QCString replyTypeStr; + const TQByteArray noParamData; + const TQByteArray paramData; + TQByteArray replyData; + TQCString replyTypeStr; bool foundAbbrowser = client->call( "kaddressbook", "KAddressBookIface", "interfaces()", noParamData, replyTypeStr, replyData ); @@ -78,8 +78,8 @@ bool UriHandler::process( const QString &uri ) KaddressBook is not already running. Pass it the UID of the contact via the command line while starting it - its neater. We start it without its main interface */ - QString iconPath = KGlobal::iconLoader()->iconPath( "go", KIcon::Small ); - QString tmpStr = "kaddressbook --editor-only --uid "; + TQString iconPath = KGlobal::iconLoader()->iconPath( "go", KIcon::Small ); + TQString tmpStr = "kaddressbook --editor-only --uid "; tmpStr += KProcess::quote( uri.mid( 6 ) ); KRun::runCommand( tmpStr, "KAddressBook", iconPath ); return true; diff --git a/korganizer/urihandler.h b/korganizer/urihandler.h index 7b3d22375..915b28578 100644 --- a/korganizer/urihandler.h +++ b/korganizer/urihandler.h @@ -24,7 +24,7 @@ #ifndef URIHANDLER_H #define URIHANDLER_H -#include <qstring.h> +#include <tqstring.h> #include <kdepimmacros.h> class KDE_EXPORT UriHandler @@ -33,7 +33,7 @@ class KDE_EXPORT UriHandler /** Process URI. Return true if handler handled the URI, otherwise false. */ - static bool process( const QString &uri ); + static bool process( const TQString &uri ); }; #endif |