-rw-r--r-- | libopie2/opiecore/device/odevice.cpp | 4 | ||||
-rw-r--r-- | libopie2/opiedb/osqlresult.cpp | 8 | ||||
-rw-r--r-- | libopie2/opiedb/osqlresult.h | 4 | ||||
-rw-r--r-- | libopie2/opiepim/TODO | 1 |
4 files changed, 11 insertions, 6 deletions
diff --git a/libopie2/opiecore/device/odevice.cpp b/libopie2/opiecore/device/odevice.cpp index 26c6dca..129215b 100644 --- a/libopie2/opiecore/device/odevice.cpp +++ b/libopie2/opiecore/device/odevice.cpp @@ -734,52 +734,56 @@ void ODevice::sendSuspendmsg() * @see Opie::Core::OKeyFilter * @see Opie::Core::OKeyFilter::inst() */ void ODevice::addPreHandler(QWSServer::KeyboardFilter*aFilter) { Opie::Core::OKeyFilter::inst()->addPreHandler(aFilter); } /** * \brief Remove the QWSServer::KeyboardFilter in the param from the list * * Remove the QWSServer::KeyboardFilter \par aFilter from the List * of Keyfilters. Call this when you delete the KeyFilter! * * @param aFilter The filter to be removed from the Opie::Core::OKeyFilter * @see Opie::Core::ODevice::addPreHandler */ void ODevice::remPreHandler(QWSServer::KeyboardFilter*aFilter) { Opie::Core::OKeyFilter::inst()->remPreHandler(aFilter); } void ODevice::playingStopped() { const_cast<QObject*>(sender())->disconnect( this ); +#ifndef QT_NO_SOUND if ( d->m_sound >= 0 ) { ::ioctl ( d->m_sound, MIXER_WRITE( d->m_mixer ), &d->m_vol ); ::close ( d->m_sound ); } +#endif } void ODevice::changeMixerForAlarm( int mixer, const char* file, Sound *snd ) { +#ifndef QT_NO_SOUND if (( d->m_sound = ::open ( file, O_RDWR )) >= 0 ) { if ( ::ioctl ( d->m_sound, MIXER_READ( mixer ), &d->m_vol ) >= 0 ) { Config cfg ( "qpe" ); cfg. setGroup ( "Volume" ); int volalarm = cfg. readNumEntry ( "AlarmPercent", 50 ); if ( volalarm < 0 ) volalarm = 0; else if ( volalarm > 100 ) volalarm = 100; volalarm |= ( volalarm << 8 ); if ( ::ioctl ( d->m_sound, MIXER_WRITE( mixer ), &volalarm ) >= 0 ) register_qpe_sound_finished(snd, this, SLOT(playingStopped())); } d->m_mixer = mixer; } +#endif } } } diff --git a/libopie2/opiedb/osqlresult.cpp b/libopie2/opiedb/osqlresult.cpp index bad7d8b..268ac8e 100644 --- a/libopie2/opiedb/osqlresult.cpp +++ b/libopie2/opiedb/osqlresult.cpp @@ -4,63 +4,63 @@ using namespace Opie::DB; OSQLResultItem::OSQLResultItem( const TableString& string, const TableInt& Int) : m_string( string ), m_int( Int ) { } OSQLResultItem::~OSQLResultItem() { } OSQLResultItem::OSQLResultItem( const OSQLResultItem& item) { *this = item; } OSQLResultItem &OSQLResultItem::operator=( const OSQLResultItem& other) { m_string = other.m_string; m_int = other.m_int; return *this; } OSQLResultItem::TableString OSQLResultItem::tableString()const{ return m_string; } OSQLResultItem::TableInt OSQLResultItem::tableInt()const { return m_int; } -QString OSQLResultItem::data( const QString& columnName, bool *ok ) { - TableString::Iterator it = m_string.find( columnName ); +QString OSQLResultItem::data( const QString& columnName, bool *ok ) const { + TableString::ConstIterator it = m_string.find( columnName ); /* if found */ if ( it != m_string.end() ) { if ( ok ) *ok = true; return it.data(); }else{ if ( ok ) *ok = false; return QString::null; } } -QString OSQLResultItem::data( int column, bool *ok ) { - TableInt::Iterator it = m_int.find( column ); +QString OSQLResultItem::data( int column, bool *ok ) const { + TableInt::ConstIterator it = m_int.find( column ); /* if found */ if ( it != m_int.end() ) { if ( ok ) *ok = true; return it.data(); }else{ if ( ok ) *ok = false; return QString::null; } } /* * DateFormat is 'YYYY-MM-DD' */ QDate OSQLResultItem::dataToDate( const QString& column, bool *ok ) { QDate date = QDate::currentDate(); QString str = data( column, ok ); if (!str.isEmpty() ) { ;// convert } return date; } QDate OSQLResultItem::dataToDate( int column, bool *ok ) { QDate date = QDate::currentDate(); QString str = data( column, ok ); diff --git a/libopie2/opiedb/osqlresult.h b/libopie2/opiedb/osqlresult.h index fc6f01a..92b65a0 100644 --- a/libopie2/opiedb/osqlresult.h +++ b/libopie2/opiedb/osqlresult.h @@ -30,54 +30,54 @@ public: typedef QMap<int, QString> TableInt; /** * Default c'tor. It has a TableString and a TableInt */ OSQLResultItem(const TableString& = TableString(), const TableInt& = TableInt() ); OSQLResultItem( const OSQLResultItem& ); ~OSQLResultItem(); OSQLResultItem &operator=( const OSQLResultItem& ); /** * returns the TableString */ TableString tableString()const; /** * returns the TableInt */ TableInt tableInt() const; /** * retrieves the Data from columnName * */ - QString data( const QString& columnName, bool *ok = 0); + QString data( const QString& columnName, bool *ok = 0) const; /** * QString for column number */ - QString data(int columnNumber, bool *ok = 0); + QString data(int columnNumber, bool *ok = 0) const; /** * Date conversion from columnName */ QDate dataToDate( const QString& columnName, bool *ok = 0 ); /** * Date conversion from column-number */ QDate dataToDate( int columnNumber, bool *ok = 0 ); QDateTime dataToDateTime( const QString& columName, bool *ok = 0 ); QDateTime dataToDateTime( int columnNumber, bool *ok = 0 ); private: TableString m_string; TableInt m_int; }; /** * the OSQLResult * either a SQL statement failed or succeeded */ class OSQLResult { public: diff --git a/libopie2/opiepim/TODO b/libopie2/opiepim/TODO index c3420cf..b520370 100644 --- a/libopie2/opiepim/TODO +++ b/libopie2/opiepim/TODO @@ -1,31 +1,32 @@ As to popular request.... 1.) fix up the core/backend mess. The actual Backend Implementation + Interface should be there The API frontend used by the developer should not be used Rename ODateBookAccess* to OPimDateBookAccess* + Rename OContactAccess* to OpimContactAccess* Fix filenames to OPim* ... 2.) Move sorting, Query By Example, Exposing of Attributes of a Record available to the Ptr base class and have sane implementation on the template level 3.) Have something like QProperty to expose attributes from OPimRecord. This would include exporting,importing of data, and translated names. This can be used for Cross Reference, Selector Widget, Generic Table Shower 4.) Marshall/Demarshall all PIM Records correctly 5.) Add the Private Backend to the OPimRecord ( private ) make the base access class friend and allow retrieving the backend. Make it virtual so the template gets the right pointer. So it can only be accessed from the inside 6.) Add signals for updating/adding/removing records to the access template Internal connect method 7.) internal QCOP communication between the interfaces 8.) GUI:Better and Improved Recurrence Widget |