Change indentation to 4 spaces
This commit is contained in:
parent
e118f3882d
commit
cfca7157b9
165 changed files with 23146 additions and 23975 deletions
|
|
@ -13,61 +13,61 @@
|
|||
|
||||
class ReadReceiptsModel : public QAbstractListModel
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum Roles
|
||||
{
|
||||
Mxid,
|
||||
DisplayName,
|
||||
AvatarUrl,
|
||||
Timestamp,
|
||||
RawTimestamp,
|
||||
};
|
||||
enum Roles
|
||||
{
|
||||
Mxid,
|
||||
DisplayName,
|
||||
AvatarUrl,
|
||||
Timestamp,
|
||||
RawTimestamp,
|
||||
};
|
||||
|
||||
explicit ReadReceiptsModel(QString event_id, QString room_id, QObject *parent = nullptr);
|
||||
explicit ReadReceiptsModel(QString event_id, QString room_id, QObject *parent = nullptr);
|
||||
|
||||
QString eventId() const { return event_id_; }
|
||||
QString roomId() const { return room_id_; }
|
||||
QString eventId() const { return event_id_; }
|
||||
QString roomId() const { return room_id_; }
|
||||
|
||||
QHash<int, QByteArray> roleNames() const override;
|
||||
int rowCount(const QModelIndex &parent) const override
|
||||
{
|
||||
Q_UNUSED(parent)
|
||||
return readReceipts_.size();
|
||||
}
|
||||
QVariant data(const QModelIndex &index, int role) const override;
|
||||
QHash<int, QByteArray> roleNames() const override;
|
||||
int rowCount(const QModelIndex &parent) const override
|
||||
{
|
||||
Q_UNUSED(parent)
|
||||
return readReceipts_.size();
|
||||
}
|
||||
QVariant data(const QModelIndex &index, int role) const override;
|
||||
|
||||
public slots:
|
||||
void addUsers(const std::multimap<uint64_t, std::string, std::greater<uint64_t>> &users);
|
||||
void update();
|
||||
void addUsers(const std::multimap<uint64_t, std::string, std::greater<uint64_t>> &users);
|
||||
void update();
|
||||
|
||||
private:
|
||||
QString dateFormat(const QDateTime &then) const;
|
||||
QString dateFormat(const QDateTime &then) const;
|
||||
|
||||
QString event_id_;
|
||||
QString room_id_;
|
||||
QVector<QPair<QString, QDateTime>> readReceipts_;
|
||||
QString event_id_;
|
||||
QString room_id_;
|
||||
QVector<QPair<QString, QDateTime>> readReceipts_;
|
||||
};
|
||||
|
||||
class ReadReceiptsProxy : public QSortFilterProxyModel
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(QString eventId READ eventId CONSTANT)
|
||||
Q_PROPERTY(QString roomId READ roomId CONSTANT)
|
||||
Q_PROPERTY(QString eventId READ eventId CONSTANT)
|
||||
Q_PROPERTY(QString roomId READ roomId CONSTANT)
|
||||
|
||||
public:
|
||||
explicit ReadReceiptsProxy(QString event_id, QString room_id, QObject *parent = nullptr);
|
||||
explicit ReadReceiptsProxy(QString event_id, QString room_id, QObject *parent = nullptr);
|
||||
|
||||
QString eventId() const { return event_id_; }
|
||||
QString roomId() const { return room_id_; }
|
||||
QString eventId() const { return event_id_; }
|
||||
QString roomId() const { return room_id_; }
|
||||
|
||||
private:
|
||||
QString event_id_;
|
||||
QString room_id_;
|
||||
QString event_id_;
|
||||
QString room_id_;
|
||||
|
||||
ReadReceiptsModel model_;
|
||||
ReadReceiptsModel model_;
|
||||
};
|
||||
|
||||
#endif // READRECEIPTSMODEL_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue