Database table descriptor.
More...
#include <bpstable.h>
List of all members.
Detailed Description
Database table descriptor.
This objects are used by the BpsTableModel. The fields should not contain the columns c_key, c_parent, or the column referencing the master table in case of slave tables.
Member Enumeration Documentation
Table field control commands.
- Enumerator:
| EndListFields |
End of list displayed fields, following fields loaded but not displayed.
|
| EndRegularFields |
End of regular (view displayed) fields, following fields are additional and loaded on demand only.
|
Constructor & Destructor Documentation
| BpsTable::BpsTable |
( |
BpsDatastore * |
aDatastore, |
|
|
const QString & |
aName, |
|
|
const QString & |
aOrder = QString(), |
|
|
const QString & |
aFilter = QString() |
|
) |
| |
- Parameters:
-
| [in] | aDatastore | The datastore connection used. |
| [in] | aName | The table (or view) name. |
| [in] | aOrder | A list of columns appended to the order by clause, but without the ORDER BY keywords. |
| [in] | aFilter | A where clause, but without the WHERE keyword. |
| BpsTable::BpsTable |
( |
const BpsTable & |
aOther | ) |
|
The copy constructor.
- Parameters:
-
| [in] | aOther | Other table to copy |
Member Function Documentation
| bool BpsTable::canAdd |
( |
| ) |
const |
True if the current user has permission to add records the table.
The initial value is retrieved from the permissions for rawname()+".add".
- Returns:
- True if current user has add permission, false if not.
| bool BpsTable::canDelete |
( |
| ) |
const |
True if the current user has permission to delete records from the table.
The initial value is retrieved from the permissions for rawname()+".delete".
- Returns:
- True if current user has delete permission, false if not.
| bool BpsTable::canEdit |
( |
| ) |
const |
True if the current user has permission to edit records in the table.
The initial value is retrieved from the permissions for rawname()+".edit".
- Returns:
- True if current user has edit permission, false if not.
| bool BpsTable::canMove |
( |
| ) |
const |
True if the current user has permission to move records in the table (change parent, normally by drag/drop).
The initial value is retrieved from the permissions for rawname()+".move".
- Returns:
- True if current user has move permission, false if not.
| int BpsTable::count |
( |
| ) |
const |
- Returns:
- The total number of field (column) definitions
- Returns:
- The datastore used.
Get field by index.
- Parameters:
-
| [in] | aIndex | The field index, must be in the range 0 ... count()-1. |
- Returns:
- The field record.
Get field by column name.
- Parameters:
-
| [in] | aColumn | The column name. |
- Returns:
- The field record, or 0 if not found.
| int BpsTable::fieldIndex |
( |
const QString & |
aColumn | ) |
const |
Get the index of a certain column name.
- Parameters:
-
| [in] | aColumn | The column name. |
- Returns:
- Index of the found field when >= 0, -1 if no matching field found.
| QString BpsTable::filter |
( |
| ) |
const |
- Returns:
- The current filter conditions.
| bool BpsTable::isCopyEnabled |
( |
| ) |
const |
Copying enabled.
It applies for example to the table t_stock which is added as slave table to t_articles in the articles master data application: Drag/drop operations with pressed CTRL key should not copy the stock table contents, while other slave table contents should get copied. The initial value is true.
- Returns:
- True if copying is enabled (apart from any permissions).
| int BpsTable::listCount |
( |
| ) |
const |
- Returns:
- The number of list column fields
| QString BpsTable::name |
( |
| ) |
const |
- Returns:
- The table (or view) name.
Add a field to the end of the list.
The table object takes ownership of the fields, e.g. the fields will get deleted on table destruction.
- Parameters:
-
| [in] | aField | The field definition |
- Returns:
- Reference to the table object.
Apply a field control command.
- Parameters:
-
| [in] | aCommand | The command to apply. |
- Returns:
- Reference to the table object.
| QString BpsTable::order |
( |
| ) |
const |
- Returns:
- The current order column list.
| QString BpsTable::rawname |
( |
| ) |
const |
- Returns:
- The table (or view) name with the prefix removed. The prefix is all up to and including the first underline in the table or view name.
| int BpsTable::regularCount |
( |
| ) |
const |
- Returns:
- The number of regular field (column) definitions
| void BpsTable::setCanAdd |
( |
bool |
aEnable | ) |
|
Change the add permission.
- Parameters:
-
| [in] | aEnable | The new permission. |
| void BpsTable::setCanDelete |
( |
bool |
aEnable | ) |
|
Change the delete permission.
- Parameters:
-
| [in] | aEnable | The new permission. |
| void BpsTable::setCanEdit |
( |
bool |
aEnable | ) |
|
Change the edit permission.
- Parameters:
-
| [in] | aEnable | The new permission. |
| void BpsTable::setCanMove |
( |
bool |
aEnable | ) |
|
Change the move permissission.
- Parameters:
-
| [in] | aEnable | The new permission. |
| void BpsTable::setCopyEnabled |
( |
bool |
aEnable | ) |
|
Change the copy enabling.
- Parameters:
-
| [in] | aEnable | The new copy enable state. |
| void BpsTable::setFilter |
( |
const QString & |
aFilter | ) |
|
Set the select filter.
- Parameters:
-
| [in] | aFilter | A where clause, but without the WHERE keyword. |
| void BpsTable::setOrder |
( |
const QString & |
aOrder | ) |
|
Set the select order.
- Parameters:
-
| [in] | aOrder | A list of columns appended to the order by clause, but without the ORDER BY keywords. |
The documentation for this class was generated from the following file: