7#ifndef OVERLAP_LAYOUT_H
8#define OVERLAP_LAYOUT_H
12#include <QLoggingCategory>
14#include <qnamespace.h>
33 void addItem(QLayoutItem *item)
override;
34 [[nodiscard]]
int count()
const override;
35 [[nodiscard]] QLayoutItem *
itemAt(
int index)
const override;
36 QLayoutItem *
takeAt(
int index)
override;
39 [[nodiscard]] QSize
sizeHint()
const override;
void insertWidgetAtIndex(QWidget *toInsert, int index)
Definition overlap_layout.cpp:65
QSize minimumSize() const override
Provides the minimum size hint for the layout, ensuring functionality within constraints.
Definition overlap_layout.cpp:362
int calculateMaxRows() const
Calculates the maximum number of rows for a horizontal overlap layout based on the current height.
Definition overlap_layout.cpp:460
int maxColumns
Definition overlap_layout.h:51
Qt::Orientation flowDirection
Definition overlap_layout.h:54
int count() const override
Retrieves the total count of items within the layout.
Definition overlap_layout.cpp:102
QList< QLayoutItem * > itemList
Definition overlap_layout.h:49
void setDirection(Qt::Orientation _direction)
Sets the layout's orientation direction.
Definition overlap_layout.cpp:372
QLayoutItem * itemAt(int index) const override
Provides access to a layout item at a specified index.
Definition overlap_layout.cpp:116
void setMaxRows(int _maxRows)
Sets the maximum number of rows for vertical orientation.
Definition overlap_layout.cpp:394
QLayoutItem * takeAt(int index) override
Removes and returns a layout item at the specified index.
Definition overlap_layout.cpp:130
int maxRows
Definition overlap_layout.h:52
int overlapPercentage
Definition overlap_layout.h:50
void setMaxColumns(int _maxColumns)
Sets the maximum number of columns for horizontal orientation.
Definition overlap_layout.cpp:382
Qt::Orientation overlapDirection
Definition overlap_layout.h:53
QSize sizeHint() const override
Returns the size hint for the layout, based on preferred size calculations.
Definition overlap_layout.cpp:349
int calculateMaxColumns() const
Calculates the maximum number of columns for a vertical overlap layout based on the current width.
Definition overlap_layout.cpp:409
int calculateRowsForColumns(int columns) const
Calculates the maximum number of rows needed for a given number of columns in a vertical overlap layo...
Definition overlap_layout.cpp:441
int calculateColumnsForRows(int rows) const
Calculates the maximum number of columns needed for a given number of rows in a horizontal overlap la...
Definition overlap_layout.cpp:495
OverlapLayout(QWidget *parent=nullptr, int overlapPercentage=10, int maxColumns=2, int maxRows=2, Qt::Orientation overlapDirection=Qt::Vertical, Qt::Orientation flowDirection=Qt::Horizontal)
Constructs an OverlapLayout with the specified parameters.
Definition overlap_layout.cpp:40
QSize calculatePreferredSize() const
Calculates the preferred size for the layout, considering overlap and orientation.
Definition overlap_layout.cpp:256
void addItem(QLayoutItem *item) override
Adds a new item to the layout.
Definition overlap_layout.cpp:87
void setGeometry(const QRect &rect) override
Sets the geometry for the layout items, arranging them with the specified overlap.
Definition overlap_layout.cpp:139
Definition remote_connection_controller.h:20
Q_LOGGING_CATEGORY(CrashReportLog, "crash_report")