BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Provides decorations (text color, icons, etc) for SessionModel in SessionModelView context. It is implemented as identity proxy model, so it has one-to-one data structure as in source SessionModel.
Definition at line 27 of file SessionDecorationModel.h.
Public Member Functions | |
SessionDecorationModel (QObject *parent, SessionModel *model=nullptr) | |
QVariant | data (const QModelIndex &index, int role) const override |
void | setSessionModel (SessionModel *model) |
Private Member Functions | |
QVariant | textColor (const QModelIndex &index) const |
Returns text color. Disabled SessionItem's will appear in gray. More... | |
Private Attributes | |
SessionModel * | m_model |
|
explicit |
Definition at line 20 of file SessionDecorationModel.cpp.
References setSessionModel().
|
override |
Definition at line 33 of file SessionDecorationModel.cpp.
References textColor().
void SessionDecorationModel::setSessionModel | ( | SessionModel * | model | ) |
Definition at line 27 of file SessionDecorationModel.cpp.
References m_model.
Referenced by SessionDecorationModel().
|
private |
Returns text color. Disabled SessionItem's will appear in gray.
Definition at line 46 of file SessionDecorationModel.cpp.
References SessionModel::itemForIndex(), and m_model.
Referenced by data().
|
private |
Definition at line 39 of file SessionDecorationModel.h.
Referenced by setSessionModel(), and textColor().