/*! Creates a TimeControl instance with the given \a parent. */ TimeControl::TimeControl(QObject *parent) : QObject(parent), m_timer(0), timeValueSpace("/UI/DisplayTime") { m_timer = new QtopiaTimer(this); QObject::connect(m_timer, SIGNAL(timeout()), this, SLOT(doTimeTick())); doTimeTick(); QObject::connect(qApp, SIGNAL(timeChanged()), this, SLOT(doTimeTick())); QObject::connect(qApp, SIGNAL(dateFormatChanged()), this, SLOT(dateFormatChanged())); QObject::connect(qApp, SIGNAL(clockChanged(bool)), this, SLOT(clockChanged(bool))); QObject::connect(qtopiaTask<SystemSuspend>(), SIGNAL(systemSuspending()), this, SLOT(systemSuspending())); QObject::connect(qtopiaTask<SystemSuspend>(), SIGNAL(systemWaking()), this, SLOT(systemWaking())); }
void LanguageSettingsObjectWrapper::setDateFormat(const QString& value) { QSettings s; s.setValue("date_format", value); prefs.date_format = copy_string(qPrintable(value));; emit dateFormatChanged(value); }
void TimeControl::doTimeTick() { clockChanged(QTimeString::currentAMPM()); dateFormatChanged(); m_timer->stop(); QTime time = QTime::currentTime(); m_timer->start((60 - time.second()) * 1000 + 500, QtopiaTimer::PauseWhenInactive); }
void TimeControl::systemWaking() { clockChanged(QTimeString::currentAMPM()); dateFormatChanged(); }
void MainWindowSettings::setDateFormat(DateFormat date_format) { m_date_format = date_format; m_date_format_string = dateFormatToString(date_format); emit dateFormatChanged(date_format); }