Krita Source Code Documentation
Loading...
Searching...
No Matches
KisWrappableHBoxLayout.h
Go to the documentation of this file.
1
/* This file is part of the KDE project
2
* Author: Agata Cacko cacko.azh@gmail.com
3
*
4
* SPDX-License-Identifier: GPL-3.0-or-later
5
*/
6
7
#ifndef KIS_WRAPPABLE_HBOX_LAYOUT_H
8
#define KIS_WRAPPABLE_HBOX_LAYOUT_H
9
10
#include <QVector>
11
#include <QLayout>
12
#include "kritawidgetutils_export.h"
13
14
// code taken partially from https://doc.qt.io/qt-5/qtwidgets-layouts-flowlayout-example.html
15
// and https://doc.qt.io/qt-5/layout.html
16
class
KRITAWIDGETUTILS_EXPORT
KisWrappableHBoxLayout
:
public
QLayout
17
{
18
Q_OBJECT
19
20
public
:
21
explicit
KisWrappableHBoxLayout
(QWidget* parent =
nullptr
);
22
~KisWrappableHBoxLayout
()
override
;
23
24
void
addItem(QLayoutItem *item)
override
;
25
QSize sizeHint()
const override
;
26
QSize minimumSize()
const override
;
27
int
count()
const override
;
28
QLayoutItem *itemAt(
int
)
const override
;
29
QLayoutItem *takeAt(
int
)
override
;
30
void
setGeometry(
const
QRect &
rect
)
override
;
31
bool
hasHeightForWidth()
const override
;
32
int
heightForWidth(
int
width)
const override
;
33
34
protected
:
35
int
doLayout(
const
QRect &
rect
,
bool
testOnly)
const
;
36
37
private
:
38
QVector<QLayoutItem*>
m_items
;
39
int
m_lastWidth {-1};
40
41
};
42
43
44
#endif
// KIS_WRAPPABLE_HBOX_LAYOUT_H
KisWrappableHBoxLayout
Definition
KisWrappableHBoxLayout.h:17
KisWrappableHBoxLayout::m_items
QVector< QLayoutItem * > m_items
Definition
KisWrappableHBoxLayout.h:38
QList
Definition
KisQStringListFwd.h:16
rect
Definition
xcftools.h:129
libs
widgetutils
KisWrappableHBoxLayout.h
Generated at
2025-11-04 02:30:02+01:00
from
Krita
branch
master
, commit
c9dde2e79561a8aea4a7e8d9ac99c98a7bac9e52