#include <KoToolBoxLayout_p.h>
Definition at line 19 of file KoToolBoxLayout_p.h.
◆ SectionLayout()
| SectionLayout::SectionLayout |
( |
QWidget * | parent | ) |
|
|
inlineexplicit |
◆ ~SectionLayout()
| SectionLayout::~SectionLayout |
( |
| ) |
|
|
inlineoverride |
◆ addButton()
| void SectionLayout::addButton |
( |
QAbstractButton * | button, |
|
|
int | priority ) |
|
inline |
Definition at line 33 of file KoToolBoxLayout_p.h.
34 {
37 qWarning() <<
"Button" <<
button <<
"has a conflicting priority";
38 }
39
41 int index = 1;
42 Q_FOREACH (QWidgetItem *item,
m_items) {
43 if (
m_priorities.value(
static_cast<QAbstractButton*
>(item->widget())) > priority)
44 break;
45 index++;
46 }
48 }
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 74 of file KoToolBoxLayout_p.h.
75 {
79 foreach (QWidgetItem* w,
m_items) {
81 continue;
82 int realX;
83 if (parentWidget()->isLeftToRight()) {
85 } else {
87 }
88 w->widget()->setGeometry(QRect(realX, y,
size.width(),
size.height()));
90 if (x +
size.width() >
rect.width()) {
93 }
94 }
95 } else {
96 foreach (QWidgetItem* w,
m_items) {
98 continue;
99 int realX;
100 if (parentWidget()->isLeftToRight()) {
102 } else {
104 }
105 w->widget()->setGeometry(QRect(realX, y,
size.width(),
size.height()));
107 if (y +
size.height() >
rect.height()) {
110 }
111 }
112 }
113 }
const QSize & buttonSize() const
References buttonSize(), m_items, and m_orientation.
◆ 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_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: