Go to the documentation of this file.
6 #include <QTreeWidgetItem>
19 while ((item = layout->takeAt(0)))
24 delete item->layout();
28 delete item->widget();
37 while (item->childCount() > 0)
39 delete item->takeChild(0);
49 for (
int i = 0; i < layout->count(); ++i)
52 <<
"QSplitter only supports widgets, but layout item #" << i <<
" is not a widget.";
56 if (
dynamic_cast<QHBoxLayout*
>(layout))
58 splitter =
new QSplitter(Qt::Orientation::Horizontal);
60 else if (
dynamic_cast<QVBoxLayout*
>(layout))
62 splitter =
new QSplitter(Qt::Orientation::Vertical);
69 while (layout->count() > 0)
72 if (layout->itemAt(
index))
74 QLayoutItem* item = layout->takeAt(
index);
92 numDigits(numDigits), base(base)
99 return QString(
"%1").arg(
value, numDigits, base, QChar(
'0'));
105 for (
int i = 0; i <
splitter->count(); ++i)
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
void clearSplitter(QSplitter *splitter)
#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.