NeoNextion
Arduino library for the Nextion displays.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator
INextionNumericalValued.h
Go to the documentation of this file.
1 
3 #ifndef __NEONEXTION_INEXTIONNUMERICALVALUED
4 #define __NEONEXTION_INEXTIONNUMERICALVALUED
5 
6 #include "Nextion.h"
7 #include "INextionWidget.h"
8 #include "NextionTypes.h"
9 
17 {
18 public:
22  INextionNumericalValued(Nextion &nex, uint8_t page, uint8_t component,
23  const char *name)
24  : INextionWidget(nex, page, component, name)
25  {
26  }
27 
33  uint32_t getValue()
34  {
35  return getNumberProperty("val");
36  }
37 
44  bool setValue(uint32_t value)
45  {
46  return setNumberProperty("val", value);
47  }
48 };
49 
50 #endif
Interface for widgets that store a numerical value.
Definition: INextionNumericalValued.h:16
Abstract class for all UI widgets.
Definition: INextionWidget.h:15
uint32_t getNumberProperty(char *propertyName)
Gets the value of a numerical property of this widget.
Definition: INextionWidget.cpp:58
bool setValue(uint32_t value)
Sets the numerical value.
Definition: INextionNumericalValued.h:44
uint32_t getValue()
Gets the numerical value.
Definition: INextionNumericalValued.h:33
INextionNumericalValued(Nextion &nex, uint8_t page, uint8_t component, const char *name)
Create a new widget adapter.
Definition: INextionNumericalValued.h:22
bool setNumberProperty(char *propertyName, uint32_t value)
Sets the value of a numerical property of this widget.
Definition: INextionWidget.cpp:45
Driver for a physical Nextion device.
Definition: Nextion.h:31