make lint
This commit is contained in:
parent
4e603387c6
commit
f57622901c
@ -22,6 +22,7 @@
|
||||
#include <QWidget>
|
||||
|
||||
#include "Cache.h"
|
||||
#include "CommunitiesList.h"
|
||||
#include "MatrixClient.h"
|
||||
#include "QuickSwitcher.h"
|
||||
#include "RoomList.h"
|
||||
@ -33,7 +34,6 @@
|
||||
#include "TopRoomBar.h"
|
||||
#include "TypingDisplay.h"
|
||||
#include "UserInfoWidget.h"
|
||||
#include "CommunitiesList.h"
|
||||
|
||||
constexpr int CONSENSUS_TIMEOUT = 1000;
|
||||
constexpr int SHOW_CONTENT_TIMEOUT = 3000;
|
||||
|
@ -1,44 +1,42 @@
|
||||
#pragma once
|
||||
|
||||
#include <QWidget>
|
||||
#include <QScrollArea>
|
||||
#include <QSharedPointer>
|
||||
#include <QVBoxLayout>
|
||||
#include <QWidget>
|
||||
|
||||
#include "MatrixClient.h"
|
||||
#include "CommunitiesListItem.h"
|
||||
#include "Community.h"
|
||||
#include "MatrixClient.h"
|
||||
#include "ui/Theme.h"
|
||||
|
||||
class CommunitiesList : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CommunitiesList(QSharedPointer<MatrixClient> client, QWidget *parent = nullptr);
|
||||
~CommunitiesList();
|
||||
CommunitiesList(QSharedPointer<MatrixClient> client, QWidget *parent = nullptr);
|
||||
~CommunitiesList();
|
||||
|
||||
void setCommunities(const QMap<QString, QSharedPointer<Community>> &communities);
|
||||
void clear();
|
||||
void setCommunities(const QMap<QString, QSharedPointer<Community>> &communities);
|
||||
void clear();
|
||||
|
||||
void addCommunity(QSharedPointer<Community> community,
|
||||
const QString &community_id);
|
||||
void removeCommunity(const QString &community_id);
|
||||
void addCommunity(QSharedPointer<Community> community, const QString &community_id);
|
||||
void removeCommunity(const QString &community_id);
|
||||
signals:
|
||||
void communityChanged(const QString &community_id);
|
||||
void communityChanged(const QString &community_id);
|
||||
|
||||
public slots:
|
||||
void updateCommunityAvatar(const QString &community_id,
|
||||
const QPixmap &img);
|
||||
void highlightSelectedCommunity(const QString &community_id);
|
||||
void updateCommunityAvatar(const QString &community_id, const QPixmap &img);
|
||||
void highlightSelectedCommunity(const QString &community_id);
|
||||
|
||||
private:
|
||||
QVBoxLayout *topLayout_;
|
||||
QVBoxLayout *contentsLayout_;
|
||||
QWidget *scrollAreaContents_;
|
||||
QScrollArea *scrollArea_;
|
||||
QVBoxLayout *topLayout_;
|
||||
QVBoxLayout *contentsLayout_;
|
||||
QWidget *scrollAreaContents_;
|
||||
QScrollArea *scrollArea_;
|
||||
|
||||
QMap<QString, QSharedPointer<CommunitiesListItem>> communities_;
|
||||
QMap<QString, QSharedPointer<CommunitiesListItem>> communities_;
|
||||
|
||||
QSharedPointer<MatrixClient> client_;
|
||||
QSharedPointer<MatrixClient> client_;
|
||||
};
|
||||
|
@ -1,83 +1,81 @@
|
||||
#pragma once
|
||||
|
||||
#include <QWidget>
|
||||
#include <QSharedPointer>
|
||||
#include <QDebug>
|
||||
#include <QMouseEvent>
|
||||
#include <QPainter>
|
||||
#include <QDebug>
|
||||
#include <QSharedPointer>
|
||||
#include <QWidget>
|
||||
|
||||
#include "ui/Theme.h"
|
||||
#include "Menu.h"
|
||||
#include "Community.h"
|
||||
#include "Menu.h"
|
||||
#include "ui/Theme.h"
|
||||
|
||||
class CommunitiesListItem : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CommunitiesListItem(QSharedPointer<Community> community,
|
||||
QString community_id,
|
||||
QWidget *parent = nullptr);
|
||||
CommunitiesListItem(QSharedPointer<Community> community,
|
||||
QString community_id,
|
||||
QWidget *parent = nullptr);
|
||||
|
||||
~CommunitiesListItem();
|
||||
~CommunitiesListItem();
|
||||
|
||||
void setCommunity(QSharedPointer<Community> community);
|
||||
void setCommunity(QSharedPointer<Community> community);
|
||||
|
||||
inline bool isPressed() const;
|
||||
inline void setAvatar(const QImage &avatar_image);
|
||||
inline bool isPressed() const;
|
||||
inline void setAvatar(const QImage &avatar_image);
|
||||
|
||||
signals:
|
||||
void clicked(const QString &community_id);
|
||||
void clicked(const QString &community_id);
|
||||
|
||||
public slots:
|
||||
void setPressedState(bool state);
|
||||
void setPressedState(bool state);
|
||||
|
||||
protected:
|
||||
void mousePressEvent(QMouseEvent *event) override;
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
void contextMenuEvent(QContextMenuEvent *event) override;
|
||||
void mousePressEvent(QMouseEvent *event) override;
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
void contextMenuEvent(QContextMenuEvent *event) override;
|
||||
|
||||
private:
|
||||
const int IconSize = 55;
|
||||
const int IconSize = 55;
|
||||
|
||||
QSharedPointer<Community> community_;
|
||||
QString communityId_;
|
||||
QString communityName_;
|
||||
QString communityShortDescription;
|
||||
QSharedPointer<Community> community_;
|
||||
QString communityId_;
|
||||
QString communityName_;
|
||||
QString communityShortDescription;
|
||||
|
||||
QPixmap communityAvatar_;
|
||||
QPixmap communityAvatar_;
|
||||
|
||||
Menu *menu_;
|
||||
bool isPressed_ = false;
|
||||
Menu *menu_;
|
||||
bool isPressed_ = false;
|
||||
};
|
||||
|
||||
inline bool
|
||||
CommunitiesListItem::isPressed() const
|
||||
{
|
||||
return isPressed_;
|
||||
return isPressed_;
|
||||
}
|
||||
|
||||
inline void
|
||||
CommunitiesListItem::setAvatar(const QImage &avatar_image)
|
||||
{
|
||||
communityAvatar_ = QPixmap::fromImage(
|
||||
avatar_image.scaled(IconSize,
|
||||
IconSize,
|
||||
Qt::IgnoreAspectRatio,
|
||||
Qt::SmoothTransformation));
|
||||
update();
|
||||
communityAvatar_ = QPixmap::fromImage(
|
||||
avatar_image.scaled(IconSize, IconSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||
update();
|
||||
}
|
||||
|
||||
class WorldCommunityListItem : public CommunitiesListItem
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
public:
|
||||
WorldCommunityListItem(QWidget *parent = nullptr);
|
||||
~WorldCommunityListItem();
|
||||
WorldCommunityListItem(QWidget *parent = nullptr);
|
||||
~WorldCommunityListItem();
|
||||
|
||||
protected:
|
||||
void mousePressEvent(QMouseEvent *event) override;
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
void mousePressEvent(QMouseEvent *event) override;
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
|
||||
private:
|
||||
const int IconSize = 55;
|
||||
const int IconSize = 55;
|
||||
};
|
||||
|
@ -1,13 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <QJsonObject>
|
||||
#include <QUrl>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QUrl>
|
||||
|
||||
class Community : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
void parseProfile(const QJsonObject &profile);
|
||||
@ -55,7 +55,6 @@ Community::getLongDescription() const
|
||||
return long_description_;
|
||||
}
|
||||
|
||||
|
||||
inline const QList<QString>
|
||||
Community::getRoomList() const
|
||||
{
|
||||
|
@ -37,15 +37,25 @@ private:
|
||||
class Deserializable
|
||||
{
|
||||
public:
|
||||
virtual void deserialize(const QJsonValue &) {}
|
||||
virtual void deserialize(const QJsonObject &) {}
|
||||
virtual void deserialize(const QJsonDocument &) {}
|
||||
virtual ~Deserializable() {}
|
||||
virtual void deserialize(const QJsonValue &)
|
||||
{
|
||||
}
|
||||
virtual void deserialize(const QJsonObject &)
|
||||
{
|
||||
}
|
||||
virtual void deserialize(const QJsonDocument &)
|
||||
{
|
||||
}
|
||||
virtual ~Deserializable()
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
class Serializable
|
||||
{
|
||||
public:
|
||||
virtual QJsonObject serialize() const = 0;
|
||||
virtual ~Serializable() {}
|
||||
virtual ~Serializable()
|
||||
{
|
||||
}
|
||||
};
|
||||
|
@ -134,5 +134,5 @@ RoomInfoListItem::setDescriptionMessage(const DescInfo &info)
|
||||
inline QString
|
||||
RoomInfoListItem::roomId()
|
||||
{
|
||||
return roomId_;
|
||||
return roomId_;
|
||||
}
|
||||
|
@ -84,8 +84,8 @@ private:
|
||||
QMap<QString, QSharedPointer<RoomInfoListItem>> rooms_;
|
||||
QString selectedRoom_;
|
||||
|
||||
bool filterRooms_ = false;
|
||||
QList<QString> roomFilter_ = QList<QString>(); //which rooms to include in the room list
|
||||
bool filterRooms_ = false;
|
||||
QList<QString> roomFilter_ = QList<QString>(); // which rooms to include in the room list
|
||||
|
||||
QSharedPointer<MatrixClient> client_;
|
||||
};
|
||||
|
@ -26,9 +26,7 @@ namespace matrix
|
||||
{
|
||||
namespace events
|
||||
{
|
||||
class AliasesEventContent
|
||||
: public Deserializable
|
||||
, public Serializable
|
||||
class AliasesEventContent : public Deserializable, public Serializable
|
||||
{
|
||||
public:
|
||||
void deserialize(const QJsonValue &data) override;
|
||||
|
@ -30,9 +30,7 @@ namespace events
|
||||
* A picture that is associated with the room.
|
||||
*/
|
||||
|
||||
class AvatarEventContent
|
||||
: public Deserializable
|
||||
, public Serializable
|
||||
class AvatarEventContent : public Deserializable, public Serializable
|
||||
{
|
||||
public:
|
||||
void deserialize(const QJsonValue &data) override;
|
||||
|
@ -32,9 +32,7 @@ namespace events
|
||||
* users which alias to use to advertise the room.
|
||||
*/
|
||||
|
||||
class CanonicalAliasEventContent
|
||||
: public Deserializable
|
||||
, public Serializable
|
||||
class CanonicalAliasEventContent : public Deserializable, public Serializable
|
||||
{
|
||||
public:
|
||||
void deserialize(const QJsonValue &data) override;
|
||||
|
@ -30,9 +30,7 @@ namespace events
|
||||
* of all other events.
|
||||
*/
|
||||
|
||||
class CreateEventContent
|
||||
: public Deserializable
|
||||
, public Serializable
|
||||
class CreateEventContent : public Deserializable, public Serializable
|
||||
{
|
||||
public:
|
||||
void deserialize(const QJsonValue &data) override;
|
||||
|
@ -62,9 +62,7 @@ bool
|
||||
isStateEvent(EventType type);
|
||||
|
||||
template<class Content>
|
||||
class Event
|
||||
: public Deserializable
|
||||
, public Serializable
|
||||
class Event : public Deserializable, public Serializable
|
||||
{
|
||||
public:
|
||||
inline Content content() const;
|
||||
|
@ -32,9 +32,7 @@ enum class HistoryVisibility {
|
||||
WorldReadable,
|
||||
};
|
||||
|
||||
class HistoryVisibilityEventContent
|
||||
: public Deserializable
|
||||
, public Serializable
|
||||
class HistoryVisibilityEventContent : public Deserializable, public Serializable
|
||||
{
|
||||
public:
|
||||
inline HistoryVisibility historyVisibility() const;
|
||||
|
@ -44,9 +44,7 @@ enum class JoinRule {
|
||||
* Describes how users are allowed to join the room.
|
||||
*/
|
||||
|
||||
class JoinRulesEventContent
|
||||
: public Deserializable
|
||||
, public Serializable
|
||||
class JoinRulesEventContent : public Deserializable, public Serializable
|
||||
{
|
||||
public:
|
||||
void deserialize(const QJsonValue &data) override;
|
||||
|
@ -47,9 +47,7 @@ enum class Membership {
|
||||
* The current membership state of a user in the room.
|
||||
*/
|
||||
|
||||
class MemberEventContent
|
||||
: public Deserializable
|
||||
, public Serializable
|
||||
class MemberEventContent : public Deserializable, public Serializable
|
||||
{
|
||||
public:
|
||||
void deserialize(const QJsonValue &data) override;
|
||||
|
@ -57,9 +57,7 @@ enum class MessageEventType {
|
||||
MessageEventType
|
||||
extractMessageEventType(const QJsonObject &data);
|
||||
|
||||
class MessageEventContent
|
||||
: public Deserializable
|
||||
, public Serializable
|
||||
class MessageEventContent : public Deserializable, public Serializable
|
||||
{
|
||||
public:
|
||||
void deserialize(const QJsonValue &data) override;
|
||||
|
@ -29,9 +29,7 @@ namespace events
|
||||
* A human-friendly room name designed to be displayed to the end-user.
|
||||
*/
|
||||
|
||||
class NameEventContent
|
||||
: public Deserializable
|
||||
, public Serializable
|
||||
class NameEventContent : public Deserializable, public Serializable
|
||||
{
|
||||
public:
|
||||
void deserialize(const QJsonValue &data) override;
|
||||
|
@ -36,9 +36,7 @@ enum class PowerLevels {
|
||||
* Defines the power levels (privileges) of users in the room.
|
||||
*/
|
||||
|
||||
class PowerLevelsEventContent
|
||||
: public Deserializable
|
||||
, public Serializable
|
||||
class PowerLevelsEventContent : public Deserializable, public Serializable
|
||||
{
|
||||
public:
|
||||
void deserialize(const QJsonValue &data) override;
|
||||
|
@ -30,9 +30,7 @@ namespace events
|
||||
* room.
|
||||
*/
|
||||
|
||||
class TopicEventContent
|
||||
: public Deserializable
|
||||
, public Serializable
|
||||
class TopicEventContent : public Deserializable, public Serializable
|
||||
{
|
||||
public:
|
||||
void deserialize(const QJsonValue &data) override;
|
||||
|
@ -10,8 +10,8 @@ enum class AvatarType { Icon, Image, Letter };
|
||||
|
||||
namespace sidebar
|
||||
{
|
||||
static const int SmallSize = 60;
|
||||
static const int NormalSize = 300;
|
||||
static const int SmallSize = 60;
|
||||
static const int NormalSize = 300;
|
||||
static const int CommunitiesSidebarSize = 64;
|
||||
}
|
||||
// Default font size.
|
||||
|
@ -49,7 +49,7 @@ ChatPage::ChatPage(QSharedPointer<MatrixClient> client, QWidget *parent)
|
||||
|
||||
communitiesList_ = new CommunitiesList(client, this);
|
||||
communitiesSideBarLayout_->addWidget(communitiesList_);
|
||||
//communitiesSideBarLayout_->addStretch(1);
|
||||
// communitiesSideBarLayout_->addStretch(1);
|
||||
topLayout_->addWidget(communitiesSideBar_);
|
||||
|
||||
auto splitter = new Splitter(this);
|
||||
@ -220,22 +220,27 @@ ChatPage::ChatPage(QSharedPointer<MatrixClient> client, QWidget *parent)
|
||||
SIGNAL(getOwnCommunitiesResponse(QList<QString>)),
|
||||
this,
|
||||
SLOT(updateOwnCommunitiesInfo(QList<QString>)));
|
||||
connect(client_.data(), &MatrixClient::communityProfileRetrieved, this,
|
||||
connect(client_.data(),
|
||||
&MatrixClient::communityProfileRetrieved,
|
||||
this,
|
||||
[=](QString communityId, QJsonObject profile) {
|
||||
communityManager_[communityId]->parseProfile(profile);
|
||||
});
|
||||
connect(client_.data(), &MatrixClient::communityRoomsRetrieved, this,
|
||||
communityManager_[communityId]->parseProfile(profile);
|
||||
});
|
||||
connect(client_.data(),
|
||||
&MatrixClient::communityRoomsRetrieved,
|
||||
this,
|
||||
[=](QString communityId, QJsonObject rooms) {
|
||||
communityManager_[communityId]->parseRooms(rooms);
|
||||
communityManager_[communityId]->parseRooms(rooms);
|
||||
|
||||
if (communityId == current_community_) {
|
||||
if (communityId == "world") {
|
||||
room_list_->setFilterRooms(false);
|
||||
} else {
|
||||
room_list_->setRoomFilter(communityManager_[communityId]->getRoomList());
|
||||
}
|
||||
}
|
||||
});
|
||||
if (communityId == current_community_) {
|
||||
if (communityId == "world") {
|
||||
room_list_->setFilterRooms(false);
|
||||
} else {
|
||||
room_list_->setRoomFilter(
|
||||
communityManager_[communityId]->getRoomList());
|
||||
}
|
||||
}
|
||||
});
|
||||
connect(client_.data(),
|
||||
SIGNAL(ownAvatarRetrieved(const QPixmap &)),
|
||||
this,
|
||||
@ -265,14 +270,18 @@ ChatPage::ChatPage(QSharedPointer<MatrixClient> client, QWidget *parent)
|
||||
}
|
||||
});
|
||||
|
||||
connect(communitiesList_, &CommunitiesList::communityChanged, this, [=](const QString &communityId) {
|
||||
current_community_ = communityId;
|
||||
if (communityId == "world") {
|
||||
room_list_->setFilterRooms(false);
|
||||
} else {
|
||||
room_list_->setRoomFilter(communityManager_[communityId]->getRoomList());
|
||||
}
|
||||
});
|
||||
connect(communitiesList_,
|
||||
&CommunitiesList::communityChanged,
|
||||
this,
|
||||
[=](const QString &communityId) {
|
||||
current_community_ = communityId;
|
||||
if (communityId == "world") {
|
||||
room_list_->setFilterRooms(false);
|
||||
} else {
|
||||
room_list_->setRoomFilter(
|
||||
communityManager_[communityId]->getRoomList());
|
||||
}
|
||||
});
|
||||
|
||||
AvatarProvider::init(client);
|
||||
}
|
||||
@ -542,13 +551,13 @@ ChatPage::updateOwnProfileInfo(const QUrl &avatar_url, const QString &display_na
|
||||
void
|
||||
ChatPage::updateOwnCommunitiesInfo(const QList<QString> &own_communities)
|
||||
{
|
||||
for (int i = 0; i < own_communities.size(); i++) {
|
||||
QSharedPointer<Community> community = QSharedPointer<Community>(new Community());
|
||||
for (int i = 0; i < own_communities.size(); i++) {
|
||||
QSharedPointer<Community> community = QSharedPointer<Community>(new Community());
|
||||
|
||||
communityManager_[own_communities[i]] = community;
|
||||
}
|
||||
communityManager_[own_communities[i]] = community;
|
||||
}
|
||||
|
||||
communitiesList_->setCommunities(communityManager_);
|
||||
communitiesList_->setCommunities(communityManager_);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -3,141 +3,150 @@
|
||||
#include <QLabel>
|
||||
|
||||
CommunitiesList::CommunitiesList(QSharedPointer<MatrixClient> client, QWidget *parent)
|
||||
: QWidget(parent)
|
||||
, client_(client)
|
||||
: QWidget(parent)
|
||||
, client_(client)
|
||||
{
|
||||
QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
|
||||
sizePolicy.setHorizontalStretch(0);
|
||||
sizePolicy.setVerticalStretch(1);
|
||||
setSizePolicy(sizePolicy);
|
||||
QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
|
||||
sizePolicy.setHorizontalStretch(0);
|
||||
sizePolicy.setVerticalStretch(1);
|
||||
setSizePolicy(sizePolicy);
|
||||
|
||||
setStyleSheet("border-style: none;");
|
||||
setStyleSheet("border-style: none;");
|
||||
|
||||
topLayout_ = new QVBoxLayout(this);
|
||||
topLayout_->setSpacing(0);
|
||||
topLayout_->setMargin(0);
|
||||
topLayout_ = new QVBoxLayout(this);
|
||||
topLayout_->setSpacing(0);
|
||||
topLayout_->setMargin(0);
|
||||
|
||||
setFixedWidth(ui::sidebar::CommunitiesSidebarSize);
|
||||
setFixedWidth(ui::sidebar::CommunitiesSidebarSize);
|
||||
|
||||
scrollArea_ = new QScrollArea(this);
|
||||
scrollArea_->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
scrollArea_->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
scrollArea_->setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContents);
|
||||
scrollArea_->setWidgetResizable(true);
|
||||
scrollArea_->setAlignment(Qt::AlignLeading | Qt::AlignTop | Qt::AlignVCenter);
|
||||
scrollArea_ = new QScrollArea(this);
|
||||
scrollArea_->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
scrollArea_->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
scrollArea_->setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContents);
|
||||
scrollArea_->setWidgetResizable(true);
|
||||
scrollArea_->setAlignment(Qt::AlignLeading | Qt::AlignTop | Qt::AlignVCenter);
|
||||
|
||||
scrollAreaContents_ = new QWidget();
|
||||
scrollAreaContents_ = new QWidget();
|
||||
|
||||
contentsLayout_ = new QVBoxLayout(scrollAreaContents_);
|
||||
contentsLayout_->setSpacing(0);
|
||||
contentsLayout_->setMargin(0);
|
||||
contentsLayout_ = new QVBoxLayout(scrollAreaContents_);
|
||||
contentsLayout_->setSpacing(0);
|
||||
contentsLayout_->setMargin(0);
|
||||
|
||||
WorldCommunityListItem *world_list_item = new WorldCommunityListItem();
|
||||
contentsLayout_->addWidget(world_list_item);
|
||||
communities_.insert("world", QSharedPointer<CommunitiesListItem>(world_list_item));
|
||||
connect(world_list_item, &WorldCommunityListItem::clicked,
|
||||
this, &CommunitiesList::highlightSelectedCommunity);
|
||||
contentsLayout_->addStretch(1);
|
||||
WorldCommunityListItem *world_list_item = new WorldCommunityListItem();
|
||||
contentsLayout_->addWidget(world_list_item);
|
||||
communities_.insert("world", QSharedPointer<CommunitiesListItem>(world_list_item));
|
||||
connect(world_list_item,
|
||||
&WorldCommunityListItem::clicked,
|
||||
this,
|
||||
&CommunitiesList::highlightSelectedCommunity);
|
||||
contentsLayout_->addStretch(1);
|
||||
|
||||
scrollArea_->setWidget(scrollAreaContents_);
|
||||
topLayout_->addWidget(scrollArea_);
|
||||
scrollArea_->setWidget(scrollAreaContents_);
|
||||
topLayout_->addWidget(scrollArea_);
|
||||
|
||||
connect(client_.data(), &MatrixClient::communityProfileRetrieved, this,
|
||||
[=](QString communityId, QJsonObject profile) {
|
||||
client_->fetchCommunityAvatar(communityId, QUrl(profile["avatar_url"].toString()));
|
||||
});
|
||||
connect(client_.data(),
|
||||
SIGNAL(communityAvatarRetrieved(const QString &, const QPixmap &)),
|
||||
this,
|
||||
SLOT(updateCommunityAvatar(const QString &,const QPixmap &)));
|
||||
connect(client_.data(),
|
||||
&MatrixClient::communityProfileRetrieved,
|
||||
this,
|
||||
[=](QString communityId, QJsonObject profile) {
|
||||
client_->fetchCommunityAvatar(communityId,
|
||||
QUrl(profile["avatar_url"].toString()));
|
||||
});
|
||||
connect(client_.data(),
|
||||
SIGNAL(communityAvatarRetrieved(const QString &, const QPixmap &)),
|
||||
this,
|
||||
SLOT(updateCommunityAvatar(const QString &, const QPixmap &)));
|
||||
}
|
||||
|
||||
CommunitiesList::~CommunitiesList() {}
|
||||
CommunitiesList::~CommunitiesList()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
CommunitiesList::setCommunities(const QMap<QString, QSharedPointer<Community>> &communities)
|
||||
{
|
||||
communities_.clear();
|
||||
communities_.clear();
|
||||
|
||||
//TODO: still not sure how to handle the "world" special-case
|
||||
WorldCommunityListItem *world_list_item = new WorldCommunityListItem();
|
||||
communities_.insert("world", QSharedPointer<CommunitiesListItem>(world_list_item));
|
||||
connect(world_list_item, &WorldCommunityListItem::clicked,
|
||||
this, &CommunitiesList::highlightSelectedCommunity);
|
||||
contentsLayout_->insertWidget(0, world_list_item);
|
||||
// TODO: still not sure how to handle the "world" special-case
|
||||
WorldCommunityListItem *world_list_item = new WorldCommunityListItem();
|
||||
communities_.insert("world", QSharedPointer<CommunitiesListItem>(world_list_item));
|
||||
connect(world_list_item,
|
||||
&WorldCommunityListItem::clicked,
|
||||
this,
|
||||
&CommunitiesList::highlightSelectedCommunity);
|
||||
contentsLayout_->insertWidget(0, world_list_item);
|
||||
|
||||
for (auto it = communities.constBegin(); it != communities.constEnd(); it++) {
|
||||
const auto community_id = it.key();
|
||||
const auto community = it.value();
|
||||
for (auto it = communities.constBegin(); it != communities.constEnd(); it++) {
|
||||
const auto community_id = it.key();
|
||||
const auto community = it.value();
|
||||
|
||||
addCommunity(community, community_id);
|
||||
addCommunity(community, community_id);
|
||||
|
||||
client_->fetchCommunityProfile(community_id);
|
||||
client_->fetchCommunityRooms(community_id);
|
||||
}
|
||||
client_->fetchCommunityProfile(community_id);
|
||||
client_->fetchCommunityRooms(community_id);
|
||||
}
|
||||
|
||||
world_list_item->setPressedState(true);
|
||||
emit communityChanged("world");
|
||||
world_list_item->setPressedState(true);
|
||||
emit communityChanged("world");
|
||||
}
|
||||
|
||||
void
|
||||
CommunitiesList::clear()
|
||||
{
|
||||
communities_.clear();
|
||||
communities_.clear();
|
||||
}
|
||||
|
||||
void
|
||||
CommunitiesList::addCommunity(QSharedPointer<Community> community, const QString &community_id)
|
||||
{
|
||||
CommunitiesListItem *list_item = new CommunitiesListItem(community,
|
||||
community_id,
|
||||
scrollArea_);
|
||||
CommunitiesListItem *list_item =
|
||||
new CommunitiesListItem(community, community_id, scrollArea_);
|
||||
|
||||
communities_.insert(community_id, QSharedPointer<CommunitiesListItem>(list_item));
|
||||
communities_.insert(community_id, QSharedPointer<CommunitiesListItem>(list_item));
|
||||
|
||||
client_->fetchCommunityAvatar(community_id, community->getAvatar());
|
||||
client_->fetchCommunityAvatar(community_id, community->getAvatar());
|
||||
|
||||
contentsLayout_->insertWidget(contentsLayout_->count()-1, list_item);
|
||||
contentsLayout_->insertWidget(contentsLayout_->count() - 1, list_item);
|
||||
|
||||
connect(list_item, &CommunitiesListItem::clicked,
|
||||
this, &CommunitiesList::highlightSelectedCommunity);
|
||||
connect(list_item,
|
||||
&CommunitiesListItem::clicked,
|
||||
this,
|
||||
&CommunitiesList::highlightSelectedCommunity);
|
||||
}
|
||||
|
||||
void
|
||||
CommunitiesList::removeCommunity(const QString &community_id)
|
||||
{
|
||||
communities_.remove(community_id);
|
||||
communities_.remove(community_id);
|
||||
}
|
||||
|
||||
void
|
||||
CommunitiesList::updateCommunityAvatar(const QString &community_id, const QPixmap &img)
|
||||
{
|
||||
if (!communities_.contains(community_id)) {
|
||||
qWarning() << "Avatar update on nonexistent community" << community_id;
|
||||
return;
|
||||
}
|
||||
|
||||
communities_.value(community_id)->setAvatar(img.toImage());
|
||||
if (!communities_.contains(community_id)) {
|
||||
qWarning() << "Avatar update on nonexistent community" << community_id;
|
||||
return;
|
||||
}
|
||||
|
||||
communities_.value(community_id)->setAvatar(img.toImage());
|
||||
}
|
||||
|
||||
void
|
||||
CommunitiesList::highlightSelectedCommunity(const QString &community_id)
|
||||
{
|
||||
emit communityChanged(community_id);
|
||||
emit communityChanged(community_id);
|
||||
|
||||
if (!communities_.contains(community_id)) {
|
||||
qDebug() << "CommunitiesList: clicked unknown community";
|
||||
return;
|
||||
}
|
||||
|
||||
for (auto it = communities_.constBegin(); it != communities_.constEnd(); it++) {
|
||||
if (it.key() != community_id) {
|
||||
it.value()->setPressedState(false);
|
||||
} else {
|
||||
it.value()->setPressedState(true);
|
||||
scrollArea_->ensureWidgetVisible(
|
||||
qobject_cast<QWidget *>(it.value().data()));
|
||||
if (!communities_.contains(community_id)) {
|
||||
qDebug() << "CommunitiesList: clicked unknown community";
|
||||
return;
|
||||
}
|
||||
|
||||
for (auto it = communities_.constBegin(); it != communities_.constEnd(); it++) {
|
||||
if (it.key() != community_id) {
|
||||
it.value()->setPressedState(false);
|
||||
} else {
|
||||
it.value()->setPressedState(true);
|
||||
scrollArea_->ensureWidgetVisible(
|
||||
qobject_cast<QWidget *>(it.value().data()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,35 +3,38 @@
|
||||
CommunitiesListItem::CommunitiesListItem(QSharedPointer<Community> community,
|
||||
QString community_id,
|
||||
QWidget *parent)
|
||||
: QWidget(parent)
|
||||
, community_(community)
|
||||
, communityId_(community_id)
|
||||
: QWidget(parent)
|
||||
, community_(community)
|
||||
, communityId_(community_id)
|
||||
{
|
||||
//menu_ = new Menu(this);
|
||||
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
setFixedHeight(ui::sidebar::CommunitiesSidebarSize);
|
||||
setFixedWidth(ui::sidebar::CommunitiesSidebarSize);
|
||||
// menu_ = new Menu(this);
|
||||
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
setFixedHeight(ui::sidebar::CommunitiesSidebarSize);
|
||||
setFixedWidth(ui::sidebar::CommunitiesSidebarSize);
|
||||
}
|
||||
|
||||
CommunitiesListItem::~CommunitiesListItem() {}
|
||||
CommunitiesListItem::~CommunitiesListItem()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
CommunitiesListItem::setCommunity(QSharedPointer<Community> community)
|
||||
{
|
||||
community_ = community;
|
||||
community_ = community;
|
||||
}
|
||||
|
||||
void
|
||||
CommunitiesListItem::setPressedState(bool state)
|
||||
{
|
||||
if (isPressed_ != state) {
|
||||
isPressed_ = state;
|
||||
update();
|
||||
}
|
||||
if (isPressed_ != state) {
|
||||
isPressed_ = state;
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
CommunitiesListItem::mousePressEvent(QMouseEvent *event) {
|
||||
CommunitiesListItem::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
if (event->buttons() == Qt::RightButton) {
|
||||
QWidget::mousePressEvent(event);
|
||||
return;
|
||||
@ -47,7 +50,6 @@ CommunitiesListItem::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
|
||||
|
||||
QPainter p(this);
|
||||
p.setRenderHint(QPainter::TextAntialiasing);
|
||||
p.setRenderHint(QPainter::SmoothPixmapTransform);
|
||||
@ -65,7 +67,7 @@ CommunitiesListItem::paintEvent(QPaintEvent *event)
|
||||
|
||||
p.setPen(QColor("#333"));
|
||||
|
||||
QRect avatarRegion((width()-IconSize)/2, (height()-IconSize)/2, IconSize, IconSize);
|
||||
QRect avatarRegion((width() - IconSize) / 2, (height() - IconSize) / 2, IconSize, IconSize);
|
||||
|
||||
font.setBold(false);
|
||||
p.setPen(Qt::NoPen);
|
||||
@ -91,14 +93,15 @@ CommunitiesListItem::paintEvent(QPaintEvent *event)
|
||||
p.save();
|
||||
|
||||
QPainterPath path;
|
||||
path.addEllipse((width()-IconSize)/2, (height()-IconSize)/2, IconSize, IconSize);
|
||||
path.addEllipse(
|
||||
(width() - IconSize) / 2, (height() - IconSize) / 2, IconSize, IconSize);
|
||||
p.setClipPath(path);
|
||||
|
||||
p.drawPixmap(avatarRegion, communityAvatar_);
|
||||
p.restore();
|
||||
}
|
||||
|
||||
//TODO: Discord-style community ping counts?
|
||||
// TODO: Discord-style community ping counts?
|
||||
/*if (unreadMsgCount_ > 0) {
|
||||
QColor textColor("white");
|
||||
QColor backgroundColor("#38A3D8");
|
||||
@ -142,15 +145,17 @@ CommunitiesListItem::contextMenuEvent(QContextMenuEvent *event)
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
|
||||
//menu_->popup(event->globalPos());
|
||||
// menu_->popup(event->globalPos());
|
||||
}
|
||||
|
||||
WorldCommunityListItem::WorldCommunityListItem(QWidget *parent)
|
||||
: CommunitiesListItem(QSharedPointer<Community>(), "", parent)
|
||||
: CommunitiesListItem(QSharedPointer<Community>(), "", parent)
|
||||
{
|
||||
}
|
||||
|
||||
WorldCommunityListItem::~WorldCommunityListItem() {}
|
||||
WorldCommunityListItem::~WorldCommunityListItem()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
WorldCommunityListItem::mousePressEvent(QMouseEvent *event)
|
||||
@ -190,10 +195,10 @@ WorldCommunityListItem::paintEvent(QPaintEvent *event)
|
||||
p.setPen(Qt::NoPen);
|
||||
p.setBrush(brush);
|
||||
|
||||
QRect avatarRegion((width()-IconSize)/2, (height()-IconSize)/2, IconSize, IconSize);
|
||||
QRect avatarRegion((width() - IconSize) / 2, (height() - IconSize) / 2, IconSize, IconSize);
|
||||
p.drawEllipse(avatarRegion.center(), IconSize / 2, IconSize / 2);
|
||||
QPainterPath path;
|
||||
path.addEllipse((width()-IconSize)/2, (height()-IconSize)/2, IconSize, IconSize);
|
||||
path.addEllipse((width() - IconSize) / 2, (height() - IconSize) / 2, IconSize, IconSize);
|
||||
p.setClipPath(path);
|
||||
|
||||
p.drawPixmap(avatarRegion, worldIcon);
|
||||
|
@ -1,45 +1,44 @@
|
||||
#include "include/Community.h"
|
||||
|
||||
#include <QJsonValue>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonValue>
|
||||
|
||||
void
|
||||
Community::parseProfile(const QJsonObject &profile)
|
||||
{
|
||||
if (profile["name"].type() == QJsonValue::Type::String) {
|
||||
name_ = profile["name"].toString();
|
||||
} else {
|
||||
name_ = "Unnamed Community"; //TODO: what is correct here?
|
||||
}
|
||||
if (profile["name"].type() == QJsonValue::Type::String) {
|
||||
name_ = profile["name"].toString();
|
||||
} else {
|
||||
name_ = "Unnamed Community"; // TODO: what is correct here?
|
||||
}
|
||||
|
||||
if (profile["avatar_url"].type() == QJsonValue::Type::String) {
|
||||
avatar_ = QUrl(profile["avatar_url"].toString());
|
||||
} else {
|
||||
avatar_ = QUrl();
|
||||
}
|
||||
if (profile["avatar_url"].type() == QJsonValue::Type::String) {
|
||||
avatar_ = QUrl(profile["avatar_url"].toString());
|
||||
} else {
|
||||
avatar_ = QUrl();
|
||||
}
|
||||
|
||||
if (profile["short_description"].type() == QJsonValue::Type::String) {
|
||||
short_description_ = profile["short_description"].toString();
|
||||
} else {
|
||||
short_description_ = "";
|
||||
}
|
||||
|
||||
if (profile["long_description"].type() == QJsonValue::Type::String) {
|
||||
long_description_ = profile["long_description"].toString();
|
||||
} else {
|
||||
long_description_ = "";
|
||||
}
|
||||
if (profile["short_description"].type() == QJsonValue::Type::String) {
|
||||
short_description_ = profile["short_description"].toString();
|
||||
} else {
|
||||
short_description_ = "";
|
||||
}
|
||||
|
||||
if (profile["long_description"].type() == QJsonValue::Type::String) {
|
||||
long_description_ = profile["long_description"].toString();
|
||||
} else {
|
||||
long_description_ = "";
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Community::parseRooms(const QJsonObject &rooms)
|
||||
{
|
||||
rooms_.clear();
|
||||
rooms_.clear();
|
||||
|
||||
for (auto i = 0; i<rooms["chunk"].toArray().size(); i++) {
|
||||
rooms_.append(rooms["chunk"].toArray()[i].toObject()["room_id"].toString());
|
||||
}
|
||||
for (auto i = 0; i < rooms["chunk"].toArray().size(); i++) {
|
||||
rooms_.append(rooms["chunk"].toArray()[i].toObject()["room_id"].toString());
|
||||
}
|
||||
|
||||
emit roomsChanged(rooms_);
|
||||
emit roomsChanged(rooms_);
|
||||
}
|
||||
|
@ -80,4 +80,6 @@ EmojiCategory::EmojiCategory(QString category, QList<Emoji> emoji, QWidget *pare
|
||||
connect(emojiListView_, &QListView::clicked, this, &EmojiCategory::clickIndex);
|
||||
}
|
||||
|
||||
EmojiCategory::~EmojiCategory() {}
|
||||
EmojiCategory::~EmojiCategory()
|
||||
{
|
||||
}
|
||||
|
@ -485,152 +485,148 @@ const QList<Emoji> EmojiProvider::food = {
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa5\x84"), ":spoon:" },
|
||||
};
|
||||
|
||||
const QList<Emoji> EmojiProvider::activity = {
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x91\xbe"), ":space_invader:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x95\xb4"), ":levitate:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xba"), ":fencer:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x87"), ":horse_racing:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x87\xf0\x9f\x8f\xbb"), ":horse_racing_tone1:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x87\xf0\x9f\x8f\xbc"), ":horse_racing_tone2:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x87\xf0\x9f\x8f\xbd"), ":horse_racing_tone3:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x87\xf0\x9f\x8f\xbe"), ":horse_racing_tone4:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x87\xf0\x9f\x8f\xbf"), ":horse_racing_tone5:" },
|
||||
Emoji{ QString::fromUtf8("\xe2\x9b\xb7"), ":skier:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x82"), ":snowboarder:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x8c"), ":golfer:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x84"), ":surfer:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x84\xf0\x9f\x8f\xbb"), ":surfer_tone1:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x84\xf0\x9f\x8f\xbc"), ":surfer_tone2:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x84\xf0\x9f\x8f\xbd"), ":surfer_tone3:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x84\xf0\x9f\x8f\xbe"), ":surfer_tone4:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x84\xf0\x9f\x8f\xbf"), ":surfer_tone5:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xa3"), ":rowboat:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xa3\xf0\x9f\x8f\xbb"), ":rowboat_tone1:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xa3\xf0\x9f\x8f\xbc"), ":rowboat_tone2:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xa3\xf0\x9f\x8f\xbd"), ":rowboat_tone3:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xa3\xf0\x9f\x8f\xbe"), ":rowboat_tone4:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xa3\xf0\x9f\x8f\xbf"), ":rowboat_tone5:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x8a"), ":swimmer:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x8a\xf0\x9f\x8f\xbb"), ":swimmer_tone1:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x8a\xf0\x9f\x8f\xbc"), ":swimmer_tone2:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x8a\xf0\x9f\x8f\xbd"), ":swimmer_tone3:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x8a\xf0\x9f\x8f\xbe"), ":swimmer_tone4:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x8a\xf0\x9f\x8f\xbf"), ":swimmer_tone5:" },
|
||||
Emoji{ QString::fromUtf8("\xe2\x9b\xb9"), ":basketball_player:" },
|
||||
Emoji{ QString::fromUtf8("\xe2\x9b\xb9\xf0\x9f\x8f\xbb"), ":basketball_player_tone1:" },
|
||||
Emoji{ QString::fromUtf8("\xe2\x9b\xb9\xf0\x9f\x8f\xbc"), ":basketball_player_tone2:" },
|
||||
Emoji{ QString::fromUtf8("\xe2\x9b\xb9\xf0\x9f\x8f\xbd"), ":basketball_player_tone3:" },
|
||||
Emoji{ QString::fromUtf8("\xe2\x9b\xb9\xf0\x9f\x8f\xbe"), ":basketball_player_tone4:" },
|
||||
Emoji{ QString::fromUtf8("\xe2\x9b\xb9\xf0\x9f\x8f\xbf"), ":basketball_player_tone5:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x8b"), ":lifter:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x8b\xf0\x9f\x8f\xbb"), ":lifter_tone1:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x8b\xf0\x9f\x8f\xbc"), ":lifter_tone2:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x8b\xf0\x9f\x8f\xbd"), ":lifter_tone3:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x8b\xf0\x9f\x8f\xbe"), ":lifter_tone4:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x8b\xf0\x9f\x8f\xbf"), ":lifter_tone5:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xb4"), ":bicyclist:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xb4\xf0\x9f\x8f\xbb"), ":bicyclist_tone1:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xb4\xf0\x9f\x8f\xbc"), ":bicyclist_tone2:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xb4\xf0\x9f\x8f\xbd"), ":bicyclist_tone3:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xb4\xf0\x9f\x8f\xbe"), ":bicyclist_tone4:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xb4\xf0\x9f\x8f\xbf"), ":bicyclist_tone5:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xb5"), ":mountain_bicyclist:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xb5\xf0\x9f\x8f\xbb"),
|
||||
":mountain_bicyclist_tone1:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xb5\xf0\x9f\x8f\xbc"),
|
||||
":mountain_bicyclist_tone2:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xb5\xf0\x9f\x8f\xbd"),
|
||||
":mountain_bicyclist_tone3:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xb5\xf0\x9f\x8f\xbe"),
|
||||
":mountain_bicyclist_tone4:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xb5\xf0\x9f\x8f\xbf"),
|
||||
":mountain_bicyclist_tone5:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xb8"), ":cartwheel:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xb8\xf0\x9f\x8f\xbb"), ":cartwheel_tone1:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xb8\xf0\x9f\x8f\xbc"), ":cartwheel_tone2:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xb8\xf0\x9f\x8f\xbd"), ":cartwheel_tone3:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xb8\xf0\x9f\x8f\xbe"), ":cartwheel_tone4:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xb8\xf0\x9f\x8f\xbf"), ":cartwheel_tone5:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbc"), ":wrestlers:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbc\xf0\x9f\x8f\xbb"), ":wrestlers_tone1:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbc\xf0\x9f\x8f\xbc"), ":wrestlers_tone2:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbc\xf0\x9f\x8f\xbd"), ":wrestlers_tone3:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbc\xf0\x9f\x8f\xbe"), ":wrestlers_tone4:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbc\xf0\x9f\x8f\xbf"), ":wrestlers_tone5:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbd"), ":water_polo:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbd\xf0\x9f\x8f\xbb"), ":water_polo_tone1:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbd\xf0\x9f\x8f\xbc"), ":water_polo_tone2:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbd\xf0\x9f\x8f\xbd"), ":water_polo_tone3:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbd\xf0\x9f\x8f\xbe"), ":water_polo_tone4:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbd\xf0\x9f\x8f\xbf"), ":water_polo_tone5:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbe"), ":handball:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbe\xf0\x9f\x8f\xbb"), ":handball_tone1:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbe\xf0\x9f\x8f\xbc"), ":handball_tone2:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbe\xf0\x9f\x8f\xbd"), ":handball_tone3:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbe\xf0\x9f\x8f\xbe"), ":handball_tone4:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbe\xf0\x9f\x8f\xbf"), ":handball_tone5:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xb9"), ":juggling:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xb9\xf0\x9f\x8f\xbb"), ":juggling_tone1:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xb9\xf0\x9f\x8f\xbc"), ":juggling_tone2:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xb9\xf0\x9f\x8f\xbd"), ":juggling_tone3:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xb9\xf0\x9f\x8f\xbe"), ":juggling_tone4:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xb9\xf0\x9f\x8f\xbf"), ":juggling_tone5:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xaa"), ":circus_tent:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xad"), ":performing_arts:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xa8"), ":art:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xb0"), ":slot_machine:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9b\x80"), ":bath:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9b\x80\xf0\x9f\x8f\xbb"), ":bath_tone1:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9b\x80\xf0\x9f\x8f\xbc"), ":bath_tone2:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9b\x80\xf0\x9f\x8f\xbd"), ":bath_tone3:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9b\x80\xf0\x9f\x8f\xbe"), ":bath_tone4:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9b\x80\xf0\x9f\x8f\xbf"), ":bath_tone5:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\x97"), ":reminder_ribbon:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\x9f"), ":tickets:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xab"), ":ticket:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\x96"), ":military_medal:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x86"), ":trophy:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x85"), ":medal:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa5\x87"), ":first_place:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa5\x88"), ":second_place:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa5\x89"), ":third_place:" },
|
||||
Emoji{ QString::fromUtf8("\xe2\x9a\xbd"), ":soccer:" },
|
||||
Emoji{ QString::fromUtf8("\xe2\x9a\xbe"), ":baseball:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x80"), ":basketball:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x90"), ":volleyball:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x88"), ":football:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x89"), ":rugby_football:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xbe"), ":tennis:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xb1"), ":8ball:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xb3"), ":bowling:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x8f"), ":cricket:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x91"), ":field_hockey:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x92"), ":hockey:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x93"), ":ping_pong:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\xb8"), ":badminton:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa5\x8a"), ":boxing_glove:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa5\x8b"), ":martial_arts_uniform:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa5\x85"), ":goal:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xaf"), ":dart:" },
|
||||
Emoji{ QString::fromUtf8("\xe2\x9b\xb3"), ":golf:" },
|
||||
Emoji{ QString::fromUtf8("\xe2\x9b\xb8"), ":ice_skate:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xa3"), ":fishing_pole_and_fish:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xbd"), ":running_shirt_with_sash:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xbf"), ":ski:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xae"), ":video_game:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xb2"), ":game_die:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xbc"), ":musical_score:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xa4"), ":microphone:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xa7"), ":headphones:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xb7"), ":saxophone:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xb8"), ":guitar:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xb9"), ":musical_keyboard:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xba"), ":trumpet:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xbb"), ":violin:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa5\x81"), ":drum:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xac"), ":clapper:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\xb9"), ":bow_and_arrow:" },
|
||||
};
|
||||
const QList<Emoji> EmojiProvider::activity =
|
||||
{
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x91\xbe"), ":space_invader:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x95\xb4"), ":levitate:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xba"), ":fencer:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x87"), ":horse_racing:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x87\xf0\x9f\x8f\xbb"), ":horse_racing_tone1:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x87\xf0\x9f\x8f\xbc"), ":horse_racing_tone2:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x87\xf0\x9f\x8f\xbd"), ":horse_racing_tone3:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x87\xf0\x9f\x8f\xbe"), ":horse_racing_tone4:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x87\xf0\x9f\x8f\xbf"), ":horse_racing_tone5:" },
|
||||
Emoji{ QString::fromUtf8("\xe2\x9b\xb7"), ":skier:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x82"), ":snowboarder:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x8c"), ":golfer:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x84"), ":surfer:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x84\xf0\x9f\x8f\xbb"), ":surfer_tone1:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x84\xf0\x9f\x8f\xbc"), ":surfer_tone2:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x84\xf0\x9f\x8f\xbd"), ":surfer_tone3:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x84\xf0\x9f\x8f\xbe"), ":surfer_tone4:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x84\xf0\x9f\x8f\xbf"), ":surfer_tone5:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xa3"), ":rowboat:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xa3\xf0\x9f\x8f\xbb"), ":rowboat_tone1:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xa3\xf0\x9f\x8f\xbc"), ":rowboat_tone2:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xa3\xf0\x9f\x8f\xbd"), ":rowboat_tone3:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xa3\xf0\x9f\x8f\xbe"), ":rowboat_tone4:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xa3\xf0\x9f\x8f\xbf"), ":rowboat_tone5:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x8a"), ":swimmer:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x8a\xf0\x9f\x8f\xbb"), ":swimmer_tone1:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x8a\xf0\x9f\x8f\xbc"), ":swimmer_tone2:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x8a\xf0\x9f\x8f\xbd"), ":swimmer_tone3:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x8a\xf0\x9f\x8f\xbe"), ":swimmer_tone4:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x8a\xf0\x9f\x8f\xbf"), ":swimmer_tone5:" },
|
||||
Emoji{ QString::fromUtf8("\xe2\x9b\xb9"), ":basketball_player:" },
|
||||
Emoji{ QString::fromUtf8("\xe2\x9b\xb9\xf0\x9f\x8f\xbb"), ":basketball_player_tone1:" },
|
||||
Emoji{ QString::fromUtf8("\xe2\x9b\xb9\xf0\x9f\x8f\xbc"), ":basketball_player_tone2:" },
|
||||
Emoji{ QString::fromUtf8("\xe2\x9b\xb9\xf0\x9f\x8f\xbd"), ":basketball_player_tone3:" },
|
||||
Emoji{ QString::fromUtf8("\xe2\x9b\xb9\xf0\x9f\x8f\xbe"), ":basketball_player_tone4:" },
|
||||
Emoji{ QString::fromUtf8("\xe2\x9b\xb9\xf0\x9f\x8f\xbf"), ":basketball_player_tone5:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x8b"), ":lifter:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x8b\xf0\x9f\x8f\xbb"), ":lifter_tone1:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x8b\xf0\x9f\x8f\xbc"), ":lifter_tone2:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x8b\xf0\x9f\x8f\xbd"), ":lifter_tone3:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x8b\xf0\x9f\x8f\xbe"), ":lifter_tone4:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x8b\xf0\x9f\x8f\xbf"), ":lifter_tone5:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xb4"), ":bicyclist:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xb4\xf0\x9f\x8f\xbb"), ":bicyclist_tone1:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xb4\xf0\x9f\x8f\xbc"), ":bicyclist_tone2:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xb4\xf0\x9f\x8f\xbd"), ":bicyclist_tone3:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xb4\xf0\x9f\x8f\xbe"), ":bicyclist_tone4:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xb4\xf0\x9f\x8f\xbf"), ":bicyclist_tone5:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xb5"), ":mountain_bicyclist:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xb5\xf0\x9f\x8f\xbb"), ":mountain_bicyclist_tone1:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xb5\xf0\x9f\x8f\xbc"), ":mountain_bicyclist_tone2:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xb5\xf0\x9f\x8f\xbd"), ":mountain_bicyclist_tone3:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xb5\xf0\x9f\x8f\xbe"), ":mountain_bicyclist_tone4:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9a\xb5\xf0\x9f\x8f\xbf"), ":mountain_bicyclist_tone5:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xb8"), ":cartwheel:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xb8\xf0\x9f\x8f\xbb"), ":cartwheel_tone1:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xb8\xf0\x9f\x8f\xbc"), ":cartwheel_tone2:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xb8\xf0\x9f\x8f\xbd"), ":cartwheel_tone3:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xb8\xf0\x9f\x8f\xbe"), ":cartwheel_tone4:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xb8\xf0\x9f\x8f\xbf"), ":cartwheel_tone5:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbc"), ":wrestlers:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbc\xf0\x9f\x8f\xbb"), ":wrestlers_tone1:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbc\xf0\x9f\x8f\xbc"), ":wrestlers_tone2:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbc\xf0\x9f\x8f\xbd"), ":wrestlers_tone3:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbc\xf0\x9f\x8f\xbe"), ":wrestlers_tone4:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbc\xf0\x9f\x8f\xbf"), ":wrestlers_tone5:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbd"), ":water_polo:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbd\xf0\x9f\x8f\xbb"), ":water_polo_tone1:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbd\xf0\x9f\x8f\xbc"), ":water_polo_tone2:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbd\xf0\x9f\x8f\xbd"), ":water_polo_tone3:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbd\xf0\x9f\x8f\xbe"), ":water_polo_tone4:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbd\xf0\x9f\x8f\xbf"), ":water_polo_tone5:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbe"), ":handball:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbe\xf0\x9f\x8f\xbb"), ":handball_tone1:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbe\xf0\x9f\x8f\xbc"), ":handball_tone2:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbe\xf0\x9f\x8f\xbd"), ":handball_tone3:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbe\xf0\x9f\x8f\xbe"), ":handball_tone4:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xbe\xf0\x9f\x8f\xbf"), ":handball_tone5:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xb9"), ":juggling:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xb9\xf0\x9f\x8f\xbb"), ":juggling_tone1:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xb9\xf0\x9f\x8f\xbc"), ":juggling_tone2:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xb9\xf0\x9f\x8f\xbd"), ":juggling_tone3:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xb9\xf0\x9f\x8f\xbe"), ":juggling_tone4:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa4\xb9\xf0\x9f\x8f\xbf"), ":juggling_tone5:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xaa"), ":circus_tent:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xad"), ":performing_arts:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xa8"), ":art:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xb0"), ":slot_machine:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9b\x80"), ":bath:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9b\x80\xf0\x9f\x8f\xbb"), ":bath_tone1:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9b\x80\xf0\x9f\x8f\xbc"), ":bath_tone2:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9b\x80\xf0\x9f\x8f\xbd"), ":bath_tone3:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9b\x80\xf0\x9f\x8f\xbe"), ":bath_tone4:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x9b\x80\xf0\x9f\x8f\xbf"), ":bath_tone5:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\x97"), ":reminder_ribbon:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\x9f"), ":tickets:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xab"), ":ticket:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\x96"), ":military_medal:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x86"), ":trophy:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x85"), ":medal:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa5\x87"), ":first_place:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa5\x88"), ":second_place:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa5\x89"), ":third_place:" },
|
||||
Emoji{ QString::fromUtf8("\xe2\x9a\xbd"), ":soccer:" },
|
||||
Emoji{ QString::fromUtf8("\xe2\x9a\xbe"), ":baseball:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x80"), ":basketball:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x90"), ":volleyball:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x88"), ":football:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x89"), ":rugby_football:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xbe"), ":tennis:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xb1"), ":8ball:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xb3"), ":bowling:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x8f"), ":cricket:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x91"), ":field_hockey:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x92"), ":hockey:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x93"), ":ping_pong:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\xb8"), ":badminton:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa5\x8a"), ":boxing_glove:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa5\x8b"), ":martial_arts_uniform:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa5\x85"), ":goal:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xaf"), ":dart:" },
|
||||
Emoji{ QString::fromUtf8("\xe2\x9b\xb3"), ":golf:" },
|
||||
Emoji{ QString::fromUtf8("\xe2\x9b\xb8"), ":ice_skate:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xa3"), ":fishing_pole_and_fish:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xbd"), ":running_shirt_with_sash:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xbf"), ":ski:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xae"), ":video_game:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xb2"), ":game_die:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xbc"), ":musical_score:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xa4"), ":microphone:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xa7"), ":headphones:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xb7"), ":saxophone:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xb8"), ":guitar:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xb9"), ":musical_keyboard:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xba"), ":trumpet:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xbb"), ":violin:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\xa5\x81"), ":drum:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8e\xac"), ":clapper:" },
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\xb9"), ":bow_and_arrow:" },
|
||||
};
|
||||
|
||||
const QList<Emoji> EmojiProvider::travel = {
|
||||
Emoji{ QString::fromUtf8("\xf0\x9f\x8f\x8e"), ":race_car:" },
|
||||
|
@ -22,7 +22,9 @@
|
||||
#include "Deserializable.h"
|
||||
#include "Login.h"
|
||||
|
||||
LoginRequest::LoginRequest() {}
|
||||
LoginRequest::LoginRequest()
|
||||
{
|
||||
}
|
||||
|
||||
LoginRequest::LoginRequest(QString username, QString password)
|
||||
: user_(username)
|
||||
|
@ -297,4 +297,6 @@ LoginPage::onBackButtonClicked()
|
||||
emit backButtonClicked();
|
||||
}
|
||||
|
||||
LoginPage::~LoginPage() {}
|
||||
LoginPage::~LoginPage()
|
||||
{
|
||||
}
|
||||
|
@ -253,4 +253,6 @@ MainWindow::instance()
|
||||
return instance_;
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow() {}
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
}
|
||||
|
@ -230,8 +230,10 @@ MatrixClient::onGetOwnCommunitiesResponse(QNetworkReply *reply)
|
||||
|
||||
try {
|
||||
QList<QString> response;
|
||||
for (auto it = json["groups"].toArray().constBegin(); it != json["groups"].toArray().constEnd(); it++) {
|
||||
response.append(it->toString());
|
||||
for (auto it = json["groups"].toArray().constBegin();
|
||||
it != json["groups"].toArray().constEnd();
|
||||
it++) {
|
||||
response.append(it->toString());
|
||||
}
|
||||
emit getOwnCommunitiesResponse(response);
|
||||
} catch (DeserializationException &e) {
|
||||
@ -434,8 +436,8 @@ MatrixClient::onCommunityProfileResponse(QNetworkReply *reply)
|
||||
return;
|
||||
}
|
||||
|
||||
auto data = reply->readAll();
|
||||
const auto json = QJsonDocument::fromJson(data).object();
|
||||
auto data = reply->readAll();
|
||||
const auto json = QJsonDocument::fromJson(data).object();
|
||||
const auto communityId = reply->property("communityId").toString();
|
||||
|
||||
emit communityProfileRetrieved(communityId, json);
|
||||
@ -453,8 +455,8 @@ MatrixClient::onCommunityRoomsResponse(QNetworkReply *reply)
|
||||
return;
|
||||
}
|
||||
|
||||
auto data = reply->readAll();
|
||||
const auto json = QJsonDocument::fromJson(data).object();
|
||||
auto data = reply->readAll();
|
||||
const auto json = QJsonDocument::fromJson(data).object();
|
||||
const auto communityId = reply->property("communityId").toString();
|
||||
|
||||
emit communityRoomsRetrieved(communityId, json);
|
||||
|
@ -181,4 +181,6 @@ RegisterPage::onRegisterButtonClicked()
|
||||
}
|
||||
}
|
||||
|
||||
RegisterPage::~RegisterPage() {}
|
||||
RegisterPage::~RegisterPage()
|
||||
{
|
||||
}
|
||||
|
@ -310,4 +310,6 @@ RoomInfoListItem::mousePressEvent(QMouseEvent *event)
|
||||
ripple_overlay_->addRipple(ripple);
|
||||
}
|
||||
|
||||
RoomInfoListItem::~RoomInfoListItem() {}
|
||||
RoomInfoListItem::~RoomInfoListItem()
|
||||
{
|
||||
}
|
||||
|
@ -62,7 +62,9 @@ RoomList::RoomList(QSharedPointer<MatrixClient> client, QWidget *parent)
|
||||
SLOT(updateRoomAvatar(const QString &, const QPixmap &)));
|
||||
}
|
||||
|
||||
RoomList::~RoomList() {}
|
||||
RoomList::~RoomList()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
RoomList::clear()
|
||||
@ -291,35 +293,35 @@ RoomList::setFilterRooms(bool filterRooms)
|
||||
{
|
||||
filterRooms_ = filterRooms;
|
||||
|
||||
for (int i=0; i<contentsLayout_->count(); i++) {
|
||||
for (int i = 0; i < contentsLayout_->count(); i++) {
|
||||
// If roomFilter_ contains the room for the current RoomInfoListItem,
|
||||
// show the list item, otherwise hide it
|
||||
RoomInfoListItem *listitem =
|
||||
(RoomInfoListItem *)contentsLayout_->itemAt(i)->widget();
|
||||
|
||||
//If roomFilter_ contains the room for the current RoomInfoListItem,
|
||||
//show the list item, otherwise hide it
|
||||
RoomInfoListItem *listitem = (RoomInfoListItem *) contentsLayout_->itemAt(i)->widget();
|
||||
|
||||
if (listitem != nullptr) {
|
||||
if (!filterRooms) {
|
||||
contentsLayout_->itemAt(i)->widget()->show();
|
||||
} else if (roomFilter_.contains(listitem->roomId())) {
|
||||
contentsLayout_->itemAt(i)->widget()->show();
|
||||
} else {
|
||||
contentsLayout_->itemAt(i)->widget()->hide();
|
||||
if (listitem != nullptr) {
|
||||
if (!filterRooms) {
|
||||
contentsLayout_->itemAt(i)->widget()->show();
|
||||
} else if (roomFilter_.contains(listitem->roomId())) {
|
||||
contentsLayout_->itemAt(i)->widget()->show();
|
||||
} else {
|
||||
contentsLayout_->itemAt(i)->widget()->hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!roomFilter_.contains(selectedRoom_)) {
|
||||
RoomInfoListItem *firstVisibleRoom = nullptr;
|
||||
for (int i=0; i<contentsLayout_->count(); i++) {
|
||||
QWidget *item = contentsLayout_->itemAt(i)->widget();
|
||||
if (item != nullptr && item->isVisible()) {
|
||||
firstVisibleRoom = (RoomInfoListItem *) item;
|
||||
break;
|
||||
RoomInfoListItem *firstVisibleRoom = nullptr;
|
||||
for (int i = 0; i < contentsLayout_->count(); i++) {
|
||||
QWidget *item = contentsLayout_->itemAt(i)->widget();
|
||||
if (item != nullptr && item->isVisible()) {
|
||||
firstVisibleRoom = (RoomInfoListItem *)item;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (firstVisibleRoom != nullptr) {
|
||||
highlightSelectedRoom(firstVisibleRoom->roomId());
|
||||
}
|
||||
}
|
||||
if (firstVisibleRoom != nullptr) {
|
||||
highlightSelectedRoom(firstVisibleRoom->roomId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -231,4 +231,6 @@ TextInputWidget::hideUploadSpinner()
|
||||
spinner_->stop();
|
||||
}
|
||||
|
||||
TextInputWidget::~TextInputWidget() {}
|
||||
TextInputWidget::~TextInputWidget()
|
||||
{
|
||||
}
|
||||
|
@ -461,4 +461,6 @@ TimelineItem::descriptiveTime(const QDateTime &then)
|
||||
return then.toString("dd/MM/yy");
|
||||
}
|
||||
|
||||
TimelineItem::~TimelineItem() {}
|
||||
TimelineItem::~TimelineItem()
|
||||
{
|
||||
}
|
||||
|
@ -37,7 +37,9 @@ TimelineViewManager::TimelineViewManager(QSharedPointer<MatrixClient> client, QW
|
||||
client_.data(), &MatrixClient::messageSent, this, &TimelineViewManager::messageSent);
|
||||
}
|
||||
|
||||
TimelineViewManager::~TimelineViewManager() {}
|
||||
TimelineViewManager::~TimelineViewManager()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
TimelineViewManager::messageSent(const QString &event_id, const QString &roomid, int txn_id)
|
||||
|
@ -171,4 +171,6 @@ TopRoomBar::setRoomSettings(QSharedPointer<RoomSettings> settings)
|
||||
roomSettings_ = settings;
|
||||
}
|
||||
|
||||
TopRoomBar::~TopRoomBar() {}
|
||||
TopRoomBar::~TopRoomBar()
|
||||
{
|
||||
}
|
||||
|
@ -121,7 +121,9 @@ UserInfoWidget::closeLogoutDialog(bool isLoggingOut)
|
||||
emit logout();
|
||||
}
|
||||
|
||||
UserInfoWidget::~UserInfoWidget() {}
|
||||
UserInfoWidget::~UserInfoWidget()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
UserInfoWidget::resizeEvent(QResizeEvent *event)
|
||||
|
@ -19,7 +19,9 @@ Avatar::Avatar(QWidget *parent)
|
||||
setSizePolicy(policy);
|
||||
}
|
||||
|
||||
Avatar::~Avatar() {}
|
||||
Avatar::~Avatar()
|
||||
{
|
||||
}
|
||||
|
||||
QColor
|
||||
Avatar::textColor() const
|
||||
|
@ -22,7 +22,9 @@ Badge::Badge(const QString &text, QWidget *parent)
|
||||
setText(text);
|
||||
}
|
||||
|
||||
Badge::~Badge() {}
|
||||
Badge::~Badge()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
Badge::init()
|
||||
|
@ -80,7 +80,9 @@ FlatButton::FlatButton(const QString &text, ui::Role role, QWidget *parent, ui::
|
||||
setRole(role);
|
||||
}
|
||||
|
||||
FlatButton::~FlatButton() {}
|
||||
FlatButton::~FlatButton()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
FlatButton::applyPreset(ui::ButtonPreset preset)
|
||||
@ -610,7 +612,9 @@ FlatButtonStateMachine::FlatButtonStateMachine(FlatButton *parent)
|
||||
addTransition(button_, QEvent::FocusOut, pressed_state_, hovered_state_);
|
||||
}
|
||||
|
||||
FlatButtonStateMachine::~FlatButtonStateMachine() {}
|
||||
FlatButtonStateMachine::~FlatButtonStateMachine()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
FlatButtonStateMachine::setOverlayOpacity(qreal opacity)
|
||||
|
@ -70,7 +70,9 @@ RaisedButton::RaisedButton(const QString &text, QWidget *parent)
|
||||
setText(text);
|
||||
}
|
||||
|
||||
RaisedButton::~RaisedButton() {}
|
||||
RaisedButton::~RaisedButton()
|
||||
{
|
||||
}
|
||||
|
||||
bool
|
||||
RaisedButton::event(QEvent *event)
|
||||
|
@ -25,7 +25,9 @@ Ripple::Ripple(const QPoint ¢er, RippleOverlay *overlay, QObject *parent)
|
||||
init();
|
||||
}
|
||||
|
||||
Ripple::~Ripple() {}
|
||||
Ripple::~Ripple()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
Ripple::setRadius(qreal radius)
|
||||
|
@ -11,7 +11,9 @@ RippleOverlay::RippleOverlay(QWidget *parent)
|
||||
setAttribute(Qt::WA_NoSystemBackground);
|
||||
}
|
||||
|
||||
RippleOverlay::~RippleOverlay() {}
|
||||
RippleOverlay::~RippleOverlay()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
RippleOverlay::addRipple(Ripple *ripple)
|
||||
|
@ -32,7 +32,9 @@ TextField::TextField(QWidget *parent)
|
||||
QCoreApplication::processEvents();
|
||||
}
|
||||
|
||||
TextField::~TextField() {}
|
||||
TextField::~TextField()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
TextField::setBackgroundColor(const QColor &color)
|
||||
@ -272,7 +274,9 @@ TextFieldStateMachine::TextFieldStateMachine(TextField *parent)
|
||||
connect(text_field_, SIGNAL(textChanged(QString)), this, SLOT(setupProperties()));
|
||||
}
|
||||
|
||||
TextFieldStateMachine::~TextFieldStateMachine() {}
|
||||
TextFieldStateMachine::~TextFieldStateMachine()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
TextFieldStateMachine::setLabel(TextFieldLabel *label)
|
||||
@ -349,7 +353,9 @@ TextFieldLabel::TextFieldLabel(TextField *parent)
|
||||
setFont(font);
|
||||
}
|
||||
|
||||
TextFieldLabel::~TextFieldLabel() {}
|
||||
TextFieldLabel::~TextFieldLabel()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
TextFieldLabel::paintEvent(QPaintEvent *)
|
||||
|
@ -22,7 +22,9 @@ Theme::Theme(QObject *parent)
|
||||
setColor("Transparent", ui::Color::Transparent);
|
||||
}
|
||||
|
||||
Theme::~Theme() {}
|
||||
Theme::~Theme()
|
||||
{
|
||||
}
|
||||
|
||||
QColor
|
||||
Theme::rgba(int r, int g, int b, qreal a) const
|
||||
|
Loading…
Reference in New Issue
Block a user