#include <assert.h>
+#include <glib-2.0/glib.h>
#include <QComboBox>
#include "enum.h"
Enum::Enum(QString name,
vector<pair<const void*, QString> > values,
- function<const void* ()> getter,
- function<void (const void*)> setter) :
+ function<GVariant* ()> getter,
+ function<void (GVariant*)> setter) :
Property(name),
_values(values),
_getter(getter),
if (index < 0)
return;
- _setter(_selector->itemData(index).value<void*>());
+ _setter(_selector->itemData(index).value<GVariant*>());
}
} // prop
#include <utility>
#include <vector>
+#include <glib-2.0/glib.h>
#include "property.h"
class QComboBox;
public:
Enum(QString name,
std::vector<std::pair<const void*, QString> > values,
- boost::function<const void* ()> getter,
- boost::function<void (const void*)> setter);
+ boost::function<GVariant* ()> getter,
+ boost::function<void (GVariant*)> setter);
QWidget* get_widget(QWidget *parent);
private:
const std::vector< std::pair<const void*, QString> > _values;
- boost::function<const void* ()> _getter;
- boost::function<void (const void*)> _setter;
+ boost::function<GVariant* ()> _getter;
+ boost::function<void (GVariant*)> _setter;
QComboBox *_selector;
};