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"
|
|
|
|
|
2016-10-05 18:37:48 +00:00
|
|
|
namespace Ui {
|
2016-10-28 09:20:24 +00:00
|
|
|
class Checkbox;
|
2016-11-22 09:48:13 +00:00
|
|
|
class SettingsSlider;
|
2016-10-05 18:37:48 +00:00
|
|
|
} // namespace Ui
|
2016-08-19 17:26:31 +00:00
|
|
|
|
2016-10-05 18:37:48 +00:00
|
|
|
namespace Settings {
|
2016-08-22 17:16:21 +00:00
|
|
|
|
|
|
|
class ScaleWidget : public BlockWidget {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
ScaleWidget(QWidget *parent, UserData *self);
|
|
|
|
|
|
|
|
private slots:
|
2016-11-22 09:48:13 +00:00
|
|
|
void onAutoChanged();
|
2016-08-22 17:16:21 +00:00
|
|
|
|
|
|
|
private:
|
2016-10-06 16:41:09 +00:00
|
|
|
void scaleChanged();
|
2016-08-22 17:16:21 +00:00
|
|
|
void createControls();
|
|
|
|
void setScale(DBIScale newScale);
|
|
|
|
|
2017-09-13 16:57:44 +00:00
|
|
|
Ui::Checkbox *_auto = nullptr;
|
|
|
|
Ui::SettingsSlider *_scale = nullptr;
|
2016-08-19 17:26:31 +00:00
|
|
|
|
2016-11-07 16:08:24 +00:00
|
|
|
DBIScale _newScale = dbisAuto;
|
2016-11-22 09:48:13 +00:00
|
|
|
bool _inSetScale = false;
|
2016-11-07 16:08:24 +00:00
|
|
|
|
2016-08-19 17:26:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Settings
|