diff options
author | Mark Palange <palange@lindenlab.com> | 2009-07-16 17:54:58 +0000 |
---|---|---|
committer | Mark Palange <palange@lindenlab.com> | 2009-07-16 17:54:58 +0000 |
commit | 0274c1f2b16e571a0cc6295d1f3073b136210a7c (patch) | |
tree | 4396f7f721befba4f907c0871067e3da1cdf0494 /indra/llui | |
parent | 09d9b0556e8cf6c0a716e5b2c78b265799486331 (diff) |
Merged work for DEV-2066 (and formerly QAR-1538) in Viewer 2.
merged all changes, post copy, from the following branches:
linden/brachnes/enable-o-v
user/cg/qar-1538
user/mani/viewer2-enable-o-v
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llmultisliderctrl.h | 8 | ||||
-rw-r--r-- | indra/llui/llpanel.cpp | 18 | ||||
-rw-r--r-- | indra/llui/llpanel.h | 4 | ||||
-rw-r--r-- | indra/llui/llslider.h | 3 | ||||
-rw-r--r-- | indra/llui/llsliderctrl.h | 7 | ||||
-rw-r--r-- | indra/llui/lluictrl.cpp | 8 | ||||
-rw-r--r-- | indra/llui/lluictrl.h | 2 |
7 files changed, 12 insertions, 38 deletions
diff --git a/indra/llui/llmultisliderctrl.h b/indra/llui/llmultisliderctrl.h index 4855ed4926..16d07541f2 100644 --- a/indra/llui/llmultisliderctrl.h +++ b/indra/llui/llmultisliderctrl.h @@ -90,8 +90,8 @@ public: void setCurSlider(const std::string& name); void setCurSliderValue(F32 val, BOOL from_event = false) { setSliderValue(mMultiSlider->getCurSlider(), val, from_event); } - virtual void setMinValue(LLSD min_value) { setMinValue((F32)min_value.asReal()); } - virtual void setMaxValue(LLSD max_value) { setMaxValue((F32)max_value.asReal()); } + virtual void setMinValue(const LLSD& min_value) { setMinValue((F32)min_value.asReal()); } + virtual void setMaxValue(const LLSD& max_value) { setMaxValue((F32)max_value.asReal()); } BOOL isMouseHeldDown(); @@ -108,8 +108,8 @@ public: void deleteSlider(const std::string& name); void deleteCurSlider() { deleteSlider(mMultiSlider->getCurSlider()); } - F32 getMinValue() { return mMultiSlider->getMinValue(); } - F32 getMaxValue() { return mMultiSlider->getMaxValue(); } + F32 getMinValue() const { return mMultiSlider->getMinValue(); } + F32 getMaxValue() const { return mMultiSlider->getMaxValue(); } void setLabel(const std::string& label) { if (mLabelBox) mLabelBox->setText(label); } void setLabelColor(const LLColor4& c) { mTextEnabledColor = c; } diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index b18a750178..116096b7b3 100644 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -799,24 +799,6 @@ BOOL LLPanel::childSetToolTipArg(const std::string& id, const std::string& key, return FALSE; } -void LLPanel::childSetMinValue(const std::string& id, LLSD min_value) -{ - LLUICtrl* child = findChild<LLUICtrl>(id); - if (child) - { - child->setMinValue(min_value); - } -} - -void LLPanel::childSetMaxValue(const std::string& id, LLSD max_value) -{ - LLUICtrl* child = findChild<LLUICtrl>(id); - if (child) - { - child->setMaxValue(max_value); - } -} - void LLPanel::childShowTab(const std::string& id, const std::string& tabname, bool visible) { LLTabContainer* child = findChild<LLTabContainer>(id); diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h index ca3b2e7e23..381cba2db3 100644 --- a/indra/llui/llpanel.h +++ b/indra/llui/llpanel.h @@ -215,10 +215,6 @@ public: BOOL childSetLabelArg(const std::string& id, const std::string& key, const LLStringExplicit& text); BOOL childSetToolTipArg(const std::string& id, const std::string& key, const LLStringExplicit& text); - // LLSlider / LLMultiSlider / LLSpinCtrl - void childSetMinValue(const std::string& id, LLSD min_value); - void childSetMaxValue(const std::string& id, LLSD max_value); - // LLTabContainer void childShowTab(const std::string& id, const std::string& tabname, bool visible = true); LLPanel *childGetVisibleTab(const std::string& id) const; diff --git a/indra/llui/llslider.h b/indra/llui/llslider.h index 50ed212656..088fd20d94 100644 --- a/indra/llui/llslider.h +++ b/indra/llui/llslider.h @@ -62,6 +62,9 @@ public: void setValue( F32 value, BOOL from_event = FALSE ); // overrides for LLF32UICtrl methods virtual void setValue(const LLSD& value ) { setValue((F32)value.asReal(), TRUE); } + + virtual void setMinValue(const LLSD& min_value) { setMinValue((F32)min_value.asReal()); } + virtual void setMaxValue(const LLSD& max_value) { setMaxValue((F32)max_value.asReal()); } virtual void setMinValue(F32 min_value) { LLF32UICtrl::setMinValue(min_value); updateThumbRect(); } virtual void setMaxValue(F32 max_value) { LLF32UICtrl::setMaxValue(max_value); updateThumbRect(); } diff --git a/indra/llui/llsliderctrl.h b/indra/llui/llsliderctrl.h index 5bdbbfcbcc..4a1574d502 100644 --- a/indra/llui/llsliderctrl.h +++ b/indra/llui/llsliderctrl.h @@ -100,12 +100,15 @@ public: /*virtual*/ void setEnabled( BOOL b ); /*virtual*/ void clear(); + + /*virtual*/ void setMinValue(const LLSD& min_value) { setMinValue((F32)min_value.asReal()); } + /*virtual*/ void setMaxValue(const LLSD& max_value) { setMaxValue((F32)max_value.asReal()); } /*virtual*/ void setMinValue(F32 min_value) { mSlider->setMinValue(min_value); updateText(); } /*virtual*/ void setMaxValue(F32 max_value) { mSlider->setMaxValue(max_value); updateText(); } /*virtual*/ void setIncrement(F32 increment) { mSlider->setIncrement(increment);} - F32 getMinValue() { return mSlider->getMinValue(); } - F32 getMaxValue() { return mSlider->getMaxValue(); } + F32 getMinValue() const { return mSlider->getMinValue(); } + F32 getMaxValue() const { return mSlider->getMaxValue(); } void setLabel(const LLStringExplicit& label) { if (mLabelBox) mLabelBox->setText(label); } void setLabelColor(const LLColor4& c) { mTextEnabledColor = c; } diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp index 2a6dd97f31..ebf594ff66 100644 --- a/indra/llui/lluictrl.cpp +++ b/indra/llui/lluictrl.cpp @@ -851,14 +851,6 @@ BOOL LLUICtrl::getTentative() const void LLUICtrl::setColor(const LLColor4& color) { } -// virtual -void LLUICtrl::setMinValue(LLSD min_value) -{ } - -// virtual -void LLUICtrl::setMaxValue(LLSD max_value) -{ } - namespace LLInitParam diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h index ff37efb5f7..16fbbf79ea 100644 --- a/indra/llui/lluictrl.h +++ b/indra/llui/lluictrl.h @@ -232,8 +232,6 @@ public: virtual void onTabInto(); virtual void clear(); virtual void setColor(const LLColor4& color); - virtual void setMinValue(LLSD min_value); - virtual void setMaxValue(LLSD max_value); BOOL focusNextItem(BOOL text_entry_only); BOOL focusPrevItem(BOOL text_entry_only); |