diff options
author | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-11-09 15:54:54 +0200 |
---|---|---|
committer | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-11-09 15:54:54 +0200 |
commit | 148a29ea1ec97922180ca8f0f6ced9a4a9e05c07 (patch) | |
tree | dbcf59a374e64849ca615f52ba19334e086fa40d /indra/newview/llpanelclassified.h | |
parent | cd328841106734938dd747e9a7fd2575cd6c1b85 (diff) |
Implemented major task EXT-2251 - Implement panels for creating, editing and viewing Classifieds.
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llpanelclassified.h')
-rw-r--r-- | indra/newview/llpanelclassified.h | 126 |
1 files changed, 126 insertions, 0 deletions
diff --git a/indra/newview/llpanelclassified.h b/indra/newview/llpanelclassified.h index 417eddf460..eccc83cf53 100644 --- a/indra/newview/llpanelclassified.h +++ b/indra/newview/llpanelclassified.h @@ -198,5 +198,131 @@ private: void* mUserData; }; +#include "llavatarpropertiesprocessor.h" + +class LLPanelClassifiedInfo : public LLPanel, public LLAvatarPropertiesObserver +{ +public: + + static LLPanelClassifiedInfo* create(); + + virtual ~LLPanelClassifiedInfo(); + + virtual void setExitCallback(const commit_callback_t& cb); + + /*virtual*/ void onOpen(const LLSD& key); + + /*virtual*/ BOOL postBuild(); + + /*virtual*/ void processProperties(void* data, EAvatarProcessorType type); + + virtual void setAvatarId(const LLUUID& avatar_id) { mAvatarId = avatar_id; } + + LLUUID& getAvatarId() { return mAvatarId; } + + virtual void setSnapshotId(const LLUUID& id); + + virtual LLUUID getSnapshotId(); + + virtual void setClassifiedId(const LLUUID& id) { mClassifiedId = id; } + + virtual LLUUID& getClassifiedId() { return mClassifiedId; } + + virtual void setClassifiedName(const std::string& name); + + virtual std::string getClassifiedName(); + + virtual void setDescription(const std::string& desc); + + virtual std::string getDescription(); + + virtual void setClassifiedLocation(const std::string& location); + + virtual void setPosGlobal(const LLVector3d& pos) { mPosGlobal = pos; } + + virtual LLVector3d& getPosGlobal() { return mPosGlobal; } + +protected: + + LLPanelClassifiedInfo(); + + virtual void resetData(); + + virtual void resetControls(); + + static std::string createLocationText( + const std::string& original_name, + const std::string& sim_name, + const LLVector3d& pos_global); + + void onClickMap(); + void onClickTeleport(); + void onClickBack(); + void onExit(); + +private: + + LLUUID mAvatarId; + LLUUID mClassifiedId; + LLVector3d mPosGlobal; +}; + +class LLPanelClassifiedEdit : public LLPanelClassifiedInfo +{ +public: + + static LLPanelClassifiedEdit* create(); + + virtual ~LLPanelClassifiedEdit(); + + BOOL postBuild(); + + void onOpen(const LLSD& key); + + void processProperties(void* data, EAvatarProcessorType type); + + BOOL isDirty() const; + + void resetDirty(); + + void setSaveCallback(const commit_callback_t& cb); + + void setCancelCallback(const commit_callback_t& cb); + + void resetControls(); + + virtual bool isNewClassified() { return mNewClassified; } + +protected: + + LLPanelClassifiedEdit(); + + void sendUpdate(); + + U32 getCategory(); + + void enableSaveButton(bool enable); + + std::string makeClassifiedName(); + + void setParcelId(const LLUUID& id) { mParcelId = id; } + + LLUUID getParcelId() { return mParcelId; } + + S32 getPriceForListing(); + + U8 getClassifiedFlags(); + + void onClickSetLocation(); + void onSnapshotChanged(LLUICtrl* ctrl); + void onClassifiedChanged(); + void onClickSave(); + +private: + LLTextureCtrl* mSnapshotCtrl; + + LLUUID mParcelId; + bool mNewClassified; +}; #endif // LL_LLPANELCLASSIFIED_H |