PageRenderTime 8ms CodeModel.GetById 1ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/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
27#ifndef LLFLOATERLAGMETER_H
28#define LLFLOATERLAGMETER_H
29
30#include "llfloater.h"
31
32class LLTextBox;
33
34class LLFloaterLagMeter : public LLFloater
35{
36	friend class LLFloaterReg;
37	
38public:
39	/*virtual*/ void draw();
40	/*virtual*/ BOOL postBuild();	
41private:
42	
43	LLFloaterLagMeter(const LLSD& key);
44	/*virtual*/ ~LLFloaterLagMeter();
45	void determineClient();
46	void determineNetwork();
47	void determineServer();
48	void updateControls(bool shrink);
49	BOOL isShrunk();
50
51	void onClickShrink();
52
53	bool mShrunk;
54	S32 mMaxWidth, mMinWidth;
55
56	F32 mClientFrameTimeCritical;
57	F32 mClientFrameTimeWarning;
58	LLButton * mClientButton;
59	LLTextBox * mClientText;
60	LLTextBox * mClientCause;
61
62	F32 mNetworkPacketLossCritical;
63	F32 mNetworkPacketLossWarning;
64	F32 mNetworkPingCritical;
65	F32 mNetworkPingWarning;
66	LLButton * mNetworkButton;
67	LLTextBox * mNetworkText;
68	LLTextBox * mNetworkCause;
69
70	F32 mServerFrameTimeCritical;
71	F32 mServerFrameTimeWarning;
72	F32 mServerSingleProcessMaxTime;
73	LLButton * mServerButton;
74	LLTextBox * mServerText;
75	LLTextBox * mServerCause;
76
77	LLStringUtil::format_map_t mStringArgs;
78};
79
80#endif