VAPOR3 3.9.4
VComboBox.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4#include <QComboBox>
5#include "VHBoxWidget.h"
6
11
12class VComboBox : public VHBoxWidget {
13 Q_OBJECT
14
15public:
16 VComboBox(const std::vector<std::string> &values = {});
17
18 void SetOptions(const std::vector<std::string> &values);
19 void SetIndex(int index);
20 void SetValue(const std::string &value);
21 void SetItemEnabled(int index, bool enabled);
22
23 std::string GetValue() const;
24 int GetCurrentIndex() const;
25 int GetCount() const;
26
27private:
28 QComboBox *_combo;
29 std::vector<std::string> _options;
30
31public slots:
32 void emitComboChanged(const QString &value);
33
34signals:
35 void ValueChanged(std::string value);
36 void IndexChanged(int index);
37};
void SetIndex(int index)
std::string GetValue() const
void emitComboChanged(const QString &value)
int GetCount() const
int GetCurrentIndex() const
void SetItemEnabled(int index, bool enabled)
void IndexChanged(int index)
void ValueChanged(std::string value)
VComboBox(const std::vector< std::string > &values={})
void SetValue(const std::string &value)
void SetOptions(const std::vector< std::string > &values)