mirror-chatterino2/src/messages/Link.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
677 B
C++
Raw Normal View History

#pragma once
2017-01-05 16:07:20 +01:00
2017-01-05 20:49:33 +01:00
#include <QString>
2017-01-05 16:07:20 +01:00
2017-04-14 17:52:22 +02:00
namespace chatterino {
2018-01-28 03:52:52 +01:00
struct Link {
2017-01-05 16:07:20 +01:00
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,
UserWhisper,
2017-01-05 20:49:33 +01:00
InsertText,
ShowMessage,
2018-01-17 14:14:31 +01:00
UserAction,
AutoModAllow,
AutoModDeny,
OpenAccountsPage,
JumpToChannel,
Reconnect,
CopyToClipboard,
ReplyToMessage,
ViewThread,
JumpToMessage,
2017-01-05 20:49:33 +01:00
};
2017-01-05 16:07:20 +01:00
Link();
2017-01-18 04:33:30 +01:00
Link(Type getType, const QString &getValue);
2017-01-05 20:49:33 +01:00
2017-01-18 04:33:30 +01:00
Type type;
QString value;
2017-01-05 16:07:20 +01:00
2018-01-28 03:52:52 +01:00
bool isValid() const;
bool isUrl() const;
2018-01-28 03:52:52 +01:00
};
} // namespace chatterino