List of all members | Public Types | Properties | Public Slots | Signals | 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

Public Types

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

Properties

QString key
 

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, bool)
 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, QString)
 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 sContactsUpdated (int)
 This slot tells other open windows the definition or status of one or more Contacts have 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 dbConnectionLost ()
 
void emitSignal (QString, bool)
 
void emitSignal (QString, int)
 
void emitSignal (QString, QString)
 
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 contactsUpdated (int cntctid)
 
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 ()
 
Q_INVOKABLE void addDockWidget (Qt::DockWidgetArea area, QDockWidget *dockwidget)
 Adds the given dockwidget to the specified area. 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 addToolBar (QToolBar *toolbar)
 Add the given toolbar to the top toolbar dock.
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...
 
Q_INVOKABLE QDoubleValidatorcostVal ()
 
Q_INVOKABLE QString databaseURL ()
 
Q_INVOKABLE QIntValidator * dayVal ()
 
const Q_INVOKABLE QDate dbDate ()
 
const Q_INVOKABLE QDate endOfTime ()
 
Q_INVOKABLE QFont fixedFont ()
 
Q_INVOKABLE GUIClient::WindowSystem getWindowSystem ()
 Return an enumerated value indicating the windowing system for the current run-time environment. More...
 
Q_INVOKABLE void handleNewWindow (QWidget *, Qt::WindowModality=Qt::NonModal, bool forceFloat=false)
 One way to open application windows from the C++ core. More...
 
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 void hunspell_initialize ()
 Initialize the spell-checking system. More...
 
Q_INVOKABLE bool hunspell_ready ()
 
const Q_INVOKABLE QStringList hunspell_suggest (const QString word)
 
Q_INVOKABLE InputManagerinputManager ()
 
Q_INVOKABLE QString key ()
 
Q_INVOKABLE void launchBrowser (QWidget *, const QString &)
 Open a web browser to a given URL. More...
 
void loadScriptGlobals (QScriptEngine *engine)
 Load JavaScript global variables into a QScriptEngine. More...
 
Q_INVOKABLE QMenuBar * menuBar ()
 
Q_INVOKABLE QDoubleValidatormoneyVal ()
 
Q_INVOKABLE QDoubleValidatornegMoneyVal ()
 
Q_INVOKABLE QDoubleValidatornegPercentVal ()
 
Q_INVOKABLE QString openrptVersion ()
 
Q_INVOKABLE QIntValidator * orderVal ()
 
Q_INVOKABLE QDoubleValidatorpercentVal ()
 
Q_INVOKABLE void populateCustomMenu (QMenu *, const QString &)
 Build a Custom submenu from the cmd table. More...
 
Q_INVOKABLE QDoubleValidatorpriceVal ()
 
Q_INVOKABLE QString qtVersion ()
 
Q_INVOKABLE QDoubleValidatorqtyPerVal ()
 
Q_INVOKABLE QDoubleValidatorqtyVal ()
 
Q_INVOKABLE QDoubleValidatorratioVal ()
 
Q_INVOKABLE QDoubleValidatorrunTimeVal ()
 
Q_INVOKABLE QDoubleValidatorsalesVal ()
 
Q_INVOKABLE void saveToolbarPositions ()
 Save the position and visibility of application toolbars in user preferences. More...
 
Q_INVOKABLE QDoubleValidatorscrapVal ()
 
Q_INVOKABLE void setCentralWidget (QWidget *widget)
 Sets the given widget to be the main window's central widget. More...
 
Q_INVOKABLE void setUpListener (const QString &)
 Subscribe to the named Postgres notification. More...
 
Q_INVOKABLE bool shuttingDown ()
 
Q_INVOKABLE bool singleCurrency ()
 Return whether the database has only one currency or if more than one currency is defined. More...
 
const Q_INVOKABLE QDate startOfTime ()
 
Q_INVOKABLE QFont systemFont ()
 
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...
 
Q_INVOKABLE QDoubleValidatortransQtyVal ()
 
Q_INVOKABLE QString username ()
 
Q_INVOKABLE QString version ()
 
Q_INVOKABLE QDoubleValidatorweightVal ()
 
Q_INVOKABLE QWidgetList windowList ()
 Return the list of windows opened by GUIClient::handleNewWindow(). More...
 
Q_INVOKABLE QMdiArea * workspace ()
 

Public Attributes

QMap< const QObject *, int > _customCommands
 
QString _key
 
MqlHash_mqlhash
 
ReportHandler * _reportHandler
 
QString _singleWindow
 
TimeoutHandler_timeoutHandler
 

Protected Slots

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

Protected Member Functions

void addDocumentWatch (QString path, int id)
 
void closeEvent (QCloseEvent *)
 Save information about the current state of the application when the main window closes and perform final cleanup. More...
 
bool removeDocumentWatch (QString path)
 
void showEvent (QShowEvent *)
 Perform extra application initialization. More...
 

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

◆ WindowSystem

Enumerator
Unknown 
X11 
WIN 
MAC 
QWS 
WINCE 
S60 

Property Documentation

◆ key

QString GUIClient::key
read

Constructor & Destructor Documentation

◆ GUIClient()

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::~GUIClient ( )
virtual

Member Function Documentation

◆ addDockWidget()

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

Adds the given dockwidget to the specified area.

See also
addToolBarBreak()

◆ addDocumentWatch()

void GUIClient::addDocumentWatch ( QString  path,
int  id 
)
protected

◆ addToolBar() [1/2]

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()

◆ addToolBar() [2/2]

void GUIClient::addToolBar ( QToolBar *  toolbar)

Add the given toolbar to the top toolbar dock.

◆ 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.

◆ assortmentsUpdated

void GUIClient::assortmentsUpdated ( int  pItemid,
bool  pLocal 
)
signal

◆ bankAccountsUpdated

void GUIClient::bankAccountsUpdated ( )
signal

◆ bankAdjustmentsUpdated

void GUIClient::bankAdjustmentsUpdated ( int  pBankadjid,
bool  pLocal 
)
signal

◆ bbomsUpdated

void GUIClient::bbomsUpdated ( int  pItemid,
bool  pLocal 
)
signal

◆ billingSelectionUpdated

void GUIClient::billingSelectionUpdated ( int  pCoheadid,
int  pCoitemid 
)
signal

◆ bomsUpdated

void GUIClient::bomsUpdated ( int  pItemid,
bool  pLocal 
)
signal

◆ boosUpdated

void GUIClient::boosUpdated ( int  pItemid,
bool  pLocal 
)
signal

◆ budgetsUpdated

void GUIClient::budgetsUpdated ( int  pItemid,
bool  pLocal 
)
signal

◆ cashReceiptsUpdated

void GUIClient::cashReceiptsUpdated ( int  pCashrcptid,
bool  pLocal 
)
signal

◆ checksUpdated

void GUIClient::checksUpdated ( int  pBankaccntid,
int  pCheckid,
bool  pLocal 
)
signal

◆ closeEvent()

void GUIClient::closeEvent ( QCloseEvent *  event)
protected

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.

◆ configureGLUpdated

void GUIClient::configureGLUpdated ( )
signal

◆ contactsUpdated

void GUIClient::contactsUpdated ( int  cntctid)
signal

◆ contractsUpdated

void GUIClient::contractsUpdated ( int  pContrctid,
bool  pLocal 
)
signal

◆ costVal()

Q_INVOKABLE QDoubleValidator* GUIClient::costVal ( )
inline

◆ creditMemosUpdated

void GUIClient::creditMemosUpdated ( )
signal

◆ crmAccountsUpdated

void GUIClient::crmAccountsUpdated ( int  crmacctid)
signal

◆ customersUpdated

void GUIClient::customersUpdated ( int  pCustid,
bool  pLocal 
)
signal

◆ databaseURL()

Q_INVOKABLE QString GUIClient::databaseURL ( )
inline

◆ dayVal()

Q_INVOKABLE QIntValidator* GUIClient::dayVal ( )
inline

◆ dbConnectionLost

void GUIClient::dbConnectionLost ( )
signal

◆ dbDate()

const Q_INVOKABLE QDate GUIClient::dbDate ( )
inline

◆ emitSignal [1/3]

void GUIClient::emitSignal ( QString  ,
bool   
)
signal

◆ emitSignal [2/3]

void GUIClient::emitSignal ( QString  ,
int   
)
signal

◆ emitSignal [3/3]

void GUIClient::emitSignal ( QString  ,
QString   
)
signal

◆ employeeUpdated

void GUIClient::employeeUpdated ( int  id)
signal

◆ endOfTime()

const Q_INVOKABLE QDate GUIClient::endOfTime ( )
inline

◆ fixedFont()

Q_INVOKABLE QFont GUIClient::fixedFont ( )
inline

◆ getWindowSystem()

GUIClient::WindowSystem GUIClient::getWindowSystem ( )

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

◆ glSeriesUpdated

void GUIClient::glSeriesUpdated ( )
signal

◆ handleNewWindow()

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.

◆ hunspell_add()

int GUIClient::hunspell_add ( const QString  word)

◆ hunspell_check()

int GUIClient::hunspell_check ( const QString  word)

◆ hunspell_ignore()

int GUIClient::hunspell_ignore ( const QString  word)

◆ hunspell_initialize()

void GUIClient::hunspell_initialize ( )

Initialize the spell-checking system.

Load the dictionary for the user's current language and the user's personal additions.

◆ hunspell_ready()

bool GUIClient::hunspell_ready ( )

◆ hunspell_suggest()

const QStringList GUIClient::hunspell_suggest ( const QString  word)

◆ initMenuBar

void GUIClient::initMenuBar ( )
slot

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

◆ inputManager()

Q_INVOKABLE InputManager* GUIClient::inputManager ( )
inline

◆ invoicesUpdated

void GUIClient::invoicesUpdated ( int  pInvcheadid,
bool  pLocal 
)
signal

◆ itemGroupsUpdated

void GUIClient::itemGroupsUpdated ( int  pItemgrpid,
bool  pLocal 
)
signal

◆ itemsitesUpdated

void GUIClient::itemsitesUpdated ( )
signal

◆ itemsUpdated

void GUIClient::itemsUpdated ( int  pItemid,
bool  pLocal 
)
signal

◆ key()

Q_INVOKABLE QString GUIClient::key ( )
inline

◆ launchBrowser()

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

◆ loadScriptGlobals()

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.

◆ menuBar()

QMenuBar * GUIClient::menuBar ( )

◆ messageNotify

void GUIClient::messageNotify ( )
signal

◆ moneyVal()

Q_INVOKABLE QDoubleValidator* GUIClient::moneyVal ( )
inline

◆ negMoneyVal()

Q_INVOKABLE QDoubleValidator* GUIClient::negMoneyVal ( )
inline

◆ negPercentVal()

Q_INVOKABLE QDoubleValidator* GUIClient::negPercentVal ( )
inline

◆ openrptVersion()

Q_INVOKABLE QString GUIClient::openrptVersion ( )
inline

◆ orderVal()

Q_INVOKABLE QIntValidator* GUIClient::orderVal ( )
inline

◆ paymentsUpdated

void GUIClient::paymentsUpdated ( int  pBankaccntid,
int  pApselectid,
bool  pLocal 
)
signal

◆ percentVal()

Q_INVOKABLE QDoubleValidator* GUIClient::percentVal ( )
inline

◆ populateCustomMenu()

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

◆ priceVal()

Q_INVOKABLE QDoubleValidator* GUIClient::priceVal ( )
inline

◆ projectsUpdated

void GUIClient::projectsUpdated ( int  prjid)
signal

◆ prospectsUpdated

void GUIClient::prospectsUpdated ( )
signal

◆ purchaseOrderReceiptsUpdated

void GUIClient::purchaseOrderReceiptsUpdated ( )
signal

◆ purchaseOrdersUpdated

void GUIClient::purchaseOrdersUpdated ( int  pPoheadid,
bool  pLocal 
)
signal

◆ purchaseRequestsUpdated

void GUIClient::purchaseRequestsUpdated ( )
signal

◆ qohChanged

void GUIClient::qohChanged ( int  pItemsiteid,
bool  pLocal 
)
signal

◆ qtVersion()

Q_INVOKABLE QString GUIClient::qtVersion ( )
inline

◆ qtyPerVal()

Q_INVOKABLE QDoubleValidator* GUIClient::qtyPerVal ( )
inline

◆ qtyVal()

Q_INVOKABLE QDoubleValidator* GUIClient::qtyVal ( )
inline

◆ quotesUpdated

void GUIClient::quotesUpdated ( int  pQuheadid,
bool  pLocal 
)
signal

◆ ratioVal()

Q_INVOKABLE QDoubleValidator* GUIClient::ratioVal ( )
inline

◆ removeDocumentWatch()

bool GUIClient::removeDocumentWatch ( QString  path)
protected

◆ reportsChanged

void GUIClient::reportsChanged ( int  pReportid,
bool  pLocal 
)
signal

◆ returnAuthorizationsUpdated

void GUIClient::returnAuthorizationsUpdated ( )
signal

◆ runTimeVal()

Q_INVOKABLE QDoubleValidator* GUIClient::runTimeVal ( )
inline

◆ salesOrdersUpdated

void GUIClient::salesOrdersUpdated ( int  pSoheadid,
bool  pLocal 
)
signal

◆ salesRepUpdated

void GUIClient::salesRepUpdated ( int  id)
signal

◆ salesVal()

Q_INVOKABLE QDoubleValidator* GUIClient::salesVal ( )
inline

◆ sAssortmentsUpdated

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

◆ saveToolbarPositions()

void GUIClient::saveToolbarPositions ( )

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

◆ sBankAccountsUpdated

void GUIClient::sBankAccountsUpdated ( )
slot

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

◆ sBankAdjustmentsUpdated

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.

◆ sBBOMsUpdated

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

◆ sBillingSelectionUpdated

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

◆ sBOMsUpdated

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

◆ sBOOsUpdated

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

◆ sBudgetsUpdated

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

◆ sCashReceiptsUpdated

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

◆ sChecksUpdated

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

◆ sClearErrorMessages

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.

◆ sConfigureGLUpdated

void GUIClient::sConfigureGLUpdated ( )
slot

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

◆ sContactsUpdated

void GUIClient::sContactsUpdated ( int  cntctid)
slot

This slot tells other open windows the definition or status of one or more Contacts have changed.

Parameters
cntctidthe internal id of the Contact which changed or -1 for multiple or unspecified Contacts

◆ sContractsUpdated

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

◆ scrapVal()

Q_INVOKABLE QDoubleValidator* GUIClient::scrapVal ( )
inline

◆ sCreditMemosUpdated

void GUIClient::sCreditMemosUpdated ( )
slot

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

◆ sCrmAccountsUpdated

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

◆ sCustomCommand

void GUIClient::sCustomCommand ( )
slot

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

This should never be called directly.

◆ sCustomersUpdated

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

◆ sEmitNotifyHeard

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

◆ sEmitSignal [1/3]

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.

◆ sEmitSignal [2/3]

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.

◆ sEmitSignal [3/3]

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");
}

◆ sEmployeeUpdated

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

◆ setCentralWidget()

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.

◆ setUpListener()

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()

◆ setWindowTitle

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.

◆ sGlSeriesUpdated

void GUIClient::sGlSeriesUpdated ( )
slot

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

◆ showEvent()

void GUIClient::showEvent ( QShowEvent *  event)
protected

Perform extra application initialization.

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

◆ shuttingDown()

Q_INVOKABLE bool GUIClient::shuttingDown ( )
inline

◆ sIdleTimeout

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.

◆ singleCurrency()

bool GUIClient::singleCurrency ( )

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

◆ sInvoicesUpdated

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

◆ sItemGroupsUpdated

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

◆ sItemsitesUpdated

void GUIClient::sItemsitesUpdated ( )
slot

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

◆ sItemsUpdated

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

◆ sNewErrorMessage

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.

◆ sPaymentsUpdated

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

◆ sProjectsUpdated

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

◆ sProspectsUpdated

void GUIClient::sProspectsUpdated ( )
slot

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

◆ sPurchaseOrderReceiptsUpdated

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.

◆ sPurchaseOrdersUpdated

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

◆ sPurchaseRequestsUpdated

void GUIClient::sPurchaseRequestsUpdated ( )
slot

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

◆ sQOHChanged

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

◆ sQuotesUpdated

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

◆ sReportError

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

◆ sReportsChanged

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

◆ sReturnAuthorizationsUpdated

void GUIClient::sReturnAuthorizationsUpdated ( )
slot

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

◆ sSalesOrdersUpdated

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

◆ sSalesRepUpdated

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

◆ sStandardPeriodsUpdated

void GUIClient::sStandardPeriodsUpdated ( )
slot

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

◆ sSystemMessageAdded

void GUIClient::sSystemMessageAdded ( )
slot

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

◆ standardPeriodsUpdated

void GUIClient::standardPeriodsUpdated ( )
signal

◆ startOfTime()

const Q_INVOKABLE QDate GUIClient::startOfTime ( )
inline

◆ sTaxAuthsUpdated

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

◆ sTick

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.

◆ sTransferOrdersUpdated

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

◆ sUserUpdated

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

◆ sVendorsUpdated

void GUIClient::sVendorsUpdated ( )
slot

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

◆ sVouchersUpdated

void GUIClient::sVouchersUpdated ( )
slot

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

◆ sWarehousesUpdated

void GUIClient::sWarehousesUpdated ( )
slot

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

◆ sWorkCentersUpdated

void GUIClient::sWorkCentersUpdated ( )
slot

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

◆ sWorkOrderMaterialsUpdated

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

◆ sWorkOrderOperationsUpdated

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

◆ sWorkOrdersUpdated

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

◆ systemFont()

Q_INVOKABLE QFont GUIClient::systemFont ( )
inline

◆ systemMessageAdded

void GUIClient::systemMessageAdded ( )
signal

◆ tabifyDockWidget()

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.

◆ taxAuthsUpdated

void GUIClient::taxAuthsUpdated ( int  taxauthid)
signal

◆ tick

void GUIClient::tick ( )
signal

◆ transferOrdersUpdated

void GUIClient::transferOrdersUpdated ( int  id)
signal

◆ transQtyVal()

Q_INVOKABLE QDoubleValidator* GUIClient::transQtyVal ( )
inline

◆ username()

Q_INVOKABLE QString GUIClient::username ( )
inline

◆ userUpdated

void GUIClient::userUpdated ( QString  username)
signal

◆ vendorsUpdated

void GUIClient::vendorsUpdated ( )
signal

◆ version()

Q_INVOKABLE QString GUIClient::version ( )
inline

◆ vouchersUpdated

void GUIClient::vouchersUpdated ( )
signal

◆ warehousesUpdated

void GUIClient::warehousesUpdated ( )
signal

◆ weightVal()

Q_INVOKABLE QDoubleValidator* GUIClient::weightVal ( )
inline

◆ windowDestroyed

void GUIClient::windowDestroyed ( QObject o)
protectedslot

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

This should not be called directly.

◆ windowList()

QWidgetList GUIClient::windowList ( )

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

◆ workCentersUpdated

void GUIClient::workCentersUpdated ( )
signal

◆ workOrderMaterialsUpdated

void GUIClient::workOrderMaterialsUpdated ( int  pWoid,
int  pWomatlid,
bool  pLocal 
)
signal

◆ workOrderOperationsUpdated

void GUIClient::workOrderOperationsUpdated ( int  pWoid,
int  pWooperid,
bool  pLocal 
)
signal

◆ workOrdersUpdated

void GUIClient::workOrdersUpdated ( int  pWoid,
bool  pLocal 
)
signal

◆ workspace()

Q_INVOKABLE QMdiArea* GUIClient::workspace ( )
inline

Friends And Related Function Documentation

◆ XDialog

friend class XDialog
friend

◆ XMainWindow

friend class XMainWindow
friend

◆ xTupleGuiClientInterface

friend class xTupleGuiClientInterface
friend

◆ XWidget

friend class XWidget
friend

Member Data Documentation

◆ _customCommands

QMap<const QObject*,int> GUIClient::_customCommands

◆ _key

QString GUIClient::_key

◆ _mqlhash

MqlHash* GUIClient::_mqlhash

◆ _reportHandler

ReportHandler* GUIClient::_reportHandler

◆ _singleWindow

QString GUIClient::_singleWindow

◆ _timeoutHandler

TimeoutHandler* GUIClient::_timeoutHandler

The documentation for this class was generated from the following files:
GUIClient::sSalesOrdersUpdated
void sSalesOrdersUpdated(int)
This slot tells other open windows the definition or status of one or more Sales Orders has changed.
Definition: guiclient.cpp:1141
GUIClient::salesOrdersUpdated
void salesOrdersUpdated(int pSoheadid, bool pLocal)

Generated on Fri Apr 9 2021 xTuple ERP Programmer Reference, Version 6.0.0 doxygen 1.8.17