mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-24 13:59:29 -04:00
Add context menu to show hidden image on lobby.
A tooltip show hidden image too. The RSImageBlockWidget is removed.
This commit is contained in:
parent
854eebb2cb
commit
fdfd2e9248
7 changed files with 134 additions and 54 deletions
|
@ -4,6 +4,8 @@
|
|||
#include <QTextBrowser>
|
||||
#include "util/RsSyntaxHighlighter.h"
|
||||
|
||||
//#define RSTEXTBROWSER_CHECKIMAGE_DEBUG 1
|
||||
|
||||
class RSImageBlockWidget;
|
||||
|
||||
class RSTextBrowser : public QTextBrowser
|
||||
|
@ -18,16 +20,20 @@ public:
|
|||
void setPlaceholderText(const QString &text);
|
||||
void setImageBlockWidget(RSImageBlockWidget *widget);
|
||||
void resetImagesStatus(bool load);
|
||||
QPixmap getBlockedImage();
|
||||
bool checkImage(QPoint pos, QString &imageStr);
|
||||
bool checkImage(QPoint pos) {QString imageStr; return checkImage(pos, imageStr); }
|
||||
|
||||
void activateLinkClick(bool active);
|
||||
|
||||
virtual QVariant loadResource(int type, const QUrl &name);
|
||||
|
||||
QColor textColorQuote() const { return highliter->textColorQuote();}
|
||||
QColor textColorQuote() const { return highlighter->textColorQuote();}
|
||||
bool getShowImages() const { return mShowImages; }
|
||||
|
||||
public slots:
|
||||
void showImages();
|
||||
void setTextColorQuote(QColor textColorQuote) { highliter->setTextColorQuote(textColorQuote);}
|
||||
void setTextColorQuote(QColor textColorQuote) { highlighter->setTextColorQuote(textColorQuote);}
|
||||
|
||||
private slots:
|
||||
void linkClicked(const QUrl &url);
|
||||
|
@ -41,7 +47,13 @@ private:
|
|||
bool mShowImages;
|
||||
RSImageBlockWidget *mImageBlockWidget;
|
||||
bool mLinkClickActive;
|
||||
RsSyntaxHighlighter *highliter;
|
||||
RsSyntaxHighlighter *highlighter;
|
||||
#ifdef RSTEXTBROWSER_CHECKIMAGE_DEBUG
|
||||
QRect mCursorRectStart;
|
||||
QRect mCursorRectLeft;
|
||||
QRect mCursorRectRight;
|
||||
QRect mCursorRectEnd;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // RSTEXTBROWSER_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue