mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-22 06:09:09 -04:00
patch "chatdialog_allow_buttons_from_different_plugins_3" from electron. ChatDialog allows now Buttons from different Plugins.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6979 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
0e134d0a92
commit
7b0a6afa56
9 changed files with 122 additions and 50 deletions
|
@ -28,12 +28,29 @@
|
|||
|
||||
#include <retroshare/rsmsgs.h>
|
||||
|
||||
// a Container for the logic behind buttons in a PopupChatDialog
|
||||
// Plugins can implement this interface to provide their own buttons
|
||||
class PopupChatDialog_WidgetsHolder{
|
||||
public:
|
||||
virtual ~PopupChatDialog_WidgetsHolder(){}
|
||||
virtual void init(const std::string &peerId, const QString &title, ChatWidget* chatWidget) = 0;
|
||||
virtual std::vector<QWidget*> getWidgets() = 0;
|
||||
|
||||
// status comes from notifyPeerStatusChanged
|
||||
// see rststaus.h for possible values
|
||||
virtual void updateStatus(int status) = 0;
|
||||
};
|
||||
|
||||
class PopupChatDialog : public ChatDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
friend class ChatDialog;
|
||||
|
||||
public:
|
||||
virtual void addWidgets(PopupChatDialog_WidgetsHolder *wh);
|
||||
virtual std::vector<PopupChatDialog_WidgetsHolder*> getWidgets();
|
||||
|
||||
private slots:
|
||||
void showAvatarFrame(bool show);
|
||||
void clearOfflineMessages();
|
||||
|
@ -66,6 +83,7 @@ protected:
|
|||
private:
|
||||
bool manualDelete;
|
||||
std::list<ChatInfo> savedOfflineChat;
|
||||
std::vector<PopupChatDialog_WidgetsHolder*> widgetsHolders;
|
||||
|
||||
/** Qt Designer generated object */
|
||||
Ui::PopupChatDialog ui;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue