|
Multi diag tools
|
Copies data from parent model to child model regarding relation key. More...
#include <RelationKeyCopier.h>
Public Member Functions | |
| void | setParentModel (QAbstractItemModel *model) |
| Set parent model. More... | |
| void | setChildModel (QAbstractItemModel *model) |
| Set child model. More... | |
| void | addColumnPair (int parentModelColumn, int childModelColumn) |
| Add a pair of columns. More... | |
| void | setKey (const PrimaryKey &parentModelPk, const ForeignKey &childModelFk) |
| Set relation key from parent model primary key and child model foreign key. More... | |
| void | setKey (const RelationKey &key) |
| Set relation key. More... | |
| RelationKey | key () const |
| Get relation key. | |
| int | parentModelCurrentRow () const |
| Get parent model current row. | |
| bool | copyAllKeyData (RowRange childModelRowRange, const QModelIndex &parent=QModelIndex()) |
| Copy all key data from parent model to child model for given row range for child model. More... | |
| bool | copyKeyData (const RowList &childModelRowList, ColumnRange parentModelColumnRange) |
| Copy key data from parent model to child model. More... | |
| void | setParentModelCurrentRow (int row) |
| Set current row in parent model. More... | |
Copies data from parent model to child model regarding relation key.
Definition at line 52 of file RelationKeyCopier.h.
| void Mdt::ItemModel::RelationKeyCopier::addColumnPair | ( | int | parentModelColumn, |
| int | childModelColumn | ||
| ) |
Add a pair of columns.
Definition at line 48 of file RelationKeyCopier.cpp.
| bool Mdt::ItemModel::RelationKeyCopier::copyAllKeyData | ( | RowRange | childModelRowRange, |
| const QModelIndex & | parent = QModelIndex() |
||
| ) |
Copy all key data from parent model to child model for given row range for child model.
Definition at line 72 of file RelationKeyCopier.cpp.
| bool Mdt::ItemModel::RelationKeyCopier::copyKeyData | ( | const RowList & | childModelRowList, |
| ColumnRange | parentModelColumnRange | ||
| ) |
Copy key data from parent model to child model.
Will only affect rows from childModelRowList in child model. Will also only copy data that exists in key regarding parentModelColumnRange .
Definition at line 95 of file RelationKeyCopier.cpp.
| void Mdt::ItemModel::RelationKeyCopier::setChildModel | ( | QAbstractItemModel * | model | ) |
Set child model.
RelationKeyCopier will not own the model (it will not delete it).
Definition at line 41 of file RelationKeyCopier.cpp.
| void Mdt::ItemModel::RelationKeyCopier::setKey | ( | const PrimaryKey & | parentModelPk, |
| const ForeignKey & | childModelFk | ||
| ) |
Set relation key from parent model primary key and child model foreign key.
Definition at line 56 of file RelationKeyCopier.cpp.
| void Mdt::ItemModel::RelationKeyCopier::setKey | ( | const RelationKey & | key | ) |
Set relation key.
Definition at line 65 of file RelationKeyCopier.cpp.
| void Mdt::ItemModel::RelationKeyCopier::setParentModel | ( | QAbstractItemModel * | model | ) |
Set parent model.
Will also set parent model current row to -1.
RelationKeyCopier will not own the model (it will not delete it).
Definition at line 33 of file RelationKeyCopier.cpp.
| void Mdt::ItemModel::RelationKeyCopier::setParentModelCurrentRow | ( | int | row | ) |
Set current row in parent model.
If parent model was not set, this slot does nothing.
Definition at line 113 of file RelationKeyCopier.cpp.
1.8.11