tdesktop/Telegram/SourceFiles/settings/settings_main.h

54 lines
1.1 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.h"
2018-09-05 19:39:35 +00:00
namespace Window {
class Controller;
} // 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<Ui::VerticalLayout*> container,
bool icon = true);
2018-09-11 18:07:04 +00:00
bool HasInterfaceScale();
void SetupInterfaceScale(
not_null<Ui::VerticalLayout*> container,
bool icon = true);
void SetupFaq(
not_null<Ui::VerticalLayout*> container,
bool icon = true);
2018-09-05 19:05:49 +00:00
class Main : public Section {
public:
2018-09-05 19:39:35 +00:00
Main(
QWidget *parent,
not_null<Window::Controller*> controller,
not_null<UserData*> self);
2018-09-05 19:05:49 +00:00
rpl::producer<Type> sectionShowOther() override;
2018-09-06 13:48:01 +00:00
protected:
void keyPressEvent(QKeyEvent *e) override;
2018-09-05 19:05:49 +00:00
private:
2018-09-05 19:39:35 +00:00
void setupContent(not_null<Window::Controller*> controller);
2018-09-05 19:05:49 +00:00
not_null<UserData*> _self;
rpl::event_stream<Type> _showOther;
};
} // namespace Settings