GnuCashew ~ GnuCash Enabled Web
GCW
|
#include <AccountsTreeView.h>
Inherits Wt::WContainerWidget.
Classes | |
class | ColDef |
Public Types | |
using | Model = GCW::Eng::AccountsTreeViewModel |
Public Member Functions | |
AccountsTreeView (int _columnCount) | |
AccountsTreeView (const std::string &_selectedAccountGuid, int _columnCount) | |
auto | model () const -> std::shared_ptr< Model > |
auto | view () const -> Wt::WTreeView * |
auto | doubleClicked () -> Wt::Signal< std::string > & |
auto | selectedAccount () const -> std::string |
auto | editAccount (const std::string &_accountGuid) -> void |
auto | editSelectedAccount () -> void |
auto | configItem () -> GCW::Dbo::Vars::Item::Ptr |
Config Item. More... | |
auto | saveConfig () -> void |
auto | loadConfig () -> void |
auto | toJson () const -> Wt::Json::Object |
auto | fromJson (Wt::Json::Object &_jobj) -> bool |
auto | test () -> void |
Private Member Functions | |
auto | init () -> void |
auto | setModel () -> void |
auto | on_doubleClicked (const Wt::WModelIndex &index, const Wt::WMouseEvent &event) -> void |
auto | iterate (Wt::Json::Array &_jary, Wt::WModelIndex _parent=Wt::WModelIndex()) const -> bool |
auto | expandNode (const std::string &_accountGuid, Wt::WModelIndex _parent=Wt::WModelIndex()) -> bool |
auto | expandTreeNodes (Wt::Json::Object &_jobj) -> bool |
auto | setSelected (const std::string &_accountGuid) -> bool |
auto | findIndex (const std::string &_accountGuid, Wt::WModelIndex _parentIndex=Wt::WModelIndex()) -> Wt::WModelIndex |
Find Index by AccountGuid. More... | |
auto | on_showPopup_triggered (const Wt::WModelIndex &_index, const Wt::WMouseEvent &_event) -> void |
Private Attributes | |
int | m_columnCount = -1 |
Wt::WGridLayout * | m_gridLayout = nullptr |
Wt::WTreeView * | m_view = nullptr |
std::shared_ptr< Model > | m_model |
std::vector< std::string > | m_columns |
Wt::Signal< std::string > | m_doubleClicked |
GCW::Gui::AccountEditor * | m_editAccountWidget = nullptr |
The AccountsTreeView is a widget that displays all of the accounts within the system. It displays the accounts in a tree-like format with multiple columns representing other field values such as; 'notes', 'tax info', 'balance remaining' and so on. The view is sortable and browsable, and facilitates gaining access to the individual account registers.
Definition at line 35 of file AccountsTreeView.h.
Definition at line 48 of file AccountsTreeView.h.
GCW::Gui::AccountsTreeView::AccountsTreeView | ( | int | _columnCount | ) |
Definition at line 30 of file AccountsTreeView.cpp.
References init().
GCW::Gui::AccountsTreeView::AccountsTreeView | ( | const std::string & | _selectedAccountGuid, |
int | _columnCount | ||
) |
Definition at line 20 of file AccountsTreeView.cpp.
References init(), and setSelected().
GCW::Dbo::Vars::Item::Ptr GCW::Gui::AccountsTreeView::configItem | ( | ) | -> GCW::Dbo::Vars::Item::Ptr |
Config Item.
This returns the single 'config item' that contains the properties of the tree view.
Definition at line 268 of file AccountsTreeView.cpp.
References GCW::app(), and GCW::Dbo::Vars::get().
|
inline |
Definition at line 56 of file AccountsTreeView.h.
References m_doubleClicked.
void GCW::Gui::AccountsTreeView::editAccount | ( | const std::string & | _accountGuid | ) | -> void |
Definition at line 189 of file AccountsTreeView.cpp.
void GCW::Gui::AccountsTreeView::editSelectedAccount | ( | ) | -> void |
Definition at line 245 of file AccountsTreeView.cpp.
|
private |
Definition at line 394 of file AccountsTreeView.cpp.
References GCW::Gui::BillPay::asString().
|
private |
Definition at line 453 of file AccountsTreeView.cpp.
|
private |
Find Index by AccountGuid.
This will loop through the tree and locate a specific index by it's accountGuid value.
Definition at line 473 of file AccountsTreeView.cpp.
References GCW::Gui::BillPay::asString().
bool GCW::Gui::AccountsTreeView::fromJson | ( | Wt::Json::Object & | _jobj | ) | -> bool |
Definition at line 524 of file AccountsTreeView.cpp.
|
private |
Definition at line 39 of file AccountsTreeView.cpp.
References on_doubleClicked(), on_showPopup_triggered(), saveConfig(), and TR8.
Referenced by AccountsTreeView().
|
private |
Definition at line 324 of file AccountsTreeView.cpp.
References GCW::Gui::BillPay::asString(), and iterate().
void GCW::Gui::AccountsTreeView::loadConfig | ( | ) | -> void |
Definition at line 298 of file AccountsTreeView.cpp.
References GCW::app(), GCW::Gui::BillPay::configItem(), and GCW::Dbo::Var::Field::varField.
|
inline |
Definition at line 53 of file AccountsTreeView.h.
References m_model.
|
private |
Definition at line 547 of file AccountsTreeView.cpp.
References GCW::Gui::BillPay::asString().
Referenced by init().
|
private |
Definition at line 104 of file AccountsTreeView.cpp.
References GCW::Gui::BillPay::asString().
Referenced by init().
void GCW::Gui::AccountsTreeView::saveConfig | ( | ) | -> void |
Definition at line 286 of file AccountsTreeView.cpp.
References GCW::app(), GCW::Gui::BillPay::configItem(), and GCW::Core::toJson().
Referenced by init().
std::string GCW::Gui::AccountsTreeView::selectedAccount | ( | ) | const -> std::string |
Definition at line 163 of file AccountsTreeView.cpp.
References GCW::Gui::BillPay::asString().
|
private |
Definition at line 254 of file AccountsTreeView.cpp.
References GCW::Dbo::Accounts::load().
|
private |
Definition at line 511 of file AccountsTreeView.cpp.
Referenced by AccountsTreeView().
void GCW::Gui::AccountsTreeView::test | ( | ) | -> void |
Definition at line 536 of file AccountsTreeView.cpp.
References GCW::Core::toJson().
Wt::Json::Object GCW::Gui::AccountsTreeView::toJson | ( | ) | const -> Wt::Json::Object |
Definition at line 375 of file AccountsTreeView.cpp.
References iterate().
|
inline |
Definition at line 54 of file AccountsTreeView.h.
References m_view.
|
private |
Definition at line 92 of file AccountsTreeView.h.
|
private |
Definition at line 96 of file AccountsTreeView.h.
|
private |
Definition at line 97 of file AccountsTreeView.h.
Referenced by doubleClicked().
|
private |
Definition at line 98 of file AccountsTreeView.h.
|
private |
Definition at line 93 of file AccountsTreeView.h.
|
private |
Definition at line 95 of file AccountsTreeView.h.
Referenced by model().
|
private |
Definition at line 94 of file AccountsTreeView.h.
Referenced by view().