gphoto2pp
A C++ Wrapper for libgphoto2
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
choices_widget.hpp
Go to the documentation of this file.
1 
25 #ifndef CHOICESWIDGET_HPP
26 #define CHOICESWIDGET_HPP
27 
28 #include "string_widget.hpp"
29 
30 #include <vector>
31 
32 namespace gphoto2pp
33 {
38  class ChoicesWidget : public StringWidget
39  {
40  friend class NonValueWidget;
41 
42  public:
49  int countChoices() const;
50 
58  int getChoice() const;
59 
67  void setChoice(int index);
68 
75  std::vector<std::string> getChoices() const;
76 
85  std::string choiceToString(int index) const;
86 
93  std::string choicesToString(std::string&& separator = " ") const;
94 
95  protected:
96  ChoicesWidget(gphoto2::_CameraWidget* cameraWidget);
97  };
98 }
99 
100 #endif // CHOICESWIDGET_HPP