summaryrefslogtreecommitdiffstats
path: root/korganizer/korgac
diff options
context:
space:
mode:
Diffstat (limited to 'korganizer/korgac')
-rw-r--r--korganizer/korgac/alarmdialog.cpp30
-rw-r--r--korganizer/korgac/alarmdialog.h2
-rw-r--r--korganizer/korgac/alarmdockwindow.cpp22
-rw-r--r--korganizer/korgac/alarmdockwindow.h2
-rw-r--r--korganizer/korgac/koalarmclient.cpp14
-rw-r--r--korganizer/korgac/koalarmclient.h2
6 files changed, 43 insertions, 29 deletions
diff --git a/korganizer/korgac/alarmdialog.cpp b/korganizer/korgac/alarmdialog.cpp
index cc0bb283..80610483 100644
--- a/korganizer/korgac/alarmdialog.cpp
+++ b/korganizer/korgac/alarmdialog.cpp
@@ -109,8 +109,8 @@ AlarmDialog::AlarmDialog( KCal::CalendarResources *calendar, TQWidget *parent, c
// User3 => Dismiss Selected
// Ok => Suspend
- connect( calendar, TQT_SIGNAL(calendarChanged()),
- this, TQT_SLOT(slotCalendarChanged()) );
+ connect( calendar, TQ_SIGNAL(calendarChanged()),
+ this, TQ_SLOT(slotCalendarChanged()) );
TDEGlobal::iconLoader()->addAppDir( "tdepim" );
setButtonOK( i18n( "Suspend" ) );
@@ -122,7 +122,7 @@ AlarmDialog::AlarmDialog( KCal::CalendarResources *calendar, TQWidget *parent, c
TQLabel *label = new TQLabel( i18n("The following items triggered reminders:"), topBox );
topLayout->addWidget( label );
- mSplitter = new TQSplitter( Qt::Vertical, topBox );
+ mSplitter = new TQSplitter( TQt::Vertical, topBox );
mSplitter->setOpaqueResize( TDEGlobalSettings::opaqueResize() );
topLayout->addWidget( mSplitter );
@@ -135,10 +135,10 @@ AlarmDialog::AlarmDialog( KCal::CalendarResources *calendar, TQWidget *parent, c
mIncidenceListView->setShowSortIndicator( true );
mIncidenceListView->setAllColumnsShowFocus( true );
mIncidenceListView->setSelectionMode( TQListView::Extended );
- connect( mIncidenceListView, TQT_SIGNAL(selectionChanged()), TQT_SLOT(updateButtons()) );
- connect( mIncidenceListView, TQT_SIGNAL(doubleClicked(TQListViewItem*)), TQT_SLOT(edit()) );
- connect( mIncidenceListView, TQT_SIGNAL(currentChanged(TQListViewItem*)), TQT_SLOT(showDetails()) );
- connect( mIncidenceListView, TQT_SIGNAL(selectionChanged()), TQT_SLOT(showDetails()) );
+ connect( mIncidenceListView, TQ_SIGNAL(selectionChanged()), TQ_SLOT(updateButtons()) );
+ connect( mIncidenceListView, TQ_SIGNAL(doubleClicked(TQListViewItem*)), TQ_SLOT(edit()) );
+ connect( mIncidenceListView, TQ_SIGNAL(currentChanged(TQListViewItem*)), TQ_SLOT(showDetails()) );
+ connect( mIncidenceListView, TQ_SIGNAL(selectionChanged()), TQ_SLOT(showDetails()) );
mDetailView = new KOEventViewer( mCalendar, mSplitter );
mDetailView->setFocus(); // set focus here to start with to make it harder
@@ -160,7 +160,7 @@ AlarmDialog::AlarmDialog( KCal::CalendarResources *calendar, TQWidget *parent, c
mSuspendUnit->insertItem( i18n("week(s)") );
mSuspendUnit->setCurrentItem( defSuspendUnit );
- connect( &mSuspendTimer, TQT_SIGNAL(timeout()), TQT_SLOT(wakeUp()) );
+ connect( &mSuspendTimer, TQ_SIGNAL(timeout()), TQ_SLOT(wakeUp()) );
setMainWidget( mIncidenceListView );
mIncidenceListView->setMinimumSize( 500, 50 );
@@ -544,7 +544,21 @@ void AlarmDialog::wakeUp()
}
if ( activeReminders )
+ {
+ DCOPRef screensaver("kdesktop", "KScreensaverIface");
+ DCOPReply reply = screensaver.call("isBlanked");
+ bool res = true;
+ if (reply.isValid()) {
+ reply.get(res);
+ }
show();
+ if (res)
+ {
+ // Lower the dialog if the screensaver is active or its status unknown.
+ // This prevents reminders to show on a locked screen.
+ lower();
+ }
+ }
setTimer();
showDetails();
emit reminderCount( activeCount() );
diff --git a/korganizer/korgac/alarmdialog.h b/korganizer/korgac/alarmdialog.h
index 949c17f7..d11dc591 100644
--- a/korganizer/korgac/alarmdialog.h
+++ b/korganizer/korgac/alarmdialog.h
@@ -43,7 +43,7 @@ class TQSpinBox;
class TQSplitter;
class AlarmDialog : public KDialogBase {
- Q_OBJECT
+ TQ_OBJECT
public:
explicit AlarmDialog( CalendarResources *calendar, TQWidget *parent = 0, const char *name = 0 );
diff --git a/korganizer/korgac/alarmdockwindow.cpp b/korganizer/korgac/alarmdockwindow.cpp
index 081d91ca..a5cb277e 100644
--- a/korganizer/korgac/alarmdockwindow.cpp
+++ b/korganizer/korgac/alarmdockwindow.cpp
@@ -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, TQT_SLOT( slotSuspendAll() ) );
- mDismissAll = contextMenu()->insertItem( i18n("Dismiss All"), this, TQT_SLOT( slotDismissAll() ) );
+ mSuspendAll = contextMenu()->insertItem( i18n("Suspend All"), this, TQ_SLOT( slotSuspendAll() ) );
+ mDismissAll = contextMenu()->insertItem( i18n("Dismiss All"), this, TQ_SLOT( slotDismissAll() ) );
contextMenu()->setItemEnabled( mSuspendAll, false );
contextMenu()->setItemEnabled( mDismissAll, false );
contextMenu()->insertSeparator();
mAlarmsEnabledId = contextMenu()->insertItem( i18n("Reminders Enabled"), this,
- TQT_SLOT( toggleAlarmsEnabled() ) );
+ TQ_SLOT( toggleAlarmsEnabled() ) );
mAutostartId = contextMenu()->insertItem( i18n("Start Reminder Daemon at Login"), this,
- TQT_SLOT( toggleAutostart() ) );
+ TQ_SLOT( toggleAutostart() ) );
contextMenu()->setItemChecked( mAutostartId, autostart );
contextMenu()->setItemChecked( mAlarmsEnabledId, alarmsEnabled );
@@ -86,15 +86,15 @@ AlarmDockWindow::AlarmDockWindow( const char *name )
kdDebug(5890) << "No Quit standard action." << endl;
} else {
#if KDE_IS_VERSION(3,3,90)
- quit->disconnect( TQT_SIGNAL( activated() ), this,
- TQT_SLOT( maybeQuit() ) );
- connect( quit, TQT_SIGNAL( activated() ), TQT_SLOT( slotQuit() ) );
+ quit->disconnect( TQ_SIGNAL( activated() ), this,
+ TQ_SLOT( maybeQuit() ) );
+ connect( quit, TQ_SIGNAL( activated() ), TQ_SLOT( slotQuit() ) );
}
#else //FIXME: remove for KDE 4.0
- quit->disconnect( TQT_SIGNAL( activated() ), tqApp,
- TQT_SLOT( closeAllWindows() ) );
+ quit->disconnect( TQ_SIGNAL( activated() ), tqApp,
+ TQ_SLOT( closeAllWindows() ) );
}
- connect( this, TQT_SIGNAL( quitSelected() ), TQT_SLOT( slotQuit() ) );
+ connect( this, TQ_SIGNAL( quitSelected() ), TQ_SLOT( slotQuit() ) );
#endif
TQToolTip::add(this, mName );
@@ -188,7 +188,7 @@ void AlarmDockWindow::enableAutostart( bool enable )
void AlarmDockWindow::mousePressEvent( TQMouseEvent *e )
{
- if ( e->button() == Qt::LeftButton ) {
+ if ( e->button() == TQt::LeftButton ) {
kapp->startServiceByDesktopName( "korganizer", TQString() );
} else {
KSystemTray::mousePressEvent( e );
diff --git a/korganizer/korgac/alarmdockwindow.h b/korganizer/korgac/alarmdockwindow.h
index 6f6cd7bd..81c00a8c 100644
--- a/korganizer/korgac/alarmdockwindow.h
+++ b/korganizer/korgac/alarmdockwindow.h
@@ -30,7 +30,7 @@
class AlarmDockWindow : public KSystemTray
{
- Q_OBJECT
+ TQ_OBJECT
public:
AlarmDockWindow( const char *name = 0 );
diff --git a/korganizer/korgac/koalarmclient.cpp b/korganizer/korgac/koalarmclient.cpp
index 2a87c7fd..37478ca0 100644
--- a/korganizer/korgac/koalarmclient.cpp
+++ b/korganizer/korgac/koalarmclient.cpp
@@ -46,8 +46,8 @@ KOAlarmClient::KOAlarmClient( TQObject *parent, const char *name )
mDocker = new AlarmDockWindow;
mDocker->show();
- connect( this, TQT_SIGNAL( reminderCount( int ) ), mDocker, TQT_SLOT( slotUpdate( int ) ) );
- connect( mDocker, TQT_SIGNAL( quitSignal() ), TQT_SLOT( slotQuit() ) );
+ connect( this, TQ_SIGNAL( reminderCount( int ) ), mDocker, TQ_SLOT( slotUpdate( int ) ) );
+ connect( mDocker, TQ_SIGNAL( quitSignal() ), TQ_SLOT( slotQuit() ) );
TDEConfig c( locate( "config", "korganizerrc" ) );
c.setGroup( "Time & Date" );
@@ -58,7 +58,7 @@ KOAlarmClient::KOAlarmClient( TQObject *parent, const char *name )
mCalendar->readConfig();
mCalendar->load();
- connect( &mCheckTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( checkAlarms() ) );
+ connect( &mCheckTimer, TQ_SIGNAL( timeout() ), TQ_SLOT( checkAlarms() ) );
TDEConfig *config = kapp->config();
config->setGroup( "Alarms" );
@@ -132,10 +132,10 @@ void KOAlarmClient::createReminder( KCal::CalendarResources *calendar,
if ( !mDialog ) {
mDialog = new AlarmDialog( calendar );
- 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() ) );
+ connect( mDialog, TQ_SIGNAL(reminderCount(int)), mDocker, TQ_SLOT(slotUpdate(int)) );
+ connect( mDocker, TQ_SIGNAL(suspendAllSignal()), mDialog, TQ_SLOT(suspendAll()) );
+ connect( mDocker, TQ_SIGNAL(dismissAllSignal()), mDialog, TQ_SLOT(dismissAll()) );
+ connect( this, TQ_SIGNAL( saveAllSignal() ), mDialog, TQ_SLOT( slotSave() ) );
}
mDialog->addIncidence( incidence, dt, displayText );
diff --git a/korganizer/korgac/koalarmclient.h b/korganizer/korgac/koalarmclient.h
index a8628848..ef6e5d27 100644
--- a/korganizer/korgac/koalarmclient.h
+++ b/korganizer/korgac/koalarmclient.h
@@ -43,7 +43,7 @@ class Incidence;
class KOAlarmClient : public TQObject, virtual public AlarmClientIface, public KSessionManaged
{
- Q_OBJECT
+ TQ_OBJECT
public:
KOAlarmClient( TQObject *parent = 0, const char *name = 0 );