|
|
|
@ -8,6 +8,8 @@ |
|
|
|
#include <QTimer> |
|
|
|
#include <QTimer> |
|
|
|
#include <QSet> |
|
|
|
#include <QSet> |
|
|
|
#include <QThreadPool> |
|
|
|
#include <QThreadPool> |
|
|
|
|
|
|
|
#include <QJsonObject> |
|
|
|
|
|
|
|
#include <QPointer> |
|
|
|
|
|
|
|
|
|
|
|
class ChatView; |
|
|
|
class ChatView; |
|
|
|
class InputBar; |
|
|
|
class InputBar; |
|
|
|
@ -18,6 +20,8 @@ class AudioRecorder; |
|
|
|
class QLabel; |
|
|
|
class QLabel; |
|
|
|
class QPushButton; |
|
|
|
class QPushButton; |
|
|
|
class RadioPanel; |
|
|
|
class RadioPanel; |
|
|
|
|
|
|
|
class QDialog; |
|
|
|
|
|
|
|
struct MessageRow; |
|
|
|
|
|
|
|
|
|
|
|
class MessageList : public QWidget { |
|
|
|
class MessageList : public QWidget { |
|
|
|
Q_OBJECT |
|
|
|
Q_OBJECT |
|
|
|
@ -37,6 +41,8 @@ public: |
|
|
|
void onDmCallRoute(const uint8_t* data, int len); |
|
|
|
void onDmCallRoute(const uint8_t* data, int len); |
|
|
|
void clearDmCallRoute(); |
|
|
|
void clearDmCallRoute(); |
|
|
|
void onAttachmentPreparation(const uint8_t* data, int len); |
|
|
|
void onAttachmentPreparation(const uint8_t* data, int len); |
|
|
|
|
|
|
|
void onFeedbackChanged(const uint8_t* data, int len); |
|
|
|
|
|
|
|
void onFeedbackResult(const uint8_t* data, int len); |
|
|
|
void onRadioTalk(quint64 groupId, quint64 srcNodeId, bool on); /* индикация говорящего */ |
|
|
|
void onRadioTalk(quint64 groupId, quint64 srcNodeId, bool on); /* индикация говорящего */ |
|
|
|
|
|
|
|
|
|
|
|
signals: |
|
|
|
signals: |
|
|
|
@ -73,6 +79,17 @@ private: |
|
|
|
bool m_radioOn = false; |
|
|
|
bool m_radioOn = false; |
|
|
|
QThreadPool m_thumbnailPool; |
|
|
|
QThreadPool m_thumbnailPool; |
|
|
|
QSet<QString> m_thumbnailJobs; |
|
|
|
QSet<QString> m_thumbnailJobs; |
|
|
|
|
|
|
|
QPushButton* m_pollBtn = nullptr; |
|
|
|
|
|
|
|
QHash<QString, QJsonObject> m_feedback; |
|
|
|
|
|
|
|
QPointer<QDialog> m_pollDialog; |
|
|
|
|
|
|
|
QString m_pollDialogMessage, m_pendingPoll; |
|
|
|
|
|
|
|
quint64 m_feedbackSequence = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void sendFeedback(QJsonObject command, bool userAction = true); |
|
|
|
|
|
|
|
void setupFeedback(QStandardItem* item, const MessageRow& message, const QString& channel); |
|
|
|
|
|
|
|
void createPoll(); |
|
|
|
|
|
|
|
void showPoll(const QString& messageId); |
|
|
|
|
|
|
|
void applyFeedback(const QJsonObject& state); |
|
|
|
|
|
|
|
|
|
|
|
QString authorName(quint64 nodeId) const; |
|
|
|
QString authorName(quint64 nodeId) const; |
|
|
|
void restoreScrollPosition(const QString& channelId); |
|
|
|
void restoreScrollPosition(const QString& channelId); |
|
|
|
|