You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ovdCSettingCollectionHelper.h 2.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #pragma once
  2. #include "ovd_base.h"
  3. #include <string>
  4. namespace OpenViBE {
  5. namespace Designer {
  6. class CSettingCollectionHelper final
  7. {
  8. public:
  9. CSettingCollectionHelper(const Kernel::IKernelContext& ctx, const char* guiFilename) : m_KernelCtx(ctx), m_GUIFilename(guiFilename) { }
  10. ~CSettingCollectionHelper() = default;
  11. CString getSettingWidgetName(const CIdentifier& typeID) const;
  12. CString getSettingEntryWidgetName(const CIdentifier& typeID) const;
  13. CString getValue(const CIdentifier& typeID, GtkWidget* widget) const;
  14. static CString getValueBoolean(GtkWidget* widget);
  15. static CString getValueInteger(GtkWidget* widget);
  16. static CString getValueFloat(GtkWidget* widget);
  17. static CString getValueString(GtkWidget* widget);
  18. static CString getValueFilename(GtkWidget* widget);
  19. static CString getValueFoldername(GtkWidget* widget);
  20. static CString getValueScript(GtkWidget* widget);
  21. static CString getValueColor(GtkWidget* widget);
  22. static CString getValueColorGradient(GtkWidget* widget);
  23. static CString getValueEnumeration(const CIdentifier& typeID, GtkWidget* widget);
  24. static CString getValueBitMask(const CIdentifier& typeID, GtkWidget* widget);
  25. void setValue(const CIdentifier& typeID, GtkWidget* widget, const CString& value);
  26. void setValueBoolean(GtkWidget* widget, const CString& value);
  27. void setValueInteger(GtkWidget* widget, const CString& value);
  28. void setValueFloat(GtkWidget* widget, const CString& value);
  29. static void setValueString(GtkWidget* widget, const CString& value);
  30. void setValueFilename(GtkWidget* widget, const CString& value);
  31. void setValueFoldername(GtkWidget* widget, const CString& value);
  32. void setValueScript(GtkWidget* widget, const CString& value);
  33. void setValueColor(GtkWidget* widget, const CString& value);
  34. void setValueColorGradient(GtkWidget* widget, const CString& value);
  35. void setValueEnumeration(const CIdentifier& typeID, GtkWidget* widget, const CString& value) const;
  36. void setValueBitMask(const CIdentifier& typeID, GtkWidget* widget, const CString& value) const;
  37. const Kernel::IKernelContext& m_KernelCtx;
  38. CString m_GUIFilename;
  39. private:
  40. CSettingCollectionHelper() = delete;
  41. };
  42. } // namespace Designer
  43. } // namespace OpenViBE