#include <SAColorToolButton.h>
|
| void | setColor (const QColor &c) |
| | Set color, will emit colorChanged signal
|
| |
|
| static void | paintNoneColor (QPainter *p, const QRect &colorRect) |
| | Paint none color
|
| |
|
| virtual void | calcRect (const QStyleOptionToolButton &opt, QRect &iconRect, QRect &textRect, QRect &colorRect) |
| | Calculate positions of basic components
|
| |
| virtual void | paintButton (QStylePainter *p, const QStyleOptionToolButton &opt) |
| | Paint button
|
| |
| virtual void | paintIcon (QStylePainter *p, const QRect &iconRect, const QStyleOptionToolButton &opt) |
| | Paint icon
|
| |
| virtual void | paintText (QStylePainter *p, const QRect &textRect, const QStyleOptionToolButton &opt) |
| | Paint text
|
| |
| virtual void | paintColor (QStylePainter *p, const QRect &colorRect, const QColor &color, const QStyleOptionToolButton &opt) |
| | Paint color
|
| |
| virtual void | paintEvent (QPaintEvent *e) Q_DECL_OVERRIDE |
| | Handle paint event
|
| |
| virtual void | resizeEvent (QResizeEvent *e) Q_DECL_OVERRIDE |
| | Handle resize event
|
| |
| virtual QSize | sizeHint () const Q_DECL_OVERRIDE |
| | Override sizeHint
|
| |
◆ ColorToolButtonStyle
Color button built-in styles
| 枚举值 |
|---|
| WithColorMenu | Default will build a SAColorMenu
|
| NoColorMenu | No ColorMenu
|
◆ SAColorToolButton() [1/2]
| SAColorToolButton::SAColorToolButton |
( |
QWidget * |
parent = nullptr | ) |
|
|
explicit |
◆ SAColorToolButton() [2/2]
◆ ~SAColorToolButton()
| SAColorToolButton::~SAColorToolButton |
( |
| ) |
|
◆ calcRect()
| void SAColorToolButton::calcRect |
( |
const QStyleOptionToolButton & |
opt, |
|
|
QRect & |
iconRect, |
|
|
QRect & |
textRect, |
|
|
QRect & |
colorRect |
|
) |
| |
|
protectedvirtual |
Calculate positions of basic components
◆ color()
| QColor SAColorToolButton::color |
( |
| ) |
const |
◆ colorChanged
| void SAColorToolButton::colorChanged |
( |
const QColor & |
color | ) |
|
|
signal |
◆ colorClicked
| void SAColorToolButton::colorClicked |
( |
const QColor & |
color, |
|
|
bool |
checked = false |
|
) |
| |
|
signal |
◆ colorMenu()
Get colorMenu, note that this function may return nullptr if ColorToolButtonStyle is set to NoColorMenu or if a custom menu is set
◆ colorToolButtonStyle()
Get color tool button style
◆ createColorMenu()
Create standard color menu
◆ margins()
| QMargins SAColorToolButton::margins |
( |
| ) |
const |
◆ paintButton()
| void SAColorToolButton::paintButton |
( |
QStylePainter * |
p, |
|
|
const QStyleOptionToolButton & |
opt |
|
) |
| |
|
protectedvirtual |
◆ paintColor()
| void SAColorToolButton::paintColor |
( |
QStylePainter * |
p, |
|
|
const QRect & |
colorRect, |
|
|
const QColor & |
color, |
|
|
const QStyleOptionToolButton & |
opt |
|
) |
| |
|
protectedvirtual |
◆ paintEvent()
| void SAColorToolButton::paintEvent |
( |
QPaintEvent * |
e | ) |
|
|
protectedvirtual |
◆ paintIcon()
| void SAColorToolButton::paintIcon |
( |
QStylePainter * |
p, |
|
|
const QRect & |
iconRect, |
|
|
const QStyleOptionToolButton & |
opt |
|
) |
| |
|
protectedvirtual |
◆ paintNoneColor()
| void SAColorToolButton::paintNoneColor |
( |
QPainter * |
p, |
|
|
const QRect & |
colorRect |
|
) |
| |
|
static |
◆ paintText()
| void SAColorToolButton::paintText |
( |
QStylePainter * |
p, |
|
|
const QRect & |
textRect, |
|
|
const QStyleOptionToolButton & |
opt |
|
) |
| |
|
protectedvirtual |
◆ resizeEvent()
| void SAColorToolButton::resizeEvent |
( |
QResizeEvent * |
e | ) |
|
|
protectedvirtual |
◆ setColor
| void SAColorToolButton::setColor |
( |
const QColor & |
c | ) |
|
|
slot |
Set color, will emit colorChanged signal
◆ setColorToolButtonStyle()
Set color tool button style
◆ setMargins()
| void SAColorToolButton::setMargins |
( |
const QMargins & |
mg | ) |
|
◆ sizeHint()
| QSize SAColorToolButton::sizeHint |
( |
| ) |
const |
|
protectedvirtual |
Override sizeHint
Qt6.4 取消了QApplication::globalStrut
该类的文档由以下文件生成:
- /home/runner/work/SARibbon/SARibbon/src/SARibbonBar/colorWidgets/SAColorToolButton.h
- /home/runner/work/SARibbon/SARibbon/src/SARibbonBar/colorWidgets/SAColorToolButton.cpp