tdesktop/Telegram/SourceFiles/ui/filter_icons.h

66 lines
1.1 KiB
C
Raw Normal View History

2020-03-19 11:06:08 +00:00
/*
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 style {
namespace internal {
class Icon;
} // namespace internal
} // namespace style
2020-03-19 14:55:17 +00:00
namespace Data {
class ChatFilter;
} // namespace Data
2020-03-19 11:06:08 +00:00
namespace Ui {
enum class FilterIcon : uchar {
All,
Unread,
Unmuted,
Bots,
Channels,
Groups,
Private,
Custom,
Setup,
Cat,
Crown,
Favorite,
Flower,
Game,
Home,
Love,
Mask,
Party,
Sport,
Study,
Trade,
Travel,
Work,
2020-04-13 06:42:00 +00:00
Edit,
2020-03-19 11:06:08 +00:00
};
struct FilterIcons {
not_null<const style::internal::Icon*> normal;
not_null<const style::internal::Icon*> active;
QString emoji;
2020-03-19 11:06:08 +00:00
};
[[nodiscard]] const FilterIcons &LookupFilterIcon(FilterIcon icon);
[[nodiscard]] std::optional<FilterIcon> LookupFilterIconByEmoji(
const QString &emoji);
2020-03-19 11:06:08 +00:00
2020-03-19 14:55:17 +00:00
[[nodiscard]] FilterIcon ComputeDefaultFilterIcon(
const Data::ChatFilter &filter);
[[nodiscard]] FilterIcon ComputeFilterIcon(const Data::ChatFilter &filter);
2020-03-19 11:06:08 +00:00
} // namespace Ui