KTp/Tasks/ModelRoles: Difference between revisions
Appearance
m Make the table A Table |
No edit summary |
||
Line 66: | Line 66: | ||
- hasTextChannel | - hasTextChannel | ||
- tubesRoles (QVariantMap of stream + dbus tubes) Rationale - hardcoding types into the model is bad | - tubesRoles (QVariantMap of stream + dbus tubes) Rationale - hardcoding types into the model is bad | ||
===Proposed Enum=== | |||
//core | |||
Qt::DisplayRole // returns Contact Alias, Account displayName or Group Name | |||
RowTypeRole,= Qt::UserRole //returns one of KTp::ContactRowType, KTp::PersonRowType, KTp::GroupRowType, KTp::AccountRowType | |||
IdRole, //returns Contact ID, Account UID, or group ID (group name or "_ungrouped") | |||
//telepathy roles | |||
ContactRole = Qt::UserRole + 100 //returns Tp::ContactPtr | |||
AccountRole // Tp::AccountPtr | |||
CustomTelepathyRole //future extensibility without breaking API | |||
//contact roles |
Revision as of 00:55, 25 January 2013
Old Roles
Original Role | Type | Comment |
---|---|---|
Qt::DisplayRole | Contact's alias OR account name OR readable group name | |
AccountRole | Tp::AccountPtr | |
AliasRole | Contact's alias | |
AudioCallCapabilityRole | bool | both you can remote can audio call |
AvatarRole | TODO | contact's avatar |
BlockedRole | bool | isBlocked |
ClientTypesRole | QStringList | client types from Tp::Contact |
ContactRole | Tp::ContactPtr | |
DesktopSharingCapabilityRole | bool | both you and remote can desktop share.. I Want to kill this, and expose QStringList streamTubeRoles |
FileTransferCapabilityRole | bool | both you and remote can file transfer |
GroupsRole | no idea, probably deprecated | KILL IT! |
IconRole | ?? | KILL IT! |
IdRole | string | contact ID or account ID or group ID as appropriate |
index | ???? | KILL IT! |
ItemRole | deprecated | KILL IT! |
MediaCallCapabilityRole | bool | ??? |
NicknameRole | KILL IT! | |
OnlineUsersCountRole | number of online contacts in this group | |
PresenceMessageRole | string - status message | |
PresenceRole | Tp::Presence | Should use KTp::Presence |
PresenceTypeRole | enum | |
RowType | enum | either AccountsRowType, ContactsRowType, GroupRowType |
SSHContactCapabilityRole | bool | both you + remote can SSH contact. I Want to kill this, and expose QStringList streamTubeRoles |
TextChatCapabilityRole | bool | both you + remote can text chat |
TotalUsersCountRole | int | total users in this group |
TypeRole | ??? | KILL IT! |
VideoCallCapabilityRole | bool | both you + remote can video call |
NEW Role Requests
Roles for:
- unread message count - hasTextChannel - tubesRoles (QVariantMap of stream + dbus tubes) Rationale - hardcoding types into the model is bad
Proposed Enum
//core Qt::DisplayRole // returns Contact Alias, Account displayName or Group Name RowTypeRole,= Qt::UserRole //returns one of KTp::ContactRowType, KTp::PersonRowType, KTp::GroupRowType, KTp::AccountRowType IdRole, //returns Contact ID, Account UID, or group ID (group name or "_ungrouped")
//telepathy roles ContactRole = Qt::UserRole + 100 //returns Tp::ContactPtr AccountRole // Tp::AccountPtr CustomTelepathyRole //future extensibility without breaking API
//contact roles