19 #ifndef OST_GUI_TOOL_OPTION_HH
20 #define OST_GUI_TOOL_OPTION_HH
35 namespace ost {
namespace gui {
58 template <
typename T, ToolOption::Type C>
62 T min_value=std::numeric_limits<T>::min(),
63 T max_value=std::numeric_limits<T>::max()):
64 ToolOption(key, verbose_name, C), value_(default_v),
65 default_(default_v), min_value_(min_value), max_value_(max_value)
76 if (value>=min_value_ && value<=max_value_) {
93 #if !defined(_MSC_VER)
115 int GetValue()
const {
return tuples_[index_].tag; }
119 size_t Size() {
return tuples_.size(); }
122 std::vector<Tuple> tuples_;
129 const String& verbose_name,
131 const char *slot_method);
135 const char *slot_method_;
#define DLLEXPORT_OST_GUI
ToolOptionNum< int, ToolOption::INT > ToolOptionInt
std::vector< ToolOption * > ToolOptionList
ToolOptionNum< float, ToolOption::FLOAT > ToolOptionFloat