Sandboxie/SandboxiePlus/MiscHelpers/Common/SmartGridWidget.h

31 lines
619 B
C
Raw Normal View History

2021-10-16 16:19:51 +01:00
#pragma once
#include <qwidget.h>
2020-06-01 17:11:56 +01:00
#include "../mischelpers_global.h"
2021-10-16 16:19:51 +01:00
class MISCHELPERS_EXPORT CSmartGridWidget : public QWidget
{
Q_OBJECT
public:
CSmartGridWidget(QWidget* parent = NULL);
virtual ~CSmartGridWidget() {}
virtual void SetBackground(const QColor& BackColor);
virtual void AddWidget(QWidget* pWidget);
virtual int GetCount() { return m_Widgets.count(); }
virtual QWidget* GetWidget(int Index) { return m_Widgets.at(Index); }
public slots:
virtual void ReArange();
protected:
QGridLayout* m_pMainLayout;
QList<QPointer<QWidget>>m_Widgets;
bool m_bReArangePending;
};