2 #include <Wt/WWidget.h> 3 #include <Wt/WModelIndex.h> 4 #include <Wt/WItemDelegate.h> 6 #include <Wt/WTemplate.h> 8 #include <Wt/WStackedWidget.h> 9 #include <Wt/WGridLayout.h> 10 #include <Wt/WVBoxLayout.h> 11 #include <Wt/WHBoxLayout.h> 12 #include <Wt/WFitLayout.h> 13 #include <Wt/WPushButton.h> 14 #include <Wt/WMessageBox.h> 16 #include <Wtx/MessageBox.h> 17 #include <Wtx/PopupMessage.h> 18 #include <Wtx/Dbo/TableViewManager.h> 19 #include <Wtx/Dbo/TemplateFormView.h> 20 #include <Wtx/Dbo/LookupItemDelegate.h> 21 #include <Wtx/Dbo/DetailForm.h> 23 #include <Wtx/Sys/Lookup/ItemDelegate.h> 24 #include <Wtx/Sys/Lookup/Lookup.h> 27 #include "ManagerWidget.h" 33 :
public Wt::WContainerWidget
48 :
Wt::WContainerWidget(),
61 PersonDetail( Wt::Dbo::ptr< Wtx::Crm::Person::Item > & item )
64 "crmPerson.detailForm",
68 std::cout << __FILE__ <<
":" << __LINE__ <<
" Wtx::Dbo::DetailForm< Wtx::Crm::Person::Item >" << std::endl;
85 void setFilter(
const std::string & value );
90 void openDetail( Wt::Dbo::ptr<Wtx::Crm::Person::Item> & item );
92 void setOpenDetail(
bool value );
97 void Wtx::Crm::Person::Desktop::openDetail( Wt::Dbo::ptr<Wtx::Crm::Person::Item> & item )
99 m_view-> openDetail( item );
102 void Wtx::Crm::Person::Desktop::setOpenDetail(
bool value )
104 m_view-> m_openDetail = value;
111 auto layout = std::make_unique< Wt::WVBoxLayout >();
113 auto u_ = std::make_unique< Wtx::Dbo::TableViewManager< Wtx::Crm::Person::Item, PersonDetail > >( viewDef, session() );
115 layout-> addWidget( std::move( u_ ) );
117 setLayout( std::move(layout) );
135 Wt::SelectionMode::Single,
161 "\"keyField\", \"cfyField\"" 179 {
"keyField",
"", 190, Wt::AlignmentFlag::Left,
"",
nullptr },
180 {
"cfyField",
"", 190, Wt::AlignmentFlag::Left,
"",
nullptr },
181 {
"phone",
"", 120, Wt::AlignmentFlag::Left,
"",
nullptr },
182 {
"cell",
"", 120, Wt::AlignmentFlag::Left,
"",
nullptr },
183 {
"email",
"", 170, Wt::AlignmentFlag::Left,
"",
nullptr },
184 {
"street1",
"", 170, Wt::AlignmentFlag::Left,
"",
nullptr },
185 {
"street2",
"", 170, Wt::AlignmentFlag::Left,
"",
nullptr },
186 {
"city",
"", 170, Wt::AlignmentFlag::Left,
"",
nullptr },
187 {
"state",
"", 170, Wt::AlignmentFlag::Left,
"",
nullptr },
188 {
"zip",
"", 170, Wt::AlignmentFlag::Left,
"",
nullptr },
205 : Wt::WCompositeWidget()
207 m_desktop = setImplementation( std::make_unique<Wtx::Crm::Person::Desktop>( session ) );
213 : Wt::WCompositeWidget()
215 m_desktop = setImplementation( std::make_unique< Wtx::Crm::Person::Desktop >( viewDef, session ) );
219 Wt::Signal< Wtx::Crm::Person::Item::Ptr > & Wtx::Crm::Person::ManagerWidget::clicked()
221 return m_desktop-> m_view-> itemClicked();
224 Wt::Signal< Wtx::Crm::Person::Item::Ptr > & Wtx::Crm::Person::ManagerWidget::doubleClicked()
226 return m_desktop-> m_view-> doubleClicked();
229 Wt::Signal< Wtx::Crm::Person::Item::Ptr > & Wtx::Crm::Person::ManagerWidget::addClicked()
231 return m_desktop-> m_view-> addClicked();
234 Wt::Signal< std::string > & Wtx::Crm::Person::ManagerWidget::additionalClicked()
236 return m_desktop-> m_view-> additionalClicked();
239 void Wtx::Crm::Person::ManagerWidget::setFilter(
const std::string & value )
241 m_desktop-> m_view-> tableView()-> setFilter( value );
244 void Wtx::Crm::Person::ManagerWidget::clearFilter()
246 m_desktop-> m_view-> tableView()-> setFilter(
"true" );
249 void Wtx::Crm::Person::ManagerWidget::openDetail( Wt::Dbo::ptr<Wtx::Crm::Person::Item> & item )
251 m_desktop-> openDetail( item );
254 void Wtx::Crm::Person::ManagerWidget::setOpenDetail(
bool value )
256 m_desktop-> setOpenDetail( value );
261 m_desktop-> m_view-> tableView();