diff options
author | Merov Linden <merov@lindenlab.com> | 2012-09-17 17:53:17 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2012-09-17 17:53:17 -0700 |
commit | d22c8510b19f12e81dc68562de45c2c364036440 (patch) | |
tree | 414bcd5946ac7a04b629d2526b4c0b119c631355 /indra/newview/llconversationmodel.h | |
parent | 9b0d627a06a817fc11edc4c6c718f1114aa7cfcf (diff) |
CHUI-340 : WIP : Sorting implemented. Type and name work. Date and distance still need the relevant values to be computed.
Diffstat (limited to 'indra/newview/llconversationmodel.h')
-rwxr-xr-x | indra/newview/llconversationmodel.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index ef1903ab19..954543f91a 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -46,6 +46,17 @@ typedef std::map<LLUUID, LLFolderViewItem*> conversations_widgets_map; class LLConversationItem : public LLFolderViewModelItemCommon { public: + enum EConversationType + { + CONV_UNKNOWN = 0, + CONV_PARTICIPANT = 1, + CONV_SESSION_NEARBY = 2, // The order counts here as it is used to sort sessions by type + CONV_SESSION_1_ON_1 = 3, + CONV_SESSION_AD_HOC = 4, + CONV_SESSION_GROUP = 5, + CONV_SESSION_UNKNOWN = 6 + }; + LLConversationItem(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); LLConversationItem(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); LLConversationItem(LLFolderViewModelInterface& root_view_model); @@ -93,6 +104,11 @@ public: virtual void selectItem(void) { } virtual void showProperties(void); + // Methods used in sorting (see LLConversationSort::operator() + EConversationType const getType() const { return mConvType; } + virtual const bool getTime(F32& time) const { return false; } + virtual const bool getDistanceToAgent(F32& distance) const { return false; } + // This method will be called to determine if a drop can be // performed, and will set drop to TRUE if a drop is // requested. @@ -111,6 +127,7 @@ public: protected: std::string mName; // Name of the session or the participant LLUUID mUUID; // UUID of the session or the participant + EConversationType mConvType; // Type of conversation item bool mNeedsRefresh; // Flag signaling to the view that something changed for this item }; |