projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added Bool property and bound to SR_CONF_RLE
[pulseview.git]
/
pv
/
prop
/
property.h
diff --git
a/pv/prop/property.h
b/pv/prop/property.h
index 002c91161faffd053d2a690e15f641a65282de9d..31b90330d5e68a69cd63f01c220b5abdbdb30f2d 100644
(file)
--- a/
pv/prop/property.h
+++ b/
pv/prop/property.h
@@
-21,6
+21,8
@@
#ifndef PULSEVIEW_PV_PROP_PROPERTY_H
#define PULSEVIEW_PV_PROP_PROPERTY_H
#ifndef PULSEVIEW_PV_PROP_PROPERTY_H
#define PULSEVIEW_PV_PROP_PROPERTY_H
+#include <glib-2.0/glib.h>
+
#include <boost/function.hpp>
#include <QString>
#include <boost/function.hpp>
#include <QString>
@@
-33,16
+35,25
@@
namespace prop {
class Property
{
class Property
{
+public:
+ typedef boost::function<GVariant* ()> Getter;
+ typedef boost::function<void (GVariant*)> Setter;
+
protected:
protected:
- Property(QString name);
+ Property(QString name
, Getter getter, Setter setter
);
public:
const QString& name() const;
virtual QWidget* get_widget(QWidget *parent) = 0;
public:
const QString& name() const;
virtual QWidget* get_widget(QWidget *parent) = 0;
+ virtual bool labeled_widget() const;
virtual void commit() = 0;
virtual void commit() = 0;
+protected:
+ const Getter _getter;
+ const Setter _setter;
+
private:
QString _name;
};
private:
QString _name;
};