2007-11-15 03:18:48 +00:00
|
|
|
/****************************************************************
|
|
|
|
* RetroShare is distributed under the following license:
|
|
|
|
*
|
|
|
|
* Copyright (C) 2006, crypton
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
|
|
|
****************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _POPUPCHATDIALOG_H
|
|
|
|
#define _POPUPCHATDIALOG_H
|
|
|
|
|
|
|
|
#include "ui_PopupChatDialog.h"
|
2012-01-17 20:36:36 +00:00
|
|
|
#include "ChatDialog.h"
|
2008-02-04 17:55:59 +00:00
|
|
|
|
2010-10-02 22:42:30 +00:00
|
|
|
#include <retroshare/rsmsgs.h>
|
2010-09-04 14:23:30 +00:00
|
|
|
|
2012-01-17 20:36:36 +00:00
|
|
|
class PopupChatDialog : public ChatDialog
|
2007-11-15 03:18:48 +00:00
|
|
|
{
|
2012-01-17 20:36:36 +00:00
|
|
|
Q_OBJECT
|
2012-01-12 00:13:25 +00:00
|
|
|
|
2012-01-17 20:36:36 +00:00
|
|
|
friend class ChatDialog;
|
2010-09-01 17:56:15 +00:00
|
|
|
|
2007-11-15 03:18:48 +00:00
|
|
|
private slots:
|
2012-01-17 20:36:36 +00:00
|
|
|
void showAvatarFrame(bool show);
|
|
|
|
void clearOfflineMessages();
|
|
|
|
void chatStatusChanged(const QString &peerId, const QString &statusString, bool isPrivateChat);
|
2012-03-11 00:22:25 +00:00
|
|
|
void statusChanged(int);
|
2010-11-21 21:12:35 +00:00
|
|
|
|
2012-01-17 20:36:36 +00:00
|
|
|
protected:
|
|
|
|
/** Default constructor */
|
|
|
|
PopupChatDialog(QWidget *parent = 0, Qt::WFlags flags = 0);
|
|
|
|
/** Default destructor */
|
|
|
|
virtual ~PopupChatDialog();
|
2010-09-02 10:15:13 +00:00
|
|
|
|
2012-01-18 00:32:15 +00:00
|
|
|
virtual void init(const std::string &peerId, const QString &title);
|
2012-01-17 20:36:36 +00:00
|
|
|
virtual void showDialog(uint chatflags);
|
|
|
|
virtual ChatWidget *getChatWidget();
|
|
|
|
virtual bool hasPeerStatus() { return true; }
|
2012-10-27 15:59:12 +00:00
|
|
|
virtual bool notifyBlink();
|
2010-09-02 10:15:13 +00:00
|
|
|
|
2012-03-11 00:22:25 +00:00
|
|
|
virtual void updateStatus(int /*status*/) {}
|
|
|
|
|
2012-01-17 20:36:36 +00:00
|
|
|
void processSettings(bool load);
|
2009-01-04 02:28:30 +00:00
|
|
|
|
2012-02-25 12:17:36 +00:00
|
|
|
// used by plugins
|
|
|
|
void addButton(QPushButton *button) ;
|
|
|
|
|
2012-01-17 20:36:36 +00:00
|
|
|
protected:
|
|
|
|
virtual void addIncomingChatMsg(const ChatInfo& info);
|
|
|
|
virtual void onChatChanged(int list, int type);
|
2010-08-18 12:02:36 +00:00
|
|
|
|
2007-11-15 03:18:48 +00:00
|
|
|
private:
|
2012-01-17 20:36:36 +00:00
|
|
|
bool manualDelete;
|
|
|
|
std::list<ChatInfo> savedOfflineChat;
|
2011-11-27 21:04:10 +00:00
|
|
|
|
2012-01-17 20:36:36 +00:00
|
|
|
/** Qt Designer generated object */
|
|
|
|
Ui::PopupChatDialog ui;
|
2007-11-15 03:18:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|