/indra/newview/llfloaterlagmeter.h

https://bitbucket.org/lindenlab/viewer-beta/ · C++ Header · 80 lines · 42 code · 13 blank · 25 comment · 0 complexity · 096fd16dc7fc2c67107f90a44d5d2a73 MD5 · raw file

  1. /**
  2. * @file llfloaterlagmeter.h
  3. * @brief The "Lag-o-Meter" floater used to tell users what is causing lag.
  4. *
  5. * $LicenseInfo:firstyear=2007&license=viewerlgpl$
  6. * Second Life Viewer Source Code
  7. * Copyright (C) 2010, 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 LLFLOATERLAGMETER_H
  27. #define LLFLOATERLAGMETER_H
  28. #include "llfloater.h"
  29. class LLTextBox;
  30. class LLFloaterLagMeter : public LLFloater
  31. {
  32. friend class LLFloaterReg;
  33. public:
  34. /*virtual*/ void draw();
  35. /*virtual*/ BOOL postBuild();
  36. private:
  37. LLFloaterLagMeter(const LLSD& key);
  38. /*virtual*/ ~LLFloaterLagMeter();
  39. void determineClient();
  40. void determineNetwork();
  41. void determineServer();
  42. void updateControls(bool shrink);
  43. BOOL isShrunk();
  44. void onClickShrink();
  45. bool mShrunk;
  46. S32 mMaxWidth, mMinWidth;
  47. F32 mClientFrameTimeCritical;
  48. F32 mClientFrameTimeWarning;
  49. LLButton * mClientButton;
  50. LLTextBox * mClientText;
  51. LLTextBox * mClientCause;
  52. F32 mNetworkPacketLossCritical;
  53. F32 mNetworkPacketLossWarning;
  54. F32 mNetworkPingCritical;
  55. F32 mNetworkPingWarning;
  56. LLButton * mNetworkButton;
  57. LLTextBox * mNetworkText;
  58. LLTextBox * mNetworkCause;
  59. F32 mServerFrameTimeCritical;
  60. F32 mServerFrameTimeWarning;
  61. F32 mServerSingleProcessMaxTime;
  62. LLButton * mServerButton;
  63. LLTextBox * mServerText;
  64. LLTextBox * mServerCause;
  65. LLStringUtil::format_map_t mStringArgs;
  66. };
  67. #endif