diff options
Diffstat (limited to 'indra/newview/llpanelenvironment.h')
-rw-r--r-- | indra/newview/llpanelenvironment.h | 97 |
1 files changed, 74 insertions, 23 deletions
diff --git a/indra/newview/llpanelenvironment.h b/indra/newview/llpanelenvironment.h index 7cc7ddae6f..44e3c11a82 100644 --- a/indra/newview/llpanelenvironment.h +++ b/indra/newview/llpanelenvironment.h @@ -32,52 +32,103 @@ #include "llcheckboxctrl.h" #include "llsliderctrl.h" #include "llsettingsdaycycle.h" +#include "llenvironment.h" +#include "llparcel.h" +#include "llsettingspicker.h" +#include "llfloatereditextdaycycle.h" class LLViewerRegion; class LLPanelEnvironmentInfo : public LLPanel { public: - LLPanelEnvironmentInfo(); + LLPanelEnvironmentInfo(); // LLPanel - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); + virtual BOOL postBuild() override; + virtual void onOpen(const LLSD& key) override; // LLView - /*virtual*/ void onVisibilityChange(BOOL new_visibility); + virtual void onVisibilityChange(BOOL new_visibility) override; + virtual void refresh() override; - virtual void refresh(); + S32 getCurrentParcelId() const { return mCurrentParcelId; } + void setCurrentParcelId(S32 parcel_id) { mCurrentParcelId = parcel_id; } + + virtual bool isRegion() const = 0; + virtual LLParcel * getParcel() = 0; + virtual bool canEdit() = 0; protected: LOG_CLASS(LLPanelEnvironmentInfo); - void setControlsEnabled(bool enabled); - void setApplyProgress(bool started); - void setDirty(bool dirty); + static const std::string RDG_ENVIRONMENT_SELECT; + static const std::string RDO_USEDEFAULT; + static const std::string RDO_USEINV; + static const std::string RDO_USECUSTOM; + static const std::string EDT_INVNAME; + static const std::string BTN_SELECTINV; + static const std::string BTN_EDIT; + static const std::string SLD_DAYLENGTH; + static const std::string SLD_DAYOFFSET; + static const std::string CHK_ALLOWOVERRIDE; + static const std::string BTN_APPLY; + static const std::string BTN_CANCEL; + static const std::string LBL_TIMEOFDAY; + + + static const std::string STR_LABEL_USEDEFAULT; + static const std::string STR_LABEL_USEREGION; + static const std::string STR_LABEL_UNKNOWNINV; + + static const U32 DIRTY_FLAG_DAYCYCLE; + static const U32 DIRTY_FLAG_DAYLENGTH; + static const U32 DIRTY_FLAG_DAYOFFSET; + + static const U32 DIRTY_FLAG_MASK; + + void setControlsEnabled(bool enabled); + void setApplyProgress(bool started); + void setDirtyFlag(U32 flag); + void clearDirtyFlag(U32 flag); + bool getIsDirty() const { return (mDirtyFlag != 0); } + bool getIsDirtyFlag(U32 flag) const { return ((mDirtyFlag & flag) != 0); } + U32 getDirtyFlag() const { return mDirtyFlag; } + + void onSwitchDefaultSelection(); + void onSldDayLengthChanged(F32 value); + void onSldDayOffsetChanged(F32 value); + void onBtnApply(); + void onBtnReset(); + void onBtnEdit(); + void onBtnSelect(); + + virtual void doApply(); + + void udpateApparentTimeOfDay(); - void onSwitchDefaultSelection(); + void onPickerCommited(LLUUID asset_id); + void onEditCommited(LLSettingsDay::ptr_t newday); + void onPickerAssetDownloaded(LLSettingsBase::ptr_t settings); + void onEnvironmentReceived(S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo); - void onBtnApply(); - void onBtnCancel(); - void onBtnEdit(); + void refreshFromSource(); - void onEditiCommited(LLSettingsDay::ptr_t newday); + std::string getInventoryNameForAssetId(LLUUID asset_id); - virtual void doApply() = 0; - virtual void doEditCommited(LLSettingsDay::ptr_t &newday); + LLFloaterSettingsPicker * getSettingsPicker(); + LLFloaterEditExtDayCycle * getEditFloater(); - /// New environment settings that are being applied to the region. - // LLEnvironmentSettings mNewRegionSettings; + LLEnvironment::EnvironmentInfo::ptr_t mCurrentEnvironment; + S32 mCurrentParcelId; - bool mEnableEditing; - LLRadioGroup* mRegionSettingsRadioGroup; - LLSliderCtrl* mDayLengthSlider; - LLSliderCtrl* mDayOffsetSlider; - LLCheckBoxCtrl* mAllowOverRide; +private: + static void onIdlePlay(void *); - LLSettingsDay::ptr_t mEditingDayCycle; + LLHandle<LLFloater> mSettingsFloater; + LLHandle<LLFloater> mEditFloater; + S32 mDirtyFlag; }; #endif // LL_LLPANELEXPERIENCES_H |