tdesktop/Telegram/SourceFiles/ui/filter_icons.h

80 lines
1.3 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 {
2022-05-03 19:08:03 +00:00
Cat,
Book,
Money,
// Camera,
Game,
// House,
Light,
Like,
// Plus,
Note,
Palette,
Travel,
Sport,
Favorite,
Study,
Airplane,
// Microbe,
// Worker,
Private,
Groups,
2020-03-19 11:06:08 +00:00
All,
Unread,
2022-05-03 19:08:03 +00:00
// Check,
2020-03-19 11:06:08 +00:00
Bots,
2022-05-03 19:08:03 +00:00
// Folders,
2020-03-19 11:06:08 +00:00
Crown,
Flower,
Home,
Love,
Mask,
Party,
Trade,
Work,
2022-05-03 19:08:03 +00:00
Unmuted,
Channels,
Custom,
Setup,
// Poo,
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