X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fbinding%2Fbinding.hpp;h=5580a0b05b48765d74fd9272beafe4e38ddc2ca8;hp=ae0afb7dfe70eff19ed1c47c99f4b3d490187bae;hb=4e2195c8d934f7f874b612eaace8c6849e8b475d;hpb=61703a0124c7ace84caf415f7d491a3ad6f42599;ds=sidebyside diff --git a/pv/binding/binding.hpp b/pv/binding/binding.hpp index ae0afb7..5580a0b 100644 --- a/pv/binding/binding.hpp +++ b/pv/binding/binding.hpp @@ -14,21 +14,31 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * along with this program; if not, see . */ -#ifndef PULSEVIEW_PV_BINDING_BINDING_H -#define PULSEVIEW_PV_BINDING_BINDING_H +#ifndef PULSEVIEW_PV_BINDING_BINDING_HPP +#define PULSEVIEW_PV_BINDING_BINDING_HPP +#include +// Suppress warnings due to use of deprecated std::auto_ptr<> by glibmm. +G_GNUC_BEGIN_IGNORE_DEPRECATIONS #include +G_GNUC_END_IGNORE_DEPRECATIONS -#include +#include #include +#include +#include #include +using std::map; +using std::shared_ptr; +using std::vector; + class QFormLayout; +class QLabel; class QWidget; namespace pv { @@ -39,26 +49,32 @@ class Property; namespace binding { -class Binding +class Binding: public QObject { + Q_OBJECT + public: - const std::vector< std::shared_ptr >& properties(); + const vector< shared_ptr >& properties(); void commit(); - void add_properties_to_form(QFormLayout *layout, - bool auto_commit = false) const; + void add_properties_to_form(QFormLayout *layout, bool auto_commit = false); + + QWidget* get_property_form(QWidget *parent, bool auto_commit = false); - QWidget* get_property_form(QWidget *parent, - bool auto_commit = false) const; + void update_property_widgets(); static QString print_gvariant(Glib::VariantBase gvar); +protected Q_SLOTS: + void on_help_clicked(); + protected: - std::vector< std::shared_ptr > properties_; + vector< shared_ptr > properties_; + map help_labels_; }; -} // binding -} // pv +} // namespace binding +} // namespace pv -#endif // PULSEVIEW_PV_BINDING_BINDING_H +#endif // PULSEVIEW_PV_BINDING_BINDING_HPP