mirror of
https://gitee.com/Zhaoxin59/my-chat_-client.git
synced 2026-02-14 00:51:48 +08:00
refactor: 大规模调整项目目录结构,将ChatClient和ChatServer整合为Monorepo结构,并分为两个独立文件夹:chatclient/ 和 chatserver/。更新了ChatClient的CMakeLists.txt配置以适配新结构。
This commit is contained in:
56
ChatClient/include/messageeditarea.h
Normal file
56
ChatClient/include/messageeditarea.h
Normal file
@ -0,0 +1,56 @@
|
||||
#ifndef MESSAGEEDITAREA_H
|
||||
#define MESSAGEEDITAREA_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QPushButton>
|
||||
#include <QPlainTextEdit>
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
#include <QScrollBar>
|
||||
//#include <QGraphicsDropShadowEffect>
|
||||
//#include <qpropertyanimation.h>
|
||||
//#include <QEvent>
|
||||
|
||||
#include "historymessagewidget.h"
|
||||
#include "model/data.h"
|
||||
|
||||
using namespace model;
|
||||
|
||||
//编辑消息的区域
|
||||
class MessageEditArea : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit MessageEditArea(QWidget *parent = nullptr);
|
||||
|
||||
void initSignalSlot();
|
||||
void sendTextMessage();
|
||||
void addSelfMessage(MessageType messageType, const QByteArray& content, const QString& extraInfo);
|
||||
void addOtherMessage(const model::Message& message);
|
||||
//花式按钮事件
|
||||
//bool eventFilter(QObject* obj, QEvent* event) override;
|
||||
|
||||
void clickSendImageBtn();
|
||||
void clickSendFileBtn();
|
||||
|
||||
void soundRecordPressed();
|
||||
void soundRecordReleased();
|
||||
|
||||
void soundSpeech(const QString& path);
|
||||
private:
|
||||
QPushButton* sendImageBtn;
|
||||
QPushButton* sendFileBtn;
|
||||
QPushButton* sendSpeechBtn;
|
||||
QPushButton* showHistoryBtn;
|
||||
QPlainTextEdit* textEdit;
|
||||
QPushButton* sendTextButton;
|
||||
QLabel* tipLabel;
|
||||
|
||||
//花式按钮
|
||||
//QGraphicsDropShadowEffect* shadowEffect;
|
||||
|
||||
|
||||
signals:
|
||||
};
|
||||
|
||||
#endif // MESSAGEEDITAREA_H
|
||||
Reference in New Issue
Block a user