4 #ifndef BPSRELATIONTABLEMODEL_H
5 #define BPSRELATIONTABLEMODEL_H
8 #include <QStandardItemModel>
Public include file for BPS CORE library macros.
#define BPSCORE_EXPORT
Declare class to be an import from the shared library.
Definition: bpscore_global.h:22
#define BPS_PRIVATE(Class)
Declare pointer to private object in a public class.
Definition: bpsglobals.h:102
BPS datastore class.
Definition: bpsdatastore.h:61
This class implements a relation table model for option assignments, such as for example t_grouppermi...
Definition: bpsrelationtablemodel.h:42
void setDescriptions(const QMap< QString, QString > &aDescriptions)
Add a second column with descriptions for the option table key.
void clear()
Clears all data from the model.
QString relationTable() const
void revertAll()
Reverts all unsaved changes.
void submitAll()
Submits all unsaved changed to the database.
QStringList checkedOptionNames(qlonglong aMaster) const
void select()
Select the list of all available options.
void checkOptions(qlonglong aMaster, const QStringList &aList)
Sets all options in the list as checked, and all options not in the list as unchecked.
void wasModified()
This signal is emitted whenever a status is changed to StatusEnable or StatusDisable.
Status
Current status of an option.
Definition: bpsrelationtablemodel.h:50
BpsRelationTableModel(QObject *aParent, BpsDatastore *aDatastore, const QString &aRelationTable, const QString &aMasterColumn, const QString &aOptionColumn, const QString &aOptionTable, const QString &aOptionKey)
Constructor for a BpsRelationTableModel.
void setMaster(qlonglong aMaster)
Set the model to the master table item.
void setItemsEnabled(bool aEnabled=true)
Enable/disable the displayed items.
virtual Qt::ItemFlags flags(const QModelIndex &index) const const override