From 6c7653c65bd3f9907bcd4a8a54e4e5c1d172d15e Mon Sep 17 00:00:00 2001 From: seth_productengine Date: Thu, 28 Jul 2011 18:41:43 +0300 Subject: SH-2169 FIXED New object weights floater added. --- indra/newview/llfloaterobjectweights.h | 64 ++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 indra/newview/llfloaterobjectweights.h (limited to 'indra/newview/llfloaterobjectweights.h') diff --git a/indra/newview/llfloaterobjectweights.h b/indra/newview/llfloaterobjectweights.h new file mode 100644 index 0000000000..10e35ad7a7 --- /dev/null +++ b/indra/newview/llfloaterobjectweights.h @@ -0,0 +1,64 @@ +/** + * @file llfloaterobjectweights.h + * @brief Object weights advanced view floater + * + * $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, 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_LLFLOATEROBJECTWEIGHTS_H +#define LL_LLFLOATEROBJECTWEIGHTS_H + +#include "llfloater.h" + +class LLTextBox; + +class LLFloaterObjectWeights : public LLFloater +{ +public: + LOG_CLASS(LLFloaterObjectWeights); + + LLFloaterObjectWeights(const LLSD& key); + ~LLFloaterObjectWeights(); + + /*virtual*/ BOOL postBuild(); + + /*virtual*/ void onOpen(const LLSD& key); + +private: + void toggleLoadingIndicators(bool visible); + void updateIfNothingSelected(); + + LLTextBox *mSelectedObjects; + LLTextBox *mSelectedPrims; + + LLTextBox *mSelectedDownloadWeight; + LLTextBox *mSelectedPhysicsWeight; + LLTextBox *mSelectedServerWeight; + LLTextBox *mSelectedDisplayWeight; + + LLTextBox *mSelectedOnLand; + LLTextBox *mRezzedOnLand; + LLTextBox *mRemainingCapacity; + LLTextBox *mTotalCapacity; +}; + +#endif //LL_LLFLOATEROBJECTWEIGHTS_H -- cgit v1.2.3 From 1b7b319ae22ac7598b7b3d75ccbec75263450e07 Mon Sep 17 00:00:00 2001 From: seth_productengine Date: Tue, 2 Aug 2011 00:16:13 +0300 Subject: SH-2170 WIP Object and land data added to new weights floater. The data is updated upon object selection change. The land data is displayed for the land containing the primary selected object. Loading indicators added for land impacts. --- indra/newview/llfloaterobjectweights.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloaterobjectweights.h') diff --git a/indra/newview/llfloaterobjectweights.h b/indra/newview/llfloaterobjectweights.h index 10e35ad7a7..82743a8aa7 100644 --- a/indra/newview/llfloaterobjectweights.h +++ b/indra/newview/llfloaterobjectweights.h @@ -29,6 +29,9 @@ #include "llfloater.h" +class LLLandImpactsObserver; +class LLObjectSelection; +class LLParcelSelection; class LLTextBox; class LLFloaterObjectWeights : public LLFloater @@ -36,15 +39,25 @@ class LLFloaterObjectWeights : public LLFloater public: LOG_CLASS(LLFloaterObjectWeights); + typedef LLSafeHandle LLObjectSelectionHandle; + typedef LLSafeHandle LLParcelSelectionHandle; + LLFloaterObjectWeights(const LLSD& key); ~LLFloaterObjectWeights(); /*virtual*/ BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); + /*virtual*/ void onClose(bool app_quitting); + + void updateLandImpacts(); private: - void toggleLoadingIndicators(bool visible); + void refresh(); + + void toggleWeightsLoadingIndicators(bool visible); + void toggleLandImpactsLoadingIndicators(bool visible); + void updateIfNothingSelected(); LLTextBox *mSelectedObjects; @@ -59,6 +72,13 @@ private: LLTextBox *mRezzedOnLand; LLTextBox *mRemainingCapacity; LLTextBox *mTotalCapacity; + + LLLandImpactsObserver *mLandImpactsObserver; + + LLObjectSelectionHandle mObjectSelection; + LLParcelSelectionHandle mParcelSelection; + + boost::signals2::connection mSelectMgrConnection; }; #endif //LL_LLFLOATEROBJECTWEIGHTS_H -- cgit v1.2.3 From 543df6736fb0ae312b9a5e056a35bf8fffd2b6c9 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Wed, 17 Aug 2011 01:42:21 +0300 Subject: SH-2171 FIXED New prim weights added to weights detail floater. - Fixed detecting cross-parcel objects selection. - Various fixes in LLAccountingCostManager. - getSelectedObjectRenderCost() moved from LLFloaterTools to LLObjectSelection where it used to reside. Previous commented out implementation of this method removed. --- indra/newview/llfloaterobjectweights.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloaterobjectweights.h') diff --git a/indra/newview/llfloaterobjectweights.h b/indra/newview/llfloaterobjectweights.h index 82743a8aa7..50d028909e 100644 --- a/indra/newview/llfloaterobjectweights.h +++ b/indra/newview/llfloaterobjectweights.h @@ -29,12 +29,14 @@ #include "llfloater.h" +#include "llaccountingcostmanager.h" + class LLLandImpactsObserver; class LLObjectSelection; class LLParcelSelection; class LLTextBox; -class LLFloaterObjectWeights : public LLFloater +class LLFloaterObjectWeights : public LLFloater, LLAccountingCostObserver { public: LOG_CLASS(LLFloaterObjectWeights); @@ -50,6 +52,9 @@ public: /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ void onClose(bool app_quitting); + /*virtual*/ void onWeightsUpdate(const SelectionCost& selection_cost); + /*virtual*/ void setErrorStatus(U32 status, const std::string& reason); + void updateLandImpacts(); private: -- cgit v1.2.3 From ca8a484f0ee4bcb9b68268f871082d4200062f0e Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Mon, 22 Aug 2011 19:18:36 +0300 Subject: SH-2169 FIXED Land impacts data added to build tools floater. Land selection moved from advanced weights floater to build tools floater. Removed selection observer from weights floater, selection data update in it is initiated from build floater. --- indra/newview/llfloaterobjectweights.h | 36 ++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 17 deletions(-) (limited to 'indra/newview/llfloaterobjectweights.h') diff --git a/indra/newview/llfloaterobjectweights.h b/indra/newview/llfloaterobjectweights.h index 50d028909e..64aa2f2bbe 100644 --- a/indra/newview/llfloaterobjectweights.h +++ b/indra/newview/llfloaterobjectweights.h @@ -30,36 +30,45 @@ #include "llfloater.h" #include "llaccountingcostmanager.h" +#include "llselectmgr.h" -class LLLandImpactsObserver; -class LLObjectSelection; -class LLParcelSelection; +class LLParcel; class LLTextBox; +/** + * struct LLCrossParcelFunctor + * + * A functor that checks whether a bounding box for all + * selected objects crosses a region or parcel bounds. + */ +struct LLCrossParcelFunctor : public LLSelectedObjectFunctor +{ + /*virtual*/ bool apply(LLViewerObject* obj); + +private: + LLBBox mBoundingBox; +}; + + class LLFloaterObjectWeights : public LLFloater, LLAccountingCostObserver { public: LOG_CLASS(LLFloaterObjectWeights); - typedef LLSafeHandle LLObjectSelectionHandle; - typedef LLSafeHandle LLParcelSelectionHandle; - LLFloaterObjectWeights(const LLSD& key); ~LLFloaterObjectWeights(); /*virtual*/ BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ void onClose(bool app_quitting); /*virtual*/ void onWeightsUpdate(const SelectionCost& selection_cost); /*virtual*/ void setErrorStatus(U32 status, const std::string& reason); - void updateLandImpacts(); - -private: + void updateLandImpacts(const LLParcel* parcel); void refresh(); +private: void toggleWeightsLoadingIndicators(bool visible); void toggleLandImpactsLoadingIndicators(bool visible); @@ -77,13 +86,6 @@ private: LLTextBox *mRezzedOnLand; LLTextBox *mRemainingCapacity; LLTextBox *mTotalCapacity; - - LLLandImpactsObserver *mLandImpactsObserver; - - LLObjectSelectionHandle mObjectSelection; - LLParcelSelectionHandle mParcelSelection; - - boost::signals2::connection mSelectMgrConnection; }; #endif //LL_LLFLOATEROBJECTWEIGHTS_H -- cgit v1.2.3 From 056015963290e47e03972e17ce6d603f8f940fe3 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Mon, 22 Aug 2011 23:41:54 +0300 Subject: SH-2171 ADDITIONAL FIX Added transaction ID to object weights requests to avoid updating the floater upon outdated or mixed up replies arrival. --- indra/newview/llfloaterobjectweights.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llfloaterobjectweights.h') diff --git a/indra/newview/llfloaterobjectweights.h b/indra/newview/llfloaterobjectweights.h index 64aa2f2bbe..9a244573be 100644 --- a/indra/newview/llfloaterobjectweights.h +++ b/indra/newview/llfloaterobjectweights.h @@ -69,6 +69,8 @@ public: void refresh(); private: + /*virtual*/ void generateTransactionID(); + void toggleWeightsLoadingIndicators(bool visible); void toggleLandImpactsLoadingIndicators(bool visible); -- cgit v1.2.3