projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make member variable underscores a suffix instead of a prefix
[pulseview.git]
/
pv
/
prop
/
property.h
diff --git
a/pv/prop/property.h
b/pv/prop/property.h
index 002c91161faffd053d2a690e15f641a65282de9d..dd6d25bad37460d4e1fe9bac6992366a42933907 100644
(file)
--- a/
pv/prop/property.h
+++ b/
pv/prop/property.h
@@
-21,8
+21,9
@@
#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 <
boost/function.hpp
>
+#include <
glibmm-2.4/glibmm.h
>
+#include <functional>
#include <QString>
#include <QWidget>
#include <QString>
#include <QWidget>
@@
-31,20
+32,32
@@
class QWidget;
namespace pv {
namespace prop {
namespace pv {
namespace prop {
-class Property
+class Property
: public QObject
{
{
+ Q_OBJECT;
+
+public:
+ typedef std::function<Glib::VariantBase ()> Getter;
+ typedef std::function<void (Glib::VariantBase)> Setter;
+
protected:
protected:
- Property(QString name);
+ Property(QString name
, Getter getter, Setter setter
);
public:
const QString& name() const;
public:
const QString& name() const;
- virtual QWidget* get_widget(QWidget *parent) = 0;
+ virtual QWidget* get_widget(QWidget *parent,
+ bool auto_commit = false) = 0;
+ virtual bool labeled_widget() const;
virtual void commit() = 0;
virtual void commit() = 0;
+protected:
+ const Getter getter_;
+ const Setter setter_;
+
private:
private:
- QString
_name
;
+ QString
name_
;
};
} // prop
};
} // prop