15 addStyleClass(
"RawTableWidget_" + _viewName );
21 auto lw = setLayout( std::make_unique< Wt::WVBoxLayout >() );
23 auto tb = std::make_unique< Wt::WToolBar >();
26 auto w_ = std::make_unique< Wt::WLineEdit >();
28 m_toolBar-> addWidget( std::move( w_ ), Wt::AlignmentFlag::Left );
29 m_toolBar-> addWidget( std::make_unique< Wt::WText >(
"<span style=\"color:red;\">these tables have been designed to facilitate the complete destruction of your database. clicking can ruin your day! use caution!</span>" ) );
30 m_search -> setPlaceholderText(
"Search" );
36 auto tv = std::make_unique< GCW::Gui::TableView >();
37 m_tableView = tv.get();
38 tableView()-> setSortingEnabled (
true );
39 tableView()-> setAlternatingRowColors (
true );
40 tableView()-> setSelectionBehavior ( Wt::SelectionBehavior::Items );
41 tableView()-> setSelectionMode ( Wt::SelectionMode::Single );
42 tableView()-> setEditTriggers ( Wt::EditTrigger::SingleClicked );
43 tableView()-> setEditOptions ( Wt::EditOption::SingleEditor | Wt::EditOption::SaveWhenClosed );
45 auto sb = std::make_unique< Wt::WContainerWidget >();
46 m_statusBar = sb.get();
48 lw-> addWidget( std::move( tb ) );
49 lw-> addWidget( std::move( tv ), 1 );
50 lw-> addWidget( std::move( sb ) );
103 std::cout << __FILE__ <<
":" << __LINE__ <<
" " << m_search-> valueText() << std::endl;
114 auto item = std::make_unique< GCW::Dbo::Accounts::Item >();
121 GCW::app()-> gnucashew_session().query< std::string >(
"select name from sqlite_master where type = 'table'" )
124 std::cout << __FILE__ <<
":" << __LINE__ <<
" " << splits.size() <<
" tables" << std::endl;
125 for(
auto tableName : splits )
126 std::cout << __FILE__ <<
":" << __LINE__ <<
" " << tableName << std::endl;
134 GCW::app()-> gnucashew_session().query< std::string >(
"select sql from sqlite_master where type = 'table'" )
137 std::cout << __FILE__ <<
":" << __LINE__ <<
" " << splits.size() <<
" tables" << std::endl;
138 for(
auto tableName : splits )
139 std::cout << __FILE__ <<
":" << __LINE__ <<
" " << tableName << std::endl;