2#include <NDEVR/ResizeVisibleAnimation.h>
3#include <NDEVR/QTTools.h>
18 m_layout->setContentsMargins(0, 0, 0, 0);
21 setBackgroundRole(QPalette::ColorRole::AlternateBase);
22 setAutoFillBackground(
true);
23 setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
25 virtual void addWidget(
const QPointer<QWidget>& widget)
29 int location =
m_layout->indexOf(widget);
34 bool make_visible = (!widget->isHidden() || !widget->testAttribute(Qt::WA_WState_ExplicitShowHide))
35 && widget->maximumWidth() > 0 && widget->maximumHeight() > 0;
36 widget->setParent(
nullptr);
40 widget->setVisible(
false);
49 int index =
m_layout->indexOf(widget);
52 if (widget->isVisible() && widget->width() > 0 && widget->height() > 0)
71 size.setWidth(style()->pixelMetric(QStyle::PM_SmallIconSize));
72 size.setHeight(style()->pixelMetric(QStyle::PM_SmallIconSize));
77 QSize size = QWidget::sizeHint();
78 size.setHeight(style()->pixelMetric(QStyle::PM_SmallIconSize));
#define lib_assert(expression, message)
Asserts some logic in the code. Disabled in non debug mode by default. Can be re-enabled in release u...
Definition LibAssert.h:68
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:59
void add(t_type &&object)
Definition Buffer.hpp:211
bool contains(const t_type &element) const
Definition Buffer.hpp:651
constexpr t_index_type size() const
Definition Buffer.hpp:1374
void clear()
Definition Buffer.hpp:557
bool removeElement(const t_type &element)
Definition Buffer.hpp:1019
static ResizeVisibleAnimation * run(QWidget *widget, bool visible, bool vertical, int duration=-1, int delay=0)
static ResizeVisibleAnimation * runRemove(QWidget *widget, bool vertical, int duration=-1, int delay=0)
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:94