List of all members | Public Types | Properties | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Slots | Protected Member Functions | Friends
GUIClient Class Reference

The GUIClient is the main xTuple ERP desktop client window. More...

#include <guiclient.h>

Inheritance diagram for GUIClient:
QMainWindow QWidget QObject QPaintDevice

Public Types

enum  WindowSystem {
  Unknown, X11, WIN, MAC,
  QWS, WINCE, S60
}
 

Properties

 acceptDrops
 
 accessibleDescription
 
 accessibleName
 
 animated
 
 autoFillBackground
 
 baseSize
 
 childrenRect
 
 childrenRegion
 
 contextMenuPolicy
 
 cursor
 
 dockNestingEnabled
 
 dockOptions
 
 documentMode
 
 enabled
 
 focus
 
 focusPolicy
 
 font
 
 frameGeometry
 
 frameSize
 
 fullScreen
 
 geometry
 
 height
 
 iconSize
 
 inputMethodHints
 
 isActiveWindow
 
QString key
 
 layoutDirection
 
 locale
 
 maximized
 
 maximumHeight
 
 maximumSize
 
 maximumWidth
 
 minimized
 
 minimumHeight
 
 minimumSize
 
 minimumSizeHint
 
 minimumWidth
 
 modal
 
 mouseTracking
 
 normalGeometry
 
 objectName
 
 palette
 
 pos
 
 rect
 
 size
 
 sizeHint
 
 sizeIncrement
 
 sizePolicy
 
 statusTip
 
 styleSheet
 
 tabShape
 
 toolButtonStyle
 
 toolTip
 
 toolTipDuration
 
 unifiedTitleAndToolBarOnMac
 
 updatesEnabled
 
 visible
 
 whatsThis
 
 width
 
 windowFilePath
 
 windowFlags
 
 windowIcon
 
 windowIconText
 
 windowModality
 
 windowModified
 
 windowOpacity
 
 windowTitle
 
 x
 
 y
 

Public Slots

void initMenuBar ()
 Build the application menus and toolbars based on the current user's preferences for menu and toolbar visibility. More...
 
void sClearErrorMessages ()
 Hide the error button in the main window's status bar. More...
 
void sCustomCommand ()
 The slot called whenever a custom command is invoked from the menu system. More...
 
void sEmitNotifyHeard (const QString &note)
 A slot used by setUpListener() for responding to Postgres notifications. More...
 
void sEmitSignal (QString, QString)
 A generic slot for extension scripts to emit their own signals. More...
 
void sEmitSignal (QString, int)
 A generic slot for extension scripts to emit their own signals. More...
 
void sEmitSignal (QString, bool)
 A generic slot for extension scripts to emit their own signals. More...
 
void setWindowTitle ()
 Build and set the title for the main application window. More...
 
void sIdleTimeout ()
 A slot to ask the user if s/he wants to log out. More...
 
void sNewErrorMessage ()
 Make the error button in the main window's status bar visible. More...
 
void sReportError (const QString &)
 Write a message to the debugging log. More...
 
void sSystemMessageAdded ()
 Tell the current user if s/he has new Social Desktop messages. More...
 
void sTick ()
 This method is called approximately once per minute. More...
 
Data Update Slots

The GUIClient provides a number of slots that application windows call for the purpose of keeping other windows informed of data changes. Each slot typically emits one corresponding signal (see Data Update Signals below). To be a good citizen, each window that makes a change to an object should call the appropriate GUIClient slot. To keep informed of changes made by other windows, interested windows should connect to one of the Data Update Signals. For example: the salesOrder window tells other windows that the current Sales Order was modified by calling:

// in salesOrder::save()
omfgThis->sSalesOrdersUpdated(_soheadid);
// in openSalesOrders::openSalesOrders()
connect(omfgThis, SIGNAL(salesOrdersUpdated(int, bool)), this, SLOT(sFillList()));
Note
These slots can only be used to notify other windows in the same application instance. They do not notify other running programs on the same or other workstations.
Todo:
Replace the explicit C++ slot connections with Postgres notifications?
void sAssortmentsUpdated (int, bool)
 
void sBBOMsUpdated (int, bool)
 This slot tells other open windows the definition or status of one or more Breeder Bills of Materials has changed. More...
 
void sBOMsUpdated (int, bool)
 This slot tells other open windows the definition or status of one or more Bills of Materials has changed. More...
 
void sBOOsUpdated (int, bool)
 This slot tells other open windows the definition or status of one or more Bills of Operations has changed. More...
 
void sBankAccountsUpdated ()
 This slot tells other open windows the definition or status of one or more Bank Accounts has changed. More...
 
void sBankAdjustmentsUpdated (int, bool)
 This slot tells other open windows the definition or status of one or more Bank Adjustments has changed. This is the actual adjustments, not bank adjustment types. More...
 
void sBillingSelectionUpdated (int, int)
 This slot tells other open windows the definition or status of one or more Billing Selections has changed. More...
 
void sBudgetsUpdated (int, bool)
 This slot tells other open windows the definition or status of one or more Budgets has changed. More...
 
void sCashReceiptsUpdated (int, bool)
 This slot tells other open windows the definition or status of one or more Cash Receipts has changed. More...
 
void sChecksUpdated (int, int, bool)
 This slot tells other open windows the definition or status of one or more Bank Checks or Payments has changed. More...
 
void sConfigureGLUpdated ()
 This slot tells other open windows the G/L Configuration has changed. More...
 
void sContractsUpdated (int, bool)
 This slot tells other open windows the definition or status of one or more Contracts has changed. More...
 
void sCreditMemosUpdated ()
 This slot tells other open windows the definition or status of one or more Credit Memos has changed. More...
 
void sCrmAccountsUpdated (int)
 This slot tells other open windows the definition or status of one or more CRM Accounts has changed. More...
 
void sCustomersUpdated (int, bool)
 This slot tells other open windows the definition or status of one or more Customers has changed. More...
 
void sEmployeeUpdated (int)
 This slot tells other open windows the definition or status of one or more Employees has changed. More...
 
void sGlSeriesUpdated ()
 This slot tells other open windows the definition or status of one or more G/L Series has changed. More...
 
void sInvoicesUpdated (int, bool)
 This slot tells other open windows the definition or status of one or more Invoices has changed. More...
 
void sItemGroupsUpdated (int, bool)
 This slot tells other open windows the definition or status of one or more Item Groups has changed. More...
 
void sItemsUpdated (int, bool)
 This slot tells other open windows the definition or status of one or more Items has changed. More...
 
void sItemsitesUpdated ()
 This slot tells other open windows the definition or status of one or more Itemsites has changed. More...
 
void sPaymentsUpdated (int, int, bool)
 This slot tells other open windows the definition or status of one or more Bank Payments has changed. More...
 
void sProjectsUpdated (int)
 This slot tells other open windows the definition or status of one or more Projects has changed. More...
 
void sProspectsUpdated ()
 This slot tells other open windows the definition or status of one or more Prospects has changed. More...
 
void sPurchaseOrderReceiptsUpdated ()
 This slot tells other open windows the definition or status of one or more Receipts has changed. More...
 
void sPurchaseOrdersUpdated (int, bool)
 This slot tells other open windows the definition or status of one or more Purchase Orders has changed. More...
 
void sPurchaseRequestsUpdated ()
 This slot tells other open windows the definition or status of one or more Purchase Requests has changed. More...
 
void sQOHChanged (int, bool)
 This slot tells other open windows the Quantity on Hand of one or more Item Sites has changed. More...
 
void sQuotesUpdated (int)
 This slot tells other open windows the definition or status of one or more Quotes has changed. More...
 
void sReportsChanged (int, bool)
 This slot tells other open windows one or more Report definitions has changed. More...
 
void sReturnAuthorizationsUpdated ()
 This slot tells other open windows the definition or status of one or more Return Authorizations has changed. More...
 
void sSalesOrdersUpdated (int)
 This slot tells other open windows the definition or status of one or more Sales Orders has changed. More...
 
void sSalesRepUpdated (int)
 This slot tells other open windows the definition or status of one or more Sales Representatives has changed. More...
 
void sStandardPeriodsUpdated ()
 This slot tells other open windows the definition or status of one or more Standard Periods has changed. More...
 
void sTaxAuthsUpdated (int)
 This slot tells other open windows the definition or status of one or more Tax Authorities has changed. More...
 
void sTransferOrdersUpdated (int)
 This slot tells other open windows the definition or status of one or more Transfer Orders has changed. More...
 
void sUserUpdated (QString)
 This slot tells other open windows the definition or status of a User has changed. More...
 
void sVendorsUpdated ()
 This slot tells other open windows the definition or status of one or more Vendors has changed. More...
 
void sVouchersUpdated ()
 This slot tells other open windows the definition or status of one or more Vouchers has changed. More...
 
void sWarehousesUpdated ()
 This slot tells other open windows the definition or status of one or more Sites or Warehouses has changed. More...
 
void sWorkCentersUpdated ()
 This slot tells other open windows the definition or status of one or more Work Centers has changed. More...
 
void sWorkOrderMaterialsUpdated (int, int, bool)
 This slot tells other open windows the definition or status of one or more Work Order Materials records has changed. More...
 
void sWorkOrderOperationsUpdated (int, int, bool)
 This slot tells other open windows the definition or status of one or more Work Order Operations records has changed. More...
 
void sWorkOrdersUpdated (int, bool)
 This slot tells other open windows the definition or status of one or more Work Orders has changed. More...
 

Signals

void emitSignal (QString, QString)
 
void emitSignal (QString, int)
 
void emitSignal (QString, bool)
 
void messageNotify ()
 
void tick ()
 
Data Update Signals

Application windows can connect to the GUIClient to listen for specific data update events. There is a signal for each corresponding slot.

For example, the opportunity window listens for updates to sales orders to keep its list current:

connect(omfgThis, SIGNAL(salesOrdersUpdated(int, bool)), this, SLOT(sFillSalesList()));
void assortmentsUpdated (int pItemid, bool pLocal)
 
void bankAccountsUpdated ()
 
void bankAdjustmentsUpdated (int pBankadjid, bool pLocal)
 
void bbomsUpdated (int pItemid, bool pLocal)
 
void billingSelectionUpdated (int pCoheadid, int pCoitemid)
 
void bomsUpdated (int pItemid, bool pLocal)
 
void boosUpdated (int pItemid, bool pLocal)
 
void budgetsUpdated (int pItemid, bool pLocal)
 
void cashReceiptsUpdated (int pCashrcptid, bool pLocal)
 
void checksUpdated (int pBankaccntid, int pCheckid, bool pLocal)
 
void configureGLUpdated ()
 
void contractsUpdated (int pContrctid, bool pLocal)
 
void creditMemosUpdated ()
 
void crmAccountsUpdated (int crmacctid)
 
void customersUpdated (int pCustid, bool pLocal)
 
void employeeUpdated (int id)
 
void glSeriesUpdated ()
 
void invoicesUpdated (int pInvcheadid, bool pLocal)
 
void itemGroupsUpdated (int pItemgrpid, bool pLocal)
 
void itemsUpdated (int pItemid, bool pLocal)
 
void itemsitesUpdated ()
 
void paymentsUpdated (int pBankaccntid, int pApselectid, bool pLocal)
 
void projectsUpdated (int prjid)
 
void prospectsUpdated ()
 
void purchaseOrderReceiptsUpdated ()
 
void purchaseOrdersUpdated (int pPoheadid, bool pLocal)
 
void purchaseRequestsUpdated ()
 
void qohChanged (int pItemsiteid, bool pLocal)
 
void quotesUpdated (int pQuheadid, bool pLocal)
 
void reportsChanged (int pReportid, bool pLocal)
 
void returnAuthorizationsUpdated ()
 
void salesOrdersUpdated (int pSoheadid, bool pLocal)
 
void salesRepUpdated (int id)
 
void standardPeriodsUpdated ()
 
void systemMessageAdded ()
 
void taxAuthsUpdated (int taxauthid)
 
void transferOrdersUpdated (int id)
 
void userUpdated (QString username)
 
void vendorsUpdated ()
 
void vouchersUpdated ()
 
void warehousesUpdated ()
 
void workCentersUpdated ()
 
void workOrderMaterialsUpdated (int pWoid, int pWomatlid, bool pLocal)
 
void workOrderOperationsUpdated (int pWoid, int pWooperid, bool pLocal)
 
void workOrdersUpdated (int pWoid, bool pLocal)
 

Public Member Functions

 GUIClient (const QString &, const QString &)
 Create a new xTuple ERP main application window, set up menus, and otherwise initialize the application. More...
 
virtual ~GUIClient ()
 
bool acceptDrops () const
 
QString accessibleDescription () const
 
QString accessibleName () const
 
QList< QAction * > actions () const
 
void activateWindow ()
 
void addAction (QAction *action)
 
void addActions (const QList< QAction * > &actions)
 
void addDockWidget (Qt::DockWidgetArea area, QDockWidget *dockwidget, Qt::Orientation orientation)
 
Q_INVOKABLE void addDockWidget (Qt::DockWidgetArea area, QDockWidget *dockwidget)
 Adds the given dockwidget to the specified area. More...
 
QToolBaraddToolBar (const QString &title)
 
Q_INVOKABLE void addToolBar (QToolBar *toolbar)
 Add the given toolbar to the top toolbar dock. More...
 
Q_INVOKABLE void addToolBar (Qt::ToolBarArea area, QToolBar *toolbar)
 Add the toolbar to the specified area in this main window. More...
 
Q_INVOKABLE void addToolBarBreak (Qt::ToolBarArea area=Qt::TopToolBarArea)
 Add a toolbar break to the given area after all the other objects that are present. More...
 
void adjustSize ()
 
bool autoFillBackground () const
 
QPalette::ColorRole backgroundRole () const
 
QBackingStorebackingStore () const
 
QSize baseSize () const
 
bool blockSignals (bool block)
 
QWidgetcentralWidget () const
 
QWidgetchildAt (int x, int y) const
 
QWidgetchildAt (const QPoint &p) const
 
const QObjectList & children () const
 
QRect childrenRect () const
 
QRegion childrenRegion () const
 
void clearFocus ()
 
void clearMask ()
 
bool close ()
 
int colorCount () const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
QMargins contentsMargins () const
 
QRect contentsRect () const
 
Qt::ContextMenuPolicy contextMenuPolicy () const
 
Qt::DockWidgetArea corner (Qt::Corner corner) const
 
Q_INVOKABLE QDoubleValidatorcostVal ()
 
virtual QMenucreatePopupMenu ()
 
QCursor cursor () const
 
void customContextMenuRequested (const QPoint &pos)
 
Q_INVOKABLE QString databaseURL ()
 
Q_INVOKABLE QIntValidatordayVal ()
 
Q_INVOKABLE const QDate dbDate ()
 
void deleteLater ()
 
int depth () const
 
void destroyed (QObject *obj)
 
int devicePixelRatio () const
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const
 
bool disconnect (const QObject *receiver, const char *method) const
 
DockOptions dockOptions () const
 
Qt::DockWidgetArea dockWidgetArea (QDockWidget *dockwidget) const
 
bool documentMode () const
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QByteArraydynamicPropertyNames () const
 
WId effectiveWinId () const
 
Q_INVOKABLE const QDate endOfTime ()
 
void ensurePolished () const
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const
 
Q_INVOKABLE QFont fixedFont ()
 
Qt::FocusPolicy focusPolicy () const
 
QWidgetfocusProxy () const
 
QWidgetfocusWidget () const
 
const QFontfont () const
 
QFontInfo fontInfo () const
 
QFontMetrics fontMetrics () const
 
QPalette::ColorRole foregroundRole () const
 
QRect frameGeometry () const
 
QSize frameSize () const
 
const QRectgeometry () const
 
void getContentsMargins (int *left, int *top, int *right, int *bottom) const
 
Q_INVOKABLE GUIClient::WindowSystem getWindowSystem ()
 Return an enumerated value indicating the windowing system for the current run-time environment. More...
 
QPixmap grab (const QRect &rectangle)
 
void grabGesture (Qt::GestureType gesture, Qt::GestureFlags flags)
 
void grabKeyboard ()
 
void grabMouse ()
 
void grabMouse (const QCursor &cursor)
 
int grabShortcut (const QKeySequence &key, Qt::ShortcutContext context)
 
QGraphicsEffectgraphicsEffect () const
 
QGraphicsProxyWidgetgraphicsProxyWidget () const
 
Q_INVOKABLE void handleNewWindow (QWidget *, Qt::WindowModality=Qt::NonModal, bool forceFloat=false)
 One way to open application windows from the C++ core. More...
 
bool hasEditFocus () const
 
bool hasFocus () const
 
virtual bool hasHeightForWidth () const
 
bool hasMouseTracking () const
 
int height () const
 
virtual int heightForWidth (int w) const
 
int heightMM () const
 
void hide ()
 
Q_INVOKABLE int hunspell_add (const QString word)
 
Q_INVOKABLE int hunspell_check (const QString word)
 
Q_INVOKABLE int hunspell_ignore (const QString word)
 
Q_INVOKABLE bool hunspell_ready ()
 
Q_INVOKABLE const QStringList hunspell_suggest (const QString word)
 
QSize iconSize () const
 
void iconSizeChanged (const QSize &iconSize)
 
bool inherits (const char *className) const
 
Q_INVOKABLE InputManagerinputManager ()
 
Qt::InputMethodHints inputMethodHints () const
 
virtual QVariant inputMethodQuery (Qt::InputMethodQuery query) const
 
void insertAction (QAction *before, QAction *action)
 
void insertActions (QAction *before, QList< QAction * > actions)
 
void insertToolBar (QToolBar *before, QToolBar *toolbar)
 
void insertToolBarBreak (QToolBar *before)
 
void installEventFilter (QObject *filterObj)
 
bool isActiveWindow () const
 
bool isAncestorOf (const QWidget *child) const
 
bool isAnimated () const
 
bool isDockNestingEnabled () const
 
bool isEnabled () const
 
bool isEnabledTo (const QWidget *ancestor) const
 
bool isEnabledToTLW () const
 
bool isFullScreen () const
 
bool isHidden () const
 
bool isMaximized () const
 
bool isMinimized () const
 
bool isModal () const
 
bool isTopLevel () const
 
bool isVisible () const
 
bool isVisibleTo (const QWidget *ancestor) const
 
bool isWidgetType () const
 
bool isWindow () const
 
bool isWindowModified () const
 
bool isWindowType () const
 
Q_INVOKABLE QString key ()
 
void killTimer (int id)
 
Q_INVOKABLE void launchBrowser (QWidget *, const QString &)
 Open a web browser to a given URL. More...
 
QLayoutlayout () const
 
Qt::LayoutDirection layoutDirection () const
 
void loadScriptGlobals (QScriptEngine *engine)
 Load JavaScript global variables into a QScriptEngine. More...
 
QLocale locale () const
 
int logicalDpiX () const
 
int logicalDpiY () const
 
void lower ()
 
QPoint mapFrom (const QWidget *parent, const QPoint &pos) const
 
QPoint mapFromGlobal (const QPoint &pos) const
 
QPoint mapFromParent (const QPoint &pos) const
 
QPoint mapTo (const QWidget *parent, const QPoint &pos) const
 
QPoint mapToGlobal (const QPoint &pos) const
 
QPoint mapToParent (const QPoint &pos) const
 
QRegion mask () const
 
int maximumHeight () const
 
QSize maximumSize () const
 
int maximumWidth () const
 
QMenuBarmenuBar () const
 
Q_INVOKABLE QMenuBarmenuBar ()
 
QWidgetmenuWidget () const
 
virtual const QMetaObjectmetaObject () const
 
int minimumHeight () const
 
QSize minimumSize () const
 
virtual QSize minimumSizeHint () const
 
int minimumWidth () const
 
Q_INVOKABLE QDoubleValidatormoneyVal ()
 
void move (int x, int y)
 
void move (const QPoint &)
 
void moveToThread (QThread *targetThread)
 
QWidgetnativeParentWidget () const
 
Q_INVOKABLE QDoubleValidatornegMoneyVal ()
 
Q_INVOKABLE QDoubleValidatornegPercentVal ()
 
QWidgetnextInFocusChain () const
 
QRect normalGeometry () const
 
QString objectName () const
 
void objectNameChanged (const QString &objectName)
 
Q_INVOKABLE QString openrptVersion ()
 
Q_INVOKABLE QIntValidatororderVal ()
 
void overrideWindowFlags (Qt::WindowFlags flags)
 
virtual QPaintEnginepaintEngine () const
 
bool paintingActive () const
 
const QPalettepalette () const
 
QObjectparent () const
 
QWidgetparentWidget () const
 
Q_INVOKABLE QDoubleValidatorpercentVal ()
 
int physicalDpiX () const
 
int physicalDpiY () const
 
Q_INVOKABLE void populateCustomMenu (QMenu *, const QString &)
 Build a Custom submenu from the cmd table. More...
 
QPoint pos () const
 
QWidgetpreviousInFocusChain () const
 
Q_INVOKABLE QDoubleValidatorpriceVal ()
 
QVariant property (const char *name) const
 
Q_INVOKABLE QString qtVersion ()
 
Q_INVOKABLE QDoubleValidatorqtyPerVal ()
 
Q_INVOKABLE QDoubleValidatorqtyVal ()
 
void raise ()
 
Q_INVOKABLE QDoubleValidatorratioVal ()
 
QRect rect () const
 
void releaseKeyboard ()
 
void releaseMouse ()
 
void releaseShortcut (int id)
 
void removeAction (QAction *action)
 
void removeDockWidget (QDockWidget *dockwidget)
 
void removeEventFilter (QObject *obj)
 
void removeToolBar (QToolBar *toolbar)
 
void removeToolBarBreak (QToolBar *before)
 
void render (QPaintDevice *target, const QPoint &targetOffset, const QRegion &sourceRegion, RenderFlags renderFlags)
 
void render (QPainter *painter, const QPoint &targetOffset, const QRegion &sourceRegion, RenderFlags renderFlags)
 
void repaint ()
 
void repaint (int x, int y, int w, int h)
 
void repaint (const QRect &rect)
 
void repaint (const QRegion &rgn)
 
void resize (int w, int h)
 
void resize (const QSize &)
 
bool restoreDockWidget (QDockWidget *dockwidget)
 
bool restoreGeometry (const QByteArray &geometry)
 
bool restoreState (const QByteArray &state, int version)
 
Q_INVOKABLE QDoubleValidatorrunTimeVal ()
 
QByteArray saveGeometry () const
 
QByteArray saveState (int version) const
 
Q_INVOKABLE void saveToolbarPositions ()
 Save the position and visibility of application toolbars in user preferences. More...
 
Q_INVOKABLE QDoubleValidatorscrapVal ()
 
void scroll (int dx, int dy)
 
void scroll (int dx, int dy, const QRect &r)
 
void setAcceptDrops (bool on)
 
void setAccessibleDescription (const QString &description)
 
void setAccessibleName (const QString &name)
 
void setAnimated (bool enabled)
 
void setAttribute (Qt::WidgetAttribute attribute, bool on)
 
void setAutoFillBackground (bool enabled)
 
void setBackgroundRole (QPalette::ColorRole role)
 
void setBaseSize (const QSize &)
 
void setBaseSize (int basew, int baseh)
 
Q_INVOKABLE void setCaption ()
 
Q_INVOKABLE void setCentralWidget (QWidget *widget)
 Sets the given widget to be the main window's central widget. More...
 
void setContentsMargins (const QMargins &margins)
 
void setContentsMargins (int left, int top, int right, int bottom)
 
void setContextMenuPolicy (Qt::ContextMenuPolicy policy)
 
void setCorner (Qt::Corner corner, Qt::DockWidgetArea area)
 
void setCursor (const QCursor &)
 
void setDisabled (bool disable)
 
void setDockNestingEnabled (bool enabled)
 
void setDockOptions (DockOptions options)
 
void setDocumentMode (bool enabled)
 
void setEditFocus (bool enable)
 
void setEnabled (bool)
 
void setFixedHeight (int h)
 
void setFixedSize (const QSize &s)
 
void setFixedSize (int w, int h)
 
void setFixedWidth (int w)
 
void setFocus ()
 
void setFocus (Qt::FocusReason reason)
 
void setFocusPolicy (Qt::FocusPolicy policy)
 
void setFocusProxy (QWidget *w)
 
void setFont (const QFont &)
 
void setForegroundRole (QPalette::ColorRole role)
 
void setGeometry (int x, int y, int w, int h)
 
void setGeometry (const QRect &)
 
void setGraphicsEffect (QGraphicsEffect *effect)
 
void setHidden (bool hidden)
 
void setIconSize (const QSize &iconSize)
 
void setInputMethodHints (Qt::InputMethodHints hints)
 
void setLayout (QLayout *layout)
 
void setLayoutDirection (Qt::LayoutDirection direction)
 
void setLocale (const QLocale &locale)
 
void setMask (const QRegion &region)
 
void setMask (const QBitmap &bitmap)
 
void setMaximumHeight (int maxh)
 
void setMaximumSize (const QSize &)
 
void setMaximumSize (int maxw, int maxh)
 
void setMaximumWidth (int maxw)
 
void setMenuBar (QMenuBar *menuBar)
 
void setMenuWidget (QWidget *menuBar)
 
void setMinimumHeight (int minh)
 
void setMinimumSize (const QSize &)
 
void setMinimumSize (int minw, int minh)
 
void setMinimumWidth (int minw)
 
void setMouseTracking (bool enable)
 
void setObjectName (const QString &name)
 
void setPalette (const QPalette &)
 
void setParent (QObject *parent)
 
void setParent (QWidget *parent)
 
void setParent (QWidget *parent, Qt::WindowFlags f)
 
bool setProperty (const char *name, const QVariant &value)
 
void setShortcutAutoRepeat (int id, bool enable)
 
void setShortcutEnabled (int id, bool enable)
 
void setSizeIncrement (const QSize &)
 
void setSizeIncrement (int w, int h)
 
void setSizePolicy (QSizePolicy)
 
void setSizePolicy (QSizePolicy::Policy horizontal, QSizePolicy::Policy vertical)
 
void setStatusBar (QStatusBar *statusbar)
 
void setStatusTip (const QString &)
 
void setStyle (QStyle *style)
 
void setStyleSheet (const QString &styleSheet)
 
void setTabPosition (Qt::DockWidgetAreas areas, QTabWidget::TabPosition tabPosition)
 
void setTabShape (QTabWidget::TabShape tabShape)
 
void setToolButtonStyle (Qt::ToolButtonStyle toolButtonStyle)
 
void setToolTip (const QString &)
 
void setToolTipDuration (int msec)
 
void setUnifiedTitleAndToolBarOnMac (bool set)
 
void setUpdatesEnabled (bool enable)
 
Q_INVOKABLE void setUpListener (const QString &)
 Subscribe to the named Postgres notification. More...
 
void setupUi (QWidget *widget)
 
virtual void setVisible (bool visible)
 
void setWhatsThis (const QString &)
 
void setWindowFilePath (const QString &filePath)
 
void setWindowFlags (Qt::WindowFlags type)
 
void setWindowIcon (const QIcon &icon)
 
void setWindowIconText (const QString &)
 
void setWindowModality (Qt::WindowModality windowModality)
 
void setWindowModified (bool)
 
void setWindowOpacity (qreal level)
 
void setWindowRole (const QString &role)
 
void setWindowState (Qt::WindowStates windowState)
 
void setWindowTitle (const QString &)
 
void show ()
 
void showFullScreen ()
 
void showMaximized ()
 
void showMinimized ()
 
void showNormal ()
 
Q_INVOKABLE bool showTopLevel () const
 
Q_INVOKABLE bool shuttingDown ()
 
bool signalsBlocked () const
 
Q_INVOKABLE bool singleCurrency ()
 Return whether the database has only one currency or if more than one currency is defined. More...
 
QSize size () const
 
virtual QSize sizeHint () const
 
QSize sizeIncrement () const
 
QSizePolicy sizePolicy () const
 
void splitDockWidget (QDockWidget *first, QDockWidget *second, Qt::Orientation orientation)
 
void stackUnder (QWidget *w)
 
Q_INVOKABLE const QDate startOfTime ()
 
int startTimer (int interval, Qt::TimerType timerType)
 
QStatusBarstatusBar () const
 
QString statusTip () const
 
QStylestyle () const
 
QString styleSheet () const
 
Q_INVOKABLE QFont systemFont ()
 
QList< QDockWidget * > tabifiedDockWidgets (QDockWidget *dockwidget) const
 
Q_INVOKABLE void tabifyDockWidget (QDockWidget *first, QDockWidget *second)
 Moves second dock widget on top of first dock widget, creating a tabbed docked area in the main window. More...
 
QTabWidget::TabPosition tabPosition (Qt::DockWidgetArea area) const
 
QTabWidget::TabShape tabShape () const
 
QWidgettakeCentralWidget ()
 
bool testAttribute (Qt::WidgetAttribute attribute) const
 
QThreadthread () const
 
Qt::ToolBarArea toolBarArea (QToolBar *toolbar) const
 
bool toolBarBreak (QToolBar *toolbar) const
 
Qt::ToolButtonStyle toolButtonStyle () const
 
void toolButtonStyleChanged (Qt::ToolButtonStyle toolButtonStyle)
 
QString toolTip () const
 
int toolTipDuration () const
 
QWidgettopLevelWidget () const
 
Q_INVOKABLE QDoubleValidatortransQtyVal ()
 
bool underMouse () const
 
void ungrabGesture (Qt::GestureType gesture)
 
bool unifiedTitleAndToolBarOnMac () const
 
void unsetCursor ()
 
void unsetLayoutDirection ()
 
void unsetLocale ()
 
void update (const QRect &rect)
 
void update (int x, int y, int w, int h)
 
void update (const QRegion &rgn)
 
void update ()
 
void updateGeometry ()
 
bool updatesEnabled () const
 
Q_INVOKABLE QString username ()
 
Q_INVOKABLE QString version ()
 
QRegion visibleRegion () const
 
Q_INVOKABLE QDoubleValidatorweightVal ()
 
QString whatsThis () const
 
int width () const
 
int widthMM () const
 
QWidgetwindow () const
 
QString windowFilePath () const
 
Qt::WindowFlags windowFlags () const
 
QWindowwindowHandle () const
 
QIcon windowIcon () const
 
void windowIconChanged (const QIcon &icon)
 
QString windowIconText () const
 
void windowIconTextChanged (const QString &iconText)
 
Q_INVOKABLE QWidgetList windowList ()
 Return the list of windows opened by GUIClient::handleNewWindow(). More...
 
Qt::WindowModality windowModality () const
 
qreal windowOpacity () const
 
QString windowRole () const
 
Qt::WindowStates windowState () const
 
QString windowTitle () const
 
void windowTitleChanged (const QString &title)
 
Qt::WindowType windowType () const
 
WId winId () const
 
Q_INVOKABLE QMdiAreaworkspace ()
 
int x () const
 
int y () const
 

Static Public Member Functions

QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
QWidgetcreateWindowContainer (QWindow *window, QWidget *parent, Qt::WindowFlags flags)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QWidgetfind (WId id)
 
QWidgetkeyboardGrabber ()
 
QWidgetmouseGrabber ()
 
void setTabOrder (QWidget *first, QWidget *second)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 

Public Attributes

QMap< const QObject *, int > _customCommands
 
QString _key
 
ReportHandler * _reportHandler
 
QString _singleWindow
 
TimeoutHandler_timeoutHandler
 
typedef DockOptions
 
typedef RenderFlags
 

Protected Slots

void windowDestroyed (QObject *)
 Slot called when a window opened by GUIClient::handleNewWindow() emits destroyed(). More...
 

Protected Member Functions

virtual void actionEvent (QActionEvent *event)
 
void addDocumentWatch (QString path, int id)
 
virtual void changeEvent (QEvent *event)
 
virtual void childEvent (QChildEvent *event)
 
void closeEvent (QCloseEvent *)
 Save information about the current state of the application when the main window closes and perform final cleanup. More...
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void contextMenuEvent (QContextMenuEvent *event)
 
void create (WId window, bool initializeWindow, bool destroyOldWindow)
 
virtual void customEvent (QEvent *event)
 
void destroy (bool destroyWindow, bool destroySubWindows)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
virtual void dragEnterEvent (QDragEnterEvent *event)
 
virtual void dragLeaveEvent (QDragLeaveEvent *event)
 
virtual void dragMoveEvent (QDragMoveEvent *event)
 
virtual void dropEvent (QDropEvent *event)
 
virtual void enterEvent (QEvent *event)
 
virtual bool event (QEvent *event)
 
virtual void focusInEvent (QFocusEvent *event)
 
bool focusNextChild ()
 
virtual bool focusNextPrevChild (bool next)
 
virtual void focusOutEvent (QFocusEvent *event)
 
bool focusPreviousChild ()
 
virtual void hideEvent (QHideEvent *event)
 
virtual void initPainter (QPainter *painter) const
 
virtual void inputMethodEvent (QInputMethodEvent *event)
 
bool isSignalConnected (const QMetaMethod &signal) const
 
virtual void keyPressEvent (QKeyEvent *event)
 
virtual void keyReleaseEvent (QKeyEvent *event)
 
virtual void leaveEvent (QEvent *event)
 
virtual int metric (PaintDeviceMetric m) const
 
virtual void mouseDoubleClickEvent (QMouseEvent *event)
 
virtual void mouseMoveEvent (QMouseEvent *event)
 
virtual void mousePressEvent (QMouseEvent *event)
 
virtual void mouseReleaseEvent (QMouseEvent *event)
 
virtual void moveEvent (QMoveEvent *event)
 
virtual bool nativeEvent (const QByteArray &eventType, void *message, long *result)
 
virtual void paintEvent (QPaintEvent *event)
 
int receivers (const char *signal) const
 
bool removeDocumentWatch (QString path)
 
virtual void resizeEvent (QResizeEvent *event)
 
QObjectsender () const
 
int senderSignalIndex () const
 
void showEvent (QShowEvent *)
 Perform extra application initialization. More...
 
virtual void tabletEvent (QTabletEvent *event)
 
virtual void timerEvent (QTimerEvent *event)
 
void updateMicroFocus ()
 
virtual void wheelEvent (QWheelEvent *event)
 

Friends

class XDialog
 
class XMainWindow
 
class xTupleGuiClientInterface
 
class XWidget
 

Detailed Description

The GUIClient is the main xTuple ERP desktop client window.

This should be a singleton object. It provides many utility functions and coordinates a number of global features and behaviors. For example, the GUIClient::inputManager() coordinates barcode scanning for the entire application instance.

Member Enumeration Documentation

Enumerator
Unknown 
X11 
WIN 
MAC 
QWS 
WINCE 
S60 

Property Documentation

QString GUIClient::key
read

Constructor & Destructor Documentation

GUIClient::GUIClient ( const QString pDatabaseURL,
const QString pUsername 
)

Create a new xTuple ERP main application window, set up menus, and otherwise initialize the application.

Do not call this more than once or bad things will happen.

GUIClient::~GUIClient ( )
virtual

Member Function Documentation

void GUIClient::addDockWidget ( Qt::DockWidgetArea  area,
QDockWidget dockwidget 
)

Adds the given dockwidget to the specified area.

See also
addToolBarBreak()
void GUIClient::addDocumentWatch ( QString  path,
int  id 
)
protected
void GUIClient::addToolBar ( QToolBar toolbar)

Add the given toolbar to the top toolbar dock.

void GUIClient::addToolBar ( Qt::ToolBarArea  area,
QToolBar toolbar 
)

Add the toolbar to the specified area in this main window.

The toolbar is placed at the end of the current toolbar block (i.e. line). If the main window already manages the toolbar then it will only move the toolbar to area.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

See also
addToolBarBreak()
void GUIClient::addToolBarBreak ( Qt::ToolBarArea  area = Qt::TopToolBarArea)

Add a toolbar break to the given area after all the other objects that are present.

void GUIClient::assortmentsUpdated ( int  pItemid,
bool  pLocal 
)
signal
void GUIClient::bankAccountsUpdated ( )
signal
void GUIClient::bankAdjustmentsUpdated ( int  pBankadjid,
bool  pLocal 
)
signal
void GUIClient::bbomsUpdated ( int  pItemid,
bool  pLocal 
)
signal
void GUIClient::billingSelectionUpdated ( int  pCoheadid,
int  pCoitemid 
)
signal
void GUIClient::bomsUpdated ( int  pItemid,
bool  pLocal 
)
signal
void GUIClient::boosUpdated ( int  pItemid,
bool  pLocal 
)
signal
void GUIClient::budgetsUpdated ( int  pItemid,
bool  pLocal 
)
signal
void GUIClient::cashReceiptsUpdated ( int  pCashrcptid,
bool  pLocal 
)
signal
void GUIClient::checksUpdated ( int  pBankaccntid,
int  pCheckid,
bool  pLocal 
)
signal
void GUIClient::closeEvent ( QCloseEvent event)
protectedvirtual

Save information about the current state of the application when the main window closes and perform final cleanup.

Examples include the size and position of application windows and toolbar visibility.

Reimplemented from QWidget.

void GUIClient::configureGLUpdated ( )
signal
void GUIClient::contractsUpdated ( int  pContrctid,
bool  pLocal 
)
signal
Q_INVOKABLE QDoubleValidator* GUIClient::costVal ( )
inline
void GUIClient::creditMemosUpdated ( )
signal
void GUIClient::crmAccountsUpdated ( int  crmacctid)
signal
void GUIClient::customersUpdated ( int  pCustid,
bool  pLocal 
)
signal
Q_INVOKABLE QString GUIClient::databaseURL ( )
inline
Q_INVOKABLE QIntValidator* GUIClient::dayVal ( )
inline
Q_INVOKABLE const QDate GUIClient::dbDate ( )
inline
void GUIClient::emitSignal ( QString  ,
QString   
)
signal
void GUIClient::emitSignal ( QString  ,
int   
)
signal
void GUIClient::emitSignal ( QString  ,
bool   
)
signal
void GUIClient::employeeUpdated ( int  id)
signal
Q_INVOKABLE const QDate GUIClient::endOfTime ( )
inline
Q_INVOKABLE QFont GUIClient::fixedFont ( )
inline
GUIClient::WindowSystem GUIClient::getWindowSystem ( )

Return an enumerated value indicating the windowing system for the current run-time environment.

void GUIClient::glSeriesUpdated ( )
signal
void GUIClient::handleNewWindow ( QWidget w,
Qt::WindowModality  m = Qt::NonModal,
bool  forceFloat = false 
)

One way to open application windows from the C++ core.

This method takes care of setting window position and size; opening properly for free-floating, workspace, and tabbed modes; and preparing the window to clean up properly when it closes.

Todo:
Document all of the ways to open windows and when to use them.
int GUIClient::hunspell_add ( const QString  word)
int GUIClient::hunspell_check ( const QString  word)
int GUIClient::hunspell_ignore ( const QString  word)
bool GUIClient::hunspell_ready ( )
const QStringList GUIClient::hunspell_suggest ( const QString  word)
void GUIClient::initMenuBar ( )
slot

Build the application menus and toolbars based on the current user's preferences for menu and toolbar visibility.

Q_INVOKABLE InputManager* GUIClient::inputManager ( )
inline
void GUIClient::invoicesUpdated ( int  pInvcheadid,
bool  pLocal 
)
signal
void GUIClient::itemGroupsUpdated ( int  pItemgrpid,
bool  pLocal 
)
signal
void GUIClient::itemsitesUpdated ( )
signal
void GUIClient::itemsUpdated ( int  pItemid,
bool  pLocal 
)
signal
Q_INVOKABLE QString GUIClient::key ( )
inline
void GUIClient::launchBrowser ( QWidget w,
const QString url 
)

Open a web browser to a given URL.

  • MS Windows - the operating system does all of the work
  • Mac OS X - start a separate process using the BROWSER environment variable then Apple's open if that doesn't work
  • Linux - start a separate process using BROWSER, followed by /usr/bin/firefox and /usr/bin/mozilla if that doesn't work
void GUIClient::loadScriptGlobals ( QScriptEngine *  engine)

Load JavaScript global variables into a QScriptEngine.

This method loads global variables and objects such as the script toolbox , mainwindow , metrics , various constants, etc.

This should never be called directly.

QMenuBar * GUIClient::menuBar ( )
void GUIClient::messageNotify ( )
signal
Q_INVOKABLE QDoubleValidator* GUIClient::moneyVal ( )
inline
Q_INVOKABLE QDoubleValidator* GUIClient::negMoneyVal ( )
inline
Q_INVOKABLE QDoubleValidator* GUIClient::negPercentVal ( )
inline
Q_INVOKABLE QString GUIClient::openrptVersion ( )
inline
Q_INVOKABLE QIntValidator* GUIClient::orderVal ( )
inline
void GUIClient::paymentsUpdated ( int  pBankaccntid,
int  pApselectid,
bool  pLocal 
)
signal
Q_INVOKABLE QDoubleValidator* GUIClient::percentVal ( )
inline
void GUIClient::populateCustomMenu ( QMenu menu,
const QString module 
)

Build a Custom submenu from the cmd table.

There are two ways to add items to the xTuple ERP menu system: write an extension script called initMenu and install it as part of an extension package, or create Custom Commands using the cmd and cmdarg tables, either manually or through an extension package. GUIClient::populateCustomMenu() reads the cmd table, creates a submenu called Custom for the named module if necessary, and adds the appropriate custom commands to the menu.

Parameters
menuthe application menu to extend
modulethe value of the cmd_module column to filter on to find commands to add to the given menu
Q_INVOKABLE QDoubleValidator* GUIClient::priceVal ( )
inline
void GUIClient::projectsUpdated ( int  prjid)
signal
void GUIClient::prospectsUpdated ( )
signal
void GUIClient::purchaseOrderReceiptsUpdated ( )
signal
void GUIClient::purchaseOrdersUpdated ( int  pPoheadid,
bool  pLocal 
)
signal
void GUIClient::purchaseRequestsUpdated ( )
signal
void GUIClient::qohChanged ( int  pItemsiteid,
bool  pLocal 
)
signal
Q_INVOKABLE QString GUIClient::qtVersion ( )
inline
Q_INVOKABLE QDoubleValidator* GUIClient::qtyPerVal ( )
inline
Q_INVOKABLE QDoubleValidator* GUIClient::qtyVal ( )
inline
void GUIClient::quotesUpdated ( int  pQuheadid,
bool  pLocal 
)
signal
Q_INVOKABLE QDoubleValidator* GUIClient::ratioVal ( )
inline
bool GUIClient::removeDocumentWatch ( QString  path)
protected
void GUIClient::reportsChanged ( int  pReportid,
bool  pLocal 
)
signal
void GUIClient::returnAuthorizationsUpdated ( )
signal
Q_INVOKABLE QDoubleValidator* GUIClient::runTimeVal ( )
inline
void GUIClient::salesOrdersUpdated ( int  pSoheadid,
bool  pLocal 
)
signal
void GUIClient::salesRepUpdated ( int  id)
signal
void GUIClient::sAssortmentsUpdated ( int  pItemid,
bool  pLocal 
)
slot
void GUIClient::saveToolbarPositions ( )

Save the position and visibility of application toolbars in user preferences.

void GUIClient::sBankAccountsUpdated ( )
slot

This slot tells other open windows the definition or status of one or more Bank Accounts has changed.

void GUIClient::sBankAdjustmentsUpdated ( int  pBankadjid,
bool  pLocal 
)
slot

This slot tells other open windows the definition or status of one or more Bank Adjustments has changed. This is the actual adjustments, not bank adjustment types.

void GUIClient::sBBOMsUpdated ( int  pItemid,
bool  pLocal 
)
slot

This slot tells other open windows the definition or status of one or more Breeder Bills of Materials has changed.

Parameters
pItemidthe internal id of the Item for which the Breeder Bill of Materials changed or -1 for multiple or unspecified Items
pLocalunknown purpose
void GUIClient::sBillingSelectionUpdated ( int  pCoheadid,
int  pCoitemid 
)
slot

This slot tells other open windows the definition or status of one or more Billing Selections has changed.

Parameters
pCoheadidthe internal id of the Sales Order for which a Billing Selection changed or -1 for multiple or unspecified Sales Orders
pCoitemidthe internal id of the Sales Order line item for which a Billing Selection changed or -1 for multiple or unspecified Sales Order lines
void GUIClient::sBOMsUpdated ( int  pItemid,
bool  pLocal 
)
slot

This slot tells other open windows the definition or status of one or more Bills of Materials has changed.

Parameters
pItemidthe internal id of the Item for which the Bill of Materials changed or -1 for multiple or unspecified Items
pLocalunknown purpose
void GUIClient::sBOOsUpdated ( int  pItemid,
bool  pLocal 
)
slot

This slot tells other open windows the definition or status of one or more Bills of Operations has changed.

Parameters
pItemidthe internal id of the Item for which the Bill of Operations changed or -1 for multiple or unspecified Items
pLocalunknown purpose
void GUIClient::sBudgetsUpdated ( int  pItemid,
bool  pLocal 
)
slot

This slot tells other open windows the definition or status of one or more Budgets has changed.

Parameters
pItemidthe internal id of the Budget which changed or -1 for multiple or unspecified Budgets
pLocalunknown purpose
void GUIClient::sCashReceiptsUpdated ( int  pCashrcptid,
bool  pLocal 
)
slot

This slot tells other open windows the definition or status of one or more Cash Receipts has changed.

Parameters
pCashrcptidthe Cash Receipt which changed or -1 for multiple or unspecified Cash Receipts
pLocalunknown purpose
void GUIClient::sChecksUpdated ( int  pBankaccntid,
int  pCheckid,
bool  pLocal 
)
slot

This slot tells other open windows the definition or status of one or more Bank Checks or Payments has changed.

Parameters
pBankaccntidthe internal id of the Bank Account from which a Payment was made or modified
pCheckidthe internal id of the Check which changed or -1 for non-check payments, multiple Checks and Payments, or unspecified Checks and Payments
pLocalunknown purpose
void GUIClient::sClearErrorMessages ( )
slot

Hide the error button in the main window's status bar.

This is typically called when clearing the Database Log window.

void GUIClient::sConfigureGLUpdated ( )
slot

This slot tells other open windows the G/L Configuration has changed.

void GUIClient::sContractsUpdated ( int  pContrctid,
bool  pLocal 
)
slot

This slot tells other open windows the definition or status of one or more Contracts has changed.

Parameters
pContrctidthe internal id of the Contract or -1 for multiple or unspecified Contracts
pLocalunknown purpose
Q_INVOKABLE QDoubleValidator* GUIClient::scrapVal ( )
inline
void GUIClient::sCreditMemosUpdated ( )
slot

This slot tells other open windows the definition or status of one or more Credit Memos has changed.

void GUIClient::sCrmAccountsUpdated ( int  crmacctid)
slot

This slot tells other open windows the definition or status of one or more CRM Accounts has changed.

Parameters
crmacctidthe internal id of the CRM Account which changed or -1 for multiple or unspecified CRM Accounts
void GUIClient::sCustomCommand ( )
slot

The slot called whenever a custom command is invoked from the menu system.

This should never be called directly.

void GUIClient::sCustomersUpdated ( int  pCustid,
bool  pLocal 
)
slot

This slot tells other open windows the definition or status of one or more Customers has changed.

Parameters
pCustidthe internal id of the Customer or -1 for multiple or unspecified Customers
pLocalunknown purpose
void GUIClient::sEmitNotifyHeard ( const QString note)
slot

A slot used by setUpListener() for responding to Postgres notifications.

This should not be called directly.

Todo:
make this emit messageNotify when notifications other than testNote and messagePosted occur
void GUIClient::sEmitSignal ( QString  source,
QString  message 
)
slot

A generic slot for extension scripts to emit their own signals.

Parameters
sourcethe script-defined source of this signal
messagea QString payload sent with the signal

Example Usage:

// connection and signal handler
mainwindow["emitSignal(QString, QString)"].connect(emitTest);
function emitTest(source, message) {
if (source == "myCustomScript") {
QMessageBox.information(mywindow, source, message);
}
}
// sample function for emitting the signal via script
function sendTestSignal() {
mainwindow.sEmitSignal("myCustomScript", "my custom message");
}
void GUIClient::sEmitSignal ( QString  source,
int  id 
)
slot

A generic slot for extension scripts to emit their own signals.

Parameters
sourcethe script-defined source of this signal
idan integer payload sent with the signal

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

void GUIClient::sEmitSignal ( QString  source,
bool  value 
)
slot

A generic slot for extension scripts to emit their own signals.

Parameters
sourcethe script-defined source of this signal
valuea boolean payload sent with the signal

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

void GUIClient::sEmployeeUpdated ( int  id)
slot

This slot tells other open windows the definition or status of one or more Employees has changed.

Parameters
idthe internal id of the Employee or -1 for multiple or unspecified Employees
void GUIClient::setCaption ( )
void GUIClient::setCentralWidget ( QWidget widget)

Sets the given widget to be the main window's central widget.

Note: GUIClient takes ownership of the widget pointer and deletes it at the appropriate time.

void GUIClient::setUpListener ( const QString note)

Subscribe to the named Postgres notification.

Parameters
notethe name of the notification to listen for.
See also
GUIClient:sEmitNotifyHeard()
GUIClient:messageNotify()
void GUIClient::setWindowTitle ( )
slot

Build and set the title for the main application window.

This title helps distinguish between copies of the application using different databases, database server hosts, users, and xTuple ERP versions.

void GUIClient::sGlSeriesUpdated ( )
slot

This slot tells other open windows the definition or status of one or more G/L Series has changed.

void GUIClient::showEvent ( QShowEvent event)
protectedvirtual

Perform extra application initialization.

Primarily this involves running application extension initMenu scripts and setting up the script engine debugger if necessary.

Reimplemented from QWidget.

Q_INVOKABLE bool GUIClient::showTopLevel ( ) const
inline
Q_INVOKABLE bool GUIClient::shuttingDown ( )
inline
void GUIClient::sIdleTimeout ( )
slot

A slot to ask the user if s/he wants to log out.

This should only be called internally after IdleTimeout minutes have passed without user activity. This value is a user preference.

bool GUIClient::singleCurrency ( )

Return whether the database has only one currency or if more than one currency is defined.

void GUIClient::sInvoicesUpdated ( int  pInvcheadid,
bool  pLocal 
)
slot

This slot tells other open windows the definition or status of one or more Invoices has changed.

Parameters
pInvcheadidthe internal id of the Invoice which changed or -1 for multiple or unspecified Invoices
pLocalunknown purpose
void GUIClient::sItemGroupsUpdated ( int  pItemgrpid,
bool  pLocal 
)
slot

This slot tells other open windows the definition or status of one or more Item Groups has changed.

Parameters
pItemgrpidthe Item Group which changed or -1 for multiple or unspecified Item Groups
pLocalunknown purpose
void GUIClient::sItemsitesUpdated ( )
slot

This slot tells other open windows the definition or status of one or more Itemsites has changed.

void GUIClient::sItemsUpdated ( int  pItemid,
bool  pLocal 
)
slot

This slot tells other open windows the definition or status of one or more Items has changed.

Parameters
pItemidthe internal id of the Item or -1 for multiple or unspecified items
pLocalunknown purpose
void GUIClient::sNewErrorMessage ( )
slot

Make the error button in the main window's status bar visible.

This is typically called if there are new messages in the Database Log window. This should only be called internally.

void GUIClient::sPaymentsUpdated ( int  pBankaccntid,
int  pApselectid,
bool  pLocal 
)
slot

This slot tells other open windows the definition or status of one or more Bank Payments has changed.

Parameters
pBankaccntidthe internal id of the Bank Account from which a Payment was made or modified
pApselectidthe internal id of the Payment Selection which changed or -1 for multiple or unspecified Payment Selections
pLocalunknown purpose
void GUIClient::sProjectsUpdated ( int  prjid)
slot

This slot tells other open windows the definition or status of one or more Projects has changed.

Parameters
prjidthe internal id of the Project which changed or -1 for multiple or unspecified Projects
void GUIClient::sProspectsUpdated ( )
slot

This slot tells other open windows the definition or status of one or more Prospects has changed.

void GUIClient::sPurchaseOrderReceiptsUpdated ( )
slot

This slot tells other open windows the definition or status of one or more Receipts has changed.

The name sPurchaseORderReceiptsUpdated is no longer accurate, as this applies to any receipt.

void GUIClient::sPurchaseOrdersUpdated ( int  pPoheadid,
bool  pLocal 
)
slot

This slot tells other open windows the definition or status of one or more Purchase Orders has changed.

Parameters
pPoheadidthe internal id of the Purchase Order that changed or -1 for multiple or unspecified Purchase Orders
pLocalunknown purpose
void GUIClient::sPurchaseRequestsUpdated ( )
slot

This slot tells other open windows the definition or status of one or more Purchase Requests has changed.

void GUIClient::sQOHChanged ( int  pItemsiteid,
bool  pLocal 
)
slot

This slot tells other open windows the Quantity on Hand of one or more Item Sites has changed.

Parameters
pItemsiteidthe Item Site for which the QOH changed or -1 for multiple or unspecified Item Sites
pLocalunknown purpose
void GUIClient::sQuotesUpdated ( int  pQuheadid)
slot

This slot tells other open windows the definition or status of one or more Quotes has changed.

Parameters
pQuheadidthe internal id of the Quote that changed or -1 for multiple or unspecified Quotes
void GUIClient::sReportError ( const QString pError)
slot

Write a message to the debugging log.

This will write to the DatabaseLog window if the debugging checkbox has been checked.

On Linux and Mac workstations this will also write to the Terminal window (stdout) if the application was started from the command line. It will otherwise write to the Console application on Macs. On Windows machines you can attach to the application with a debugger to catch this.

Parameters
pErrorThe message to write
void GUIClient::sReportsChanged ( int  pReportid,
bool  pLocal 
)
slot

This slot tells other open windows one or more Report definitions has changed.

Parameters
pReportidthe internal id of the report that changed
pLocalunknown purpose
void GUIClient::sReturnAuthorizationsUpdated ( )
slot

This slot tells other open windows the definition or status of one or more Return Authorizations has changed.

void GUIClient::sSalesOrdersUpdated ( int  pSoheadid)
slot

This slot tells other open windows the definition or status of one or more Sales Orders has changed.

Parameters
pSoheadidthe internal id of the Sales Order that changed or -1 for multiple or unspecified Sales Orders
void GUIClient::sSalesRepUpdated ( int  id)
slot

This slot tells other open windows the definition or status of one or more Sales Representatives has changed.

Parameters
idthe internal id of the Sales Rep that changed or -1 for multiple or unspecified Sales Reps
void GUIClient::sStandardPeriodsUpdated ( )
slot

This slot tells other open windows the definition or status of one or more Standard Periods has changed.

void GUIClient::sSystemMessageAdded ( )
slot

Tell the current user if s/he has new Social Desktop messages.

void GUIClient::standardPeriodsUpdated ( )
signal
Q_INVOKABLE const QDate GUIClient::startOfTime ( )
inline
void GUIClient::sTaxAuthsUpdated ( int  taxauthid)
slot

This slot tells other open windows the definition or status of one or more Tax Authorities has changed.

Parameters
taxauthidthe internal id of the Tax Authority which changed or -1 for multiple or unspecified Tax AUthorities
void GUIClient::sTick ( )
slot

This method is called approximately once per minute.

It checks the database to see if there are any new events for the current user and updates the status bar accordingly. If there is an error retrieving this information then the function warns the user that the database connection as been lost.

Every few minutes, as determined by the updateTickInterval metric, this method emits the tick signal. This allows individual windows to track the passage of time or update themselves if desired without setting their own timers.

Todo:

Handle aborted transactions more intelligently.

Make the check for lost database connections more intelligent.

If the database connection really is gone, try to reconnect.

void GUIClient::sTransferOrdersUpdated ( int  id)
slot

This slot tells other open windows the definition or status of one or more Transfer Orders has changed.

Parameters
idthe internal id of the Transfer Order which changed or -1 for multiple or unspecified Transfer Orders
void GUIClient::sUserUpdated ( QString  username)
slot

This slot tells other open windows the definition or status of a User has changed.

Parameters
usernamethe username of the User which changed
void GUIClient::sVendorsUpdated ( )
slot

This slot tells other open windows the definition or status of one or more Vendors has changed.

void GUIClient::sVouchersUpdated ( )
slot

This slot tells other open windows the definition or status of one or more Vouchers has changed.

void GUIClient::sWarehousesUpdated ( )
slot

This slot tells other open windows the definition or status of one or more Sites or Warehouses has changed.

void GUIClient::sWorkCentersUpdated ( )
slot

This slot tells other open windows the definition or status of one or more Work Centers has changed.

void GUIClient::sWorkOrderMaterialsUpdated ( int  pWoid,
int  pWomatlid,
bool  pLocal 
)
slot

This slot tells other open windows the definition or status of one or more Work Order Materials records has changed.

Parameters
pWoidthe internal id of the Work Order that changed
pWomatlidthe internal id of the W/O Materials record that changed
pLocalunknown purpose
void GUIClient::sWorkOrderOperationsUpdated ( int  pWoid,
int  pWooperid,
bool  pLocal 
)
slot

This slot tells other open windows the definition or status of one or more Work Order Operations records has changed.

Parameters
pWoidthe internal id of the Work Order that changed
pWooperidthe internal id of the Work Order Operation that changed
pLocalunknown purpose
void GUIClient::sWorkOrdersUpdated ( int  pWoid,
bool  pLocal 
)
slot

This slot tells other open windows the definition or status of one or more Work Orders has changed.

Parameters
pWoidthe internal id of the Work Order that changed or -1 for multiple or unspecified work orders
pLocalunknown purpose
Q_INVOKABLE QFont GUIClient::systemFont ( )
inline
void GUIClient::systemMessageAdded ( )
signal
void GUIClient::tabifyDockWidget ( QDockWidget first,
QDockWidget second 
)

Moves second dock widget on top of first dock widget, creating a tabbed docked area in the main window.

void GUIClient::taxAuthsUpdated ( int  taxauthid)
signal
void GUIClient::tick ( )
signal
void GUIClient::transferOrdersUpdated ( int  id)
signal
Q_INVOKABLE QDoubleValidator* GUIClient::transQtyVal ( )
inline
Q_INVOKABLE QString GUIClient::username ( )
inline
void GUIClient::userUpdated ( QString  username)
signal
void GUIClient::vendorsUpdated ( )
signal
Q_INVOKABLE QString GUIClient::version ( )
inline
void GUIClient::vouchersUpdated ( )
signal
void GUIClient::warehousesUpdated ( )
signal
Q_INVOKABLE QDoubleValidator* GUIClient::weightVal ( )
inline
void GUIClient::windowDestroyed ( QObject o)
protectedslot

Slot called when a window opened by GUIClient::handleNewWindow() emits destroyed().

This should not be called directly.

QWidgetList GUIClient::windowList ( )

Return the list of windows opened by GUIClient::handleNewWindow().

void GUIClient::workCentersUpdated ( )
signal
void GUIClient::workOrderMaterialsUpdated ( int  pWoid,
int  pWomatlid,
bool  pLocal 
)
signal
void GUIClient::workOrderOperationsUpdated ( int  pWoid,
int  pWooperid,
bool  pLocal 
)
signal
void GUIClient::workOrdersUpdated ( int  pWoid,
bool  pLocal 
)
signal
Q_INVOKABLE QMdiArea* GUIClient::workspace ( )
inline

Friends And Related Function Documentation

friend class XDialog
friend
friend class XMainWindow
friend
friend class xTupleGuiClientInterface
friend
friend class XWidget
friend

Member Data Documentation

QMap<const QObject*,int> GUIClient::_customCommands
QString GUIClient::_key
ReportHandler* GUIClient::_reportHandler
QString GUIClient::_singleWindow
TimeoutHandler* GUIClient::_timeoutHandler

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

Generated on Wed Nov 30 2016 xTuple ERP Programmer Reference, Version 4.10.0 doxygen 1.8.7