Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+40
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* @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
|
||||
Reference in new issue
Block a user