GnuCashew ~ Web Application compatible with GnuCash sql data files.
GCW
|
Main GnuCashew Central Widget. More...
#include <CentralWidget.h>
Public Member Functions | |
CentralWidget () | |
Central Widget. | |
auto | tabWidget () -> Wt::WTabWidget * |
auto | accountsTreeView () -> GCW::Gui::AccountsTreeView * |
auto | customersWidget () -> GCW::Gui::Customer::MainWidget * |
auto | activateAccountsTreeView () -> void |
auto | open_AccountRegister (const std::string &_accountGuid) -> void |
auto | open_CustomersWidget () -> void |
auto | open_EmployeesWidget () -> void |
auto | open_CustomerReportWidget (const std::string &_customerGuid) -> void |
auto | open_GeneralJournal () -> void |
auto | open_TablesWidget () -> void |
auto | tabIndex (const std::string &_text) -> int |
Index of Tab matching 'text'. | |
auto | currentAccountRegister () -> Gui::AccountRegister::Widget * |
auto | test () -> void |
![]() | |
WContainerWidget () | |
~WContainerWidget () | |
void | setLayout (std::unique_ptr< WLayout > layout) |
Layout * | setLayout (std::unique_ptr< Layout > layout) |
WLayout * | layout () 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< WWidget > | removeWidget (WWidget *widget) override |
virtual void | clear () |
virtual int | indexOf (WWidget *widget) const |
virtual WWidget * | widget (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< AlignmentFlag > | contentAlignment () 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< WWidget > | removeWidget (WWidget *widget) |
std::unique_ptr< Widget > | removeWidget (Widget *widget) |
![]() | |
WInteractWidget () | |
EventSignal< WKeyEvent > & | keyWentDown () |
EventSignal< WKeyEvent > & | keyPressed () |
EventSignal< WKeyEvent > & | keyWentUp () |
EventSignal & | enterPressed () |
EventSignal & | escapePressed () |
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 |
![]() | |
WWebWidget () | |
virtual std::vector< WWidget * > | children () const override |
Signal & | childrenChanged () |
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< Side > | clearSides () 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 WCssDecorationStyle & | decorationStyle () 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 WWidget * | find (const std::string &name) override |
virtual WWidget * | findById (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 |
EventSignal & | blurred () |
EventSignal & | focussed () |
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 |
![]() | |
virtual | ~WWidget () |
WWidget * | parent () const |
std::unique_ptr< Widget > | removeWidget (Widget *widget) |
std::unique_ptr< WWidget > | removeFromParent () |
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 |
![]() | |
void | addChild (std::unique_ptr< WObject > child) |
Child * | addChild (std::unique_ptr< Child > child) |
std::unique_ptr< WObject > | removeChild (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) |
![]() | |
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 Attributes | |
Wt::WGridLayout * | m_gridLayout = nullptr |
Wt::WTabWidget * | m_tabWidget = nullptr |
GCW::Gui::AccountsTreeView * | m_accountsTreeView = nullptr |
GCW::Gui::Customer::MainWidget * | m_customersWidget = nullptr |
Additional Inherited Members | |
![]() | |
typedef void(WObject::* | Method) () |
![]() | |
static std::string | jsStringLiteral (const std::string &v, char delimiter='\'') |
![]() | |
static WString | tr (const char *key) |
![]() | |
virtual void | propagateSetEnabled (bool enabled) override |
![]() | |
virtual void | enableAjax () override |
virtual WStatelessSlot * | getStateless (Method method) override |
virtual void | render (WFlags< RenderFlag > flags) override |
![]() | |
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) |
Main GnuCashew Central Widget.
This widget acts as a 'tab widget manager' for controlling what views (widgets) are presented to the user in the main central display widget. The central widget fills up the lion's share of the MainWidget area.
see also; MainWidget
Definition at line 29 of file CentralWidget.h.
GCW::Gui::CentralWidget::CentralWidget | ( | ) |
Central Widget.
The CentralWidget is the component on the main user interface that acts as a tab widget for being able to select from one tab to another.
The first tab is usually the 'accounts' tab. This tab normally cannot be closed. The other tabs open and close on reports or other views as they are requested.
Definition at line 32 of file CentralWidget.cpp.
References accountsTreeView(), Wt::WWebWidget::addStyleClass(), Wt::WContainerWidget::addWidget(), Wt::WInteractWidget::doubleClicked(), m_accountsTreeView, m_gridLayout, m_tabWidget, open_AccountRegister(), Wt::WContainerWidget::setLayout(), Wt::WWebWidget::tabIndex(), tabWidget(), TR, and Wt::WContainerWidget::widget().
|
inline |
Definition at line 37 of file CentralWidget.h.
References m_accountsTreeView.
Referenced by CentralWidget().
Definition at line 79 of file CentralWidget.cpp.
References TR8.
auto GCW::Gui::CentralWidget::currentAccountRegister | ( | ) | -> Gui::AccountRegister::Widget * |
Definition at line 172 of file CentralWidget.cpp.
|
inline |
Definition at line 38 of file CentralWidget.h.
References m_customersWidget.
This needs to also receive the 'split-guid' of the item to jump to.
Definition at line 104 of file CentralWidget.cpp.
References GCW::app(), GCW::Dbo::Accounts::byGuid(), and open_AccountRegister().
Referenced by CentralWidget(), and open_AccountRegister().
auto GCW::Gui::CentralWidget::open_CustomerReportWidget | ( | const std::string & | _customerGuid | ) | -> void |
Definition at line 182 of file CentralWidget.cpp.
References GCW::Dbo::Customers::byGuid(), and TR8.
Definition at line 236 of file CentralWidget.cpp.
References TR8.
Referenced by GCW::Gui::MainMenu::MainMenu().
Definition at line 282 of file CentralWidget.cpp.
References TR8.
Referenced by GCW::Gui::MainMenu::MainMenu().
Definition at line 366 of file CentralWidget.cpp.
Referenced by GCW::Gui::MainMenu::MainMenu().
Definition at line 399 of file CentralWidget.cpp.
Referenced by GCW::Gui::MainMenu::MainMenu().
Index of Tab matching 'text'.
Return the index of the tab with the matching text.
This is used when opening new windows. When opening a new window, the system will first check if the window is already open. For instance, if the "Customers Widget" is requested, the system will first check, by way of "tab-name" if there is a tab that is already open. If so, the user is switched to the open tab, rather than creating a new tab.
Definition at line 92 of file CentralWidget.cpp.
|
inline |
Definition at line 36 of file CentralWidget.h.
References m_tabWidget.
Referenced by CentralWidget().
Definition at line 469 of file CentralWidget.cpp.
|
private |
Definition at line 75 of file CentralWidget.h.
Referenced by accountsTreeView(), and CentralWidget().
|
private |
Definition at line 76 of file CentralWidget.h.
Referenced by customersWidget().
|
private |
Definition at line 73 of file CentralWidget.h.
Referenced by CentralWidget().
|
private |
Definition at line 74 of file CentralWidget.h.
Referenced by CentralWidget(), and tabWidget().