From bcb4e527689b22f3279e01f456e23f30e8fc442b Mon Sep 17 00:00:00 2001 From: thunder2 Date: Sun, 16 Apr 2023 22:43:40 +0200 Subject: [PATCH] Added methods to set title, notes and link on PostedCreatePostDialog from outside --- .../src/gui/Posted/PostedCreatePostDialog.cpp | 15 +++++++++++++++ .../src/gui/Posted/PostedCreatePostDialog.h | 4 ++++ 2 files changed, 19 insertions(+) diff --git a/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.cpp b/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.cpp index ec41434c1..f0bc99551 100644 --- a/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.cpp +++ b/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.cpp @@ -330,3 +330,18 @@ void PostedCreatePostDialog::reject() QDialog::reject(); } + +void PostedCreatePostDialog::setTitle(const QString& title) +{ + ui->titleEdit->setText(title); +} + +void PostedCreatePostDialog::setNotes(const QString& notes) +{ + ui->RichTextEditWidget->setText(notes); +} + +void PostedCreatePostDialog::setLink(const QString& link) +{ + ui->linkEdit->setText(link); +} diff --git a/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.h b/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.h index d7b8a261c..e952f6be8 100644 --- a/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.h +++ b/retroshare-gui/src/gui/Posted/PostedCreatePostDialog.h @@ -41,6 +41,10 @@ public: explicit PostedCreatePostDialog(RsPosted* posted, const RsGxsGroupId& grpId, const RsGxsId& default_author=RsGxsId(),QWidget *parent = 0); ~PostedCreatePostDialog(); + void setTitle(const QString& title); + void setNotes(const QString& notes); + void setLink(const QString& link); + private: QString imagefilename; QByteArray imagebytes;