mirror of
https://gitee.com/Zhaoxin59/my-chat_-client.git
synced 2026-02-14 00:51:48 +08:00
has been completed.
This commit is contained in:
@ -43,6 +43,9 @@ public:
|
||||
//清空窗口中所有的历史消息
|
||||
void clear();
|
||||
|
||||
void clickSearchBtn();
|
||||
void clickSearchBtnDone();
|
||||
|
||||
private:
|
||||
void initScrollArea(QGridLayout* layout);
|
||||
|
||||
@ -56,3 +59,50 @@ private:
|
||||
//持有所有的历史消息结果的容器对象
|
||||
QWidget* container;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
/// 展示图片历史消息
|
||||
////////////////////////////////////////////////////////////////////
|
||||
class ImageButton : public QPushButton
|
||||
{
|
||||
public:
|
||||
ImageButton(const QString& fileId, const QByteArray& content);
|
||||
void updateUI(const QString& fileId, const QByteArray& content);
|
||||
|
||||
private:
|
||||
QString fileId;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
/// 展示文件历史消息
|
||||
////////////////////////////////////////////////////////////////////
|
||||
class FileLabel : public QLabel {
|
||||
public:
|
||||
FileLabel(const QString& fileId, const QString& filename);
|
||||
void getContentDone(const QString& fileId, const QByteArray& fileContent);
|
||||
|
||||
void mousePressEvent(QMouseEvent* event) override;
|
||||
|
||||
private:
|
||||
QString fileId;
|
||||
QByteArray content;
|
||||
QString filename;
|
||||
bool loadDone = false;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
/// 展示语音历史消息
|
||||
////////////////////////////////////////////////////////////////////
|
||||
class SpeechLabel : public QLabel {
|
||||
public:
|
||||
SpeechLabel(const QString& fileId);
|
||||
|
||||
void getContentDone(const QString& fileId, const QByteArray& content);
|
||||
|
||||
void mousePressEvent(QMouseEvent* event);
|
||||
|
||||
private:
|
||||
QString fileId;
|
||||
QByteArray content;
|
||||
bool loadDone = false;
|
||||
};
|
||||
Reference in New Issue
Block a user