PageRenderTime 86ms CodeModel.GetById 3ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/newview/llpanelsnapshot.h

https://bitbucket.org/lindenlab/viewer-beta/
C Header | 71 lines | 33 code | 9 blank | 29 comment | 0 complexity | 7494b46fc5721f482a4301c142f8dbab MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llpanelsnapshot.h
  3. * @brief Snapshot panel base class
  4. *
  5. * $LicenseInfo:firstyear=2011&license=viewerlgpl$
  6. * Second Life Viewer Source Code
  7. * Copyright (C) 2011, Linden Research, Inc.
  8. *
  9. * This library is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU Lesser General Public
  11. * License as published by the Free Software Foundation;
  12. * version 2.1 of the License only.
  13. *
  14. * This library is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * Lesser General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Lesser General Public
  20. * License along with this library; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  22. *
  23. * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
  24. * $/LicenseInfo$
  25. */
  26. #ifndef LL_LLPANELSNAPSHOT_H
  27. #define LL_LLPANELSNAPSHOT_H
  28. #include "llfloatersnapshot.h"
  29. class LLSideTrayPanelContainer;
  30. /**
  31. * Snapshot panel base class.
  32. */
  33. class LLPanelSnapshot: public LLPanel
  34. {
  35. public:
  36. /*virtual*/ BOOL postBuild();
  37. /*virtual*/ void onOpen(const LLSD& key);
  38. virtual std::string getWidthSpinnerName() const = 0;
  39. virtual std::string getHeightSpinnerName() const = 0;
  40. virtual std::string getAspectRatioCBName() const = 0;
  41. virtual std::string getImageSizeComboName() const = 0;
  42. virtual std::string getImageSizePanelName() const = 0;
  43. virtual S32 getTypedPreviewWidth() const;
  44. virtual S32 getTypedPreviewHeight() const;
  45. virtual LLSpinCtrl* getWidthSpinner();
  46. virtual LLSpinCtrl* getHeightSpinner();
  47. virtual void enableAspectRatioCheckbox(BOOL enable);
  48. virtual LLFloaterSnapshot::ESnapshotFormat getImageFormat() const;
  49. virtual void updateControls(const LLSD& info) = 0; ///< Update controls from saved settings
  50. void enableControls(BOOL enable);
  51. protected:
  52. LLSideTrayPanelContainer* getParentContainer();
  53. virtual void updateCustomResControls();
  54. void updateImageQualityLevel();
  55. void goBack(); ///< Switch to the default (Snapshot Options) panel
  56. void cancel();
  57. // common UI callbacks
  58. void onCustomResolutionCommit();
  59. void onResolutionComboCommit(LLUICtrl* ctrl);
  60. void onKeepAspectRatioCommit(LLUICtrl* ctrl);
  61. };
  62. #endif // LL_LLPANELSNAPSHOT_H