PageRenderTime 10ms CodeModel.GetById 1ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/newview/llfloaterbulkpermission.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 103 lines | 49 code | 21 blank | 33 comment | 2 complexity | 999f0765240e61efb8891de91d679c79 MD5 | raw file
  1/** 
  2 * @file llfloaterbulkpermissions.h
  3 * @brief Allow multiple task inventory properties to be set in one go.
  4 * @author Michelle2 Zenovka
  5 *
  6 * $LicenseInfo:firstyear=2008&license=viewerlgpl$
  7 * Second Life Viewer Source Code
  8 * Copyright (C) 2010, Linden Research, Inc.
  9 * 
 10 * This library is free software; you can redistribute it and/or
 11 * modify it under the terms of the GNU Lesser General Public
 12 * License as published by the Free Software Foundation;
 13 * version 2.1 of the License only.
 14 * 
 15 * This library is distributed in the hope that it will be useful,
 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 18 * Lesser General Public License for more details.
 19 * 
 20 * You should have received a copy of the GNU Lesser General Public
 21 * License along with this library; if not, write to the Free Software
 22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 23 * 
 24 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
 25 * $/LicenseInfo$
 26 */
 27
 28#ifndef LL_LLBULKPERMISSION_H
 29#define LL_LLBULKPERMISSION_H
 30
 31#include "lldarray.h"
 32#include "llinventory.h"
 33#include "llviewerobject.h"
 34#include "llvoinventorylistener.h"
 35#include "llmap.h"
 36#include "lluuid.h"
 37
 38#include "llfloater.h"
 39#include "llscrolllistctrl.h"
 40
 41class LLFloaterBulkPermission : public LLFloater, public LLVOInventoryListener
 42{
 43	friend class LLFloaterReg;
 44public:
 45
 46	BOOL postBuild();
 47
 48private:
 49	
 50	LLFloaterBulkPermission(const LLSD& seed);	
 51	virtual ~LLFloaterBulkPermission() {}
 52
 53	BOOL start(); // returns TRUE if the queue has started, otherwise FALSE.
 54	BOOL nextObject();
 55	BOOL popNext();
 56
 57	// This is the callback method for the viewer object currently
 58	// being worked on.
 59	/*virtual*/ void inventoryChanged(LLViewerObject* obj,
 60								 LLInventoryObject::object_list_t* inv,
 61								 S32 serial_num,
 62								 void* queue);
 63	
 64	// This is called by inventoryChanged
 65	void handleInventory(LLViewerObject* viewer_obj,
 66								LLInventoryObject::object_list_t* inv);
 67
 68
 69	void updateInventory(LLViewerObject* object,
 70								LLViewerInventoryItem* item,
 71								U8 key,
 72								bool is_new);
 73
 74	void onCloseBtn();
 75	void onApplyBtn();
 76	void onCommitCopy();
 77	void onCheckAll() { doCheckUncheckAll(TRUE); }
 78	void onUncheckAll() { doCheckUncheckAll(FALSE); }
 79	
 80	// returns true if this is done
 81	BOOL isDone() const { return (mCurrentObjectID.isNull() || (mObjectIDs.count() == 0)); }
 82
 83	//Read the settings and Apply the permissions
 84	void doApply();
 85	void doCheckUncheckAll(BOOL check);
 86
 87private:
 88	// UI
 89	LLScrollListCtrl* mMessages;
 90	LLButton* mCloseBtn;
 91
 92	// Object Queue
 93	LLDynamicArray<LLUUID> mObjectIDs;
 94	LLUUID mCurrentObjectID;
 95	BOOL mDone;
 96
 97	LLUUID mID;
 98
 99	const char* mStartString;
100};
101
102#endif
103