Source Code (Use browser search to find items of interest.)
Class Index
kspread'KSpreadMapIface (./koffice/kspread/KSpreadMapIface.h:12)
class KSpreadMapIface : virtual public DCOPObject
{
K_DCOP
public:
KSpreadMapIface( KSpreadMap* );
virtual bool processDynamic(const QCString &fun, const QByteArray &data,
QCString& replyType, QByteArray &replyData);
k_dcop:
virtual DCOPRef table( const QString& name );
virtual DCOPRef table( int index );
virtual int tableCount() const;
virtual QStringList tableNames() const;
virtual QValueList<DCOPRef> tables();
virtual DCOPRef insertTable( const QString& name );
private:
KSpreadMap* m_map;
};
kspread'KSpreadMapIface::KSpreadMapIface() (./koffice/kspread/KSpreadMapIface.cc:10)
KSpreadMapIface::KSpreadMapIface( KSpreadMap* map )
: DCOPObject( map )
{
m_map = map;
}
kspread'KSpreadMapIface::table() (./koffice/kspread/KSpreadMapIface.cc:16)
DCOPRef KSpreadMapIface::table( const QString& name )
{
KSpreadTable* t = m_map->findTable( name );
if ( !t )
return DCOPRef();
return DCOPRef( kapp->dcopClient()->appId(), t->dcopObject()->objId() );
}
kspread'KSpreadMapIface::table() (./koffice/kspread/KSpreadMapIface.cc:25)
DCOPRef KSpreadMapIface::table( int index )
{
KSpreadTable* t = m_map->tableList().at( index );
if ( !t )
{
qDebug("+++++ No table found at index %i", index );
return DCOPRef();
}
qDebug("+++++++ Returning table %s", t->QObject::name() );
return DCOPRef( kapp->dcopClient()->appId(), t->dcopObject()->objId() );
}
kspread'KSpreadMapIface::tableCount() (./koffice/kspread/KSpreadMapIface.cc:39)
int KSpreadMapIface::tableCount() const
{
return m_map->count();
}
kspread'KSpreadMapIface::tableNames() (./koffice/kspread/KSpreadMapIface.cc:44)
QStringList KSpreadMapIface::tableNames() const
{
QStringList names;
QList<KSpreadTable>& lst = m_map->tableList();
QListIterator<KSpreadTable> it( lst );
for( ; it.current(); ++it )
names.append( it.current()->name() );
return names;
}
kspread'KSpreadMapIface::tables() (./koffice/kspread/KSpreadMapIface.cc:56)
QValueList<DCOPRef> KSpreadMapIface::tables()
{
QValueList<DCOPRef> t;
QList<KSpreadTable>& lst = m_map->tableList();
QListIterator<KSpreadTable> it( lst );
for( ; it.current(); ++it )
t.append( DCOPRef( kapp->dcopClient()->appId(), it.current()->dcopObject()->objId() ) );
return t;
}
kspread'KSpreadMapIface::insertTable() (./koffice/kspread/KSpreadMapIface.cc:68)
DCOPRef KSpreadMapIface::insertTable( const QString& name )
{
if ( m_map->findTable( name ) )
return table( name );
KSpreadTable* t = new KSpreadTable( m_map, name );
t->setTableName( name );
m_map->doc()->addTable( t );
return table( name );
}
kspread'KSpreadMapIface::processDynamic() (./koffice/kspread/KSpreadMapIface.cc:80)
bool KSpreadMapIface::processDynamic(const QCString &fun, const QByteArray &data,
QCString& replyType, QByteArray &replyData)
{
// Does the name follow the pattern "foobar()" ?
uint len = fun.length();
if ( len < 3 )
return FALSE;
if ( fun[ len - 1 ] != ')' || fun[ len - 2 ] != '(' )
return FALSE;
KSpreadTable* t = m_map->findTable( fun.left( len - 2 ).data() );
if ( !t )
return FALSE;
replyType = "DCOPRef";
QDataStream out( replyData, IO_WriteOnly );
out << DCOPRef( kapp->dcopClient()->appId(), t->dcopObject()->objId() );
return TRUE;
}