mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
49 lines
620 B
C++
49 lines
620 B
C++
#ifndef LINK_H
|
|
#define LINK_H
|
|
|
|
#include <QString>
|
|
|
|
namespace chatterino {
|
|
namespace messages {
|
|
|
|
class Link
|
|
{
|
|
public:
|
|
enum Type {
|
|
None,
|
|
Url,
|
|
CloseCurrentSplit,
|
|
UserInfo,
|
|
UserTimeout,
|
|
UserBan,
|
|
InsertText,
|
|
ShowMessage,
|
|
};
|
|
|
|
Link();
|
|
Link(Type getType, const QString &getValue);
|
|
|
|
bool isValid() const
|
|
{
|
|
return type != None;
|
|
}
|
|
|
|
Type getType() const
|
|
{
|
|
return type;
|
|
}
|
|
|
|
const QString &getValue() const
|
|
{
|
|
return value;
|
|
}
|
|
|
|
private:
|
|
Type type;
|
|
QString value;
|
|
};
|
|
}
|
|
}
|
|
|
|
#endif // LINK_H
|