mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-24 14:23:36 -05:00
a23e563c6b
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8036 b45a01b8-16f6-495d-af2f-9b41ad6348cc
41 lines
809 B
C++
41 lines
809 B
C++
#ifndef RSTEXTBROWSER_H
|
|
#define RSTEXTBROWSER_H
|
|
|
|
#include <QTextBrowser>
|
|
|
|
class RSImageBlockWidget;
|
|
|
|
class RSTextBrowser : public QTextBrowser
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit RSTextBrowser(QWidget *parent = 0);
|
|
|
|
void setPlaceholderText(const QString &text);
|
|
void setImageBlockWidget(RSImageBlockWidget *widget);
|
|
void resetImagesStatus(bool load);
|
|
|
|
void activateLinkClick(bool active);
|
|
|
|
virtual QVariant loadResource(int type, const QUrl &name);
|
|
|
|
public slots:
|
|
void showImages();
|
|
|
|
private slots:
|
|
void linkClicked(const QUrl &url);
|
|
void destroyImageBlockWidget();
|
|
|
|
protected:
|
|
void paintEvent(QPaintEvent *event);
|
|
|
|
private:
|
|
QString mPlaceholderText;
|
|
bool mShowImages;
|
|
RSImageBlockWidget *mImageBlockWidget;
|
|
bool mLinkClickActive;
|
|
};
|
|
|
|
#endif // RSTEXTBROWSER_H
|