2010-08-31 13:13:52 -04:00
|
|
|
/****************************************************************
|
|
|
|
* RetroShare is distributed under the following license:
|
|
|
|
*
|
|
|
|
* Copyright (C) 2008 Robert Fernie
|
|
|
|
*
|
|
|
|
* 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 _CHATMSG_ITEM_DIALOG_H
|
|
|
|
#define _CHATMSG_ITEM_DIALOG_H
|
|
|
|
|
|
|
|
#include "ui_ChatMsgItem.h"
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
class FeedHolder;
|
|
|
|
|
|
|
|
class ChatMsgItem : public QWidget, private Ui::ChatMsgItem
|
|
|
|
{
|
2012-02-01 07:21:14 -05:00
|
|
|
Q_OBJECT
|
2010-08-31 13:13:52 -04:00
|
|
|
|
|
|
|
public:
|
2012-02-01 07:21:14 -05:00
|
|
|
/** Default Constructor */
|
2014-03-17 16:56:06 -04:00
|
|
|
ChatMsgItem(FeedHolder *parent, uint32_t feedId, const RsPeerId &peerId, const std::string &message);
|
2010-08-31 13:13:52 -04:00
|
|
|
|
|
|
|
void updateItemStatic();
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
/* default stuff */
|
2010-09-08 15:04:24 -04:00
|
|
|
void gotoHome();
|
|
|
|
void removeItem();
|
2010-08-31 13:13:52 -04:00
|
|
|
|
|
|
|
void sendMsg();
|
|
|
|
void openChat();
|
|
|
|
|
|
|
|
void updateItem();
|
2010-09-08 15:04:24 -04:00
|
|
|
|
2010-09-08 12:27:13 -04:00
|
|
|
void togglequickmessage();
|
|
|
|
void sendMessage();
|
2010-08-31 13:13:52 -04:00
|
|
|
|
2010-09-08 15:04:24 -04:00
|
|
|
void on_quickmsgText_textChanged();
|
|
|
|
|
2010-08-31 13:13:52 -04:00
|
|
|
private:
|
2012-02-01 07:21:14 -05:00
|
|
|
void insertChat(const std::string &message);
|
2010-08-31 13:13:52 -04:00
|
|
|
|
2010-09-08 15:04:24 -04:00
|
|
|
FeedHolder *mParent;
|
2010-08-31 13:13:52 -04:00
|
|
|
uint32_t mFeedId;
|
|
|
|
|
2014-03-17 16:56:06 -04:00
|
|
|
RsPeerId mPeerId;
|
2010-08-31 13:13:52 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|