diff options
author | David Robillard <d@drobilla.net> | 2010-01-28 04:16:30 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-01-28 04:16:30 +0000 |
commit | cd9c2adf12076194e8ea6c1cb2eb5ab641fb96ef (patch) | |
tree | d41de06b9f3639359012dc958c3b18055fe1259e /src/shared | |
parent | 80838b9dcfde1e5d9760ae4d3123a45854a47c32 (diff) | |
download | ingen-cd9c2adf12076194e8ea6c1cb2eb5ab641fb96ef.tar.gz ingen-cd9c2adf12076194e8ea6c1cb2eb5ab641fb96ef.tar.bz2 ingen-cd9c2adf12076194e8ea6c1cb2eb5ab641fb96ef.zip |
Universal properties window.
Instead of custom designed limited dialogs for each object type, this
replacement is built dynamically and shows all properties of an object.
Preliminary work, this version allows the user to wreck things by
changing properties that shouldn't ever be changed manually.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2385 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/ResourceImpl.cpp | 13 | ||||
-rw-r--r-- | src/shared/ResourceImpl.hpp | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/shared/ResourceImpl.cpp b/src/shared/ResourceImpl.cpp index 93d6ea03..949a8b36 100644 --- a/src/shared/ResourceImpl.cpp +++ b/src/shared/ResourceImpl.cpp @@ -62,6 +62,19 @@ ResourceImpl::set_property(const Raul::URI& uri, const Raul::Atom& value) } +bool +ResourceImpl::has_property(const Raul::URI& uri, const Raul::Atom& value) +{ + Properties::const_iterator i = _properties.find(uri); + for (; i->first == uri; ++i) { + if (i->second == value) { + return true; + } + } + return false; +} + + Raul::Atom& ResourceImpl::set_property(const Raul::URI& uri, const Raul::Atom& value) const { diff --git a/src/shared/ResourceImpl.hpp b/src/shared/ResourceImpl.hpp index b4afc50a..7ff88f6a 100644 --- a/src/shared/ResourceImpl.hpp +++ b/src/shared/ResourceImpl.hpp @@ -40,6 +40,7 @@ public: const Raul::Atom& get_property(const Raul::URI& uri) const; Raul::Atom& set_property(const Raul::URI& uri, const Raul::Atom& value); + bool has_property(const Raul::URI& uri, const Raul::Atom& value); void add_property(const Raul::URI& uri, const Raul::Atom& value); void set_properties(const Properties& p); void add_properties(const Properties& p); |