🛰️航天仿真算法库 SpaceAST
0.0.1
载入中...
搜索中...
未找到
UiChatInput.hpp
浏览该文件的文档.
1
12
13
#pragma once
14
15
#include "AstGlobal.h"
16
#include <QWidget>
17
18
class
QTextEdit;
19
class
QPushButton;
20
21
AST_NAMESPACE_BEGIN
22
29
class
AST_UIAI_API
UiChatInput
:
public
QWidget
30
{
31
Q_OBJECT
32
33
public
:
34
explicit
UiChatInput
(QWidget* parent =
nullptr
);
35
~UiChatInput
()
override
;
36
38
void
setSendEnabled(
bool
enabled);
39
41
void
clear();
42
44
void
setInputFocus();
45
47
void
setPlaceholderText(
const
QString& text);
48
49
Q_SIGNALS:
51
void
sendMessage
(
const
QString& message);
52
54
void
stopRequested
();
55
56
private
Q_SLOTS:
57
void
onSendClicked();
58
void
onTextChanged();
59
60
private
:
61
void
setupUi();
62
bool
eventFilter(QObject* obj, QEvent* event)
override
;
63
64
QTextEdit* textEdit_ =
nullptr
;
65
QPushButton* sendButton_ =
nullptr
;
66
QPushButton* stopButton_ =
nullptr
;
67
};
68
71
AST_NAMESPACE_END
ast::UiChatInput
聊天输入区域部件
定义
UiChatInput.hpp:30
ast::UiChatInput::sendMessage
void sendMessage(const QString &message)
用户点击发送
ast::UiChatInput::stopRequested
void stopRequested()
用户点击停止
src
AstUiAI
Chat
UiChatInput.hpp
制作者
1.12.0