41 lines
1.3 KiB
C++
Executable File
41 lines
1.3 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* Model for ParticipantsMoveDialog
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Gerlinde Rudolphus, SLSE, 2018-01-02
|
|
*/
|
|
|
|
#include "ppm_planning_model.h"
|
|
|
|
#include <Plugins/ParticipantManagement/ppm_data_plugin_interface.h>
|
|
|
|
|
|
namespace ParticipantManagement
|
|
{
|
|
//----------------------------------------------------------------------------
|
|
ParticipantPlanningModel::ParticipantPlanningModel(QObject *parent,
|
|
const std::shared_ptr<ParticipantManagement::Interface::Dtc> &ppmDtc,
|
|
const std::shared_ptr<AdvancedSymbology::ForeignDataInterface> &asbIfc)
|
|
: ParticipantManagement::ParticipantEditModel(parent, ppmDtc, asbIfc)
|
|
, m_logger(getLogger("ParticipantPlanningModel"))
|
|
{
|
|
m_titles += tr("Hierarchy");
|
|
|
|
DEBUG_LOG(m_logger) << "ParticipantPlanningModel::ParticipantPlanningModel";
|
|
}
|
|
|
|
QVariant ParticipantPlanningModel::data(const QModelIndex &index, int role) const
|
|
{
|
|
const CheckedTreeItem *item = privateData(index);
|
|
const ParticipantManagement::ParticipantData &participantData = item->participant;
|
|
|
|
if (role == Qt::DisplayRole && index.column() == columnCount() - 1)
|
|
return m_dtc->hierarchyFromParticipant(participantData.id());
|
|
|
|
return ParticipantManagement::ParticipantEditModel::data(index, role);
|
|
}
|
|
|
|
} // namespace ParticipantManagement
|