From 778088b74c19773646a50b5c0aa40015f2b242f3 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Tue, 31 May 2011 22:36:26 +0300 Subject: STORM-1253 WIP Implemented editing region day cycle. --- indra/newview/llregioninfomodel.h | 82 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 indra/newview/llregioninfomodel.h (limited to 'indra/newview/llregioninfomodel.h') diff --git a/indra/newview/llregioninfomodel.h b/indra/newview/llregioninfomodel.h new file mode 100644 index 0000000000..87e1b35ff8 --- /dev/null +++ b/indra/newview/llregioninfomodel.h @@ -0,0 +1,82 @@ +/** + * @file llregioninfomodel.h + * @brief Region info model + * + * $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_LLREGIONINFOMODEL_H +#define LL_LLREGIONINFOMODEL_H + +class LLMessageSystem; + +#include "llsingleton.h" + +/** + * Contains region info, notifies interested parties of its changes. + */ +class LLRegionInfoModel : public LLSingleton +{ + LOG_CLASS(LLRegionInfoModel); + +public: + typedef boost::signals2::signal update_signal_t; + boost::signals2::connection setUpdateCallback(const update_signal_t::slot_type& cb); + + // *TODO: Add getters and make the data private. + U8 mSimAccess; + U8 mAgentLimit; + + U32 mRegionFlags; + U32 mEstateID; + U32 mParentEstateID; + + S32 mPricePerMeter; + S32 mRedirectGridX; + S32 mRedirectGridY; + + F32 mBillableFactor; + F32 mObjectBonusFactor; + F32 mWaterHeight; + F32 mTerrainRaiseLimit; + F32 mTerrainLowerLimit; + F32 mSunHour; + + BOOL mUseEstateSun; + + std::string mSimName; + std::string mSimType; + +protected: + friend class LLSingleton; + friend class LLViewerRegion; + + LLRegionInfoModel(); + void update(LLMessageSystem* msg); + +private: + void reset(); + + update_signal_t mUpdateSignal; +}; + +#endif // LL_LLREGIONINFOMODEL_H -- cgit v1.2.3 From 2fc65cae7b073077c29133dc4cfc438880163746 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Fri, 1 Jul 2011 20:05:49 +0300 Subject: STORM-1464 FIXED Fixed inability to change terrain settings. Reason: The "setregionterrain" message missed estate/region sun info and thus was incomplete. Fix: Added missing fields back. Note: The fields' values are fake. --- indra/newview/llregioninfomodel.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llregioninfomodel.h') diff --git a/indra/newview/llregioninfomodel.h b/indra/newview/llregioninfomodel.h index 87e1b35ff8..7fb911dedd 100644 --- a/indra/newview/llregioninfomodel.h +++ b/indra/newview/llregioninfomodel.h @@ -42,6 +42,8 @@ public: typedef boost::signals2::signal update_signal_t; boost::signals2::connection setUpdateCallback(const update_signal_t::slot_type& cb); + bool getUseFixedSun(); + // *TODO: Add getters and make the data private. U8 mSimAccess; U8 mAgentLimit; -- cgit v1.2.3 From 7aa7ee68387bf9393db023f6961340e8fa247bfb Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Tue, 5 Jul 2011 17:51:22 +0300 Subject: STORM-1330 WIP Switched the Terrain tab of the Region/Estate floater to using the region info model. --- indra/newview/llregioninfomodel.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'indra/newview/llregioninfomodel.h') diff --git a/indra/newview/llregioninfomodel.h b/indra/newview/llregioninfomodel.h index 7fb911dedd..cbb5e5210a 100644 --- a/indra/newview/llregioninfomodel.h +++ b/indra/newview/llregioninfomodel.h @@ -42,7 +42,9 @@ public: typedef boost::signals2::signal update_signal_t; boost::signals2::connection setUpdateCallback(const update_signal_t::slot_type& cb); - bool getUseFixedSun(); + void sendRegionTerrain(const LLUUID& invoice) const; /// upload region terrain data + + bool getUseFixedSun() const; // *TODO: Add getters and make the data private. U8 mSimAccess; @@ -73,11 +75,22 @@ protected: friend class LLViewerRegion; LLRegionInfoModel(); + + /** + * Refresh model with data from the incoming server message. + */ void update(LLMessageSystem* msg); private: void reset(); + // *FIXME: Duplicated code from LLPanelRegionInfo + static void sendEstateOwnerMessage( + LLMessageSystem* msg, + const std::string& request, + const LLUUID& invoice, + const std::vector& strings); + update_signal_t mUpdateSignal; }; -- cgit v1.2.3 From 02c9c49788c6677a4332246a8d748d3e002c712f Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Tue, 5 Jul 2011 22:52:31 +0300 Subject: STORM-1330 WIP Override region sun position when switching the region to fixed sky. --- indra/newview/llregioninfomodel.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/llregioninfomodel.h') diff --git a/indra/newview/llregioninfomodel.h b/indra/newview/llregioninfomodel.h index cbb5e5210a..89efd82767 100644 --- a/indra/newview/llregioninfomodel.h +++ b/indra/newview/llregioninfomodel.h @@ -46,6 +46,8 @@ public: bool getUseFixedSun() const; + void setUseFixedSun(bool fixed); + // *TODO: Add getters and make the data private. U8 mSimAccess; U8 mAgentLimit; @@ -63,7 +65,7 @@ public: F32 mWaterHeight; F32 mTerrainRaiseLimit; F32 mTerrainLowerLimit; - F32 mSunHour; + F32 mSunHour; // 6..30 BOOL mUseEstateSun; -- cgit v1.2.3