Go to the documentation of this file.
7 #include <QTreeWidgetItem>
19 while ((item = layout->takeAt(0)))
24 delete item->layout();
28 delete item->widget();
36 while (item->childCount() > 0)
38 delete item->takeChild(0);
48 for (
int i = 0; i < layout->count(); ++i)
51 <<
"QSplitter only supports widgets, but layout item #" << i <<
" is not a widget.";
55 if (
dynamic_cast<QHBoxLayout*
>(layout))
57 splitter =
new QSplitter(Qt::Orientation::Horizontal);
59 else if (
dynamic_cast<QVBoxLayout*
>(layout))
61 splitter =
new QSplitter(Qt::Orientation::Vertical);
68 while (layout->count() > 0)
71 if (layout->itemAt(
index))
73 QLayoutItem* item = layout->takeAt(
index);
91 numDigits(numDigits), base(base)
98 return QString(
"%1").arg(
value, numDigits, base, QChar(
'0'));
std::vector< std::string > splitter(std::string const &propertyValue)
#define ARMARX_CHECK_NOT_NULL(ptr)
This macro evaluates whether ptr is not null and if it turns out to be false it will throw an Express...
#define ARMARX_CHECK(expression)
Shortcut for ARMARX_CHECK_EXPRESSION.
void clearItem(QTreeWidgetItem *item)
Clear a tree widget item.
void clearLayout(QLayout *layout)
Clear a layout.
std::shared_ptr< Value > value()
QString textFromValue(int value) const override
#define ARMARX_CHECK_EQUAL(lhs, rhs)
This macro evaluates whether lhs is equal (==) rhs and if it turns out to be false it will throw an E...
LeadingZeroSpinBox(int numDigits, int base)
QSplitter * useSplitter(QLayout *layout)
Let items in layout be children of a splitter.