/indra/newview/llfloaterobjectweights.h
C++ Header | 93 lines | 42 code | 20 blank | 31 comment | 0 complexity | 9b8c72ed3933610f0bf2e8f44116c3ce MD5 | raw file
Possible License(s): LGPL-2.1
1/** 2 * @file llfloaterobjectweights.h 3 * @brief Object weights advanced view floater 4 * 5 * $LicenseInfo:firstyear=2011&license=viewerlgpl$ 6 * Second Life Viewer Source Code 7 * Copyright (C) 2011, Linden Research, Inc. 8 * 9 * This library is free software; you can redistribute it and/or 10 * modify it under the terms of the GNU Lesser General Public 11 * License as published by the Free Software Foundation; 12 * version 2.1 of the License only. 13 * 14 * This library is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 * Lesser General Public License for more details. 18 * 19 * You should have received a copy of the GNU Lesser General Public 20 * License along with this library; if not, write to the Free Software 21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 * 23 * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA 24 * $/LicenseInfo$ 25 */ 26 27#ifndef LL_LLFLOATEROBJECTWEIGHTS_H 28#define LL_LLFLOATEROBJECTWEIGHTS_H 29 30#include "llfloater.h" 31 32#include "llaccountingcostmanager.h" 33#include "llselectmgr.h" 34 35class LLParcel; 36class LLTextBox; 37 38/** 39 * struct LLCrossParcelFunctor 40 * 41 * A functor that checks whether a bounding box for all 42 * selected objects crosses a region or parcel bounds. 43 */ 44struct LLCrossParcelFunctor : public LLSelectedObjectFunctor 45{ 46 /*virtual*/ bool apply(LLViewerObject* obj); 47 48private: 49 LLBBox mBoundingBox; 50}; 51 52 53class LLFloaterObjectWeights : public LLFloater, LLAccountingCostObserver 54{ 55public: 56 LOG_CLASS(LLFloaterObjectWeights); 57 58 LLFloaterObjectWeights(const LLSD& key); 59 ~LLFloaterObjectWeights(); 60 61 /*virtual*/ BOOL postBuild(); 62 63 /*virtual*/ void onOpen(const LLSD& key); 64 65 /*virtual*/ void onWeightsUpdate(const SelectionCost& selection_cost); 66 /*virtual*/ void setErrorStatus(U32 status, const std::string& reason); 67 68 void updateLandImpacts(const LLParcel* parcel); 69 void refresh(); 70 71private: 72 /*virtual*/ void generateTransactionID(); 73 74 void toggleWeightsLoadingIndicators(bool visible); 75 void toggleLandImpactsLoadingIndicators(bool visible); 76 77 void updateIfNothingSelected(); 78 79 LLTextBox *mSelectedObjects; 80 LLTextBox *mSelectedPrims; 81 82 LLTextBox *mSelectedDownloadWeight; 83 LLTextBox *mSelectedPhysicsWeight; 84 LLTextBox *mSelectedServerWeight; 85 LLTextBox *mSelectedDisplayWeight; 86 87 LLTextBox *mSelectedOnLand; 88 LLTextBox *mRezzedOnLand; 89 LLTextBox *mRemainingCapacity; 90 LLTextBox *mTotalCapacity; 91}; 92 93#endif //LL_LLFLOATEROBJECTWEIGHTS_H