2016-08-19 17:26:31 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
2018-01-03 10:23:14 +00:00
|
|
|
the official desktop application for the Telegram messaging service.
|
2016-08-19 17:26:31 +00:00
|
|
|
|
2018-01-03 10:23:14 +00:00
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
2016-08-19 17:26:31 +00:00
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "settings/settings_block_widget.h"
|
|
|
|
|
|
|
|
namespace Settings {
|
|
|
|
|
|
|
|
class NotificationsWidget : public BlockWidget {
|
2016-08-22 17:16:21 +00:00
|
|
|
Q_OBJECT
|
|
|
|
|
2016-08-19 17:26:31 +00:00
|
|
|
public:
|
|
|
|
NotificationsWidget(QWidget *parent, UserData *self);
|
|
|
|
|
2016-08-22 17:16:21 +00:00
|
|
|
private slots:
|
|
|
|
void onDesktopNotifications();
|
|
|
|
void onShowSenderName();
|
|
|
|
void onShowMessagePreview();
|
2016-10-03 15:07:50 +00:00
|
|
|
void onNativeNotifications();
|
2016-08-22 17:16:21 +00:00
|
|
|
void onPlaySound();
|
|
|
|
void onIncludeMuted();
|
2016-10-05 18:37:48 +00:00
|
|
|
void onAdvanced();
|
2016-08-19 17:26:31 +00:00
|
|
|
|
|
|
|
private:
|
2016-08-22 17:16:21 +00:00
|
|
|
void createControls();
|
2016-10-07 14:28:37 +00:00
|
|
|
void createNotificationsControls();
|
2016-08-27 04:49:18 +00:00
|
|
|
void desktopEnabledUpdated();
|
|
|
|
void viewParamUpdated();
|
2016-08-22 17:16:21 +00:00
|
|
|
|
2017-09-13 16:57:44 +00:00
|
|
|
Ui::Checkbox *_desktopNotifications = nullptr;
|
|
|
|
Ui::SlideWrap<Ui::Checkbox> *_showSenderName = nullptr;
|
|
|
|
Ui::SlideWrap<Ui::Checkbox> *_showMessagePreview = nullptr;
|
|
|
|
Ui::Checkbox *_nativeNotifications = nullptr;
|
|
|
|
Ui::Checkbox *_playSound = nullptr;
|
|
|
|
Ui::Checkbox *_includeMuted = nullptr;
|
|
|
|
Ui::SlideWrap<Ui::LinkButton> *_advanced = nullptr;
|
2016-08-19 17:26:31 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Settings
|