PasswordInputDialog.h 712 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
  3. * Copyright (c) 2022, the SerenityOS developers.
  4. *
  5. * SPDX-License-Identifier: BSD-2-Clause
  6. */
  7. #pragma once
  8. #include <LibGUI/Dialog.h>
  9. namespace GUI {
  10. class PasswordInputDialog : public Dialog {
  11. C_OBJECT(PasswordInputDialog);
  12. public:
  13. ErrorOr<NonnullRefPtr<GUI::Widget>> try_create();
  14. virtual ~PasswordInputDialog() override = default;
  15. static ExecResult show(Window* parent_window, ByteString& text_value, ByteString title, ByteString server, ByteString username);
  16. private:
  17. explicit PasswordInputDialog(Window* parent_window, ByteString title, ByteString server, ByteString username);
  18. ByteString m_password;
  19. };
  20. }