Added initial double clicking to select word functionality.
This commit is contained in:
@@ -58,11 +58,22 @@ MessageLayoutElement *MessageLayoutElement::setLink(const Link &_link)
|
||||
return this;
|
||||
}
|
||||
|
||||
MessageLayoutElement *MessageLayoutElement::setText(const QString &_text)
|
||||
{
|
||||
this->text_ = _text;
|
||||
return this;
|
||||
}
|
||||
|
||||
const Link &MessageLayoutElement::getLink() const
|
||||
{
|
||||
return this->link_;
|
||||
}
|
||||
|
||||
const QString &MessageLayoutElement::getText() const
|
||||
{
|
||||
return this->text_;
|
||||
}
|
||||
|
||||
//
|
||||
// IMAGE
|
||||
//
|
||||
@@ -88,7 +99,7 @@ void ImageLayoutElement::addCopyTextToString(QString &str, int from,
|
||||
}
|
||||
}
|
||||
|
||||
int ImageLayoutElement::getSelectionIndexCount()
|
||||
int ImageLayoutElement::getSelectionIndexCount() const
|
||||
{
|
||||
return this->trailingSpace ? 2 : 1;
|
||||
}
|
||||
@@ -121,7 +132,7 @@ void ImageLayoutElement::paintAnimated(QPainter &painter, int yOffset)
|
||||
}
|
||||
}
|
||||
|
||||
int ImageLayoutElement::getMouseOverIndex(const QPoint &abs)
|
||||
int ImageLayoutElement::getMouseOverIndex(const QPoint &abs) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -163,7 +174,7 @@ void TextLayoutElement::addCopyTextToString(QString &str, int from,
|
||||
}
|
||||
}
|
||||
|
||||
int TextLayoutElement::getSelectionIndexCount()
|
||||
int TextLayoutElement::getSelectionIndexCount() const
|
||||
{
|
||||
return this->text.length() + (this->trailingSpace ? 1 : 0);
|
||||
}
|
||||
@@ -185,7 +196,7 @@ void TextLayoutElement::paintAnimated(QPainter &, int)
|
||||
{
|
||||
}
|
||||
|
||||
int TextLayoutElement::getMouseOverIndex(const QPoint &abs)
|
||||
int TextLayoutElement::getMouseOverIndex(const QPoint &abs) const
|
||||
{
|
||||
if (abs.x() < this->getRect().left()) {
|
||||
return 0;
|
||||
@@ -246,7 +257,7 @@ void TextIconLayoutElement::addCopyTextToString(QString &str, int from,
|
||||
{
|
||||
}
|
||||
|
||||
int TextIconLayoutElement::getSelectionIndexCount()
|
||||
int TextIconLayoutElement::getSelectionIndexCount() const
|
||||
{
|
||||
return this->trailingSpace ? 2 : 1;
|
||||
}
|
||||
@@ -281,7 +292,7 @@ void TextIconLayoutElement::paintAnimated(QPainter &painter, int yOffset)
|
||||
{
|
||||
}
|
||||
|
||||
int TextIconLayoutElement::getMouseOverIndex(const QPoint &abs)
|
||||
int TextIconLayoutElement::getMouseOverIndex(const QPoint &abs) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user