From 9006c567a17d8bb32178b59c7de637a0e1251bf2 Mon Sep 17 00:00:00 2001 From: csoler Date: Tue, 15 Jul 2014 15:59:12 +0000 Subject: [PATCH] added method to add new widget in chatWidget git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7451 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/chat/ChatWidget.cpp | 6 ++++++ retroshare-gui/src/gui/chat/ChatWidget.h | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/retroshare-gui/src/gui/chat/ChatWidget.cpp b/retroshare-gui/src/gui/chat/ChatWidget.cpp index c63f43e9c..3d7d884f2 100644 --- a/retroshare-gui/src/gui/chat/ChatWidget.cpp +++ b/retroshare-gui/src/gui/chat/ChatWidget.cpp @@ -198,6 +198,12 @@ void ChatWidget::setDefaultExtraFileFlags(TransferRequestFlags fl) ui->hashBox->setDefaultTransferRequestFlags(fl) ; } +void ChatWidget::addChatHorizontalWidget(QWidget *w) +{ + ui->verticalLayout->addWidget(w) ; + update() ; +} + void ChatWidget::addChatBarWidget(QWidget *w) { ui->pluginButtonFrame->layout()->addWidget(w) ; diff --git a/retroshare-gui/src/gui/chat/ChatWidget.h b/retroshare-gui/src/gui/chat/ChatWidget.h index 9b64e1bc5..195a23d7c 100644 --- a/retroshare-gui/src/gui/chat/ChatWidget.h +++ b/retroshare-gui/src/gui/chat/ChatWidget.h @@ -95,7 +95,12 @@ public: bool setStyle(); const RSStyle *getStyle() { return &style; } + // Adds one widget in the chat bar. Used to add e.g. new buttons. The widget should be + // small enough in size. void addChatBarWidget(QWidget *w) ; + + // Adds a new horizonal widget in the layout of the chat window. + void addChatHorizontalWidget(QWidget *w) ; bool isActive(); void setDefaultExtraFileFlags(TransferRequestFlags f) ;