settings_chat.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. This file is part of Telegram Desktop,
  3. the official desktop application for the Telegram messaging service.
  4. For license and copyright information please follow this link:
  5. https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
  6. */
  7. #pragma once
  8. #include "settings/settings_common_session.h"
  9. namespace Window {
  10. class Controller;
  11. } // namespace Window
  12. namespace Settings {
  13. void SetupDataStorage(
  14. not_null<Window::SessionController*> controller,
  15. not_null<Ui::VerticalLayout*> container);
  16. void SetupAutoDownload(
  17. not_null<Window::SessionController*> controller,
  18. not_null<Ui::VerticalLayout*> container);
  19. void SetupDefaultThemes(
  20. not_null<Window::Controller*> window,
  21. not_null<Ui::VerticalLayout*> container);
  22. void SetupSupport(
  23. not_null<Window::SessionController*> controller,
  24. not_null<Ui::VerticalLayout*> container);
  25. void SetupExport(
  26. not_null<Window::SessionController*> controller,
  27. not_null<Ui::VerticalLayout*> container,
  28. Fn<void(Type)> showOther);
  29. void PaintRoundColorButton(
  30. QPainter &p,
  31. int size,
  32. QBrush brush,
  33. float64 selected);
  34. class Chat : public Section<Chat> {
  35. public:
  36. Chat(QWidget *parent, not_null<Window::SessionController*> controller);
  37. [[nodiscard]] rpl::producer<QString> title() override;
  38. void fillTopBarMenu(
  39. const Ui::Menu::MenuCallback &addAction) override;
  40. private:
  41. void setupContent(not_null<Window::SessionController*> controller);
  42. const not_null<Window::SessionController*> _controller;
  43. };
  44. } // namespace Settings