diff options
author | David Robillard <d@drobilla.net> | 2012-06-12 21:46:22 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-06-12 21:46:22 +0000 |
commit | 071e36b69b5bcc203f70179580c8bed924b7305b (patch) | |
tree | 6af0c15841b20ae8ca5d020a7423d80a7c432fc3 /src/client | |
parent | 9923f2bc2a0731c111dbf614223ed81dee3e91f5 (diff) | |
download | ingen-071e36b69b5bcc203f70179580c8bed924b7305b.tar.gz ingen-071e36b69b5bcc203f70179580c8bed924b7305b.tar.bz2 ingen-071e36b69b5bcc203f70179580c8bed924b7305b.zip |
Add "expose" (to parent) operation for ports.
Partially implments #39. Export all the way to root has a few issues, I am
considering this functionality good enough for now.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4496 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/NodeModel.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/client/NodeModel.cpp b/src/client/NodeModel.cpp index ad3ce273..a92d5aae 100644 --- a/src/client/NodeModel.cpp +++ b/src/client/NodeModel.cpp @@ -219,6 +219,19 @@ NodeModel::port_value_range(SharedPtr<const PortModel> port, } std::string +NodeModel::label() const +{ + const Raul::Atom& name_property = get_property(_uris.lv2_name); + if (name_property.type() == _uris.forge.String) { + return name_property.get_string(); + } else if (plugin_model()) { + return plugin_model()->human_name(); + } else { + return symbol().c_str(); + } +} + +std::string NodeModel::port_label(SharedPtr<const PortModel> port) const { const Raul::Atom& name = port->get_property(LV2_CORE__name); |