2018-09-05 22:05:49 +03:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
|
|
|
the official desktop application for the Telegram messaging service.
|
|
|
|
|
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
2023-11-15 00:54:32 +03:00
|
|
|
#include "settings/settings_common_session.h"
|
2018-09-05 22:05:49 +03:00
|
|
|
|
2018-09-05 22:39:35 +03:00
|
|
|
namespace Window {
|
2021-06-13 10:37:52 +03:00
|
|
|
class Controller;
|
2019-06-06 13:21:40 +03:00
|
|
|
class SessionController;
|
2018-09-05 22:39:35 +03:00
|
|
|
} // namespace Window
|
|
|
|
|
2018-09-06 00:01:50 +03:00
|
|
|
namespace Ui {
|
|
|
|
class VerticalLayout;
|
|
|
|
} // namespace Ui
|
|
|
|
|
2018-09-05 22:05:49 +03:00
|
|
|
namespace Settings {
|
|
|
|
|
2018-09-17 13:52:34 +03:00
|
|
|
void SetupLanguageButton(
|
2023-01-30 18:01:10 +04:00
|
|
|
not_null<Window::Controller*> window,
|
2023-11-04 13:41:50 +03:00
|
|
|
not_null<Ui::VerticalLayout*> container);
|
2018-09-11 21:07:04 +03:00
|
|
|
bool HasInterfaceScale();
|
|
|
|
void SetupInterfaceScale(
|
2021-06-13 10:37:52 +03:00
|
|
|
not_null<Window::Controller*> window,
|
2018-09-11 21:07:04 +03:00
|
|
|
not_null<Ui::VerticalLayout*> container,
|
|
|
|
bool icon = true);
|
|
|
|
|
2024-04-04 21:08:56 +04:00
|
|
|
void OpenFaq(base::weak_ptr<Window::SessionController> weak);
|
|
|
|
|
2022-04-01 15:53:23 +04:00
|
|
|
class Main : public Section<Main> {
|
2018-09-05 22:05:49 +03:00
|
|
|
public:
|
2019-07-24 16:00:30 +02:00
|
|
|
Main(QWidget *parent, not_null<Window::SessionController*> controller);
|
2018-09-05 22:05:49 +03:00
|
|
|
|
2022-04-13 12:05:10 +04:00
|
|
|
[[nodiscard]] rpl::producer<QString> title() override;
|
2022-04-01 15:53:23 +04:00
|
|
|
|
2024-03-01 22:18:01 +04:00
|
|
|
void fillTopBarMenu(
|
2024-02-28 14:55:28 +04:00
|
|
|
const Ui::Menu::MenuCallback &addAction) override;
|
2018-09-05 22:05:49 +03:00
|
|
|
|
2018-09-06 16:48:01 +03:00
|
|
|
protected:
|
|
|
|
void keyPressEvent(QKeyEvent *e) override;
|
|
|
|
|
2018-09-05 22:05:49 +03:00
|
|
|
private:
|
2019-06-06 13:21:40 +03:00
|
|
|
void setupContent(not_null<Window::SessionController*> controller);
|
2018-09-05 22:05:49 +03:00
|
|
|
|
2019-07-24 16:00:30 +02:00
|
|
|
const not_null<Window::SessionController*> _controller;
|
2018-09-05 22:05:49 +03:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Settings
|