2012-07-01 23:05:03 +00:00
|
|
|
/*
|
|
|
|
* Retroshare Posted Plugin.
|
|
|
|
*
|
|
|
|
* Copyright 2012-2012 by Robert Fernie.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License Version 2.1 as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This library 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
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
|
|
* USA.
|
|
|
|
*
|
|
|
|
* Please report all bugs and problems to "retroshare@lunamutt.com".
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MRK_POSTED_POSTED_ITEM_H
|
|
|
|
#define MRK_POSTED_POSTED_ITEM_H
|
|
|
|
|
|
|
|
#include "ui_PostedItem.h"
|
|
|
|
|
2012-10-21 19:45:35 +00:00
|
|
|
#include <retroshare/rsposted.h>
|
2012-07-01 23:05:03 +00:00
|
|
|
|
|
|
|
class RsPostedPost;
|
|
|
|
class PostedItem;
|
|
|
|
|
|
|
|
class PostedHolder
|
|
|
|
{
|
|
|
|
public:
|
2012-08-01 01:47:53 +00:00
|
|
|
|
2012-11-22 22:40:31 +00:00
|
|
|
virtual void showComments(const RsGxsMessageId& threadId) = 0;
|
2012-07-01 23:05:03 +00:00
|
|
|
};
|
|
|
|
|
2012-11-17 21:43:21 +00:00
|
|
|
|
2012-07-01 23:05:03 +00:00
|
|
|
class PostedItem : public QWidget, private Ui::PostedItem
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
PostedItem(PostedHolder *parent, const RsPostedPost &item);
|
|
|
|
|
2012-11-22 22:40:31 +00:00
|
|
|
RsPostedPost getPost() const;
|
2012-07-01 23:05:03 +00:00
|
|
|
|
2012-08-01 01:47:53 +00:00
|
|
|
private slots:
|
|
|
|
void loadComments();
|
|
|
|
|
2012-07-01 23:05:03 +00:00
|
|
|
private:
|
|
|
|
uint32_t mType;
|
|
|
|
bool mSelected;
|
2012-08-01 01:47:53 +00:00
|
|
|
|
|
|
|
std::string mThreadId;
|
2012-11-22 22:40:31 +00:00
|
|
|
PostedHolder *mPostHolder;
|
|
|
|
RsPostedPost mPost;
|
2012-08-01 01:47:53 +00:00
|
|
|
|
2012-07-01 23:05:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|