[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Howto create akonadi resource in python
From:       Ignacio Lorenzo =?iso-8859-1?q?Garc=EDa?= <nacholore () gmail ! com>
Date:       2010-11-30 10:56:54
Message-ID: 201011301056.54943.nacholore () gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hello,
I'm trying to create a resource akonadi in python, but I need help getting 
started.Anybody can help me find documentation? or guide me?

This is code

[Attachment #5 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" \
"http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" \
content="1" /><style type="text/css"> p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; \
font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;"><span style=" font-family:'arial,sans-serif'; font-size:medium; \
color:#000000;">Hello,<br />I'm trying to create a resource akonadi in python, but I \
need help getting started.Anybody can help me find documentation? or guide me?<br \
/><br />This is code<br /></span></p></body></html>


["pruebat.py" (text/x-python)]

from PyKDE4.akonadi import *
from PyQt4 import QtCore

class FbResource( Akonadi.ResourceBase ):
  id = None
  
  def __init__(self, id):
    self.id = id
    Akonadi.ResourceBase.__init__(self, id)
    
       
  def retrieveCollections( self ):
    c = Akonadi.Collection()
    c.setParent(Akonadi.Collection.root())
    c.setRemoteId("fb-contacts");
    c.setName(QtCore.QString('fb'));
    mimeTypes = QtCore.QStringList('text/directory')
    c.setContentMimeTypes(mimeTypes)
    list = [c]
    collectionsRetrieved(list);


if __name__ == "__main__":
  FbResource(QtCore.QString('Hola'))



>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic