diff options
Diffstat (limited to 'korganizer/korgac')
-rw-r--r-- | korganizer/korgac/alarmclientiface.h | 4 | ||||
-rw-r--r-- | korganizer/korgac/alarmdialog.cpp | 102 | ||||
-rw-r--r-- | korganizer/korgac/alarmdialog.h | 14 | ||||
-rw-r--r-- | korganizer/korgac/alarmdockwindow.cpp | 42 | ||||
-rw-r--r-- | korganizer/korgac/alarmdockwindow.h | 14 | ||||
-rw-r--r-- | korganizer/korgac/koalarmclient.cpp | 60 | ||||
-rw-r--r-- | korganizer/korgac/koalarmclient.h | 16 | ||||
-rw-r--r-- | korganizer/korgac/testalarmdlg.cpp | 10 |
8 files changed, 131 insertions, 131 deletions
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(); |