Ananas Library 0.9.5
aEngine Class Reference

#include <engine.h>

Inheritance diagram for aEngine:

Public Slots

QString cfgname ()
QString Time ()
QString Date ()
void Exit ()
void Message (int n, const QString &msg)
void StatusMessage (const QString &msg)
void StatusMessage (const QString &msg, const int &pos)
void settimer (int sec, QString proc)
aFormOpenForm (QString fname, int mode=0, aObject *selecter=0, bool modal=false)
aFormOpenForm (QString fname, int mode, int ido, aObject *selecter=0, bool modal=false)
 Create and open new form.
QVariant value (const QString &name)
void setValue (const QString &name, QVariant value=QVariant::Invalid)
void on_MenuBar (int id)
void execAction (aCfgItem &act, QObject *context=0)
aDataFieldenterValue (const QString &FieldType, const QString &title="")
bool startTransaction ()
bool commitTransaction ()
bool rollbackTransaction ()

Signals

void statusMessage (const QString &msg)
void statusMessage (const QString &msg, const int &pos)
void statusIcon (const int &status)
void event (const QString &source, const QString &data)

Public Member Functions

 aEngine ()
virtual ~aEngine ()
virtual bool init (const QString &rcfile)
virtual void done ()
void openEmbedCatalogueEditor (int oid, QWidget *parent=NULL, const bool toSelect=true)
QString sourcePreprocessor (const QString &src)
void timerEvent (QTimerEvent *e)
int on_systemstart ()
int on_systemstop ()
aFormopenForm (int oid, int fid=0, int defaultfor=1, int mode=0, ANANAS_UID id=0, aWidget *caller=0, bool modal=false)
 Create and open new form.

Public Attributes

aDatabase db
aCfgmd
QWidget * ws
aWindowsListwl
QSInterpreter * code
QSProject project
int next_obj_id

Detailed Description

Ananas-engine object.

Constructor & Destructor Documentation

◆ aEngine()

aEngine::aEngine ( )

Constructor.

References md, and next_obj_id.

◆ ~aEngine()

aEngine::~aEngine ( )
virtual

Destructor

Member Function Documentation

◆ cfgname

QString aEngine::cfgname ( )
slot

Stub.

◆ commitTransaction

bool aEngine::commitTransaction ( )
slot

Commit transaction

References db.

◆ Date

QString aEngine::Date ( )
slot

◆ done()

void aEngine::done ( )
virtual

◆ enterValue

aDataField * aEngine::enterValue ( const QString & FieldType,
const QString & title = "" )
slot

References ws.

◆ execAction

void aEngine::execAction ( aCfgItem & act,
QObject * context = 0 )
slot

◆ init()

bool aEngine::init ( const QString & rcfile)
virtual

Init engine. Init script subsystem, load global module.

References code, db, md, project, and sourcePreprocessor().

◆ Message

void aEngine::Message ( int n,
const QString & msg )
slot

Outputs messages.

See also
cfg_message(int msgtype, const char *msgfmt,...)

◆ on_MenuBar

void aEngine::on_MenuBar ( int id)
slot

References execAction(), and md.

◆ on_systemstart()

int aEngine::on_systemstart ( )

Called on system start.

References project.

◆ on_systemstop()

int aEngine::on_systemstop ( )

Called on system stop.

References project.

◆ openEmbedCatalogueEditor()

void aEngine::openEmbedCatalogueEditor ( int oid,
QWidget * parent = NULL,
const bool toSelect = true )

Create and open new embedded catalog editor form.

Parameters
oid- catalogue md id,
parent- parent wField object,
toSelect- Mode. true - for select, false - for edit

References db, wCatalogEditor::edit(), wCatalogEditor::initCat(), wCatalogEditor::select(), and ws.

Referenced by execAction().

◆ OpenForm

aForm * aEngine::OpenForm ( QString formName,
int mode,
int ido,
aObject * selector = 0,
bool modal = false )
slot

Create and open new form.

Parameters
formName- form name
mode- form use mode
selector- database id of opening object
modal- is window modal
Returns
link on new form or 0 if form not created.

References md, openForm(), and aObject::sysValue().

◆ openForm()

aForm * aEngine::openForm ( int formOwnerId,
int formId = 0,
int defaultfor = 1,
int mode = 0,
ANANAS_UID id = 0,
aWidget * caller = 0,
bool modal = false )

Create and open new form.

Parameters
formOwnerId- form owner md id
formId- form md id
defaultfor- form use mode
mode- not use yet
id- database id of opening object
caller- caller widget
modal- is window modal
Returns
link on new form or 0 if form not created.

References db, md, aForm::New(), aLog::print(), aForm::Select(), aForm::setMode(), aForm::SetReadOnly(), aForm::Show(), wl, and ws.

Referenced by execAction(), and OpenForm().

◆ rollbackTransaction

bool aEngine::rollbackTransaction ( )
slot

Discard changes made in transaction

References db.

◆ settimer

void aEngine::settimer ( int sec,
QString proc )
slot

◆ setValue

void aEngine::setValue ( const QString & name,
QVariant value = QVariant::Invalid )
slot

References value().

◆ sourcePreprocessor()

QString aEngine::sourcePreprocessor ( const QString & src)

Referenced by execAction(), and init().

◆ startTransaction

bool aEngine::startTransaction ( )
slot

Starts transaction if driver supports

References db.

◆ StatusMessage [1/2]

void aEngine::StatusMessage ( const QString & msg)
slot

Outputs status messages.

◆ StatusMessage [2/2]

void aEngine::StatusMessage ( const QString & msg,
const int & pos )
slot

Outputs status messages in target label.

◆ Time

QString aEngine::Time ( )
slot

◆ timerEvent()

void aEngine::timerEvent ( QTimerEvent * e)

Stub.

◆ value

QVariant aEngine::value ( const QString & name)
slot

Referenced by setValue().

Member Data Documentation

◆ code

QSInterpreter* aEngine::code

link to script interpreter.

Referenced by execAction(), and init().

◆ db

◆ md

aCfg* aEngine::md

◆ next_obj_id

int aEngine::next_obj_id

number to form

Referenced by aEngine().

◆ project

QSProject aEngine::project

link to script project.

Referenced by init(), on_systemstart(), and on_systemstop().

◆ wl

aWindowsList* aEngine::wl

link to windowlist.

Referenced by openForm().

◆ ws

QWidget* aEngine::ws

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