RetroShare/plugins/FeedReader/gui/FeedReaderFeedItem.h

73 lines
2.5 KiB
C
Raw Normal View History

2018-11-04 09:48:33 -05:00
/*******************************************************************************
* plugins/FeedReader/gui/FeedReaderFeedItem.h *
* *
* Copyright (C) 2012 by Thunder *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as *
* published by the Free Software Foundation, either version 3 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 Affero General Public License for more details. *
* *
* You should have received a copy of the GNU Affero General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#ifndef _FEEDREADERFEEDITEM_H
#define _FEEDREADERFEEDITEM_H
#include "gui/feeds/FeedItem.h"
namespace Ui {
class FeedReaderFeedItem;
}
class RsFeedReader;
class FeedReaderNotify;
class FeedHolder;
class FeedInfo;
class FeedMsgInfo;
class FeedReaderFeedItem : public FeedItem
{
Q_OBJECT
public:
2020-11-08 07:22:59 -05:00
FeedReaderFeedItem(RsFeedReader *feedReader, FeedReaderNotify *notify, const FeedInfo &feedInfo, const FeedMsgInfo &msgInfo);
~FeedReaderFeedItem();
2020-11-08 07:22:59 -05:00
virtual uint64_t uniqueIdentifier() const override { return hash_64bits("FeedReaderFeedItem " + mMsgId); }
protected:
/* FeedItem */
virtual void doExpand(bool open);
private slots:
/* default stuff */
void toggle() override;
void readAndClearItem();
void copyLink();
void openLink();
2020-11-08 07:22:59 -05:00
void msgChanged(uint32_t feedId, const QString &msgId, int type);
private:
void setMsgRead();
RsFeedReader *mFeedReader;
FeedReaderNotify *mNotify;
std::string mMsgId;
QString mLink;
Ui::FeedReaderFeedItem *ui;
};
#endif // _FEEDREADERFEEDITEM_H