Improved inline bot results layout.

Video duration displayed in the middle of the thumbnail.
Contact is now displayed like File, not like Article.
File doesn't have download/open link and displays icon by mimetype.
This commit is contained in:
John Preston 2016-04-08 19:37:14 +04:00
parent fa0c700ca6
commit e1f55822b7
7 changed files with 200 additions and 54 deletions

View File

@ -257,7 +257,7 @@ void Gif::paint(Painter &p, const QRect &clip, uint32 selection, const PaintCont
}
}
void Gif::getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int32 x, int32 y) const {
void Gif::getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int x, int y) const {
if (x >= 0 && x < _width && y >= 0 && y < st::inlineMediaHeight) {
if (_delete && (rtl() ? _width - x : x) >= _width - st::stickerPanDelete.pxWidth() && y < st::stickerPanDelete.pxHeight()) {
link = _delete;
@ -456,7 +456,7 @@ void Sticker::paint(Painter &p, const QRect &clip, uint32 selection, const Paint
}
}
void Sticker::getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int32 x, int32 y) const {
void Sticker::getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int x, int y) const {
if (x >= 0 && x < _width && y >= 0 && y < st::inlineMediaHeight) {
link = _send;
}
@ -545,7 +545,7 @@ void Photo::paint(Painter &p, const QRect &clip, uint32 selection, const PaintCo
}
}
void Photo::getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int32 x, int32 y) const {
void Photo::getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int x, int y) const {
if (x >= 0 && x < _width && y >= 0 && y < st::inlineMediaHeight) {
link = _send;
}
@ -646,6 +646,7 @@ Video::Video(Result *result) : FileBase(result)
, _description(st::emojiPanWidth - st::emojiScroll.width - st::inlineResultsLeft - st::inlineThumbSize - st::inlineThumbSkip) {
if (int duration = content_duration()) {
_duration = formatDurationText(duration);
_durationWidth = st::normalFont->width(_duration);
}
}
@ -677,7 +678,7 @@ void Video::initDimensions() {
}
void Video::paint(Painter &p, const QRect &clip, uint32 selection, const PaintContext *context) const {
int32 left = st::inlineThumbSize + st::inlineThumbSkip;
int left = st::inlineThumbSize + st::inlineThumbSkip;
bool withThumb = !content_thumb()->isNull();
if (withThumb) {
@ -692,11 +693,13 @@ void Video::paint(Painter &p, const QRect &clip, uint32 selection, const PaintCo
}
if (!_duration.isEmpty()) {
int32 durationTop = st::inlineRowMargin + st::inlineThumbSize - st::normalFont->height - st::inlineDurationMargin;
p.fillRect(rtlrect(0, durationTop - st::inlineDurationMargin, st::inlineThumbSize, st::normalFont->height + 2 * st::inlineDurationMargin, _width), st::msgDateImgBg);
int durationTop = st::inlineRowMargin + st::inlineThumbSize - st::normalFont->height - st::inlineDurationMargin;
int durationW = _durationWidth + 2 * st::msgDateImgPadding.x(), durationH = st::normalFont->height + 2 * st::msgDateImgPadding.y();
int durationX = (st::inlineThumbSize - durationW) / 2, durationY = st::inlineRowMargin + st::inlineThumbSize - durationH;
App::roundRect(p, durationX, durationY - st::msgDateImgPadding.y(), durationW, durationH, st::msgDateImgBg, DateCorners);
p.setPen(st::white);
p.setFont(st::normalFont);
p.drawTextRight(_width - st::inlineThumbSize + st::inlineDurationMargin, durationTop, _width, _duration);
p.drawText(durationX + st::msgDateImgPadding.x(), durationTop + st::normalFont->ascent, _duration);
}
p.setPen(st::black);
@ -712,7 +715,7 @@ void Video::paint(Painter &p, const QRect &clip, uint32 selection, const PaintCo
}
}
void Video::getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int32 x, int32 y) const {
void Video::getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int x, int y) const {
if (x >= 0 && x < st::inlineThumbSize && y >= st::inlineRowMargin && y < st::inlineRowMargin + st::inlineThumbSize) {
link = _link;
return;
@ -756,9 +759,9 @@ void CancelFileClickHandler::onClickImpl() const {
File::File(Result *result) : FileBase(result)
, _title(st::emojiPanWidth - st::emojiScroll.width - st::inlineResultsLeft - st::msgFileSize - st::inlineThumbSkip)
, _description(st::emojiPanWidth - st::emojiScroll.width - st::inlineResultsLeft - st::msgFileSize - st::inlineThumbSkip)
, _open(new OpenFileClickHandler(result))
, _cancel(new CancelFileClickHandler(result)) {
, _description(st::emojiPanWidth - st::emojiScroll.width - st::inlineResultsLeft - st::msgFileSize - st::inlineThumbSkip) {
//, _open(new OpenFileClickHandler(result))
//, _cancel(new CancelFileClickHandler(result)) {
}
void File::initDimensions() {
@ -803,20 +806,38 @@ void File::paint(Painter &p, const QRect &clip, uint32 selection, const PaintCon
p.setRenderHint(QPainter::HighQualityAntialiasing, false);
style::sprite icon;
if (bool showPause = false) {
icon = st::msgFileInPause;
} else if (radial || content_loading()) {
icon = st::msgFileInCancel;
} else if (loaded) {
//if (_data->song() || _data->voice()) {
//if (bool showPause = false) {
// icon = st::msgFileInPause;
//} else if (radial || content_loading()) {
// icon = st::msgFileInCancel;
//} else if (loaded) {
// //if (_data->song() || _data->voice()) {
// icon = st::msgFileInPlay;
// //} else if (_data->isImage()) {
// // icon = st::msgFileInImage;
// //} else {
// // icon = st::msgFileInFile;
// //}
//} else {
// icon = st::msgFileInDownload;
//}
if (DocumentData *doc = getShownDocument()) {
if (doc->isImage()) {
icon = st::msgFileInImage;
} else if (doc->voice() || doc->song()) {
icon = st::msgFileInPlay;
//} else if (_data->isImage()) {
// icon = st::msgFileInImage;
//} else {
// icon = st::msgFileInFile;
//}
} else {
icon = st::msgFileInFile;
}
} else {
icon = st::msgFileInDownload;
QString mime = getResultContentType();
if (mime.startsWith(qstr("image/"))) {
icon = st::msgFileInImage;
} else if (mime.startsWith(qstr("audio/"))) {
icon = st::msgFileInPlay;
} else {
icon = st::msgFileInFile;
}
}
p.drawSpriteCenter(iconCircle, icon);
@ -834,7 +855,7 @@ void File::paint(Painter &p, const QRect &clip, uint32 selection, const PaintCon
}
}
void File::getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int32 x, int32 y) const {
void File::getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int x, int y) const {
if (x >= 0 && x < st::msgFileSize && y >= st::inlineRowMargin && y < st::inlineRowMargin + st::msgFileSize) {
link = content_loading() ? _cancel : _open;
return;
@ -899,6 +920,95 @@ void File::checkAnimationFinished() {
}
}
Contact::Contact(Result *result) : ItemBase(result)
, _title(st::emojiPanWidth - st::emojiScroll.width - st::inlineResultsLeft - st::inlineThumbSize - st::inlineThumbSkip)
, _description(st::emojiPanWidth - st::emojiScroll.width - st::inlineResultsLeft - st::inlineThumbSize - st::inlineThumbSkip) {
}
void Contact::initDimensions() {
_maxw = st::emojiPanWidth - st::emojiScroll.width - st::inlineResultsLeft;
int32 textWidth = _maxw - (st::inlineThumbSize + st::inlineThumbSkip);
TextParseOptions titleOpts = { 0, _maxw, st::semiboldFont->height, Qt::LayoutDirectionAuto };
_title.setText(st::semiboldFont, textOneLine(_result->getLayoutTitle()), titleOpts);
int32 titleHeight = qMin(_title.countHeight(_maxw), st::semiboldFont->height);
TextParseOptions descriptionOpts = { TextParseMultiline, _maxw, st::normalFont->height, Qt::LayoutDirectionAuto };
_description.setText(st::normalFont, _result->getLayoutDescription(), descriptionOpts);
int32 descriptionHeight = qMin(_description.countHeight(_maxw), st::normalFont->height);
_minh = st::msgFileSize;
_minh += st::inlineRowMargin * 2 + st::inlineRowBorder;
}
int32 Contact::resizeGetHeight(int32 width) {
_width = qMin(width, _maxw);
_height = _minh;
return _height;
}
void Contact::paint(Painter &p, const QRect &clip, uint32 selection, const PaintContext *context) const {
int32 left = st::emojiPanHeaderLeft - st::inlineResultsLeft;
left = st::msgFileSize + st::inlineThumbSkip;
prepareThumb(st::msgFileSize, st::msgFileSize);
QRect rthumb(rtlrect(0, st::inlineRowMargin, st::msgFileSize, st::msgFileSize, _width));
p.drawPixmapLeft(rthumb.topLeft(), _width, _thumb);
int titleTop = st::inlineRowMargin + st::inlineRowFileNameTop;
int descriptionTop = st::inlineRowMargin + st::inlineRowFileDescriptionTop;
p.setPen(st::black);
_title.drawLeftElided(p, left, titleTop, _width - left, _width);
p.setPen(st::inlineDescriptionFg);
_description.drawLeftElided(p, left, descriptionTop, _width - left, _width);
if (!context->lastRow) {
p.fillRect(rtlrect(left, _height - st::inlineRowBorder, _width - left, st::inlineRowBorder, _width), st::inlineRowBorderFg);
}
}
void Contact::getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int x, int y) const {
int left = (st::msgFileSize + st::inlineThumbSkip);
if (x >= 0 && x < left - st::inlineThumbSkip && y >= st::inlineRowMargin && y < st::inlineRowMargin + st::inlineThumbSize) {
return;
}
if (x >= left && x < _width && y >= 0 && y < _height) {
link = _send;
return;
}
}
void Contact::prepareThumb(int width, int height) const {
ImagePtr thumb = getResultThumb();
if (thumb->isNull()) {
if (_thumb.width() != width * cIntRetinaFactor() || _thumb.height() != height * cIntRetinaFactor()) {
_thumb = getResultContactAvatar(width, height);
}
return;
}
if (thumb->loaded()) {
if (_thumb.width() != width * cIntRetinaFactor() || _thumb.height() != height * cIntRetinaFactor()) {
int w = qMax(convertScale(thumb->width()), 1), h = qMax(convertScale(thumb->height()), 1);
if (w * height > h * width) {
if (height < h) {
w = w * height / h;
h = height;
}
} else {
if (width < w) {
h = h * width / w;
w = width;
}
}
_thumb = thumb->pixNoCache(w * cIntRetinaFactor(), h * cIntRetinaFactor(), ImagePixSmooth, width, height);
}
} else {
thumb->load();
}
}
Article::Article(Result *result, bool withThumb) : ItemBase(result)
, _url(getResultUrlHandler())
, _link(getResultContentUrlHandler())
@ -989,8 +1099,8 @@ void Article::paint(Painter &p, const QRect &clip, uint32 selection, const Paint
}
}
void Article::getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int32 x, int32 y) const {
int32 left = _withThumb ? (st::inlineThumbSize + st::inlineThumbSkip) : 0;
void Article::getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int x, int y) const {
int left = _withThumb ? (st::inlineThumbSize + st::inlineThumbSkip) : 0;
if (x >= 0 && x < left - st::inlineThumbSkip && y >= st::inlineRowMargin && y < st::inlineRowMargin + st::inlineThumbSize) {
link = _link;
return;
@ -1011,7 +1121,7 @@ void Article::getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int32
}
}
void Article::prepareThumb(int32 width, int32 height) const {
void Article::prepareThumb(int width, int height) const {
ImagePtr thumb = getResultThumb();
if (thumb->isNull()) {
if (_thumb.width() != width * cIntRetinaFactor() || _thumb.height() != height * cIntRetinaFactor()) {
@ -1022,7 +1132,7 @@ void Article::prepareThumb(int32 width, int32 height) const {
if (thumb->loaded()) {
if (_thumb.width() != width * cIntRetinaFactor() || _thumb.height() != height * cIntRetinaFactor()) {
int32 w = qMax(convertScale(thumb->width()), 1), h = qMax(convertScale(thumb->height()), 1);
int w = qMax(convertScale(thumb->width()), 1), h = qMax(convertScale(thumb->height()), 1);
if (w * height > h * width) {
if (height < h) {
w = w * height / h;

View File

@ -79,7 +79,7 @@ public:
}
void paint(Painter &p, const QRect &clip, uint32 selection, const PaintContext *context) const override;
void getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int32 x, int32 y) const override;
void getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int x, int y) const override;
// ClickHandlerHost interface
void clickHandlerActiveChanged(const ClickHandlerPtr &p, bool active) override;
@ -144,7 +144,7 @@ public:
}
void paint(Painter &p, const QRect &clip, uint32 selection, const PaintContext *context) const override;
void getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int32 x, int32 y) const override;
void getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int x, int y) const override;
private:
PhotoData *getShownPhoto() const;
@ -179,7 +179,7 @@ public:
void preload() const override;
void paint(Painter &p, const QRect &clip, uint32 selection, const PaintContext *context) const override;
void getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int32 x, int32 y) const override;
void getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int x, int y) const override;
// ClickHandlerHost interface
void clickHandlerActiveChanged(const ClickHandlerPtr &p, bool active) override;
@ -204,7 +204,7 @@ public:
void initDimensions() override;
void paint(Painter &p, const QRect &clip, uint32 selection, const PaintContext *context) const override;
void getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int32 x, int32 y) const override;
void getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int x, int y) const override;
private:
@ -213,6 +213,7 @@ private:
mutable QPixmap _thumb;
Text _title, _description;
QString _duration;
int _durationWidth = 0;
void prepareThumb(int32 width, int32 height) const;
@ -251,7 +252,7 @@ public:
void initDimensions() override;
void paint(Painter &p, const QRect &clip, uint32 selection, const PaintContext *context) const override;
void getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int32 x, int32 y) const override;
void getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int x, int y) const override;
// ClickHandlerHost interface
void clickHandlerActiveChanged(const ClickHandlerPtr &p, bool active) override;
@ -295,15 +296,34 @@ private:
};
class Contact : public ItemBase {
public:
Contact(Result *result);
void initDimensions() override;
int resizeGetHeight(int width) override;
void paint(Painter &p, const QRect &clip, uint32 selection, const PaintContext *context) const override;
void getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int x, int y) const override;
private:
mutable QPixmap _thumb;
Text _title, _description;
void prepareThumb(int width, int height) const;
};
class Article : public ItemBase {
public:
Article(Result *result, bool withThumb);
void initDimensions() override;
int32 resizeGetHeight(int32 width) override;
int resizeGetHeight(int width) override;
void paint(Painter &p, const QRect &clip, uint32 selection, const PaintContext *context) const override;
void getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int32 x, int32 y) const override;
void getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int x, int y) const override;
private:
@ -315,7 +335,7 @@ private:
QString _thumbLetter, _urlText;
int32 _urlWidth;
void prepareThumb(int32 width, int32 height) const;
void prepareThumb(int width, int height) const;
};

View File

@ -100,8 +100,8 @@ UniquePointer<ItemBase> ItemBase::createLayout(Result *result, bool forceThumb)
case Type::Sticker: return MakeUnique<internal::Sticker>(result); break;
case Type::Gif: return MakeUnique<internal::Gif>(result); break;
case Type::Article:
case Type::Contact:
case Type::Venue: return MakeUnique<internal::Article>(result, forceThumb); break;
case Type::Contact: return MakeUnique<internal::Contact>(result); break;
}
return UniquePointer<ItemBase>();
}
@ -187,5 +187,9 @@ QString ItemBase::getResultThumbLetter() const {
return QString();
}
QString ItemBase::getResultContentType() const {
return _result->_content_type;
}
} // namespace Layout
} // namespace InlineBots

View File

@ -104,6 +104,7 @@ protected:
ClickHandlerPtr getResultUrlHandler() const;
ClickHandlerPtr getResultContentUrlHandler() const;
QString getResultThumbLetter() const;
QString getResultContentType() const;
Result *_result = nullptr;
DocumentData *_doc = nullptr;

View File

@ -63,6 +63,12 @@ QVector<MTPDocumentAttribute> SendData::prepareResultAttributes(const Result *ow
result.push_back(MTP_documentAttributeVideo(MTP_int(owner->_duration), MTP_int(owner->_width), MTP_int(owner->_height)));
} else if (owner->_type == Type::Video) {
result.push_back(MTP_documentAttributeVideo(MTP_int(owner->_duration), MTP_int(owner->_width), MTP_int(owner->_height)));
} else if (owner->_type == Type::Audio) {
MTPDdocumentAttributeAudio::Flags flags = 0;
if (owner->_content_type == qstr("audio/ogg")) {
flags |= MTPDdocumentAttributeAudio::Flag::f_voice;
}
result.push_back(MTP_documentAttributeAudio(MTP_flags(flags), MTP_int(owner->_duration), MTPstring(), MTPstring(), MTPbytes()));
}
return result;
}
@ -109,7 +115,11 @@ SendData::SentMTPMessageFields SendContact::getSentMessageFields(const Result*)
}
QString SendContact::getLayoutDescription(const Result *owner) const {
return App::formatPhone(_phoneNumber) + '\n' + SendData::getLayoutDescription(owner);
auto result = SendData::getLayoutDescription(owner);
if (result.isEmpty()) {
return App::formatPhone(_phoneNumber);
}
return result;
}
SendData::SentMTPMessageFields SendPhoto::getSentMessageFields(const Result *owner) const {
@ -141,11 +151,13 @@ SendData::SentMTPMessageFields SendPhoto::getSentMessageFields(const Result *own
void SendFile::prepareDocument(const Result *owner) const {
if (getResultDocument(owner).type() != mtpc_documentEmpty) return;
uint64 docId = rand_value<uint64>();
ImagePtr resultThumb = getResultThumb(owner);
MTPPhotoSize thumbSize;
QPixmap thumb;
int32 tw = resultThumb->width(), th = resultThumb->height();
if (tw > 0 && th > 0 && tw < 20 * th && th < 20 * tw && resultThumb->loaded()) {
int tw = resultThumb->width(), th = resultThumb->height();
if (!resultThumb->isNull() && tw > 0 && th > 0 && tw < 20 * th && th < 20 * tw && resultThumb->loaded()) {
if (tw > th) {
if (tw > 90) {
th = th * 90 / tw;
@ -161,7 +173,6 @@ void SendFile::prepareDocument(const Result *owner) const {
tw = th = 0;
thumbSize = MTP_photoSizeEmpty(MTP_string(""));
}
uint64 docId = rand_value<uint64>();
QVector<MTPDocumentAttribute> attributes = prepareResultAttributes(owner);
MTPDocument document = MTP_document(MTP_long(docId), MTP_long(0), MTP_int(unixtime()), MTP_string(getResultMime(owner)), MTP_int(owner->data().size()), thumbSize, MTP_int(MTP::maindc()), MTP_vector<MTPDocumentAttribute>(attributes));

View File

@ -388,7 +388,7 @@ void LayoutOverviewPhoto::paint(Painter &p, const QRect &clip, uint32 selection,
}
}
void LayoutOverviewPhoto::getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int32 x, int32 y) const {
void LayoutOverviewPhoto::getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int x, int y) const {
if (hasPoint(x, y)) {
link = _link;
}
@ -525,7 +525,7 @@ void LayoutOverviewVideo::paint(Painter &p, const QRect &clip, uint32 selection,
}
}
void LayoutOverviewVideo::getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int32 x, int32 y) const {
void LayoutOverviewVideo::getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int x, int y) const {
bool loaded = _data->loaded();
if (hasPoint(x, y)) {
@ -678,7 +678,7 @@ void LayoutOverviewVoice::paint(Painter &p, const QRect &clip, uint32 selection,
}
}
void LayoutOverviewVoice::getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int32 x, int32 y) const {
void LayoutOverviewVoice::getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int x, int y) const {
bool loaded = _data->loaded();
bool showPause = updateStatusText();
@ -972,7 +972,7 @@ void LayoutOverviewDocument::paint(Painter &p, const QRect &clip, uint32 selecti
}
}
void LayoutOverviewDocument::getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int32 x, int32 y) const {
void LayoutOverviewDocument::getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int x, int y) const {
bool loaded = _data->loaded() || Local::willStickerImageLoad(mediaKey(DocumentFileLocation, _data->dc, _data->id));
bool showPause = updateStatusText();
@ -1286,7 +1286,7 @@ void LayoutOverviewLink::paint(Painter &p, const QRect &clip, uint32 selection,
}
}
void LayoutOverviewLink::getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int32 x, int32 y) const {
void LayoutOverviewLink::getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int x, int y) const {
int32 left = st::dlgPhotoSize + st::dlgPhotoPadding, top = st::linksMargin.top() + st::linksBorder, w = _width - left;
if (rtlrect(0, top, st::dlgPhotoSize, st::dlgPhotoSize, _width).contains(x, y)) {
link = _photol;

View File

@ -112,11 +112,11 @@ public:
return _height;
}
virtual void getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int32 x, int32 y) const {
virtual void getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int x, int y) const {
link.clear();
cursor = HistoryDefaultCursorState;
}
virtual void getSymbol(uint16 &symbol, bool &after, bool &upon, int32 x, int32 y) const { // from text
virtual void getSymbol(uint16 &symbol, bool &after, bool &upon, int x, int y) const { // from text
upon = hasPoint(x, y);
symbol = upon ? 0xFFFF : 0;
after = false;
@ -129,7 +129,7 @@ public:
return _height;
}
bool hasPoint(int32 x, int32 y) const {
bool hasPoint(int x, int y) const {
return (x >= 0 && y >= 0 && x < width() && y < height());
}
@ -298,7 +298,7 @@ public:
void initDimensions() override;
int32 resizeGetHeight(int32 width) override;
void paint(Painter &p, const QRect &clip, uint32 selection, const PaintContextOverview *context) const override;
void getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int32 x, int32 y) const override;
void getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int x, int y) const override;
private:
PhotoData *_data;
@ -316,7 +316,7 @@ public:
void initDimensions() override;
int32 resizeGetHeight(int32 width) override;
void paint(Painter &p, const QRect &clip, uint32 selection, const PaintContextOverview *context) const override;
void getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int32 x, int32 y) const override;
void getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int x, int y) const override;
protected:
float64 dataProgress() const override {
@ -349,7 +349,7 @@ public:
void initDimensions() override;
void paint(Painter &p, const QRect &clip, uint32 selection, const PaintContextOverview *context) const override;
void getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int32 x, int32 y) const override;
void getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int x, int y) const override;
protected:
float64 dataProgress() const override {
@ -383,7 +383,7 @@ public:
void initDimensions() override;
void paint(Painter &p, const QRect &clip, uint32 selection, const PaintContextOverview *context) const override;
void getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int32 x, int32 y) const override;
void getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int x, int y) const override;
virtual DocumentData *getDocument() const override {
return _data;
@ -428,7 +428,7 @@ public:
void initDimensions() override;
int32 resizeGetHeight(int32 width) override;
void paint(Painter &p, const QRect &clip, uint32 selection, const PaintContextOverview *context) const override;
void getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int32 x, int32 y) const override;
void getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int x, int y) const override;
private:
ClickHandlerPtr _photol;