mirror-chatterino2/messages/wordpart.h

55 lines
1.1 KiB
C
Raw Normal View History

2017-01-11 01:08:20 +01:00
#ifndef WORDPART_H
#define WORDPART_H
#include <QRect>
2017-01-11 18:52:09 +01:00
#include <QString>
2017-01-11 01:08:20 +01:00
2017-04-14 17:52:22 +02:00
namespace chatterino {
namespace messages {
2017-01-18 21:30:23 +01:00
2017-01-11 01:08:20 +01:00
class Word;
class WordPart
{
public:
2017-04-12 17:46:44 +02:00
WordPart(Word &getWord, int getX, int getY, int _lineNumber, const QString &getCopyText,
bool allowTrailingSpace = true);
WordPart(Word &getWord, int getX, int getY, int getWidth, int getHeight, int _lineNumber,
const QString &getCopyText, const QString &customText, bool allowTrailingSpace = true);
const Word &getWord() const;
int getWidth() const;
int getHeight() const;
int getX() const;
int getY() const;
void setPosition(int _x, int _y);
void setY(int _y);
int getRight() const;
int getBottom() const;
QRect getRect() const;
const QString getCopyText() const;
int hasTrailingSpace() const;
const QString &getText() const;
int getLineNumber();
2017-02-17 23:51:35 +01:00
2017-01-11 01:08:20 +01:00
private:
2017-04-12 17:46:44 +02:00
Word &_word;
2017-01-11 01:08:20 +01:00
2017-04-12 17:46:44 +02:00
QString _copyText;
QString _text;
2017-01-11 01:08:20 +01:00
2017-04-12 17:46:44 +02:00
int _x;
int _y;
int _width;
int _height;
2017-01-11 01:08:20 +01:00
2017-04-12 17:46:44 +02:00
int _lineNumber;
2017-02-17 23:51:35 +01:00
2017-01-18 04:33:30 +01:00
bool _trailingSpace;
2017-01-11 01:08:20 +01:00
};
2017-01-18 21:30:23 +01:00
}
}
2017-01-11 01:08:20 +01:00
2017-01-11 18:52:09 +01:00
#endif // WORDPART_H