- Formatted all CodeGen module files (9 files) - Formatted LtsAppDescriptor module files - Formatted LtsAppManager/AppChooser files - Applied clang-format to all DTC and enum headers across modules - Removed coordTransTests from CommonUnitTestsPlaceholder (moved to tests/) Cosmetic changes only, no functional modifications. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
49 lines
889 B
C++
49 lines
889 B
C++
|
|
|
|
#pragma once
|
|
#include "lts_base.h"
|
|
#include "ltswidgets_export.h"
|
|
|
|
#include <QGridLayout>
|
|
#include <QObject>
|
|
#include <QVector>
|
|
|
|
class QWidget;
|
|
|
|
namespace LtsWidgets
|
|
{
|
|
|
|
class LTSWIDGETS_EXPORT LtsGridLayout : public QGridLayout
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit LtsGridLayout(LtsWidgets::ButtonSize buttonSize, QWidget* parent = nullptr, int maxColumn = 1);
|
|
|
|
void add_widget(QWidget* widget);
|
|
|
|
void setAutoSize(bool enable);
|
|
|
|
void setMaxColumn(int max);
|
|
|
|
private:
|
|
void addWidgetInternal(QWidget* widget);
|
|
|
|
public Q_SLOTS:
|
|
void onParentResize(QResizeEvent* e);
|
|
|
|
private Q_SLOTS:
|
|
void onWidgetDestroyed();
|
|
|
|
private:
|
|
LtsWidgets::ButtonSize m_buttonSize;
|
|
int m_defaultMaxColumn;
|
|
int m_maxColumn;
|
|
int m_colSize;
|
|
QVector<QWidget*> m_widgetList;
|
|
QRect m_oldGeo;
|
|
QSize m_oldSize;
|
|
bool m_autoSize;
|
|
};
|
|
|
|
} // namespace LtsWidgets
|