- Timestamp:
- Aug 24, 2021, 5:33:19 PM (3 years ago)
- Location:
- trunk/lib/FlairCore/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairCore/src/DoubleSpinBox.cpp
r15 r437 24 24 25 25 DoubleSpinBox::DoubleSpinBox(const LayoutPosition *position, string name, 26 double min, double max, double step, int decimals,26 double min, double max, double step, uint16_t decimals, 27 27 double default_value) 28 28 : Box(position, name, "DoubleSpinBox") { … … 46 46 DoubleSpinBox::DoubleSpinBox(const LayoutPosition *position, string name, 47 47 string suffix, double min, double max, double step, 48 int decimals, double default_value)48 uint16_t decimals, double default_value) 49 49 : Box(position, name, "DoubleSpinBox") { 50 50 // update value from xml file -
trunk/lib/FlairCore/src/DoubleSpinBox.h
r15 r437 43 43 */ 44 44 DoubleSpinBox(const LayoutPosition *position, std::string name, double min, 45 double max, double step, int decimals = 2,45 double max, double step, uint16_t decimals = 2, 46 46 double default_value = 0); 47 47 … … 63 63 DoubleSpinBox(const LayoutPosition *position, std::string name, 64 64 std::string suffix, double min, double max, double step, 65 int decimals = 2, double default_value = 0);65 uint16_t decimals = 2, double default_value = 0); 66 66 67 67 /*! -
trunk/lib/FlairCore/src/SendData.cpp
r15 r437 30 30 31 31 SendData::SendData(const LayoutPosition *position, string name, string type, 32 uint16_t default_periodms, bool default_enabled )32 uint16_t default_periodms, bool default_enabled, uint16_t default_nb_buffering) 33 33 : Widget(position->getLayout(), name, type) { 34 34 pimpl_ = new SendData_impl(); … … 39 39 pimpl_->send_period = default_periodms; 40 40 pimpl_->is_enabled = default_enabled; 41 pimpl_->nb_buffering = default_nb_buffering; 41 42 42 43 SetVolatileXmlProp("row", position->Row()); … … 46 47 GetPersistentXmlProp("enabled", pimpl_->is_enabled); 47 48 SetPersistentXmlProp("enabled", pimpl_->is_enabled); 49 GetPersistentXmlProp("nb_buf", pimpl_->nb_buffering); 50 SetPersistentXmlProp("nb_buf", pimpl_->nb_buffering); 48 51 49 52 delete position; … … 67 70 68 71 void SendData::XmlEvent(void) { 69 uint16_t send_period ;72 uint16_t send_period,nb_buffering; 70 73 bool is_enabled; 71 74 bool something_changed = false; 72 75 73 if (GetPersistentXmlProp("period", send_period) && 74 GetPersistentXmlProp("enabled", is_enabled)) { 76 if (GetPersistentXmlProp("period", send_period) && GetPersistentXmlProp("enabled", is_enabled) && GetPersistentXmlProp("nb_buf", nb_buffering)) { 75 77 if (send_period != SendPeriod()) 76 78 something_changed = true; 77 79 if (is_enabled != IsEnabled()) 80 something_changed = true; 81 } 82 83 if (GetPersistentXmlProp("nb_buf", nb_buffering)) { 84 if (nb_buffering != NbBuffering()) 78 85 something_changed = true; 79 86 } … … 84 91 SetSendPeriod(send_period); 85 92 SetEnabled(is_enabled); 93 SetNbBuffering(nb_buffering); 86 94 87 95 getFrameworkManager()->UpdateSendData(this); … … 91 99 SetVolatileXmlProp("period", send_period); 92 100 SetVolatileXmlProp("enabled", is_enabled); 101 SetVolatileXmlProp("nb_buf", nb_buffering); 93 102 SendXml(); 94 103 … … 102 111 103 112 uint16_t SendData::SendPeriod(void) const { return pimpl_->send_period; } 113 114 uint16_t SendData::NbBuffering(void) const { return pimpl_->nb_buffering; } 104 115 105 116 bool SendData::IsEnabled(void) const { return pimpl_->is_enabled; } … … 116 127 void SendData::SetSendPeriod(uint16_t value) { pimpl_->send_period = value; } 117 128 129 void SendData::SetNbBuffering(uint16_t value) { pimpl_->nb_buffering = value; } 130 118 131 } // end namespace core 119 132 } // end namespace flair -
trunk/lib/FlairCore/src/SendData.h
r15 r437 34 34 */ 35 35 SendData(const LayoutPosition *position, std::string name, std::string type, 36 uint16_t default_periodms = 100, bool default_enabled = false );36 uint16_t default_periodms = 100, bool default_enabled = false, uint16_t default_nb_buffering=1); 37 37 38 38 /*! … … 54 54 uint16_t SendPeriod(void) const; // in ms 55 55 bool IsEnabled(void) const; 56 uint16_t NbBuffering(void) const; 56 57 57 58 protected: … … 88 89 89 90 void SetSendPeriod(uint16_t value); 91 void SetNbBuffering(uint16_t value); 90 92 void SetEnabled(bool value); 91 93 -
trunk/lib/FlairCore/src/Vector3DSpinBox.cpp
r167 r437 26 26 Vector3DSpinBox::Vector3DSpinBox(const LayoutPosition *position, string name, 27 27 double min, double max, double step, 28 int decimals, core::Vector3Df default_value)28 uint16_t decimals, core::Vector3Df default_value) 29 29 : Box(position, name, "Vector3DSpinBox") { 30 30 // update value from xml file -
trunk/lib/FlairCore/src/Vector3DSpinBox.h
r199 r437 43 43 */ 44 44 Vector3DSpinBox(const LayoutPosition *position, std::string name, double min, 45 double max, double step, int decimals = 2,45 double max, double step, uint16_t decimals = 2, 46 46 core::Vector3Df default_value = core::Vector3Df(0, 0, 0)); 47 47 -
trunk/lib/FlairCore/src/unexported/SendData_impl.h
r15 r437 30 30 size_t send_size; 31 31 uint16_t send_period; 32 uint16_t nb_buffering; 32 33 }; 33 34
Note:
See TracChangeset
for help on using the changeset viewer.