2007-11-14 22:18:48 -05: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 15:36:36 -05:00
|
|
|
#include "ChatDialog.h"
|
2008-02-04 12:55:59 -05:00
|
|
|
|
2010-10-02 18:42:30 -04:00
|
|
|
#include <retroshare/rsmsgs.h>
|
2010-09-04 10:23:30 -04:00
|
|
|
|
2012-01-17 15:36:36 -05:00
|
|
|
class PopupChatDialog : public ChatDialog
|
2007-11-14 22:18:48 -05:00
|
|
|
{
|
2012-01-17 15:36:36 -05:00
|
|
|
Q_OBJECT
|
2012-01-11 19:13:25 -05:00
|
|
|
|
2012-01-17 15:36:36 -05:00
|
|
|
friend class ChatDialog;
|
2010-09-01 13:56:15 -04:00
|
|
|
|
2007-11-14 22:18:48 -05:00
|
|
|
private slots:
|
2012-01-17 15:36:36 -05:00
|
|
|
void showAvatarFrame(bool show);
|
|
|
|
void clearOfflineMessages();
|
|
|
|
void chatStatusChanged(const QString &peerId, const QString &statusString, bool isPrivateChat);
|
2012-03-10 19:22:25 -05:00
|
|
|
void statusChanged(int);
|
2010-11-21 16:12:35 -05:00
|
|
|
|
2012-01-17 15:36:36 -05:00
|
|
|
protected:
|
|
|
|
/** Default constructor */
|
|
|
|
PopupChatDialog(QWidget *parent = 0, Qt::WFlags flags = 0);
|
|
|
|
/** Default destructor */
|
|
|
|
virtual ~PopupChatDialog();
|
2010-09-02 06:15:13 -04:00
|
|
|
|
2012-01-17 19:32:15 -05:00
|
|
|
virtual void init(const std::string &peerId, const QString &title);
|
2012-01-17 15:36:36 -05:00
|
|
|
virtual void showDialog(uint chatflags);
|
|
|
|
virtual ChatWidget *getChatWidget();
|
|
|
|
virtual bool hasPeerStatus() { return true; }
|
2012-10-27 11:59:12 -04:00
|
|
|
virtual bool notifyBlink();
|
2010-09-02 06:15:13 -04:00
|
|
|
|
2012-03-10 19:22:25 -05:00
|
|
|
virtual void updateStatus(int /*status*/) {}
|
|
|
|
|
2012-01-17 15:36:36 -05:00
|
|
|
void processSettings(bool load);
|
2009-01-03 21:28:30 -05:00
|
|
|
|
2012-02-25 07:17:36 -05:00
|
|
|
// used by plugins
|
|
|
|
void addButton(QPushButton *button) ;
|
|
|
|
|
2012-01-17 15:36:36 -05:00
|
|
|
protected:
|
|
|
|
virtual void addIncomingChatMsg(const ChatInfo& info);
|
|
|
|
virtual void onChatChanged(int list, int type);
|
2010-08-18 08:02:36 -04:00
|
|
|
|
2007-11-14 22:18:48 -05:00
|
|
|
private:
|
2012-01-17 15:36:36 -05:00
|
|
|
bool manualDelete;
|
|
|
|
std::list<ChatInfo> savedOfflineChat;
|
2011-11-27 16:04:10 -05:00
|
|
|
|
2012-01-17 15:36:36 -05:00
|
|
|
/** Qt Designer generated object */
|
|
|
|
Ui::PopupChatDialog ui;
|
2007-11-14 22:18:48 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|