Skip to content
Snippets Groups Projects
Commit 2bf5932a authored by Emmanuel Lepage's avatar Emmanuel Lepage
Browse files

[ #10724 ] Refactor sorting in the KDE library, implement contact in the dataengine

parent b97cd23f
Branches
Tags
No related merge requests found
...@@ -471,6 +471,12 @@ void Call::setRecordingPath(const QString& path) ...@@ -471,6 +471,12 @@ void Call::setRecordingPath(const QString& path)
m_RecordingPath = path; m_RecordingPath = path;
} }
///Set peer name
void Call::setPeerName(const QString& name)
{
m_PeerName = name;
}
/***************************************************************************** /*****************************************************************************
* * * *
* Mutator * * Mutator *
......
...@@ -163,6 +163,7 @@ public: ...@@ -163,6 +163,7 @@ public:
void setTransferNumber ( const QString& number ); void setTransferNumber ( const QString& number );
void setCallNumber ( const QString& number ); void setCallNumber ( const QString& number );
void setRecordingPath ( const QString& path ); void setRecordingPath ( const QString& path );
void setPeerName ( const QString& name );
//Mutators //Mutators
void appendText(const QString& str); void appendText(const QString& str);
......
This diff is collapsed.
...@@ -188,3 +188,22 @@ void Contact::setDepartment(const QString& name) ...@@ -188,3 +188,22 @@ void Contact::setDepartment(const QString& name)
{ {
m_Department = name; m_Department = name;
} }
///Turn the contact into QString-QString hash
QHash<QString,QVariant> Contact::toHash()
{
QHash<QString,QVariant> aContact;
//aContact[""] = PhoneNumbers getPhoneNumbers() const;
aContact[ "nickName" ] = getNickName();
aContact[ "firstName" ] = getFirstName();
aContact[ "secondName" ] = getSecondName();
aContact[ "formattedName" ] = getFormattedName();
aContact[ "organization" ] = getOrganization();
aContact[ "Uid" ] = getUid();
aContact[ "preferredEmail" ] = getPreferredEmail();
//aContact["Photo"] = getPhoto( const;
aContact[ "type" ] = getType();
aContact[ "group" ] = getGroup();
aContact[ "department" ] = getDepartment();
return aContact;
}
\ No newline at end of file
...@@ -21,7 +21,8 @@ ...@@ -21,7 +21,8 @@
#ifndef CONTACT_H #ifndef CONTACT_H
#define CONTACT_H #define CONTACT_H
#include <QObject> #include <QtCore/QObject>
#include <QtCore/QVariant>
//Qt //Qt
class QListWidgetItem; class QListWidgetItem;
...@@ -107,6 +108,9 @@ public: ...@@ -107,6 +108,9 @@ public:
virtual void setUid ( const QString& id ); virtual void setUid ( const QString& id );
virtual void setPhoto ( QPixmap* photo ); virtual void setPhoto ( QPixmap* photo );
//Mutator
QHash<QString,QVariant> toHash();
protected: protected:
virtual void initItemWidget(); virtual void initItemWidget();
......
...@@ -24,12 +24,16 @@ ...@@ -24,12 +24,16 @@
#include <QObject> #include <QObject>
#include <QHash> #include <QHash>
#include <QStringList>
#include <QVariant>
#include "typedefs.h" #include "typedefs.h"
#include "Contact.h"
//SFLPhone //SFLPhone
class Contact; class Contact;
//Typedef
typedef QList<Contact*> ContactList; typedef QList<Contact*> ContactList;
///@class ContactBackend Allow different way to handle contact without poluting the library ///@class ContactBackend Allow different way to handle contact without poluting the library
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment