PageRenderTime 137ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/newview/llfloatertranslationsettings.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 76 lines | 41 code | 10 blank | 25 comment | 0 complexity | 06d86308485671803156b70ff1b1adf3 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llfloatertranslationsettings.h
  3. * @brief Machine translation settings for chat
  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_LLFLOATERTRANSLATIONSETTINGS_H
  27. #define LL_LLFLOATERTRANSLATIONSETTINGS_H
  28. #include "llfloater.h"
  29. class LLButton;
  30. class LLCheckBoxCtrl;
  31. class LLComboBox;
  32. class LLLineEditor;
  33. class LLRadioGroup;
  34. class LLFloaterTranslationSettings : public LLFloater
  35. {
  36. public:
  37. LLFloaterTranslationSettings(const LLSD& key);
  38. /*virtual*/ BOOL postBuild();
  39. /*virtual*/ void onOpen(const LLSD& key);
  40. void setBingVerified(bool ok, bool alert);
  41. void setGoogleVerified(bool ok, bool alert);
  42. private:
  43. std::string getSelectedService() const;
  44. std::string getEnteredBingKey() const;
  45. std::string getEnteredGoogleKey() const;
  46. void showAlert(const std::string& msg_name) const;
  47. void updateControlsEnabledState();
  48. void verifyKey(int service, const std::string& key, bool alert = true);
  49. void onEditorFocused(LLFocusableElement* control);
  50. void onBingKeyEdited();
  51. void onGoogleKeyEdited();
  52. void onBtnBingVerify();
  53. void onBtnGoogleVerify();
  54. void onBtnOK();
  55. LLCheckBoxCtrl* mMachineTranslationCB;
  56. LLComboBox* mLanguageCombo;
  57. LLLineEditor* mBingAPIKeyEditor;
  58. LLLineEditor* mGoogleAPIKeyEditor;
  59. LLRadioGroup* mTranslationServiceRadioGroup;
  60. LLButton* mBingVerifyBtn;
  61. LLButton* mGoogleVerifyBtn;
  62. LLButton* mOKBtn;
  63. bool mBingKeyVerified;
  64. bool mGoogleKeyVerified;
  65. };
  66. #endif // LL_LLFLOATERTRANSLATIONSETTINGS_H