List of all members | Public Slots | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | Static Protected Attributes
XAbstractConfigure Class Referenceabstract

#include <xabstractconfigure.h>

Inheritance diagram for XAbstractConfigure:
XWidget QWidget ScriptablePrivate ScriptableWidget configureCC configureCRM configureEncryption configureGL configureIE configureIM configureMS configurePD configurePO configureSearchPath configureSO configureWO databaseInformation registrationKey

Public Slots

virtual enum SetResponse set (const ParameterList &)
 
virtual bool sSave ()=0
 

Public Member Functions

virtual Q_INVOKABLE ParameterList get () const
 

Protected Slots

virtual void languageChange ()=0
 
virtual enum SetResponse postSet ()
 

Protected Member Functions

 XAbstractConfigure (QWidget *parent=0, Qt::WindowFlags f=0)
 Abstract interface definition for xTuple ERP Configure widgets. More...
 
virtual ~XAbstractConfigure ()
 
virtual void callCloseEvent (QEvent *)
 
virtual enum SetResponse callSet (const ParameterList &)
 
virtual void callShowEvent (QEvent *)
 
void closeEvent (QCloseEvent *event)
 
virtual QScriptEngine * engine ()
 
virtual void loadScript (const QString &oName)
 
virtual void loadScript (const QStringList &list)
 
virtual void loadScriptEngine ()
 
virtual Q_INVOKABLE bool setScriptableParams (ParameterList &)
 
void showEvent (QShowEvent *event)
 

Protected Attributes

QScriptEngineDebugger * _debugger
 
QScriptEngine * _engine
 
ParameterList _lastSetParams
 
QAction_rememberPos
 
QAction_rememberSize
 
bool _scriptLoaded
 
QWidget_self
 
QAction_showMe
 
bool _shown
 

Static Protected Attributes

static ScriptCache_cache
 
static GuiClientInterface_guiClientInterface
 

Constructor & Destructor Documentation

◆ XAbstractConfigure()

XAbstractConfigure::XAbstractConfigure ( QWidget parent = 0,
Qt::WindowFlags  f = 0 
)
protected

Abstract interface definition for xTuple ERP Configure widgets.

XAbstractConfigure is an abstract class defining a simple programming interface that all configuration windows must implement. This is used by the Setup window to ensure that all data get saved properly.

Every configuration UI intended to be included in the Setup window should inherit from XAbstractConfigure. It must implement a languageChange() method and an sSave() method. The languageChange() method is usually empty; it is required to ensure that the configuration window can be translated. The sSave method returns a boolean. It should return true if the save attempt was successful and false if the save attempt failed. If the save attempt failed, sSave() should set the focus on the failed widget and give the user a QMessageBox explaining the failure. It is the Setup window's responsibility to handle the failure and focus widget gracefully.

Child classes of XAbstractConfigure should define a saving() signal and emit it at the beginning of sSave(). This will allow scripts on these child classes to save their own data.

Todo:
Find a way for scripts to return failures so they also can handle errors during saving.
See also
setup

◆ ~XAbstractConfigure()

XAbstractConfigure::~XAbstractConfigure ( )
protectedvirtual

Member Function Documentation

◆ callCloseEvent()

void ScriptablePrivate::callCloseEvent ( QEvent *  event)
virtualinherited

◆ callSet()

enum SetResponse ScriptablePrivate::callSet ( const ParameterList &  params)
virtualinherited

◆ callShowEvent()

void ScriptablePrivate::callShowEvent ( QEvent *  event)
virtualinherited

◆ closeEvent()

void XWidget::closeEvent ( QCloseEvent *  event)
protectedinherited

◆ engine()

QScriptEngine * ScriptablePrivate::engine ( )
virtualinherited

Reimplemented from ScriptableWidget.

◆ get()

ParameterList XWidget::get ( ) const
virtualinherited

Implements ScriptablePrivate.

◆ languageChange

virtual void XAbstractConfigure::languageChange ( )
protectedpure virtualslot

◆ loadScript() [1/2]

void ScriptableWidget::loadScript ( const QString &  oName)
virtualinherited

◆ loadScript() [2/2]

void ScriptableWidget::loadScript ( const QStringList &  list)
virtualinherited

◆ loadScriptEngine()

void ScriptableWidget::loadScriptEngine ( )
virtualinherited

◆ postSet

enum SetResponse XWidget::postSet ( )
protectedvirtualslotinherited

◆ set

enum SetResponse XWidget::set ( const ParameterList &  pParams)
virtualslotinherited

◆ setScriptableParams()

bool ScriptableWidget::setScriptableParams ( ParameterList &  params)
virtualinherited

◆ showEvent()

void XWidget::showEvent ( QShowEvent *  event)
protectedinherited

◆ sSave

virtual bool XAbstractConfigure::sSave ( )
pure virtualslot

Member Data Documentation

◆ _cache

ScriptCache * ScriptableWidget::_cache
staticprotectedinherited

◆ _debugger

QScriptEngineDebugger* ScriptableWidget::_debugger
protectedinherited

◆ _engine

QScriptEngine* ScriptableWidget::_engine
protectedinherited

◆ _guiClientInterface

GuiClientInterface * ScriptableWidget::_guiClientInterface
staticinherited

◆ _lastSetParams

ParameterList ScriptablePrivate::_lastSetParams
inherited

◆ _rememberPos

QAction* ScriptablePrivate::_rememberPos
inherited

◆ _rememberSize

QAction* ScriptablePrivate::_rememberSize
inherited

◆ _scriptLoaded

bool ScriptableWidget::_scriptLoaded
protectedinherited

◆ _self

QWidget* ScriptableWidget::_self
protectedinherited

◆ _showMe

QAction* ScriptablePrivate::_showMe
inherited

◆ _shown

bool ScriptablePrivate::_shown
inherited

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

Generated on Mon May 3 2021 xTuple ERP Programmer Reference, Version 4.12.0 doxygen 1.8.17