From 2206f97d8efb2683e6c0d759a8549de9de67a054 Mon Sep 17 00:00:00 2001 From: Cho Date: Wed, 23 Apr 2014 22:19:20 +0100 Subject: Added SEARCH tab to Experience floater for ACME-1420 --- indra/newview/llpanelexperiencepicker.h | 88 +++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 indra/newview/llpanelexperiencepicker.h (limited to 'indra/newview/llpanelexperiencepicker.h') diff --git a/indra/newview/llpanelexperiencepicker.h b/indra/newview/llpanelexperiencepicker.h new file mode 100644 index 0000000000..166639a14e --- /dev/null +++ b/indra/newview/llpanelexperiencepicker.h @@ -0,0 +1,88 @@ +/** +* @file llpanelexperiencepicker.h +* @brief Header file for llpanelexperiencepicker +* @author dolphin@lindenlab.com +* +* $LicenseInfo:firstyear=2014&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2014, Linden Research, Inc. +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; +* version 2.1 of the License only. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +* +* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +* $/LicenseInfo$ +*/ +#ifndef LL_LLPANELEXPERIENCEPICKER_H +#define LL_LLPANELEXPERIENCEPICKER_H + +#include "llpanel.h" + +class LLScrollListCtrl; +class LLLineEditor; + + +class LLPanelExperiencePicker : public LLPanel +{ +public: + friend class LLExperienceSearchResponder; + + // The callback function will be called with an avatar name and UUID. + typedef boost::function select_callback_t; + // filter function for experiences, return true if the experience should be hidden. + typedef boost::function filter_function; + typedef std::vector filter_list; + + LLPanelExperiencePicker(); + virtual ~LLPanelExperiencePicker(); + + BOOL postBuild(); + + void addFilter(filter_function func){mFilters.push_back(func);} + template + void addFilters(IT begin, IT end){mFilters.insert(mFilters.end(), begin, end);} + void setDefaultFilters(); + + static bool FilterWithProperty(const LLSD& experience, S32 prop); + static bool FilterWithoutProperty(const LLSD& experience, S32 prop); + bool FilterOverRating(const LLSD& experience); + +private: + void editKeystroke(LLLineEditor* caller, void* user_data); + + void onBtnFind(); + void onBtnProfile(); + void onList(); + void onMaturity(); + + void getSelectedExperienceIds( const LLScrollListCtrl* results, uuid_vec_t &experience_ids ); + void setAllowMultiple(bool allow_multiple); + + + void find(); + bool isSelectButtonEnabled(); + void processResponse( const LLUUID& query_id, const LLSD& content ); + + void filterContent(); + bool isExperienceHidden(const LLSD& experience) const ; + std::string getMaturityString(int maturity); + + + select_callback_t mSelectionCallback; + filter_list mFilters; + LLUUID mQueryID; + LLSD mResponse; +}; + +#endif // LL_LLPANELEXPERIENCEPICKER_H -- cgit v1.2.3 From 446a3193b1f2932ed14a16216bcf65dc30889612 Mon Sep 17 00:00:00 2001 From: Cho Date: Thu, 24 Apr 2014 23:43:54 +0100 Subject: Refactored to share code between experience search floater and panel for ACME-1420 --- indra/newview/llpanelexperiencepicker.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview/llpanelexperiencepicker.h') diff --git a/indra/newview/llpanelexperiencepicker.h b/indra/newview/llpanelexperiencepicker.h index 166639a14e..af0a30ceba 100644 --- a/indra/newview/llpanelexperiencepicker.h +++ b/indra/newview/llpanelexperiencepicker.h @@ -37,8 +37,8 @@ class LLPanelExperiencePicker : public LLPanel { public: friend class LLExperienceSearchResponder; + friend class LLFloaterExperiencePicker; - // The callback function will be called with an avatar name and UUID. typedef boost::function select_callback_t; // filter function for experiences, return true if the experience should be hidden. typedef boost::function filter_function; @@ -62,6 +62,8 @@ private: void editKeystroke(LLLineEditor* caller, void* user_data); void onBtnFind(); + void onBtnSelect(); + void onBtnClose(); void onBtnProfile(); void onList(); void onMaturity(); @@ -83,6 +85,7 @@ private: filter_list mFilters; LLUUID mQueryID; LLSD mResponse; + bool mCloseOnSelect; }; #endif // LL_LLPANELEXPERIENCEPICKER_H -- cgit v1.2.3 From 6766ef06d44b1991bd6ef3f699354f98651679b4 Mon Sep 17 00:00:00 2001 From: dolphin Date: Tue, 13 May 2014 14:52:10 -0700 Subject: ACME-1474: Prevent the viewer from trying to add or remove the default experience. --- indra/newview/llpanelexperiencepicker.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llpanelexperiencepicker.h') diff --git a/indra/newview/llpanelexperiencepicker.h b/indra/newview/llpanelexperiencepicker.h index af0a30ceba..d5c38598e1 100644 --- a/indra/newview/llpanelexperiencepicker.h +++ b/indra/newview/llpanelexperiencepicker.h @@ -56,6 +56,7 @@ public: static bool FilterWithProperty(const LLSD& experience, S32 prop); static bool FilterWithoutProperty(const LLSD& experience, S32 prop); + static bool FilterMatching(const LLSD& experience, const LLUUID& id); bool FilterOverRating(const LLSD& experience); private: -- cgit v1.2.3 From 169bf48f1068b0996f38ef03a9a97cd6c0fa07e0 Mon Sep 17 00:00:00 2001 From: dolphin Date: Tue, 13 May 2014 16:25:52 -0700 Subject: ACME-1450: Added paging to the experience picker and upped the search size to 30 results per page. --- indra/newview/llpanelexperiencepicker.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llpanelexperiencepicker.h') diff --git a/indra/newview/llpanelexperiencepicker.h b/indra/newview/llpanelexperiencepicker.h index d5c38598e1..b2ba7f26ee 100644 --- a/indra/newview/llpanelexperiencepicker.h +++ b/indra/newview/llpanelexperiencepicker.h @@ -68,6 +68,7 @@ private: void onBtnProfile(); void onList(); void onMaturity(); + void onPage(S32 direction); void getSelectedExperienceIds( const LLScrollListCtrl* results, uuid_vec_t &experience_ids ); void setAllowMultiple(bool allow_multiple); @@ -87,6 +88,7 @@ private: LLUUID mQueryID; LLSD mResponse; bool mCloseOnSelect; + S32 mCurrentPage; }; #endif // LL_LLPANELEXPERIENCEPICKER_H -- cgit v1.2.3 From e7645eb995c291ebbbd05bab796639306545d2ad Mon Sep 17 00:00:00 2001 From: dolphin Date: Fri, 5 Sep 2014 10:58:39 -0700 Subject: Allow non-grid-wide experiences in the parcel block list to block estate allowed experiences. --- indra/newview/llpanelexperiencepicker.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llpanelexperiencepicker.h') diff --git a/indra/newview/llpanelexperiencepicker.h b/indra/newview/llpanelexperiencepicker.h index b2ba7f26ee..2a0731f34c 100644 --- a/indra/newview/llpanelexperiencepicker.h +++ b/indra/newview/llpanelexperiencepicker.h @@ -55,6 +55,7 @@ public: void setDefaultFilters(); static bool FilterWithProperty(const LLSD& experience, S32 prop); + static bool FilterWithProperties(const LLSD& experience, S32 prop); static bool FilterWithoutProperty(const LLSD& experience, S32 prop); static bool FilterMatching(const LLSD& experience, const LLUUID& id); bool FilterOverRating(const LLSD& experience); -- cgit v1.2.3 From 4e84aa4ecfe3351463ca9c54df4477528f65e41f Mon Sep 17 00:00:00 2001 From: dolphin Date: Fri, 5 Sep 2014 15:14:21 -0700 Subject: Fixed reversed logic --- indra/newview/llpanelexperiencepicker.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llpanelexperiencepicker.h') diff --git a/indra/newview/llpanelexperiencepicker.h b/indra/newview/llpanelexperiencepicker.h index 2a0731f34c..e39ffed70b 100644 --- a/indra/newview/llpanelexperiencepicker.h +++ b/indra/newview/llpanelexperiencepicker.h @@ -55,7 +55,7 @@ public: void setDefaultFilters(); static bool FilterWithProperty(const LLSD& experience, S32 prop); - static bool FilterWithProperties(const LLSD& experience, S32 prop); + static bool FilterWithoutProperties(const LLSD& experience, S32 prop); static bool FilterWithoutProperty(const LLSD& experience, S32 prop); static bool FilterMatching(const LLSD& experience, const LLUUID& id); bool FilterOverRating(const LLSD& experience); -- cgit v1.2.3