mirror-chatterino2/src/common/Common.hpp

41 lines
896 B
C++
Raw Normal View History

2018-02-05 15:11:50 +01:00
#pragma once
2018-06-26 14:09:39 +02:00
#include "debug/Log.hpp"
2018-02-05 15:11:50 +01:00
#include <QString>
2018-06-01 14:20:46 +02:00
#include <QWidget>
2018-02-05 15:11:50 +01:00
#include <boost/preprocessor.hpp>
#include <string>
2018-02-05 15:11:50 +01:00
namespace chatterino {
enum class HighlightState {
None,
Highlighted,
NewMessage,
};
inline QString qS(const std::string &string)
{
return QString::fromStdString(string);
}
2018-06-01 14:20:46 +02:00
const Qt::KeyboardModifiers showSplitOverlayModifiers = Qt::ControlModifier | Qt::AltModifier;
const Qt::KeyboardModifiers showAddSplitRegions = Qt::ControlModifier | Qt::AltModifier;
const Qt::KeyboardModifiers showResizeHandlesModifiers = Qt::ControlModifier;
static const char *ANONYMOUS_USERNAME_LABEL ATTR_UNUSED = " - anonymous - ";
2018-07-06 17:02:26 +02:00
#define return_if(x) \
if ((x)) { \
return; \
}
#define return_unless(x) \
if (!(x)) { \
return; \
}
2018-02-05 15:11:50 +01:00
} // namespace chatterino