GnuCashew ~ GnuCash Enabled Web
GCW
|
#include <AccountRegister.h>
Inherits Wt::WContainerWidget.
Classes | |
class | StatusBar |
Public Types | |
using | BaseModel = GCW::Eng::AccountRegisterModel |
Model. More... | |
using | SortFilterModel = Wt::WSortFilterProxyModel |
using | BatchEditModel = Wt::WBatchEditProxyModel |
Public Member Functions | |
AccountRegister (const std::string &_accountGuid="") | |
Constructor. More... | |
auto | setAccountGuid (const std::string &_accountGuid) -> void |
auto | tableView () -> GCW::Gui::TableView * |
Table View. More... | |
auto | baseModel () -> std::shared_ptr< BaseModel > |
auto | sortFilterModel () -> std::shared_ptr< SortFilterModel > |
auto | batchEditModel () -> std::shared_ptr< BatchEditModel > |
auto | statusBar () -> StatusBar * |
auto | test () -> void |
auto | toJson () const -> Wt::Json::Object |
Create View Properties JSON Object. More... | |
auto | fromJson (const Wt::Json::Object &_jobj) -> bool |
Set View Properties from JSON Object. More... | |
Private Member Functions | |
auto | loadData () -> void |
auto | editRow (int _row) -> void |
auto | deleteRow (int _row) -> void |
auto | lastIndex () -> Wt::WModelIndex |
auto | on_showPopup_triggered (const Wt::WModelIndex &_index, const Wt::WMouseEvent &_event) -> void |
auto | on_sortBy_triggered () -> void |
auto | on_filterBy_triggered () -> void |
auto | on_renamePage_triggered () -> void |
auto | on_duplicate_triggered () -> void |
auto | on_delete_triggered () -> void |
Delete a Row. More... | |
auto | on_removeSplits_triggered () -> void |
auto | on_enter_triggered () -> void |
auto | on_cancel_triggered () -> void |
auto | on_manageDocument_triggered () -> void |
auto | on_openDocument_triggered () -> void |
auto | on_blankTransaction_triggered () -> void |
auto | on_goDate_triggered () -> void |
auto | on_splitTransaction_triggered () -> void |
auto | on_editExchangeRate_triggered () -> void |
auto | on_schedule_triggered () -> void |
auto | on_jump_triggered () -> void |
auto | on_assignPayment_triggered () -> void |
Private Attributes | |
Wt::WPopupMenu | m_popupMenu |
std::string | m_accountGuid |
std::shared_ptr< BaseModel > | m_baseModel |
std::shared_ptr< Wt::WSortFilterProxyModel > | m_sortFilterModel |
std::shared_ptr< Wt::WBatchEditProxyModel > | m_batchEditModel |
GCW::Gui::TableView * | m_tableView = nullptr |
StatusBar * | m_statusBar = nullptr |
int | m_clickedRow = -1 |
int | m_clickedCol = -1 |
int | m_rightClickRow = -1 |
int | m_rightClickCol = -1 |
The AccountRegister is a widget that displays transactions from a single account within the system. It displays the account transactions in a spreadsheet-table-like format with multiple columns representing other field values such as; date, check-number, description... and so on.
The goal here is to make this widget behave just as closely as possible to the GnuCash interface, because theirs is very slick and makes navigating the register a no-mouse-necessary affair. One of the problems with web-based interfaces, however, is trapping keys completely, such as the ~tab~ key. So... we'll see how this goes!
The register view also grants the user editing abilities. When the user clicks on fields that are ~not~ reconciled, and appropriate 'editor' will open. The editor depends on the column selected, and is generated by the column Delegates.
Definition at line 49 of file AccountRegister.h.
Model.
An alias for the Model in case this interface changes.
Definition at line 91 of file AccountRegister.h.
using GCW::Gui::AccountRegister::BatchEditModel = Wt::WBatchEditProxyModel |
Definition at line 93 of file AccountRegister.h.
using GCW::Gui::AccountRegister::SortFilterModel = Wt::WSortFilterProxyModel |
Definition at line 92 of file AccountRegister.h.
GCW::Gui::AccountRegister::AccountRegister | ( | const std::string & | _accountGuid = "" | ) |
Constructor.
A register must be opened to a specific AccountGuid. If the AccountGuid is blank or cannot be found (why would that be?) then the register simply opens, allows registry entries, but has no place to save them (dangerous?).
Definition at line 585 of file AccountRegister.cpp.
References baseModel(), m_clickedCol, m_clickedRow, m_statusBar, m_tableView, on_showPopup_triggered(), and tableView().
|
inline |
Definition at line 113 of file AccountRegister.h.
References m_baseModel.
Referenced by AccountRegister(), deleteRow(), editRow(), lastIndex(), loadData(), on_delete_triggered(), on_showPopup_triggered(), and setAccountGuid().
|
inline |
Definition at line 115 of file AccountRegister.h.
References m_batchEditModel.
|
private |
Definition at line 864 of file AccountRegister.cpp.
References baseModel().
Referenced by on_delete_triggered().
|
private |
Definition at line 1259 of file AccountRegister.cpp.
References baseModel(), and tableView().
Referenced by on_showPopup_triggered(), and setAccountGuid().
auto GCW::Gui::AccountRegister::fromJson | ( | const Wt::Json::Object & | _jobj | ) | -> bool |
Set View Properties from JSON Object.
This accepts a JSON object containing all of the view properties and applys them to the view, essentially restoring it to its previous layout.
Definition at line 1301 of file AccountRegister.cpp.
|
private |
Definition at line 1187 of file AccountRegister.cpp.
References baseModel().
Referenced by setAccountGuid().
|
private |
Definition at line 1195 of file AccountRegister.cpp.
References baseModel(), m_baseModel, statusBar(), and tableView().
Referenced by setAccountGuid().
|
private |
Definition at line 1083 of file AccountRegister.cpp.
|
private |
Definition at line 1035 of file AccountRegister.cpp.
|
private |
Definition at line 1010 of file AccountRegister.cpp.
|
private |
Delete a Row.
This will delete a row from the register
by default, the user will be asked to delete an item from the register, unless they have chosen to never be asked.
Definition at line 909 of file AccountRegister.cpp.
References baseModel(), deleteRow(), GCW_DATE_FORMAT_DISPLAY, GCW::Dbo::Prefrences::get(), m_rightClickRow, and TR.
Referenced by on_showPopup_triggered().
|
private |
Definition at line 901 of file AccountRegister.cpp.
|
private |
Definition at line 1059 of file AccountRegister.cpp.
|
private |
Definition at line 1002 of file AccountRegister.cpp.
|
private |
Definition at line 885 of file AccountRegister.cpp.
|
private |
Definition at line 1043 of file AccountRegister.cpp.
|
private |
Definition at line 1075 of file AccountRegister.cpp.
|
private |
Definition at line 1018 of file AccountRegister.cpp.
|
private |
Definition at line 1027 of file AccountRegister.cpp.
|
private |
Definition at line 994 of file AccountRegister.cpp.
|
private |
Definition at line 893 of file AccountRegister.cpp.
|
private |
Definition at line 1067 of file AccountRegister.cpp.
|
private |
Definition at line 1091 of file AccountRegister.cpp.
References baseModel(), editRow(), m_popupMenu, m_rightClickCol, m_rightClickRow, on_delete_triggered(), tableView(), and TR.
Referenced by AccountRegister().
|
private |
Definition at line 877 of file AccountRegister.cpp.
|
private |
Definition at line 1051 of file AccountRegister.cpp.
auto GCW::Gui::AccountRegister::setAccountGuid | ( | const std::string & | _accountGuid | ) | -> void |
Definition at line 1169 of file AccountRegister.cpp.
References baseModel(), editRow(), lastIndex(), loadData(), and m_accountGuid.
|
inline |
Definition at line 114 of file AccountRegister.h.
References m_sortFilterModel.
|
inline |
|
inline |
Table View.
Definition at line 111 of file AccountRegister.h.
References m_tableView.
Referenced by AccountRegister(), editRow(), loadData(), on_showPopup_triggered(), and test().
void GCW::Gui::AccountRegister::test | ( | ) | -> void |
Definition at line 1310 of file AccountRegister.cpp.
References tableView().
auto GCW::Gui::AccountRegister::toJson | ( | ) | const -> Wt::Json::Object |
Create View Properties JSON Object.
This will pack all of the Widget display variables in to a JSON object for restoration later.
Definition at line 1292 of file AccountRegister.cpp.
|
private |
Definition at line 178 of file AccountRegister.h.
Referenced by setAccountGuid().
|
private |
Definition at line 179 of file AccountRegister.h.
Referenced by baseModel(), and loadData().
|
private |
Definition at line 181 of file AccountRegister.h.
Referenced by batchEditModel().
|
private |
Definition at line 185 of file AccountRegister.h.
Referenced by AccountRegister().
|
private |
Definition at line 184 of file AccountRegister.h.
Referenced by AccountRegister().
|
private |
Definition at line 177 of file AccountRegister.h.
Referenced by on_showPopup_triggered().
|
private |
Definition at line 187 of file AccountRegister.h.
Referenced by on_showPopup_triggered().
|
private |
Definition at line 186 of file AccountRegister.h.
Referenced by on_delete_triggered(), and on_showPopup_triggered().
|
private |
Definition at line 180 of file AccountRegister.h.
Referenced by sortFilterModel().
|
private |
Definition at line 183 of file AccountRegister.h.
Referenced by AccountRegister(), and statusBar().
|
private |
Definition at line 182 of file AccountRegister.h.
Referenced by AccountRegister(), and tableView().