tdesktop/Telegram/SourceFiles/settings/settings_common.h
2018-09-19 19:22:12 +03:00

51 lines
923 B
C++

/*
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"
namespace Window {
class Controller;
} // namespace Window
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,
not_null<Window::Controller*> controller,
UserData *self = nullptr);
} // namespace Settings