BPS C++ API  2.24.4
bpstable.h
Go to the documentation of this file.
1 
4 #ifndef BPSTABLE_H
5 #define BPSTABLE_H
6 
7 #include "bpsgui_global.h"
8 #include "bpstablefield.h"
9 
10 class BpsDatastore;
11 
19 {
21 
22 public:
26  enum Command {
28  EndRegularFields
29  };
30 
37  BpsTable(BpsDatastore* aDatastore, const QString& aName, const QString& aOrder = QString(), const QString& aFilter = QString());
38 
43  BpsTable(const BpsTable& aOther);
44 
46  virtual ~BpsTable();
48 
53 
57  QString name() const;
58 
65  void setName(const QString& aName);
66 
72  QString rawname() const;
73 
79  bool canAdd() const;
80 
85  void setCanAdd(bool aEnable);
86 
92  bool canDelete() const;
93 
98  void setCanDelete(bool aEnable);
99 
105  bool canEdit() const;
106 
111  void setCanEdit(bool aEnable);
112 
118  bool canMove() const;
119 
124  void setCanMove(bool aEnable);
125 
133  bool isCopyEnabled() const;
134 
139  void setCopyEnabled(bool aEnable);
140 
144  QString order() const;
145 
150  void setOrder(const QString& aOrder);
151 
155  QString filter() const;
156 
161  void setFilter(const QString& aFilter);
162 
170 
177 
181  int count() const;
182 
186  int listCount() const;
187 
191  int regularCount() const;
192 
198  int fieldIndex(const QString& aColumn) const;
199 
205  BpsTableField* field(int aIndex) const;
206 
212  BpsTableField* field(const QString& aColumn) const;
213 
214 };
215 
216 #endif // BPSTABLE_H
#define BPS_PRIVATE(Class)
Declare pointer to private object in a public class.
Definition: bpsglobals.h:102
Public include file for BPS GUI library macros.
#define BPSGUI_EXPORT
Declare class an import from the shared library.
Definition: bpsgui_global.h:22
Public include file for BpsTableField.
BPS datastore class.
Definition: bpsdatastore.h:61
Abstract base class for table fields.
Definition: bpstablefield.h:24
Database table descriptor.
Definition: bpstable.h:19
void setOrder(const QString &aOrder)
Set the select order.
QString filter() const
BpsTable(const BpsTable &aOther)
The copy constructor.
void setCanDelete(bool aEnable)
Change the delete permission.
void setCanAdd(bool aEnable)
Change the add permission.
Command
Table field control commands.
Definition: bpstable.h:26
@ EndListFields
End of list displayed fields, following fields loaded but not displayed.
Definition: bpstable.h:27
bool canDelete() const
True if the current user has permission to delete records from the table.
void setFilter(const QString &aFilter)
Set the select filter.
bool canMove() const
True if the current user has permission to move records in the table (change parent,...
BpsTable & operator<<(BpsTableField *aField)
Add a field to the end of the list.
int fieldIndex(const QString &aColumn) const
Get the index of a certain column name.
bool canAdd() const
True if the current user has permission to add records the table.
void setCanMove(bool aEnable)
Change the move permissission.
void setName(const QString &aName)
Set the table name.
BpsTable & operator<<(Command aCommand)
Apply a field control command.
void setCanEdit(bool aEnable)
Change the edit permission.
bool isCopyEnabled() const
Copying enabled.
int regularCount() const
BpsDatastore * datastore() const
QString rawname() const
BpsTableField * field(int aIndex) const
Get field by index.
void setCopyEnabled(bool aEnable)
Change the copy enabling.
QString name() const
BpsTable(BpsDatastore *aDatastore, const QString &aName, const QString &aOrder=QString(), const QString &aFilter=QString())
BpsTableField * field(const QString &aColumn) const
Get field by column name.
QString order() const
int count() const
int listCount() const
bool canEdit() const
True if the current user has permission to edit records in the table.