45 #ifndef __WTX_DBO_FIELDDEFLOOKUPBASE_H_234e0174_6b7d_11e8_b503_fb1ef3651ec0__ 46 #define __WTX_DBO_FIELDDEFLOOKUPBASE_H_234e0174_6b7d_11e8_b503_fb1ef3651ec0__ 48 #include <Wtx/Dbo/QueryModel.h> 50 #include "FieldDefBase.h" 73 int m_selectedId = -1;
81 typedef std::shared_ptr< Wtx::Dbo::QueryModel< std::tuple<int,std::string> > > Model;
83 virtual int find_id(
const std::string & value );
84 virtual std::string get_string(
int id );
85 virtual std::string get_toolTip(
int id );
87 virtual std::shared_ptr< Wt::WAbstractItemModel > model(
int sid,
int tid,
const std::string & filter );
89 virtual std::unique_ptr<Wt::WTableView> getTableView(
int sid,
int tid,
const std::string & filter );
104 Flags f = Flags::None,
107 std::string inf =
"",
118 std::string inf =
"",
123 Provider * provider() {
return m_provider.get(); }
198 std::shared_ptr<Wt::WAbstractItemModel> (*getLookupModel)(
int sid,
int tid,
const std::string & filter,
Wtx::Dbo::Session & session ) =
nullptr;
200 std::unique_ptr<Wt::WTableView> (*getTableView)(
int sid,
int tid,
const std::string & filter,
Wtx::Dbo::Session & session ) =
nullptr;
202 std::unique_ptr<Provider> m_provider;
209 #endif // #ifndef __WTX_DBO_FIELDDEFLOOKUPBASE_H___
FieldDefLookupBase(TableDef &td, const char *fn, int w=-1, int h=-1, Flags f=Flags::None, std::string lb="", std::string ph="", std::string inf="", std::string tt="", int ht=-1)
ctor
Flags
Field Definition Flags.