projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
View: Create trace groups from channel groups
[pulseview.git]
/
pv
/
prop
/
enum.h
diff --git
a/pv/prop/enum.h
b/pv/prop/enum.h
index 2350fef886917ad884639938c0f5b106a00a6c70..6ff785a3ba430562fffbfacb47d97b5990a0ed04 100644
(file)
--- a/
pv/prop/enum.h
+++ b/
pv/prop/enum.h
@@
-26,6
+26,10
@@
#include "property.h"
#include "property.h"
+#include <QMetaType>
+
+Q_DECLARE_METATYPE(Glib::VariantBase);
+
class QComboBox;
namespace pv {
class QComboBox;
namespace pv {
@@
-33,13
+37,23
@@
namespace prop {
class Enum : public Property
{
class Enum : public Property
{
+ Q_OBJECT;
+
public:
public:
- Enum(QString name, std::vector<std::pair<int, QString> > values);
+ Enum(QString name, std::vector<std::pair<Glib::VariantBase, QString> > values,
+ Getter getter, Setter setter);
+
+ virtual ~Enum();
+
+ QWidget* get_widget(QWidget *parent, bool auto_commit);
+
+ void commit();
- QWidget* get_widget(QWidget *parent);
+private Q_SLOTS:
+ void on_current_item_changed(int);
private:
private:
- const std::vector< std::pair<
int
, QString> > _values;
+ const std::vector< std::pair<
Glib::VariantBase
, QString> > _values;
QComboBox *_selector;
};
QComboBox *_selector;
};