tdesktop/Telegram/SourceFiles/settings/settings_main.h

54 lines
1.2 KiB
C
Raw Normal View History

2018-09-05 19:05:49 +00: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
#include "settings/settings_common_session.h"
2018-09-05 19:05:49 +00:00
2018-09-05 19:39:35 +00:00
namespace Window {
class Controller;
class SessionController;
2018-09-05 19:39:35 +00:00
} // namespace Window
2018-09-05 21:01:50 +00:00
namespace Ui {
class VerticalLayout;
} // namespace Ui
2018-09-05 19:05:49 +00:00
namespace Settings {
2018-09-17 10:52:34 +00:00
void SetupLanguageButton(
not_null<Window::Controller*> window,
not_null<Ui::VerticalLayout*> container);
2018-09-11 18:07:04 +00:00
bool HasInterfaceScale();
void SetupInterfaceScale(
not_null<Window::Controller*> window,
2018-09-11 18:07:04 +00:00
not_null<Ui::VerticalLayout*> container,
bool icon = true);
2024-04-04 17:08:56 +00:00
void OpenFaq(base::weak_ptr<Window::SessionController> weak);
class Main : public Section<Main> {
2018-09-05 19:05:49 +00:00
public:
2019-07-24 14:00:30 +00:00
Main(QWidget *parent, not_null<Window::SessionController*> controller);
2018-09-05 19:05:49 +00:00
[[nodiscard]] rpl::producer<QString> title() override;
2024-03-01 18:18:01 +00:00
void fillTopBarMenu(
2024-02-28 10:55:28 +00:00
const Ui::Menu::MenuCallback &addAction) override;
2018-09-05 19:05:49 +00:00
2018-09-06 13:48:01 +00:00
protected:
void keyPressEvent(QKeyEvent *e) override;
2018-09-05 19:05:49 +00:00
private:
void setupContent(not_null<Window::SessionController*> controller);
2018-09-05 19:05:49 +00:00
2019-07-24 14:00:30 +00:00
const not_null<Window::SessionController*> _controller;
2018-09-05 19:05:49 +00:00
};
} // namespace Settings