author | mickeyl <mickeyl> | 2004-02-24 12:46:23 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-02-24 12:46:23 (UTC) |
commit | 911473db35a9fce5f3589f03c27210456faaba86 (patch) (side-by-side diff) | |
tree | 7d55b6117b24de6ab18747b00a4641d38001c0ed /libopie2/opiepim/core/opimnotifymanager.cpp | |
parent | a2ead23c3614fe581261455cb4c3f31cee2098f3 (diff) | |
download | opie-911473db35a9fce5f3589f03c27210456faaba86.zip opie-911473db35a9fce5f3589f03c27210456faaba86.tar.gz opie-911473db35a9fce5f3589f03c27210456faaba86.tar.bz2 |
*phew* here is the class and file rename patch. not converted yet: backend,
but that will be not visible to application classes so we can change it later.
Diffstat (limited to 'libopie2/opiepim/core/opimnotifymanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/opimnotifymanager.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libopie2/opiepim/core/opimnotifymanager.cpp b/libopie2/opiepim/core/opimnotifymanager.cpp index a54d597..573340a 100644 --- a/libopie2/opiepim/core/opimnotifymanager.cpp +++ b/libopie2/opiepim/core/opimnotifymanager.cpp @@ -9,49 +9,49 @@ :`=1 )Y*s>-.-- : the terms of the GNU Library General Public .="- .-=="i, .._ License as published by the Free Software - . .-<_> .<> Foundation; either version 2 of the License, ._= =} : or (at your option) any later version. .%`+i> _;_. .i_,=:_. -<s. This program is distributed in the hope that + . -:. = it will be useful, but WITHOUT ANY WARRANTY; : .. .:, . . . without even the implied warranty of =_ + =;=|` MERCHANTABILITY or FITNESS FOR A _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU ..}^=.= = ; Library General Public License for more ++= -. .` .: details. : = ...= . :.=- -. .:....=;==+<; You should have received a copy of the GNU -_. . . )=. = Library General Public License along with -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "opimnotifymanager.h" /* OPIE */ -#include <opie2/oconversion.h> +#include <opie2/opimdateconversion.h> /* QT */ #include <qstringlist.h> namespace Opie { OPimNotifyManager::OPimNotifyManager( const Reminders& rem, const Alarms& al ) : m_rem( rem ), m_al( al ) {} OPimNotifyManager::~OPimNotifyManager() {} /* use static_cast and type instead of dynamic... */ void OPimNotifyManager::add( const OPimNotify& noti ) { if ( noti.type() == QString::fromLatin1( "OPimReminder" ) ) { const OPimReminder & rem = static_cast<const OPimReminder&>( noti ); m_rem.append( rem ); } @@ -163,87 +163,87 @@ void OPimNotifyManager::deregister( const OPimNotify& ) bool OPimNotifyManager::isEmpty() const { qWarning( "is Empty called on OPimNotifyManager %d %d", m_rem.count(), m_al.count() ); if ( m_rem.isEmpty() && m_al.isEmpty() ) return true; else return false; } // Taken from otodoaccessxml.. code duplication bad. any alternative? QString OPimNotifyManager::alarmsToString() const { QString str; OPimNotifyManager::Alarms alarms = m_al; if ( !alarms.isEmpty() ) { QStringList als; OPimNotifyManager::Alarms::Iterator it = alarms.begin(); for ( ; it != alarms.end(); ++it ) { /* only if time is valid */ if ( ( *it ).dateTime().isValid() ) { - als << OConversion::dateTimeToString( ( *it ).dateTime() ) + als << OPimDateConversion::dateTimeToString( ( *it ).dateTime() ) + ":" + QString::number( ( *it ).duration() ) + ":" + QString::number( ( *it ).sound() ) + ":"; } } // now write the list qWarning( "als: %s", als.join( "____________" ).latin1() ); str = als.join( ";" ); } return str; } QString OPimNotifyManager::remindersToString() const { QString str; OPimNotifyManager::Reminders reminders = m_rem; if ( !reminders.isEmpty() ) { OPimNotifyManager::Reminders::Iterator it = reminders.begin(); QStringList records; for ( ; it != reminders.end(); ++it ) { records << QString::number( ( *it ).recordUid() ); } str = records.join( ";" ); } return str; } void OPimNotifyManager::alarmsFromString( const QString& str ) { QStringList als = QStringList::split( ";", str ); for ( QStringList::Iterator it = als.begin(); it != als.end(); ++it ) { QStringList alarm = QStringList::split( ":", ( *it ), TRUE ); // allow empty qWarning( "alarm: %s", alarm.join( "___" ).latin1() ); qWarning( "alarm[0]: %s %s", alarm[ 0 ].latin1(), - OConversion::dateTimeFromString( alarm[ 0 ] ).toString().latin1() ); - OPimAlarm al( alarm[ 2 ].toInt(), OConversion::dateTimeFromString( alarm[ 0 ] ), + OPimDateConversion::dateTimeFromString( alarm[ 0 ] ).toString().latin1() ); + OPimAlarm al( alarm[ 2 ].toInt(), OPimDateConversion::dateTimeFromString( alarm[ 0 ] ), alarm[ 1 ].toInt() ); add( al ); } } void OPimNotifyManager::remindersFromString( const QString& str ) { QStringList rems = QStringList::split( ";", str ); for ( QStringList::Iterator it = rems.begin(); it != rems.end(); ++it ) { OPimReminder rem( ( *it ).toInt() ); add( rem ); } } } |