30 #include <QTextBrowser> 41 setOrientation(Qt::Vertical);
45 help_ =
new QTextBrowser;
46 help_->setOpenExternalLinks(
true);
51 setStretchFactor(0, 1000);
52 setCollapsible(0,
false);
55 _sizes.push_back(1000);
67 QString body_text =
property->getDescription();
68 QString heading =
property->getName();
69 body_text.replace(
"\n",
"<br>");
70 QString html =
"<html><body><strong>" + heading +
"</strong><br>" + body_text +
"</body></html>";
83 QList<int> _sizes = sizes();
94 if (config.
mapGetInt(
"Tree Height", &tree_height) && config.
mapGetInt(
"Help Height", &help_height))
97 _sizes.push_back(tree_height);
98 _sizes.push_back(help_height);
A single element of a property tree, with a name, value, description, and possibly children...
Config mapGetChild(const QString &key) const
If the referenced Node is a Map and it has a child with the given key, return a reference to the chil...
void mapSetValue(const QString &key, QVariant value)
Set a named child to the given value.
void save(Config config) const
Write state to the given Config.
Configuration data storage class.
PropertyTreeWidget * property_tree_
PropertyTreeWithHelp(QWidget *parent=nullptr)
void showHelpForProperty(const Property *property)
Config mapMakeChild(const QString &key)
Create a child node stored with the given key, and return the child.
void load(const Config &config)
Read state from the given Config.
bool mapGetInt(const QString &key, int *value_out) const
Convenience function for looking up a named integer.