author | zecke <zecke> | 2004-04-04 11:38:52 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-04-04 11:38:52 (UTC) |
commit | 321f82bb3d43cbab358434fef52fe76f17e7d1e3 (patch) (side-by-side diff) | |
tree | 7a7a25db1b639a95ed5087bd5f90167a38252789 | |
parent | 56b4b6a658854637f688975874390938260f2afc (diff) | |
download | opie-321f82bb3d43cbab358434fef52fe76f17e7d1e3.zip opie-321f82bb3d43cbab358434fef52fe76f17e7d1e3.tar.gz opie-321f82bb3d43cbab358434fef52fe76f17e7d1e3.tar.bz2 |
use alarmbell
-rw-r--r-- | noncore/tools/clock/clock.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/tools/clock/clock.cpp b/noncore/tools/clock/clock.cpp index ad422a6..e681650 100644 --- a/noncore/tools/clock/clock.cpp +++ b/noncore/tools/clock/clock.cpp @@ -56,97 +56,97 @@ #include <qlayout.h> #include <qhbox.h> #include <qlineedit.h> static const int sw_prec = 2; static const int magic_daily = 2292922; static const int magic_countdown = 2292923; static const int magic_snooze = 2292924; static const int magic_playmp = 2292925; #include <math.h> #include <unistd.h> #include <sys/types.h> #include <pthread.h> static void toggleScreenSaver( bool on ) { QCopEnvelope e( "QPE/System", "setScreenSaverMode(int)" ); e << ( on ? QPEApplication::Enable : QPEApplication::DisableSuspend ); } static void startPlayer() { Config config( "qpe" ); config.setGroup( "Time" ); sleep(15); QCopEnvelope e( "QPE/Application/opieplayer", "setDocument(QString)" ); e << config.readEntry( "mp3File", "" ); } class MySpinBox : public QSpinBox { public: QLineEdit *lineEdit() const { return editor(); } }; // // // AlarmDlg::AlarmDlg(QWidget *parent, const char *name, bool modal, const QString &txt) : AlarmDlgBase(parent, name, modal) { setCaption( tr("Clock") ); - pixmap->setPixmap( Resource::loadPixmap("alarmbell") ); + pixmap->setPixmap( Resource::loadPixmap("clock/alarmbell") ); alarmDlgLabel->setText(txt); connect(snoozeTime, SIGNAL(valueChanged(int)), this, SLOT(changePrompt(int))); connect(cmdOk, SIGNAL(clicked()), this, SLOT(checkSnooze())); } // // // void AlarmDlg::setText(const QString &txt) { alarmDlgLabel->setText(txt); } // // // void AlarmDlg::checkSnooze(void) { // // Ensure we have only one snooze alarm. // AlarmServer::deleteAlarm(QDateTime(), "QPE/Application/clock", "alarm(QDateTime,int)", magic_snooze); if (snoozeTime->value() > 0) { QDateTime wake = QDateTime::currentDateTime(); wake = wake.addSecs(snoozeTime->value() * 60); // snoozeTime in minutes AlarmServer::addAlarm(wake, "QPE/Application/clock", "alarm(QDateTime,int)", magic_snooze); } accept(); } void AlarmDlg::changePrompt(int mins) { cmdOk->setText(mins > 0 ? tr("Snooze") : tr("Close") ); } |