Continues migration with DDS, Common
This commit is contained in:
1 parent
9b15cee841
commit
fa48db111e
668 files changed
+111841
-2
No files matched your search
Executable
+61
@@ -0,0 +1,61 @@
|
||||
|
||||
|
||||
|
||||
#pragma once
|
||||
#include <QGridLayout>
|
||||
#include <QVector>
|
||||
|
||||
#include "lts_widgets_export.h"
|
||||
#include "lts_base.h"
|
||||
|
||||
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;
|
||||
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user