Source Code (Use browser search to find items of interest.)
Class Index
abbrowser'ContactEntryList (./kdepim/abbrowser/entry.h:47)
class ContactEntryList : public QDict<ContactEntry>
{
public:
ContactEntryList( const QString &filename );
QString key();
QString insert( ContactEntry *item );
void unremove( const QString &key, ContactEntry *item );
void save( const QString &filename );
void load( const QString &filename );
protected:
long kkey;
QList<ContactEntry> list;
};
abbrowser'ContactEntryList::ContactEntryList() (./kdepim/abbrowser/entry.cpp:15)
ContactEntryList::ContactEntryList( const QString &filename )
{
kkey = 0;
setAutoDelete( true );
load( filename );
}
abbrowser'ContactEntryList::key() (./kdepim/abbrowser/entry.cpp:22)
QString ContactEntryList::key()
{
++kkey;
return QString().setNum( kkey );
}
abbrowser'ContactEntryList::insert() (./kdepim/abbrowser/entry.cpp:28)
QString ContactEntryList::insert( ContactEntry *item )
{
QString result = key();
QDict<ContactEntry>::insert( result, item );
return result;
}
abbrowser'ContactEntryList::unremove() (./kdepim/abbrowser/entry.cpp:35)
void ContactEntryList::unremove( const QString &key, ContactEntry *item )
{
QDict<ContactEntry>::insert( key, item );
}
abbrowser'ContactEntryList::save() (./kdepim/abbrowser/entry.cpp:40)
void ContactEntryList::save( const QString &filename )
{
QFile f( filename );
if ( !f.open( IO_WriteOnly ) )
return;
QTextStream t( &f );
QDictIterator<ContactEntry> it(*this);
while (it.current()) {
it.current()->save( t );
++it;
}
f.close();
}
abbrowser'ContactEntryList::load() (./kdepim/abbrowser/entry.cpp:57)
void ContactEntryList::load( const QString &filename )
{
QFile f( filename );
if ( !f.open( IO_ReadOnly ) )
return;
QTextStream t( &f );
clear();
while ( !t.eof() ) {
QDict<ContactEntry>::insert( key(), new ContactEntry( t ));
// connect up a signal to emit of this guy
}
f.close();
}
////////////////////////
// ContactEntry methods