tdesktop/Telegram/SourceFiles/window/themes/window_theme_editor.h

58 lines
1.2 KiB
C
Raw Normal View History

/*
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
namespace Ui {
class FlatButton;
class ScrollArea;
class CrossButton;
class MultiSelect;
class PlainShadow;
} // namespace Ui
namespace Window {
2019-09-03 08:25:19 +00:00
class Controller;
namespace Theme {
2019-08-26 16:36:23 +00:00
bool CopyColorsToPalette(
const QString &destination,
const QString &themePath,
const QByteArray &themeContent);
class Editor : public TWidget {
public:
2019-09-03 08:25:19 +00:00
Editor(QWidget*, not_null<Window::Controller*> window);
protected:
void paintEvent(QPaintEvent *e) override;
void resizeEvent(QResizeEvent *e) override;
void keyPressEvent(QKeyEvent *e) override;
void focusInEvent(QFocusEvent *e) override;
private:
2019-09-03 08:25:19 +00:00
void save();
void closeEditor();
2019-09-03 08:25:19 +00:00
not_null<Window::Controller*> _window;
object_ptr<Ui::ScrollArea> _scroll;
class Inner;
QPointer<Inner> _inner;
object_ptr<Ui::CrossButton> _close;
object_ptr<Ui::MultiSelect> _select;
object_ptr<Ui::PlainShadow> _leftShadow;
object_ptr<Ui::PlainShadow> _topShadow;
2019-09-03 08:25:19 +00:00
object_ptr<Ui::FlatButton> _save;
};
} // namespace Theme
} // namespace Window