tdesktop/Telegram/SourceFiles/settings/settings_common.h

52 lines
923 B
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 "ui/rp_widget.h"
2018-09-05 19:39:35 +00:00
namespace Window {
class Controller;
} // namespace Window
2018-09-05 19:05:49 +00:00
namespace Info {
namespace Profile {
class Button;
} // namespace Profile
} // namespace Info
namespace Settings {
enum class Type {
Main,
Information,
Notifications,
PrivacySecurity,
General,
Chat,
};
using Button = Info::Profile::Button;
class Section : public Ui::RpWidget {
public:
using RpWidget::RpWidget;
virtual rpl::producer<Type> sectionShowOther() {
return rpl::never<Type>();
}
};
object_ptr<Section> CreateSection(
Type type,
not_null<QWidget*> parent,
2018-09-05 19:39:35 +00:00
not_null<Window::Controller*> controller,
2018-09-05 19:05:49 +00:00
UserData *self = nullptr);
} // namespace Settings