15 #ifndef BORNAGAIN_MVVM_MODEL_MVVM_MODEL_COMBOPROPERTY_H
16 #define BORNAGAIN_MVVM_MODEL_MVVM_MODEL_COMBOPROPERTY_H
19 #include "mvvm/model_export.h"
31 static ComboProperty createFrom(
const std::vector<std::string>& values,
32 const std::string& current_value = {});
34 std::string value()
const;
35 void setValue(
const std::string&
name);
37 std::vector<std::string> values()
const;
38 void setValues(
const std::vector<std::string>& values);
40 std::vector<std::string> toolTips()
const;
41 void setToolTips(
const std::vector<std::string>& tooltips);
43 int currentIndex()
const;
44 void setCurrentIndex(
int index);
52 std::string stringOfValues()
const;
53 void setStringOfValues(
const std::string& values);
55 std::vector<int> selectedIndices()
const;
56 std::vector<std::string> selectedValues()
const;
58 void setSelected(
int index,
bool value =
true);
59 void setSelected(
const std::string&
name,
bool value =
true);
61 std::string stringOfSelections()
const;
62 void setStringOfSelections(
const std::string& values);
64 std::string label()
const;
bool operator<(const CumulativeValue &lhs, const CumulativeValue &rhs)
std::vector< const INode * > & operator<<(std::vector< const INode * > &v_node, const std::unique_ptr< T > &node)
bool operator!=(const Material &left, const Material &right)
Comparison operator for material wrapper (inequality check)
bool operator==(const Material &left, const Material &right)
Comparison operator for material wrapper (equality check)
Custom property to define list of string values with multiple selections.
std::vector< std::string > m_tooltips
std::vector< std::string > m_values
std::vector< int > m_selected_indices
materialitems.h Collection of materials to populate MaterialModel.
QString const & name(EShape k)