mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-22 22:53:55 -07:00
[Room][UserList] Introduce style delegate for user list
- Allow users to set a card name and parameters as their background banner - Allow mods to white/blacklist cards - Allow toggling back to the old display style Took 7 minutes Took 28 seconds Took 2 minutes Took 2 minutes
This commit is contained in:
parent
bdb0f12f66
commit
aff93a4435
35 changed files with 1977 additions and 26 deletions
|
|
@ -0,0 +1,30 @@
|
|||
#ifndef COCKATRICE_USER_AVATAR_PROVIDER_H
|
||||
#define COCKATRICE_USER_AVATAR_PROVIDER_H
|
||||
|
||||
#include <QMap>
|
||||
#include <QObject>
|
||||
#include <QPixmap>
|
||||
#include <QSet>
|
||||
|
||||
class AbstractClient;
|
||||
|
||||
class UserAvatarProvider : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit UserAvatarProvider(AbstractClient *client, QObject *parent = nullptr);
|
||||
|
||||
void requestAvatar(const QString &userName);
|
||||
const QMap<QString, QPixmap> &cache() const;
|
||||
|
||||
signals:
|
||||
void avatarUpdated(const QString &userName);
|
||||
|
||||
private:
|
||||
AbstractClient *client;
|
||||
QMap<QString, QPixmap> avatarCache;
|
||||
QSet<QString> pending;
|
||||
};
|
||||
|
||||
#endif // COCKATRICE_USER_AVATAR_PROVIDER_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue