16 setStyleSheet(
"QToolButton { font-family : \"Iosevka\";padding: 0; margin: 0; }");
34 painter.setFont(
font);
35 painter.setPen(mTextColor);
38 painter.fillRect(0, 0, mWidth, mHeight, mHoverColor);
42 painter.fillRect(0, 0, mWidth, mHeight, mCheckedColor);
48 painter.translate(0, -1);
51 painter.translate(-1, mHeight);
55 painter.translate(mWidth + 1, 0);
59 icon().paint(&painter, 0, (mRelativeHeight / 2) - (mIconSize / 2), mIconSize, (mRelativeHeight / 2) - (mIconSize / 2) + mIconSize);
85 mCheckedColor = color;
98 int textwidth = fm.width(
text());
99 mRelativeWidth = mIconSize + textwidth + mWidthPadding;
103 mWidth = mRelativeWidth;
104 mHeight = mRelativeHeight;
108 mWidth = mRelativeHeight;
109 mHeight = mRelativeWidth;
118 return mRelativeWidth;
Abstract class for Widgets within HAL's ContentArea.
void setText(const QString &text)
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
virtual bool eventFilter(QObject *watched, QEvent *event)
void installEventFilter(QObject *filterObj)
QVariant property(const char *name) const const