/indra/newview/llfloaterobjectweights.h

https://bitbucket.org/lindenlab/viewer-beta/ · C++ Header · 93 lines · 42 code · 20 blank · 31 comment · 0 complexity · 9b8c72ed3933610f0bf2e8f44116c3ce MD5 · raw file

  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. #ifndef LL_LLFLOATEROBJECTWEIGHTS_H
  27. #define LL_LLFLOATEROBJECTWEIGHTS_H
  28. #include "llfloater.h"
  29. #include "llaccountingcostmanager.h"
  30. #include "llselectmgr.h"
  31. class LLParcel;
  32. class LLTextBox;
  33. /**
  34. * struct LLCrossParcelFunctor
  35. *
  36. * A functor that checks whether a bounding box for all
  37. * selected objects crosses a region or parcel bounds.
  38. */
  39. struct LLCrossParcelFunctor : public LLSelectedObjectFunctor
  40. {
  41. /*virtual*/ bool apply(LLViewerObject* obj);
  42. private:
  43. LLBBox mBoundingBox;
  44. };
  45. class LLFloaterObjectWeights : public LLFloater, LLAccountingCostObserver
  46. {
  47. public:
  48. LOG_CLASS(LLFloaterObjectWeights);
  49. LLFloaterObjectWeights(const LLSD& key);
  50. ~LLFloaterObjectWeights();
  51. /*virtual*/ BOOL postBuild();
  52. /*virtual*/ void onOpen(const LLSD& key);
  53. /*virtual*/ void onWeightsUpdate(const SelectionCost& selection_cost);
  54. /*virtual*/ void setErrorStatus(U32 status, const std::string& reason);
  55. void updateLandImpacts(const LLParcel* parcel);
  56. void refresh();
  57. private:
  58. /*virtual*/ void generateTransactionID();
  59. void toggleWeightsLoadingIndicators(bool visible);
  60. void toggleLandImpactsLoadingIndicators(bool visible);
  61. void updateIfNothingSelected();
  62. LLTextBox *mSelectedObjects;
  63. LLTextBox *mSelectedPrims;
  64. LLTextBox *mSelectedDownloadWeight;
  65. LLTextBox *mSelectedPhysicsWeight;
  66. LLTextBox *mSelectedServerWeight;
  67. LLTextBox *mSelectedDisplayWeight;
  68. LLTextBox *mSelectedOnLand;
  69. LLTextBox *mRezzedOnLand;
  70. LLTextBox *mRemainingCapacity;
  71. LLTextBox *mTotalCapacity;
  72. };
  73. #endif //LL_LLFLOATEROBJECTWEIGHTS_H