Ananas Library  0.9.5
Public Slots | Signals | Public Member Functions | Public Attributes | List of all members
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. More...
 
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. More...
 

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.

◆ init()

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

Init engine. Init script subsystem, load global module.

References aDatabase::cfg, code, db, aCfg::find(), aDatabase::init(), md, project, and aCfg::sText().

◆ Message

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

Outputs messages.

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

◆ 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 wField::fieldSelect().

◆ 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, aWindowsList::find(), aCfg::find(), aWindowsList::get(), aCfg::getDefaultFormId(), md, aForm::New(), aLog::print(), aForm::Select(), aForm::setMode(), aForm::SetReadOnly(), aForm::Show(), wl, and ws.

Referenced by wDBTable::EditElement(), wField::fieldSelect(), and OpenForm().

◆ 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 aCfg::attr(), aCfg::find(), md, openForm(), aCfg::parent(), and aObject::sysValue().

◆ rollbackTransaction

bool aEngine::rollbackTransaction ( )
slot

Discard changes made in transaction

References db.

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

◆ timerEvent()

void aEngine::timerEvent ( QTimerEvent *  e)

Stub.

Member Data Documentation

◆ code

QSInterpreter* aEngine::code

link to script interpreter.

Referenced by init().

◆ db

aDatabase aEngine::db

◆ md

aCfg* aEngine::md

link to metadata.

Referenced by aEngine(), aForm::aForm(), aReport::aReport(), init(), openForm(), and OpenForm().

◆ next_obj_id

int aEngine::next_obj_id

number to form

Referenced by aEngine().

◆ project

QSProject aEngine::project

link to script project.

Referenced by aForm::init(), init(), on_systemstart(), on_systemstop(), aForm::Show(), and aForm::SignIn().

◆ wl

aWindowsList* aEngine::wl

link to windowlist.

Referenced by aForm::Close(), aForm::init(), aForm::New(), openForm(), and aForm::Select().

◆ ws

QWidget* aEngine::ws

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