SendReplyDialog::SendReplyDialog(const QString &originalMessage, const QString &replyId, const QString &topicName, QWidget *parent)
: QDialog(parent)
, m_replyId(replyId)
, m_ui(new Ui::SendReplyDialog)
{
m_ui->setupUi(this);
m_ui->textView->setText(topicName + QStringLiteral(": \n") + originalMessage);
auto button = m_ui->buttonBox->button(QDialogButtonBox::Ok);
button->setText(i18n("Send"));
auto textEdit = m_ui->replyEdit;
connect(textEdit, &SendReplyTextEdit::send, this, &SendReplyDialog::sendButtonClicked);
connect(this, &QDialog::accepted, this, &SendReplyDialog::sendButtonClicked);
setWindowTitle(topicName);
setWindowIcon(QIcon::fromTheme(QStringLiteral("kdeconnect")));
setAttribute(Qt::WA_DeleteOnClose);
m_ui->replyEdit->setFocus();
}
This creates a send reply dialog with a text view and a button to send the message to the given topic. It sets the title and icon of the dialog to the original message.