2017-01-18 21:30:23 +01:00
|
|
|
#include "messages/wordpart.h"
|
|
|
|
#include "messages/word.h"
|
|
|
|
|
|
|
|
namespace chatterino {
|
|
|
|
namespace messages {
|
2017-01-11 01:08:20 +01:00
|
|
|
|
2017-02-17 23:51:35 +01:00
|
|
|
WordPart::WordPart(Word &word, int x, int y, int lineNumber,
|
|
|
|
const QString ©Text, bool allowTrailingSpace)
|
2017-01-11 01:08:20 +01:00
|
|
|
: m_word(word)
|
2017-01-18 04:33:30 +01:00
|
|
|
, copyText(copyText)
|
2017-01-18 14:48:42 +01:00
|
|
|
, text(word.isText() ? m_word.getText() : QString())
|
2017-01-18 04:33:30 +01:00
|
|
|
, x(x)
|
|
|
|
, y(y)
|
|
|
|
, width(word.getWidth())
|
|
|
|
, height(word.getHeight())
|
2017-02-17 23:51:35 +01:00
|
|
|
, lineNumber(lineNumber)
|
2017-01-18 04:33:30 +01:00
|
|
|
, _trailingSpace(word.hasTrailingSpace() & allowTrailingSpace)
|
2017-01-11 01:08:20 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2017-01-15 16:38:30 +01:00
|
|
|
WordPart::WordPart(Word &word, int x, int y, int width, int height,
|
2017-02-17 23:51:35 +01:00
|
|
|
int lineNumber, const QString ©Text,
|
|
|
|
const QString &customText, bool allowTrailingSpace)
|
2017-01-15 16:38:30 +01:00
|
|
|
: m_word(word)
|
2017-01-18 04:33:30 +01:00
|
|
|
, copyText(copyText)
|
2017-01-18 14:48:42 +01:00
|
|
|
, text(customText)
|
2017-01-18 04:33:30 +01:00
|
|
|
, x(x)
|
|
|
|
, y(y)
|
|
|
|
, width(width)
|
|
|
|
, height(height)
|
2017-02-17 23:51:35 +01:00
|
|
|
, lineNumber(lineNumber)
|
2017-01-18 04:33:30 +01:00
|
|
|
, _trailingSpace(word.hasTrailingSpace() & allowTrailingSpace)
|
2017-01-11 01:08:20 +01:00
|
|
|
{
|
|
|
|
}
|
2017-01-18 21:30:23 +01:00
|
|
|
}
|
|
|
|
}
|