qmlvcard.cpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #include "qmlvcard.h"
  2. #include <QDebug>
  3. QMLVCard::QMLVCard(QObject *parent) : QObject(parent)
  4. {
  5. m_photo = "";
  6. m_nickname = "";
  7. m_name = "";
  8. m_middlename = "";
  9. m_lastname = "";
  10. m_fullname = "";
  11. m_birthday = "";
  12. m_email = "";
  13. m_url = "";
  14. }
  15. void QMLVCard::setVCard( QMLVCard *value )
  16. {
  17. m_vcard =value;
  18. m_photo = value->getPhoto();
  19. m_nickname = value->getNickName();
  20. m_name = value->getName();
  21. m_middlename = value->getMiddleName();
  22. m_lastname = value->getLastName();
  23. m_fullname = value->getFullName();
  24. m_birthday = value->getBirthday();
  25. m_email = value->getEMail();
  26. m_url = value->getUrl();
  27. m_jid = value->getJid();
  28. //qDebug()<<"***>"<<m_photo <<m_nickname<<m_name<<m_middlename<<m_lastname<<m_fullname<<m_birthday<<m_email<<m_url<<m_jid;
  29. emit vCardChanged();
  30. }
  31. void QMLVCard::clearData() //Q_INVOKABLE
  32. {
  33. m_vcard = 0;
  34. m_photo = "";
  35. m_nickname = "";
  36. m_name = "";
  37. m_middlename = "";
  38. m_lastname = "";
  39. m_fullname = "";
  40. m_birthday = "";
  41. m_email = "";
  42. m_url = "";
  43. m_jid = "";
  44. }