2016-11-02 14:44:33 +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-11-02 14:44:33 +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-11-02 14:44:33 +00:00
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
2016-11-11 13:46:04 +00:00
|
|
|
namespace Ui {
|
2017-02-03 20:07:26 +00:00
|
|
|
class FlatButton;
|
|
|
|
class ScrollArea;
|
|
|
|
class CrossButton;
|
|
|
|
class MultiSelect;
|
2017-09-30 18:26:45 +00:00
|
|
|
class PlainShadow;
|
2016-11-11 13:46:04 +00:00
|
|
|
} // namespace Ui
|
2016-11-02 14:44:33 +00:00
|
|
|
|
|
|
|
namespace Window {
|
|
|
|
namespace Theme {
|
|
|
|
|
2017-02-03 20:07:26 +00:00
|
|
|
class Editor : public TWidget {
|
|
|
|
public:
|
|
|
|
Editor(QWidget*, const QString &path);
|
2016-11-02 14:44:33 +00:00
|
|
|
|
2017-02-07 17:39:47 +00:00
|
|
|
static void Start();
|
2016-11-02 14:44:33 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
void paintEvent(QPaintEvent *e) override;
|
|
|
|
void resizeEvent(QResizeEvent *e) override;
|
2017-02-03 20:07:26 +00:00
|
|
|
void keyPressEvent(QKeyEvent *e) override;
|
2016-11-02 14:44:33 +00:00
|
|
|
|
2017-02-03 20:07:26 +00:00
|
|
|
void focusInEvent(QFocusEvent *e) override;
|
2016-11-02 14:44:33 +00:00
|
|
|
|
2017-02-03 20:07:26 +00:00
|
|
|
private:
|
|
|
|
void closeEditor();
|
|
|
|
|
|
|
|
object_ptr<Ui::ScrollArea> _scroll;
|
|
|
|
class Inner;
|
|
|
|
QPointer<Inner> _inner;
|
|
|
|
object_ptr<Ui::CrossButton> _close;
|
|
|
|
object_ptr<Ui::MultiSelect> _select;
|
2017-09-30 18:26:45 +00:00
|
|
|
object_ptr<Ui::PlainShadow> _leftShadow;
|
|
|
|
object_ptr<Ui::PlainShadow> _topShadow;
|
2017-02-03 20:07:26 +00:00
|
|
|
object_ptr<Ui::FlatButton> _export;
|
2016-11-02 14:44:33 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Theme
|
|
|
|
} // namespace Window
|