GnuCashew ~ Web Application compatible with GnuCash sql data files.
GCW
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
GCW::Gui::BillPay::MainWidget Class Reference

Bill Pay Widget. More...

#include <MainWidget.h>

+ Inheritance diagram for GCW::Gui::BillPay::MainWidget:

Public Member Functions

 MainWidget ()
 
- Public Member Functions inherited from Wt::WContainerWidget
 WContainerWidget ()
 
 ~WContainerWidget ()
 
void setLayout (std::unique_ptr< WLayout > layout)
 
LayoutsetLayout (std::unique_ptr< Layout > layout)
 
WLayoutlayout () const
 
virtual void addWidget (std::unique_ptr< WWidget > widget)
 
Widget * addWidget (std::unique_ptr< Widget > widget)
 
Widget * addNew (Args &&...args)
 
virtual void insertBefore (std::unique_ptr< WWidget > widget, WWidget *before)
 
Widget * insertBefore (std::unique_ptr< Widget > widget, WWidget *before)
 
virtual void insertWidget (int index, std::unique_ptr< WWidget > widget)
 
Widget * insertWidget (int index, std::unique_ptr< Widget > widget)
 
Widget * insertNew (int index, Args &&...args)
 
virtual std::unique_ptr< WWidgetremoveWidget (WWidget *widget) override
 
virtual void clear ()
 
virtual int indexOf (WWidget *widget) const
 
virtual WWidgetwidget (int index) const
 
virtual int count () const
 
void setContentAlignment (WFlags< AlignmentFlag > contentAlignment)
 
void setPadding (const WLength &padding, WFlags< Side > sides=AllSides)
 
WLength padding (Side side) const
 
WFlags< AlignmentFlagcontentAlignment () const
 
void setOverflow (Overflow overflow, WFlags< Orientation > orientation=(Orientation::Horizontal|Orientation::Vertical))
 
void setList (bool list, bool ordered=false)
 
bool isList () const
 
bool isUnorderedList () const
 
bool isOrderedList () const
 
EventSignal< WScrollEvent > & scrolled ()
 
int scrollTop () const
 
int scrollLeft () const
 
virtual std::unique_ptr< WWidgetremoveWidget (WWidget *widget)
 
std::unique_ptr< Widget > removeWidget (Widget *widget)
 
- Public Member Functions inherited from Wt::WInteractWidget
 WInteractWidget ()
 
EventSignal< WKeyEvent > & keyWentDown ()
 
EventSignal< WKeyEvent > & keyPressed ()
 
EventSignal< WKeyEvent > & keyWentUp ()
 
EventSignalenterPressed ()
 
EventSignalescapePressed ()
 
EventSignal< WMouseEvent > & clicked ()
 
EventSignal< WMouseEvent > & doubleClicked ()
 
EventSignal< WMouseEvent > & mouseWentDown ()
 
EventSignal< WMouseEvent > & mouseWentUp ()
 
EventSignal< WMouseEvent > & mouseWentOut ()
 
EventSignal< WMouseEvent > & mouseWentOver ()
 
EventSignal< WMouseEvent > & mouseMoved ()
 
EventSignal< WMouseEvent > & mouseDragged ()
 
EventSignal< WMouseEvent > & mouseWheel ()
 
EventSignal< WTouchEvent > & touchStarted ()
 
EventSignal< WTouchEvent > & touchEnded ()
 
EventSignal< WTouchEvent > & touchMoved ()
 
EventSignal< WGestureEvent > & gestureStarted ()
 
EventSignal< WGestureEvent > & gestureChanged ()
 
EventSignal< WGestureEvent > & gestureEnded ()
 
void setDraggable (const std::string &mimeType, WWidget *dragWidget=nullptr, bool isDragWidgetOnly=false, WObject *sourceWidget=nullptr)
 
void unsetDraggable ()
 
void setMouseOverDelay (int delay)
 
int mouseOverDelay () const
 
virtual void setPopup (bool popup) override
 
virtual void load () override
 
virtual bool isEnabled () const override
 
- Public Member Functions inherited from Wt::WWebWidget
 WWebWidget ()
 
virtual std::vector< WWidget * > children () const override
 
SignalchildrenChanged ()
 
virtual void setPositionScheme (PositionScheme scheme) override
 
virtual PositionScheme positionScheme () const override
 
virtual void setOffsets (const WLength &offset, WFlags< Side > sides=AllSides) override
 
virtual WLength offset (Side s) const override
 
virtual void resize (const WLength &width, const WLength &height) override
 
virtual WLength width () const override
 
virtual WLength height () const override
 
virtual void setMinimumSize (const WLength &width, const WLength &height) override
 
virtual WLength minimumWidth () const override
 
virtual WLength minimumHeight () const override
 
virtual void setMaximumSize (const WLength &width, const WLength &height) override
 
virtual WLength maximumWidth () const override
 
virtual WLength maximumHeight () const override
 
virtual void setLineHeight (const WLength &height) override
 
virtual WLength lineHeight () const override
 
virtual void setFloatSide (Side s) override
 
virtual Side floatSide () const override
 
virtual void setClearSides (WFlags< Side > sides) override
 
virtual WFlags< SideclearSides () const override
 
virtual void setMargin (const WLength &margin, WFlags< Side > sides=AllSides) override
 
virtual WLength margin (Side side) const override
 
virtual void setHiddenKeepsGeometry (bool enabled) override
 
virtual bool hiddenKeepsGeometry () const override
 
virtual void setHidden (bool hidden, const WAnimation &animation=WAnimation()) override
 
virtual bool isHidden () const override
 
virtual bool isVisible () const override
 
virtual void setDisabled (bool disabled) override
 
virtual bool isDisabled () const override
 
virtual bool isPopup () const override
 
virtual void setInline (bool isInline) override
 
virtual bool isInline () const override
 
virtual void setDecorationStyle (const WCssDecorationStyle &style) override
 
virtual WCssDecorationStyledecorationStyle () override
 
virtual void setStyleClass (const WString &styleClass) override
 
virtual WString styleClass () const override
 
virtual void addStyleClass (const WString &styleClass, bool force=false) override
 
virtual void removeStyleClass (const WString &styleClass, bool force=false) override
 
virtual bool hasStyleClass (const WString &styleClass) const override
 
virtual void setVerticalAlignment (AlignmentFlag alignment, const WLength &length=WLength()) override
 
virtual AlignmentFlag verticalAlignment () const override
 
virtual WLength verticalAlignmentLength () const override
 
virtual void setToolTip (const WString &text, TextFormat textFormat=TextFormat::Plain) override
 
virtual void setDeferredToolTip (bool enable, TextFormat textFormat=TextFormat::Plain) override
 
virtual WString toolTip () const override
 
virtual void refresh () override
 
virtual void setAttributeValue (const std::string &name, const WString &value) override
 
virtual WString attributeValue (const std::string &name) const override
 
virtual void setJavaScriptMember (const std::string &name, const std::string &value) override
 
virtual std::string javaScriptMember (const std::string &name) const override
 
virtual void callJavaScriptMember (const std::string &name, const std::string &args) override
 
virtual bool loaded () const override
 
virtual void setId (const std::string &id) override
 
virtual WWidgetfind (const std::string &name) override
 
virtual WWidgetfindById (const std::string &id) override
 
virtual void setSelectable (bool selectable) override
 
virtual void doJavaScript (const std::string &javascript) override
 
virtual const std::string id () const override
 
void setLoadLaterWhenInvisible (bool)
 
std::string htmlTagName () const
 
void setHtmlTagName (const std::string &tag)
 
virtual void setCanReceiveFocus (bool enabled) override
 
virtual bool canReceiveFocus () const override
 
virtual bool setFirstFocus () override
 
virtual void setFocus (bool focus) override
 
virtual bool hasFocus () const override
 
virtual void setTabIndex (int index) override
 
virtual int tabIndex () const override
 
EventSignalblurred ()
 
EventSignalfocussed ()
 
virtual bool scrollVisibilityEnabled () const final override
 
virtual void setScrollVisibilityEnabled (bool enabled) final override
 
virtual int scrollVisibilityMargin () const final override
 
virtual void setScrollVisibilityMargin (int margin) final override
 
virtual Signal< bool > & scrollVisibilityChanged () final override
 
virtual bool isScrollVisible () const final override
 
virtual void setThemeStyleEnabled (bool enabled) final override
 
virtual bool isThemeStyleEnabled () const final override
 
virtual void setObjectName (const std::string &name) override
 
void setFocus ()
 
virtual void setFocus (bool focus)=0
 
- Public Member Functions inherited from Wt::WWidget
virtual ~WWidget ()
 
WWidgetparent () const
 
std::unique_ptr< Widget > removeWidget (Widget *widget)
 
std::unique_ptr< WWidgetremoveFromParent ()
 
void setWidth (const WLength &width)
 
void setHeight (const WLength &height)
 
virtual void positionAt (const WWidget *widget, Orientation orientation=Orientation::Vertical)
 
virtual void toggleStyleClass (const WString &styleClass, bool add, bool force=false)
 
std::string jsRef () const
 
void setFocus ()
 
virtual void acceptDrops (const std::string &mimeType, const WString &hoverStyleClass=WString())
 
virtual void stopAcceptDrops (const std::string &mimeType)
 
virtual void htmlText (std::ostream &out)
 
bool isRendered () const
 
void hide ()
 
void animateHide (const WAnimation &animation)
 
void show ()
 
void animateShow (const WAnimation &animation)
 
void enable ()
 
void disable ()
 
bool layoutSizeAware () const
 
- Public Member Functions inherited from Wt::WObject
void addChild (std::unique_ptr< WObject > child)
 
Child * addChild (std::unique_ptr< Child > child)
 
std::unique_ptr< WObjectremoveChild (WObject *child)
 
std::unique_ptr< Child > removeChild (Child *child)
 
virtual std::string objectName () const
 
void resetLearnedSlots ()
 
void resetLearnedSlot (void(T::*method)())
 
WStatelessSlot * implementStateless (void(T::*method)())
 
WStatelessSlot * implementStateless (void(T::*method)(), void(T::*undoMethod)())
 
void isNotStateless ()
 
WStatelessSlot * implementJavaScript (void(T::*method)(), const std::string &jsCode)
 
- Public Member Functions inherited from Wt::Core::observable
 observable () noexcept
 
virtual ~observable ()
 
auto bindSafe (void(C::*method)(Args...)) noexcept
 
auto bindSafe (void(C::*method)(Args...) const) const noexcept
 
auto bindSafe (const Function &function) noexcept
 

Private Member Functions

auto buildContent () -> void
 
auto do_refreshClicked () -> void
 
auto do_addClicked () -> void
 
auto do_editClicked () -> void
 
auto do_inactiveClicked () -> void
 
auto do_summaryClicked () -> void
 
auto do_yearChanged () -> void
 
auto refreshClicked () -> void
 
auto addClicked () -> void
 
auto editClicked (TableView *_table, Wt::WModelIndex _index) -> void
 
auto openEditor (const std::string &_bpGuid) -> void
 
auto setMonth (int _month) -> void
 
auto refreshViews () -> void
 
auto importClicked () -> void
 
auto exportClicked () -> void
 
auto clearSelectionExcept (TableView *=nullptr) -> void
 
auto summaryClicked (const std::string &_txGuid) -> void
 
auto finderInput () -> void
 
auto recallSelectedMonth () const -> int
 
auto toolBar () const -> ToolBar *
 
auto pendingView () const -> TableView *
 
auto paidView () const -> TableView *
 
auto unpaidView () const -> TableView *
 
auto inactiveView () const -> TableView *
 
auto summaryView () const -> SummaryWidget *
 
auto selectedMonth () -> int
 
auto selectedYear () -> int
 
auto on_headerClicked (int _col, const Wt::WMouseEvent _me) -> void
 

Private Attributes

std::unique_ptr< EditWidgetDialogm_dialog
 
Wt::Core::observing_ptr< EditWidgetm_editWidget
 
ToolBarm_toolBar = nullptr
 
TableViewm_pendingView = nullptr
 
TableViewm_paidView = nullptr
 
TableViewm_unpaidView = nullptr
 
TableViewm_inactiveView = nullptr
 
SummaryWidgetm_summaryView = nullptr
 
Wt::WModelIndex m_selectedIndex
 Selected Index.
 
int m_selectedMonth = -1
 
Wt::WHBoxLayoutm_hlw = nullptr
 

Additional Inherited Members

- Public Types inherited from Wt::WObject
typedef void(WObject::* Method) ()
 
- Static Public Member Functions inherited from Wt::WWebWidget
static std::string jsStringLiteral (const std::string &v, char delimiter='\'')
 
- Static Public Member Functions inherited from Wt::WWidget
static WString tr (const char *key)
 
- Protected Member Functions inherited from Wt::WInteractWidget
virtual void propagateSetEnabled (bool enabled) override
 
- Protected Member Functions inherited from Wt::WWebWidget
virtual void enableAjax () override
 
virtual WStatelessSlot * getStateless (Method method) override
 
virtual void render (WFlags< RenderFlag > flags) override
 
- Protected Member Functions inherited from Wt::WWidget
void setLayoutSizeAware (bool sizeAware)
 
virtual void layoutSizeChanged (int width, int height)
 
 WWidget ()
 
virtual void dropEvent (WDropEvent dropEvent)
 
virtual int boxPadding (Orientation orientation) const
 
virtual int boxBorder (Orientation orientation) const
 
void scheduleRender (WFlags< RepaintFlag > flags=None)
 

Detailed Description

Bill Pay Widget.

Definition at line 23 of file BillPay/MainWidget.h.

Constructor & Destructor Documentation

◆ MainWidget()

GCW::Gui::BillPay::MainWidget::MainWidget ( )

Definition at line 10 of file BillPay/MainWidget.cpp.

References Wt::WWebWidget::addStyleClass(), and buildContent().

Member Function Documentation

◆ addClicked()

auto GCW::Gui::BillPay::MainWidget::addClicked ( ) -> void
private

Add Clicked Handler

Definition at line 292 of file BillPay/MainWidget.cpp.

References GCW::app().

◆ buildContent()

auto GCW::Gui::BillPay::MainWidget::buildContent ( ) -> void
private

◆ clearSelectionExcept()

auto GCW::Gui::BillPay::MainWidget::clearSelectionExcept ( TableView _view = nullptr) -> void
private

Clear table selections except for the indicated table

Definition at line 184 of file BillPay/MainWidget.cpp.

◆ do_addClicked()

auto GCW::Gui::BillPay::MainWidget::do_addClicked ( ) -> void
private

Do add clicked

Definition at line 263 of file BillPay/MainWidget.cpp.

Referenced by buildContent().

◆ do_editClicked()

auto GCW::Gui::BillPay::MainWidget::do_editClicked ( ) -> void
private

Do edit clicked

Definition at line 271 of file BillPay/MainWidget.cpp.

References Wt::asString(), Wt::WString::toUTF8(), and Wt::ItemDataRole::User.

Referenced by buildContent().

◆ do_inactiveClicked()

auto GCW::Gui::BillPay::MainWidget::do_inactiveClicked ( ) -> void
private

Do inactive clicked

Definition at line 324 of file BillPay/MainWidget.cpp.

Referenced by buildContent().

◆ do_refreshClicked()

auto GCW::Gui::BillPay::MainWidget::do_refreshClicked ( ) -> void
private

Do refresh clicked

Definition at line 255 of file BillPay/MainWidget.cpp.

Referenced by buildContent().

◆ do_summaryClicked()

auto GCW::Gui::BillPay::MainWidget::do_summaryClicked ( ) -> void
private

Do summary clicked

Definition at line 335 of file BillPay/MainWidget.cpp.

Referenced by buildContent().

◆ do_yearChanged()

auto GCW::Gui::BillPay::MainWidget::do_yearChanged ( ) -> void
private

Do year changed

Definition at line 247 of file BillPay/MainWidget.cpp.

Referenced by buildContent().

◆ editClicked()

auto GCW::Gui::BillPay::MainWidget::editClicked ( TableView _table,
Wt::WModelIndex  _index 
) -> void
private

Edit Clicked Handler

Definition at line 301 of file BillPay/MainWidget.cpp.

References Wt::asString(), Wt::WString::toUTF8(), and Wt::ItemDataRole::User.

◆ exportClicked()

auto GCW::Gui::BillPay::MainWidget::exportClicked ( ) -> void
private

Export Handler

Definition at line 428 of file BillPay/MainWidget.cpp.

Referenced by buildContent().

◆ finderInput()

auto GCW::Gui::BillPay::MainWidget::finderInput ( ) -> void
private

Finder Input Handler

Definition at line 155 of file BillPay/MainWidget.cpp.

Referenced by buildContent().

◆ importClicked()

auto GCW::Gui::BillPay::MainWidget::importClicked ( ) -> void
private

Import Handler

Definition at line 420 of file BillPay/MainWidget.cpp.

Referenced by buildContent().

◆ inactiveView()

auto GCW::Gui::BillPay::MainWidget::inactiveView ( ) const -> TableView *
inlineprivate

Definition at line 131 of file BillPay/MainWidget.h.

References m_inactiveView.

◆ on_headerClicked()

auto GCW::Gui::BillPay::MainWidget::on_headerClicked ( int  _col,
const Wt::WMouseEvent  _me 
) -> void
private

Definition at line 436 of file BillPay/MainWidget.cpp.

Referenced by buildContent().

◆ openEditor()

auto GCW::Gui::BillPay::MainWidget::openEditor ( const std::string &  _bpGuid) -> void
private

Open the Editor

Definition at line 201 of file BillPay/MainWidget.cpp.

References Wt::WLength::Auto, Wt::WWidget::show(), and TR.

◆ paidView()

auto GCW::Gui::BillPay::MainWidget::paidView ( ) const -> TableView *
inlineprivate

Definition at line 129 of file BillPay/MainWidget.h.

References m_paidView.

◆ pendingView()

auto GCW::Gui::BillPay::MainWidget::pendingView ( ) const -> TableView *
inlineprivate

Definition at line 128 of file BillPay/MainWidget.h.

References m_pendingView.

◆ recallSelectedMonth()

auto GCW::Gui::BillPay::MainWidget::recallSelectedMonth ( ) const -> int
private

Recall selected month from config.

Definition at line 346 of file BillPay/MainWidget.cpp.

References GCW::Gui::BillPay::configItem().

◆ refreshClicked()

auto GCW::Gui::BillPay::MainWidget::refreshClicked ( ) -> void
private

Refresh Clicked Handler

Definition at line 284 of file BillPay/MainWidget.cpp.

◆ refreshViews()

auto GCW::Gui::BillPay::MainWidget::refreshViews ( ) -> void
private

Refresh the views

Definition at line 412 of file BillPay/MainWidget.cpp.

◆ selectedMonth()

auto GCW::Gui::BillPay::MainWidget::selectedMonth ( ) -> int
inlineprivate

Definition at line 134 of file BillPay/MainWidget.h.

References m_selectedMonth.

◆ selectedYear()

auto GCW::Gui::BillPay::MainWidget::selectedYear ( ) -> int
private

Definition at line 403 of file BillPay/MainWidget.cpp.

◆ setMonth()

auto GCW::Gui::BillPay::MainWidget::setMonth ( int  _month) -> void
private

Set the current Month

Definition at line 360 of file BillPay/MainWidget.cpp.

References GCW::app(), and GCW::Gui::BillPay::configItem().

◆ summaryClicked()

auto GCW::Gui::BillPay::MainWidget::summaryClicked ( const std::string &  _txGuid) -> void
private

Summary Clicked Handler

Definition at line 169 of file BillPay/MainWidget.cpp.

Referenced by buildContent().

◆ summaryView()

auto GCW::Gui::BillPay::MainWidget::summaryView ( ) const -> SummaryWidget *
inlineprivate

Definition at line 132 of file BillPay/MainWidget.h.

References m_summaryView.

◆ toolBar()

auto GCW::Gui::BillPay::MainWidget::toolBar ( ) const -> ToolBar *
inlineprivate

Definition at line 127 of file BillPay/MainWidget.h.

References m_toolBar.

◆ unpaidView()

auto GCW::Gui::BillPay::MainWidget::unpaidView ( ) const -> TableView *
inlineprivate

Definition at line 130 of file BillPay/MainWidget.h.

References m_unpaidView.

Member Data Documentation

◆ m_dialog

std::unique_ptr< EditWidgetDialog > GCW::Gui::BillPay::MainWidget::m_dialog
private

Definition at line 137 of file BillPay/MainWidget.h.

◆ m_editWidget

Wt::Core::observing_ptr< EditWidget > GCW::Gui::BillPay::MainWidget::m_editWidget
private

Definition at line 146 of file BillPay/MainWidget.h.

◆ m_hlw

Wt::WHBoxLayout* GCW::Gui::BillPay::MainWidget::m_hlw = nullptr
private

Definition at line 172 of file BillPay/MainWidget.h.

◆ m_inactiveView

TableView* GCW::Gui::BillPay::MainWidget::m_inactiveView = nullptr
private

Definition at line 152 of file BillPay/MainWidget.h.

Referenced by inactiveView().

◆ m_paidView

TableView* GCW::Gui::BillPay::MainWidget::m_paidView = nullptr
private

Definition at line 150 of file BillPay/MainWidget.h.

Referenced by paidView().

◆ m_pendingView

TableView* GCW::Gui::BillPay::MainWidget::m_pendingView = nullptr
private

Definition at line 149 of file BillPay/MainWidget.h.

Referenced by pendingView().

◆ m_selectedIndex

Wt::WModelIndex GCW::Gui::BillPay::MainWidget::m_selectedIndex
private

Selected Index.

When single-clicking through the interface, the currently selected (clicked) item, so that if the 'edit' button is hit, we'll know which was the last item clicked. This is important because there are three possible table-views containing items, and we're never sure which was the last table clicked in. So, on-click, in any of the three tables, the clicked-item index will be stored here.

Definition at line 168 of file BillPay/MainWidget.h.

◆ m_selectedMonth

int GCW::Gui::BillPay::MainWidget::m_selectedMonth = -1
private

Definition at line 169 of file BillPay/MainWidget.h.

Referenced by selectedMonth().

◆ m_summaryView

SummaryWidget* GCW::Gui::BillPay::MainWidget::m_summaryView = nullptr
private

Definition at line 153 of file BillPay/MainWidget.h.

Referenced by summaryView().

◆ m_toolBar

ToolBar* GCW::Gui::BillPay::MainWidget::m_toolBar = nullptr
private

Definition at line 148 of file BillPay/MainWidget.h.

Referenced by toolBar().

◆ m_unpaidView

TableView* GCW::Gui::BillPay::MainWidget::m_unpaidView = nullptr
private

Definition at line 151 of file BillPay/MainWidget.h.

Referenced by unpaidView().


The documentation for this class was generated from the following files: