 |
LeechCraft
0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
|
Go to the documentation of this file.
22 class QStyleOptionViewItem;
106 QByteArray infosData;
107 QDataStream ostr { &infosData, QIODevice::WriteOnly };
110 mimeData->setData (name, infosData);
117 constexpr QColor
operator"" _rgb (
const char *str, std::size_t size)
120 throw std::runtime_error {
"invalid color size" };
122 constexpr
auto digit = [] (
char digit)
124 if (digit >=
'0' && digit <=
'9')
126 if (digit >=
'a' && digit <=
'f')
127 return digit -
'a' + 0xa;
128 if (digit >=
'A' && digit <=
'F')
129 return digit -
'A' + 0xa;
131 throw std::runtime_error {
"unable to parse" };
134 constexpr
auto group = [digit] (
const char *str)
136 return digit (str [0]) * 16 + digit (str [1]);
139 return QColor { group (str + 1), group (str + 3), group (str + 5) };
QString FormatName(const QString &name)
HTML-formats the name to let the user know it is not a part of the fixed dialog text.
void Save2MimeData(QMimeData *mimeData, const QString &name, const T &t)
QString ElideProgressBarText(const QString &text, const QStyleOptionViewItem &option)
void TintPalette(QWidget *widget, const QColor &color, double alpha, const QList< QPalette::ColorRole > &roles)
Mixes some of the widget's palette roles with the given color.
QPixmap DrawOverlayText(QPixmap px, const QString &text, QFont font, const QPen &pen, const QBrush &brush)
QColor TintColors(const QColor &c1, const QColor &c2, double alpha)
Mixes two colors with the given weights.
QLabel * ShowPixmapLabel(const QPixmap &srcPx, const QPoint &pos)
Shows a pixmap at the given pos.
const Q_DECL_IMPORT QString Text