PageRenderTime 42ms CodeModel.GetById 14ms RepoModel.GetById 0ms 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
Possible License(s): LGPL-2.1
  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. #ifndef LL_LLBULKPERMISSION_H
  28. #define LL_LLBULKPERMISSION_H
  29. #include "lldarray.h"
  30. #include "llinventory.h"
  31. #include "llviewerobject.h"
  32. #include "llvoinventorylistener.h"
  33. #include "llmap.h"
  34. #include "lluuid.h"
  35. #include "llfloater.h"
  36. #include "llscrolllistctrl.h"
  37. class LLFloaterBulkPermission : public LLFloater, public LLVOInventoryListener
  38. {
  39. friend class LLFloaterReg;
  40. public:
  41. BOOL postBuild();
  42. private:
  43. LLFloaterBulkPermission(const LLSD& seed);
  44. virtual ~LLFloaterBulkPermission() {}
  45. BOOL start(); // returns TRUE if the queue has started, otherwise FALSE.
  46. BOOL nextObject();
  47. BOOL popNext();
  48. // This is the callback method for the viewer object currently
  49. // being worked on.
  50. /*virtual*/ void inventoryChanged(LLViewerObject* obj,
  51. LLInventoryObject::object_list_t* inv,
  52. S32 serial_num,
  53. void* queue);
  54. // This is called by inventoryChanged
  55. void handleInventory(LLViewerObject* viewer_obj,
  56. LLInventoryObject::object_list_t* inv);
  57. void updateInventory(LLViewerObject* object,
  58. LLViewerInventoryItem* item,
  59. U8 key,
  60. bool is_new);
  61. void onCloseBtn();
  62. void onApplyBtn();
  63. void onCommitCopy();
  64. void onCheckAll() { doCheckUncheckAll(TRUE); }
  65. void onUncheckAll() { doCheckUncheckAll(FALSE); }
  66. // returns true if this is done
  67. BOOL isDone() const { return (mCurrentObjectID.isNull() || (mObjectIDs.count() == 0)); }
  68. //Read the settings and Apply the permissions
  69. void doApply();
  70. void doCheckUncheckAll(BOOL check);
  71. private:
  72. // UI
  73. LLScrollListCtrl* mMessages;
  74. LLButton* mCloseBtn;
  75. // Object Queue
  76. LLDynamicArray<LLUUID> mObjectIDs;
  77. LLUUID mCurrentObjectID;
  78. BOOL mDone;
  79. LLUUID mID;
  80. const char* mStartString;
  81. };
  82. #endif