llfloatervoicedevicesettings.h 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /**
  2. * @file llfloatervoicedevicesettings.h
  3. * @author Richard Nelson
  4. * @brief Voice communication set-up wizard
  5. *
  6. * $LicenseInfo:firstyear=2007&license=viewergpl$
  7. *
  8. * Copyright (c) 2007-2009, Linden Research, Inc.
  9. * Copyright (c) 2024 Henri Beauchamp (largely rewritten).
  10. *
  11. * Second Life Viewer Source Code
  12. * The source code in this file ("Source Code") is provided by Linden Lab
  13. * to you under the terms of the GNU General Public License, version 2.0
  14. * ("GPL"), unless you have obtained a separate licensing agreement
  15. * ("Other License"), formally executed by you and Linden Lab. Terms of
  16. * the GPL can be found in doc/GPL-license.txt in this distribution, or
  17. * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  18. *
  19. * There are special exceptions to the terms and conditions of the GPL as
  20. * it is applied to this Source Code. View the full text of the exception
  21. * in the file doc/FLOSS-exception.txt in this software distribution, or
  22. * online at
  23. * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  24. *
  25. * By copying, modifying or distributing this software, you acknowledge
  26. * that you have read and understood your obligations described above,
  27. * and agree to abide by those obligations.
  28. *
  29. * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
  30. * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  31. * COMPLETENESS OR PERFORMANCE.
  32. * $/LicenseInfo$
  33. */
  34. #ifndef LL_LLFLOATERVOICEDEVICESETTINGS_H
  35. #define LL_LLFLOATERVOICEDEVICESETTINGS_H
  36. #include "llfloater.h"
  37. class LLComboBox;
  38. class LLSliderCtrl;
  39. class LLTextBox;
  40. class LLFloaterVoiceDeviceSettings final
  41. : public LLFloater,
  42. public LLFloaterSingleton<LLFloaterVoiceDeviceSettings>
  43. {
  44. friend class LLUISingleton<LLFloaterVoiceDeviceSettings,
  45. VisibilityPolicy<LLFloater> >;
  46. public:
  47. void apply();
  48. void cancel();
  49. // LLFloater override
  50. void refresh() override;
  51. private:
  52. // Open only via LLFloaterSingleton interface, i.e. showInstance() or
  53. // toggleInstance().
  54. LLFloaterVoiceDeviceSettings(const LLSD&);
  55. ~LLFloaterVoiceDeviceSettings() override;
  56. // LLFloater overrides
  57. bool postBuild() override;
  58. void draw() override;
  59. static void onApply(void* datap);
  60. static void onCancel(void* datap);
  61. static void onCommitInputDevice(LLUICtrl* ctrlp, void* datap);
  62. static void onCommitOutputDevice(LLUICtrl* ctrlp, void* datap);
  63. private:
  64. LLComboBox* mCtrlInputDevices;
  65. LLComboBox* mCtrlOutputDevices;
  66. LLSliderCtrl* mCtrlMicVolume;
  67. LLTextBox* mCtrlWaitText;
  68. LLTextBox* mCtrlInputLoadingText;
  69. LLTextBox* mCtrlOutputLoadingText;
  70. std::string mInputDevice;
  71. std::string mOutputDevice;
  72. std::string mDefaultDeviceName;
  73. LLColor4 mSpeakingColor;
  74. LLColor4 mOverdrivenColor;
  75. F32 mMicVolume;
  76. F32 mLastMicTune;
  77. bool mUseWebRTC;
  78. bool mDevicesUpdated;
  79. };
  80. #endif // LL_LLFLOATERVOICEDEVICESETTINGS_H