mirror-chatterino2/link.h

47 lines
564 B
C
Raw Normal View History

2017-01-05 16:07:20 +01:00
#ifndef LINK_H
#define LINK_H
2017-01-05 20:49:33 +01:00
#include <QString>
2017-01-05 16:07:20 +01:00
class Link
{
public:
2017-01-05 20:49:33 +01:00
enum Type {
None,
Url,
CloseCurrentSplit,
UserInfo,
2017-01-15 16:38:30 +01:00
UserTimeout,
UserBan,
2017-01-05 20:49:33 +01:00
InsertText,
ShowMessage,
};
2017-01-05 16:07:20 +01:00
Link();
2017-01-11 18:52:09 +01:00
Link(Type type, const QString &value);
2017-01-05 20:49:33 +01:00
2017-01-11 18:52:09 +01:00
bool
isValid()
{
2017-01-05 20:49:33 +01:00
return m_type == None;
}
2017-01-11 18:52:09 +01:00
Type
type()
{
2017-01-05 20:49:33 +01:00
return m_type;
}
2017-01-11 18:52:09 +01:00
const QString &
value()
{
2017-01-05 20:49:33 +01:00
return m_value;
}
private:
Type m_type;
QString m_value;
2017-01-05 16:07:20 +01:00
};
2017-01-11 18:52:09 +01:00
#endif // LINK_H