/* 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/layers/box_content.h" namespace Ui { template class RadioenumGroup; template class Radioenum; class LinkButton; } // namespace Ui namespace Window { class SessionController; } // namespace Window class DownloadPathBox : public Ui::BoxContent { public: DownloadPathBox( QWidget *parent, not_null controller); protected: void prepare() override; void resizeEvent(QResizeEvent *e) override; private: enum class Directory { Downloads, Temp, Custom, }; void radioChanged(Directory value); Directory typeFromPath(const QString &path); void save(); void updateControlsVisibility(); void setPathText(const QString &text); void editPath(); const not_null _controller; QString _path; QByteArray _pathBookmark; std::shared_ptr> _group; object_ptr> _default; object_ptr> _temp; object_ptr> _dir; object_ptr _pathLink; };