2017-01-05 16:07:20 +01:00
|
|
|
#include "word.h"
|
|
|
|
|
2017-01-05 16:59:01 +01:00
|
|
|
// Image word
|
2017-01-11 18:52:09 +01:00
|
|
|
Word::Word(LazyLoadedImage *image, Type type, const QString ©text,
|
|
|
|
const QString &tooltip, const Link &link)
|
2017-01-05 16:59:01 +01:00
|
|
|
: m_image(image)
|
|
|
|
, m_text()
|
|
|
|
, m_isImage(true)
|
|
|
|
, m_type(type)
|
|
|
|
, m_copyText(copytext)
|
|
|
|
, m_tooltip(tooltip)
|
2017-01-05 20:49:33 +01:00
|
|
|
, m_color()
|
|
|
|
, m_link(link)
|
2017-01-05 16:07:20 +01:00
|
|
|
{
|
2017-01-11 18:52:09 +01:00
|
|
|
image->width(); // professional segfault test
|
2017-01-05 16:07:20 +01:00
|
|
|
}
|
|
|
|
|
2017-01-05 16:59:01 +01:00
|
|
|
// Text word
|
2017-01-11 18:52:09 +01:00
|
|
|
Word::Word(const QString &text, Type type, const QColor &color,
|
|
|
|
const QString ©text, const QString &tooltip, const Link &link)
|
2017-01-11 01:08:20 +01:00
|
|
|
: m_image(NULL)
|
2017-01-05 16:59:01 +01:00
|
|
|
, m_text(text)
|
2017-01-11 01:08:20 +01:00
|
|
|
, m_isImage(false)
|
2017-01-05 16:59:01 +01:00
|
|
|
, m_type(type)
|
|
|
|
, m_copyText(copytext)
|
|
|
|
, m_tooltip(tooltip)
|
2017-01-05 20:49:33 +01:00
|
|
|
, m_color(color)
|
|
|
|
, m_link(link)
|
2017-01-05 16:07:20 +01:00
|
|
|
{
|
|
|
|
}
|