MiniQtHelper: upgrade ComboBox widget

Added interface functions:
    - GetComboBoxCount() the function returns the number of
      combo box options currently set,
    - SelectComboBoxOption() - selects an active combo box
      option by name from the list of set options.

Updated interface functions:
    - Changed SetComboOptions() to SetComboBoxOptions to keep
      consistency in naming.
This commit is contained in:
Artur Wojcik
2022-11-15 20:32:03 +01:00
committed by Baldur Karlsson
parent e2f3426dc6
commit e630515813
4 changed files with 53 additions and 6 deletions
+12 -2
View File
@@ -298,9 +298,19 @@ struct MiniQtInvoker : ObjectForwarder<IMiniQtHelper>
return InvokeRetFunction<QWidget *>(&IMiniQtHelper::CreateComboBox, editable, changed);
}
void SetComboOptions(QWidget *combo, const rdcarray<rdcstr> &options)
void SetComboBoxOptions(QWidget *combo, const rdcarray<rdcstr> &options)
{
InvokeVoidFunction(&IMiniQtHelper::SetComboOptions, combo, options);
InvokeVoidFunction(&IMiniQtHelper::SetComboBoxOptions, combo, options);
}
size_t GetComboBoxCount(QWidget *combo)
{
return InvokeRetFunction<size_t>(&IMiniQtHelper::GetComboBoxCount, combo);
}
void SelectComboBoxOption(QWidget *combo, const rdcstr &option)
{
InvokeVoidFunction(&IMiniQtHelper::SelectComboBoxOption, combo, option);
}
};