#include <KoToolBoxLayout_p.h>
Definition at line 19 of file KoToolBoxLayout_p.h.
◆ SectionLayout()
| SectionLayout::SectionLayout |
( |
QWidget * | parent | ) |
|
|
inlineexplicit |
Definition at line 22 of file KoToolBoxLayout_p.h.
23 : QLayout(parent)
26 {
27 }
Qt::Orientation m_orientation
◆ ~SectionLayout()
| SectionLayout::~SectionLayout |
( |
| ) |
|
|
inlineoverride |
◆ addButton()
| void SectionLayout::addButton |
( |
QAbstractButton * | button, |
|
|
int | priority ) |
|
inline |
Definition at line 35 of file KoToolBoxLayout_p.h.
36 {
39 qWarning() <<
"Button" <<
button <<
"has a conflicting priority";
40 }
41
43 int index = 1;
44 Q_FOREACH (QWidgetItem *item,
m_items) {
45 if (
m_priorities.value(
static_cast<QAbstractButton*
>(item->widget())) > priority)
46 break;
47 index++;
48 }
50 }
QMap< QAbstractButton *, int > m_priorities
QString button(const QWheelEvent &ev)
References button(), m_items, and m_priorities.
◆ addItem()
| void SectionLayout::addItem |
( |
QLayoutItem * | | ) |
|
|
inlineoverride |
◆ buttonSize()
| const QSize & SectionLayout::buttonSize |
( |
| ) |
const |
|
inline |
◆ count()
| int SectionLayout::count |
( |
| ) |
const |
|
inlineoverride |
◆ itemAt()
| QLayoutItem * SectionLayout::itemAt |
( |
int | i | ) |
const |
|
inlineoverride |
◆ setButtonSize()
| void SectionLayout::setButtonSize |
( |
const QSize | size | ) |
|
|
inline |
◆ setGeometry()
| void SectionLayout::setGeometry |
( |
const QRect & | rect | ) |
|
|
inlineoverride |
Definition at line 76 of file KoToolBoxLayout_p.h.
77 {
78
79
81 const bool isLeftToRight = parentWidget()->isLeftToRight();
82
84 const int maxWidth = isVertical ?
rect.width() :
rect.height();
85 const int iconWidth = isVertical ?
size.width() :
size.height();
86 const int iconHeight = isVertical ?
size.height() :
size.width();
87
90 foreach (QWidgetItem* w,
m_items) {
92 continue;
93 }
94 if (isVertical) {
95 const int realX = isLeftToRight ?
x :
rect.width() -
x -
size.width();
96 w->widget()->setGeometry(QRect(realX, y,
size.width(),
size.height()));
97 } else {
98 const int realX = isLeftToRight ?
y :
rect.width() -
y -
size.width();
99 w->widget()->setGeometry(QRect(realX, x,
size.width(),
size.height()));
100 }
102 if (x + iconWidth > maxWidth) {
105 }
106 }
107 }
const QSize & buttonSize() const
References buttonSize(), m_items, m_onset, and m_orientation.
◆ setOnset()
| void SectionLayout::setOnset |
( |
int | onset | ) |
|
|
inline |
◆ setOrientation()
| void SectionLayout::setOrientation |
( |
Qt::Orientation | orientation | ) |
|
|
inline |
◆ sizeHint()
| QSize SectionLayout::sizeHint |
( |
| ) |
const |
|
inlineoverride |
◆ takeAt()
| QLayoutItem * SectionLayout::takeAt |
( |
int | i | ) |
|
|
inlineoverride |
◆ m_buttonSize
| QSize SectionLayout::m_buttonSize |
|
private |
◆ m_items
| QList<QWidgetItem*> SectionLayout::m_items |
|
private |
◆ m_onset
| int SectionLayout::m_onset |
|
private |
◆ m_orientation
| Qt::Orientation SectionLayout::m_orientation |
|
private |
◆ m_priorities
| QMap<QAbstractButton*, int> SectionLayout::m_priorities |
|
private |
The documentation for this class was generated from the following file: