QDumontCommenceForms Class Reference

Managed list of Open Forms. More...

#include <DumontDLL.h>

List of all members.

Public Slots

long count (void)
QCommenceFormform (int i_index)
void on_formDestroyed (QObject *form)

Public Member Functions

 QDumontCommenceForms ()
 QDumontCommenceForms (const QDumontCommenceForms &copy)
 QDumontCommenceForms (QObject *parent)
virtual ~QDumontCommenceForms ()
void append (QCommenceForm *addition)

Private Attributes

QList< QCommenceForm * > forms

Detailed Description

Managed list of Open Forms.


This object maintains a list of currently opened detail forms. What this provides is the ability to acquire a handle to any detail form that happens to be open when this call is made. All of the properties and methods on that form are available to the handle just as if it was a local Form.

This can be handy in situations where other forms that are open can provide information to this form. Any field on the target (other) form can be queried and manipulated.

vbScript Example:
 Option Explicit
 dim ddll: set ddll = createObject("DumontDLL")
 dim dfrm: set dfrm = ddll.Form(Form)

 Sub Form_OnLoad()
   dim i: for i = 0 to ddll.formCount - 1
     dim otherForm: set otherForm = ddll.form(i)
     if( otherForm.name = "Company" ) then
       dfrm.Field("Company Name").Value = otherForm.keyField.Value
     end if
 End Sub
If a pointer to an (other) form is acquired and that form closes, the pointer that was acquired for that form becomes invalid, and using that pointer may produce unpredictable results (think application crash).

Definition at line 1620 of file DumontDLL.h.

Constructor & Destructor Documentation

QDumontCommenceForms::QDumontCommenceForms (  )  [inline]

Definition at line 1627 of file DumontDLL.h.

QDumontCommenceForms::QDumontCommenceForms ( const QDumontCommenceForms copy  )  [inline]

Definition at line 1628 of file DumontDLL.h.

QDumontCommenceForms::QDumontCommenceForms ( QObject *  parent  ) 

virtual QDumontCommenceForms::~QDumontCommenceForms (  )  [inline, virtual]

Definition at line 1630 of file DumontDLL.h.

Member Function Documentation

void QDumontCommenceForms::append ( QCommenceForm addition  )  [inline]

Connect a Form.Destroy signal to this list.

Connect a signal back so that we can remove this form from the list when the user closes it.

Definition at line 1632 of file DumontDLL.h.

long QDumontCommenceForms::count ( void   )  [inline, slot]

Definition at line 1652 of file DumontDLL.h.

QCommenceForm* QDumontCommenceForms::form ( int  i_index  )  [inline, slot]

Return a pointer to an instance of a particular form.

Definition at line 1661 of file DumontDLL.h.

void QDumontCommenceForms::on_formDestroyed ( QObject *  form  )  [inline, slot]

This gets called when the user closes his form so that it can get removed from the list of open forms.

Definition at line 1671 of file DumontDLL.h.

Member Data Documentation

Definition at line 1678 of file DumontDLL.h.

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

~ ~ ~ ~ ~ ~
Source Code without Comments is like a Cranberry Garland
without the berries. Comment your Code!
Commence Database User Support Group Forum
~ ~ ~ ~ ~ ~
Author: Mark Petryk
Lorimark Solutions, LLC