30 #include <QTextBrowser> 43 setOrientation( Qt::Vertical );
47 help_ =
new QTextBrowser;
48 help_->setOpenExternalLinks(
true );
53 setStretchFactor( 0, 1000 );
54 setCollapsible( 0,
false );
57 _sizes.push_back( 1000 );
58 _sizes.push_back( 1 );
69 QString body_text =
property->getDescription();
70 QString heading =
property->getName();
71 QString html =
"<html><body bgcolor=\"#EFEBE7\"><strong>" + heading +
"</strong><br>" + body_text +
"</body></html>";
72 help_->setHtml( html );
84 QList<int> _sizes = sizes();
95 if( config.
mapGetInt(
"Tree Height", &tree_height ) &&
96 config.
mapGetInt(
"Help Height", &help_height ))
99 _sizes.push_back( tree_height );
100 _sizes.push_back( help_height );
A single element of a property tree, with a name, value, description, and possibly children...
void mapSetValue(const QString &key, QVariant value)
Set a named child to the given value.
Configuration data storage class.
PropertyTreeWidget * property_tree_
void save(Config config) const
Write state to the given Config.
void showHelpForProperty(const Property *property)
Config mapMakeChild(const QString &key)
Create a child node stored with the given key, and return the child.
PropertyTreeWithHelp(QWidget *parent=0)
bool mapGetInt(const QString &key, int *value_out) const
Convenience function for looking up a named integer.
void load(const Config &config)
Read state from the given Config.
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...