mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-16 03:14:31 -05:00
b433d15536
- Fixed enabled state of read all button - Fixed copy links from context menu git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6091 b45a01b8-16f6-495d-af2f-9b41ad6348cc
88 lines
2.3 KiB
C++
88 lines
2.3 KiB
C++
#ifndef FEEDREADERMESSAGEWIDGET_H
|
|
#define FEEDREADERMESSAGEWIDGET_H
|
|
|
|
#include <QWidget>
|
|
|
|
#include "interface/rsFeedReader.h"
|
|
|
|
namespace Ui {
|
|
class FeedReaderMessageWidget;
|
|
}
|
|
|
|
class QTimer;
|
|
class FeedMsgInfo;
|
|
class QTreeWidgetItem;
|
|
class RSTreeWidgetItemCompareRole;
|
|
class RsFeedReader;
|
|
class FeedReaderNotify;
|
|
|
|
class FeedReaderMessageWidget : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit FeedReaderMessageWidget(const std::string &feedId, RsFeedReader *feedReader, FeedReaderNotify *notify, QWidget *parent = 0);
|
|
~FeedReaderMessageWidget();
|
|
|
|
std::string feedId() { return mFeedId; }
|
|
void setFeedId(const std::string &feedId);
|
|
QString feedName(bool withUnreadCount);
|
|
QIcon feedIcon();
|
|
|
|
protected:
|
|
virtual void showEvent(QShowEvent *e);
|
|
bool eventFilter(QObject *obj, QEvent *ev);
|
|
|
|
signals:
|
|
void feedMessageChanged(QWidget *widget);
|
|
|
|
private slots:
|
|
void msgTreeCustomPopupMenu(QPoint point);
|
|
void updateCurrentMessage();
|
|
void msgItemChanged();
|
|
void msgItemClicked(QTreeWidgetItem *item, int column);
|
|
void filterColumnChanged(int column);
|
|
void filterItems(const QString &text);
|
|
void toggleMsgText();
|
|
void markAsReadMsg();
|
|
void markAsUnreadMsg();
|
|
void markAllAsReadMsg();
|
|
void copySelectedLinksMsg();
|
|
void removeMsg();
|
|
void processFeed();
|
|
void openLinkMsg();
|
|
void copyLinkMsg();
|
|
void retransformMsg();
|
|
|
|
/* FeedReaderNotify */
|
|
void feedChanged(const QString &feedId, int type);
|
|
void msgChanged(const QString &feedId, const QString &msgId, int type);
|
|
|
|
private:
|
|
std::string currentMsgId();
|
|
void processSettings(bool load);
|
|
void updateMsgs();
|
|
void calculateMsgIconsAndFonts(QTreeWidgetItem *item);
|
|
void updateMsgItem(QTreeWidgetItem *item, FeedMsgInfo &info);
|
|
void setMsgAsReadUnread(QList<QTreeWidgetItem*> &rows, bool read);
|
|
void filterItem(QTreeWidgetItem *item, const QString &text, int filterColumn);
|
|
void filterItem(QTreeWidgetItem *item);
|
|
void toggleMsgText_internal();
|
|
|
|
bool mProcessSettings;
|
|
RSTreeWidgetItemCompareRole *mMsgCompareRole;
|
|
std::string mFeedId;
|
|
unsigned int mUnreadCount;
|
|
unsigned int mNewCount;
|
|
QTimer *mTimer;
|
|
FeedInfo mFeedInfo;
|
|
|
|
// gui interface
|
|
RsFeedReader *mFeedReader;
|
|
FeedReaderNotify *mNotify;
|
|
|
|
Ui::FeedReaderMessageWidget *ui;
|
|
};
|
|
|
|
#endif // FEEDREADERMESSAGEWIDGET_H
|