46 #ifndef __WTX_DBO_FIELDDEFBASE_H_234e0174_6b7d_11e8_b503_fb1ef3651ec0__ 47 #define __WTX_DBO_FIELDDEFBASE_H_234e0174_6b7d_11e8_b503_fb1ef3651ec0__ 52 #include <Wt/WObject.h> 53 #include <Wt/WFlags.h> 54 #include <Wt/WLineEdit.h> 138 Flags f = Flags::None,
141 std::string inf =
"",
156 std::string inf =
"",
170 Flags f = Flags::None
185 virtual const char * fieldName()
const;
194 virtual const std::string & aliasName()
const;
196 virtual int width()
const;
197 virtual void setWidth(
int value );
199 virtual int height()
const;
200 virtual void setHeight(
int value );
202 virtual bool isVisible()
const;
203 virtual void setIsVisible(
bool value=
true );
205 virtual bool isReadOnly()
const;
206 virtual void setIsReadOnly(
bool value=
true );
208 virtual bool isUnique()
const;
209 virtual void setIsUnique(
bool value=
true );
211 virtual const std::string & label()
const;
212 virtual void setLabel(
const std::string & value );
214 virtual const std::string & placeholderText()
const;
215 virtual void setPlaceholderText(
const std::string & value );
217 virtual const std::string & info()
const;
218 virtual void setInfo(
const std::string & value );
220 virtual const std::string & toolTip()
const;
221 virtual void setToolTip(
const std::string & value );
223 virtual int helpTopic()
const;
224 virtual void setHelpTopic(
int value );
226 virtual const Flags & flags()
const;
227 virtual void setFlags(
const Flags value );
229 virtual const std::string & defaultValue()
const;
230 virtual void setDefaultValue(
const std::string & value );
232 virtual bool forceUppercase()
const;
233 virtual void setForceUppercase(
bool value =
true );
235 virtual const std::string & inputMask()
const;
236 virtual void setInputMask(
const std::string & mask =
"", Wt::WFlags< Wt::InputMaskFlag > flags = Wt::None );
238 virtual std::unique_ptr<Wt::WItemDelegate> createItemDelegate(
int sid,
Wtx::Dbo::Session & session )
const;
239 virtual std::unique_ptr<Wt::WWidget> createLabelWidget(
int sid,
Wtx::Dbo::Session & session )
const;
240 virtual std::unique_ptr<Wt::WWidget> createEditWidget(
int sid,
Wtx::Dbo::Session & session )
const;
241 virtual std::unique_ptr<Wt::WWidget> createDisplayWidget(
int sid,
Wtx::Dbo::Session & session )
const;
243 virtual std::string toJson()
const;
244 virtual void fromJson(
const std::string & valud );
251 const char * m_fieldName;
252 std::string m_aliasName;
256 bool m_isReadOnly =
false;
257 bool m_isVisible =
true;
258 bool m_isUnique =
false;
259 bool m_forceUppercase =
false;
260 Flags m_flags = None;
262 std::string m_placeholderText;
264 std::string m_toolTip;
265 std::string m_defaultValue;
266 std::string m_inputMask;
267 Wt::WFlags< Wt::InputMaskFlag > m_inputMaskFlags;
276 #endif // #ifndef __WTX_DBO_FIELDDEF_H___
Flags
Field Definition Flags.