Messagelib

searchlinecommandflowlayout.h
1/*
2 SPDX-FileCopyrightText: 2020-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6#pragma once
7#include "messagelist_private_export.h"
8#include <QLayout>
9#include <QList>
10namespace MessageList
11{
12namespace Core
13{
14class MESSAGELIST_TESTS_EXPORT SearchLineCommandFlowLayout : public QLayout
15{
16 Q_OBJECT
17
18public:
19 explicit SearchLineCommandFlowLayout(QWidget *parent = nullptr);
20 ~SearchLineCommandFlowLayout() override;
21
22 [[nodiscard]] int horizontalSpacing() const;
23 void setHorizontalSpacing(int horizontalSpacing);
24
25 [[nodiscard]] int verticalSpacing() const;
26 void setVerticalSpacing(int verticalSpacing);
27
28 [[nodiscard]] QSize sizeHint() const override;
29 [[nodiscard]] QSize minimumSize() const override;
30
31 void addItem(QLayoutItem *item) override;
32 QLayoutItem *itemAt(int index) const override;
33 QLayoutItem *takeAt(int index) override;
34 [[nodiscard]] int count() const override;
35
36 [[nodiscard]] Qt::Orientations expandingDirections() const override;
37 [[nodiscard]] bool hasHeightForWidth() const override;
38 [[nodiscard]] int heightForWidth(int width) const override;
39
40 void setGeometry(const QRect &rect) override;
41
42 void clear();
43 void clearAndDeleteWidgets();
44
45private:
46 MESSAGELIST_NO_EXPORT int doFlow(QRect rect, bool effective) const;
48 int mHorizontalSpacing = -1;
49 int mVerticalSpacing = -1;
50};
51}
52}
KGuiItem clear()
typedef Orientations
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:33:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.