Files
neochat/src/matriqueroom.h
Black Hat cfa8043596 A lot of improvements.
Fix laggish RoomListView when dragging.
Remove per-room timer and add timer in RoomForm.
Remove singleton module and use file as singleton.
Minor UI tweak in RoomListView.
Pass room to RoomListView via "currentRoom" delegate property and remove
RoomListForm-wide currentRoom.
Put menu files in a separate folder.
Show initial image in ImageStatus when avatar is not loaded.
Add about page.
Merge all setting pages into Setting.qml.
Add option to rearrange rooms by activity.
Add option to use RichText parser.
Add document url.
2018-08-24 13:25:41 +08:00

52 lines
1.2 KiB
C++

#ifndef MATRIQUEROOM_H
#define MATRIQUEROOM_H
#include "room.h"
#include <QObject>
#include <QTimer>
using namespace QMatrixClient;
class MatriqueRoom : public Room {
Q_OBJECT
Q_PROPERTY(bool hasUsersTyping READ hasUsersTyping NOTIFY typingChanged)
Q_PROPERTY(QString usersTyping READ getUsersTyping NOTIFY typingChanged)
Q_PROPERTY(QString cachedInput READ cachedInput WRITE setCachedInput NOTIFY
cachedInputChanged)
public:
explicit MatriqueRoom(Connection* connection, QString roomId,
JoinState joinState = {});
const QString& cachedInput() const { return m_cachedInput; }
void setCachedInput(const QString& input) {
if (input != m_cachedInput) {
m_cachedInput = input;
emit cachedInputChanged();
}
}
bool hasUsersTyping();
QString getUsersTyping();
QString lastEvent();
private:
QString m_cachedInput;
QString getMIME(const QUrl& fileUrl) const;
void postFile(const QUrl& localFile, const QUrl& mxcUrl);
signals:
void cachedInputChanged();
public slots:
void chooseAndUploadFile();
void saveFileAs(QString eventId);
void acceptInvitation();
void forget();
void sendTypingNotification(bool isTyping);
};
#endif // MATRIQUEROOM_H