#include <kpttaskeditor.h>
Inherits KPlato::ItemModelBase.
Inheritance diagram for KPlato::NodeItemModel:
Public Member Functions | |
NodeItemModel (Part *part, QObject *parent=0) | |
~NodeItemModel () | |
virtual void | setProject (Project *project) |
virtual Qt::ItemFlags | flags (const QModelIndex &index) const |
virtual QModelIndex | parent (const QModelIndex &index) const |
virtual bool | hasChildren (const QModelIndex &parent=QModelIndex()) const |
virtual QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const |
virtual int | columnCount (const QModelIndex &parent=QModelIndex()) const |
virtual int | rowCount (const QModelIndex &parent=QModelIndex()) const |
virtual bool | insertRows (int row, int count, const QModelIndex &parent=QModelIndex()) |
virtual bool | removeRows (int row, int count, const QModelIndex &parent=QModelIndex()) |
virtual QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
virtual bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) |
virtual QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
virtual void | sort (int column, Qt::SortOrder order=Qt::AscendingOrder) |
virtual QMimeData * | mimeData (const QModelIndexList &indexes) const |
virtual QStringList | mimeTypes () const |
Node * | node (const QModelIndex &index) const |
Protected Slots | |
void | slotNodeChanged (Node *) |
Protected Member Functions | |
QVariant | name (const Node *node, int role) const |
bool | setName (Node *node, const QVariant &value, int role) |
QVariant | leader (const Node *node, int role) const |
bool | setLeader (Node *node, const QVariant &value, int role) |
QVariant | description (const Node *node, int role) const |
bool | setDescription (Node *node, const QVariant &value, int role) |
QVariant | type (const Node *node, int role) const |
bool | setType (Node *node, const QVariant &value, int role) |
QVariant | constraint (const Node *node, int role) const |
bool | setConstraint (Node *node, const QVariant &value, int role) |
QVariant | constraintStartTime (const Node *node, int role) const |
bool | setConstraintStartTime (Node *node, const QVariant &value, int role) |
QVariant | constraintEndTime (const Node *node, int role) const |
bool | setConstraintEndTime (Node *node, const QVariant &value, int role) |
QVariant | estimateType (const Node *node, int role) const |
bool | setEstimateType (Node *node, const QVariant &value, int role) |
QVariant | test (const Node *node, int role) const |
bool | setTest (Node *node, const QVariant &value, int role) |
Definition at line 80 of file kpttaskeditor.h.
KPlato::NodeItemModel::NodeItemModel | ( | Part * | part, | |
QObject * | parent = 0 | |||
) |
Definition at line 124 of file kpttaskeditor.cc.
KPlato::NodeItemModel::~NodeItemModel | ( | ) |
Definition at line 129 of file kpttaskeditor.cc.
void KPlato::NodeItemModel::setProject | ( | Project * | project | ) | [virtual] |
Reimplemented from KPlato::ItemModelBase.
Definition at line 133 of file kpttaskeditor.cc.
References KPlato::ItemModelBase::m_project, KPlato::ItemModelBase::project(), KPlato::ItemModelBase::slotLayoutChanged(), KPlato::ItemModelBase::slotLayoutToBeChanged(), and slotNodeChanged().
Referenced by KPlato::NodeTreeView::setProject().
Qt::ItemFlags KPlato::NodeItemModel::flags | ( | const QModelIndex & | index | ) | const [virtual] |
Definition at line 157 of file kpttaskeditor.cc.
References KPlato::Node::constraint(), KPlato::Node::FinishNotLater, KPlato::Node::FixedInterval, KPlato::ItemModelBase::m_readWrite, KPlato::Node::MustFinishOn, KPlato::Node::MustStartOn, node(), and KPlato::Node::StartNotEarlier.
Referenced by setData().
QModelIndex KPlato::NodeItemModel::parent | ( | const QModelIndex & | index | ) | const [virtual] |
Definition at line 194 of file kpttaskeditor.cc.
References KPlato::Node::findChildNode(), KPlato::Node::getParent(), node(), KPlato::Node::type(), and KPlato::Node::Type_Project.
bool KPlato::NodeItemModel::hasChildren | ( | const QModelIndex & | parent = QModelIndex() |
) | const [virtual] |
Definition at line 208 of file kpttaskeditor.cc.
References node(), and KPlato::Node::numChildren().
QModelIndex KPlato::NodeItemModel::index | ( | int | row, | |
int | column, | |||
const QModelIndex & | parent = QModelIndex() | |||
) | const [virtual] |
Definition at line 214 of file kpttaskeditor.cc.
References KPlato::Node::childNode(), columnCount(), KPlato::ItemModelBase::m_project, node(), and KPlato::Node::numChildren().
int KPlato::NodeItemModel::columnCount | ( | const QModelIndex & | parent = QModelIndex() |
) | const [virtual] |
int KPlato::NodeItemModel::rowCount | ( | const QModelIndex & | parent = QModelIndex() |
) | const [virtual] |
Definition at line 234 of file kpttaskeditor.cc.
References node(), and KPlato::Node::numChildren().
bool KPlato::NodeItemModel::insertRows | ( | int | row, | |
int | count, | |||
const QModelIndex & | parent = QModelIndex() | |||
) | [virtual] |
Definition at line 240 of file kpttaskeditor.cc.
bool KPlato::NodeItemModel::removeRows | ( | int | row, | |
int | count, | |||
const QModelIndex & | parent = QModelIndex() | |||
) | [virtual] |
Definition at line 246 of file kpttaskeditor.cc.
QVariant KPlato::NodeItemModel::data | ( | const QModelIndex & | index, | |
int | role = Qt::DisplayRole | |||
) | const [virtual] |
Definition at line 487 of file kpttaskeditor.cc.
References constraint(), constraintEndTime(), constraintStartTime(), description(), estimateType(), leader(), name(), node(), and type().
bool KPlato::NodeItemModel::setData | ( | const QModelIndex & | index, | |
const QVariant & | value, | |||
int | role = Qt::EditRole | |||
) | [virtual] |
Definition at line 518 of file kpttaskeditor.cc.
References flags(), node(), setConstraint(), setConstraintEndTime(), setConstraintStartTime(), setDescription(), setEstimateType(), setLeader(), setName(), and setType().
QVariant KPlato::NodeItemModel::headerData | ( | int | section, | |
Qt::Orientation | orientation, | |||
int | role = Qt::DisplayRole | |||
) | const [virtual] |
Definition at line 540 of file kpttaskeditor.cc.
References KPlato::ToolTip::NodeConstraint, KPlato::ToolTip::NodeConstraintEnd, KPlato::ToolTip::NodeConstraintStart, KPlato::ToolTip::NodeDescription, KPlato::ToolTip::NodeEstimateType, KPlato::ToolTip::NodeName, KPlato::ToolTip::NodeResponsible, and KPlato::ToolTip::NodeType.
void KPlato::NodeItemModel::sort | ( | int | column, | |
Qt::SortOrder | order = Qt::AscendingOrder | |||
) | [virtual] |
Definition at line 578 of file kpttaskeditor.cc.
QMimeData * KPlato::NodeItemModel::mimeData | ( | const QModelIndexList & | indexes | ) | const [virtual] |
Definition at line 582 of file kpttaskeditor.cc.
QStringList KPlato::NodeItemModel::mimeTypes | ( | ) | const [virtual] |
Definition at line 587 of file kpttaskeditor.cc.
Node * KPlato::NodeItemModel::node | ( | const QModelIndex & | index | ) | const |
Definition at line 592 of file kpttaskeditor.cc.
References KPlato::ItemModelBase::m_project.
Referenced by constraint(), constraintEndTime(), constraintStartTime(), KPlato::TaskEditor::currentNode(), data(), description(), estimateType(), flags(), hasChildren(), index(), leader(), name(), parent(), rowCount(), KPlato::TaskEditor::selectedNode(), KPlato::TaskEditor::selectedNodes(), setConstraint(), setConstraintEndTime(), setConstraintStartTime(), setData(), setDescription(), setEstimateType(), setLeader(), setName(), slotNodeChanged(), and type().
void KPlato::NodeItemModel::slotNodeChanged | ( | Node * | ) | [protected, slot] |
Definition at line 606 of file kpttaskeditor.cc.
References columnCount(), KPlato::Node::findChildNode(), KPlato::Node::getParent(), and node().
Referenced by setProject().
QVariant KPlato::NodeItemModel::name | ( | const Node * | node, | |
int | role | |||
) | const [protected] |
Definition at line 252 of file kpttaskeditor.cc.
References KPlato::Node::name(), and node().
Referenced by data().
bool KPlato::NodeItemModel::setName | ( | Node * | node, | |
const QVariant & | value, | |||
int | role | |||
) | [protected] |
Definition at line 266 of file kpttaskeditor.cc.
References KPlato::Part::addCommand(), KPlato::ItemModelBase::m_part, and node().
Referenced by setData().
QVariant KPlato::NodeItemModel::leader | ( | const Node * | node, | |
int | role | |||
) | const [protected] |
Definition at line 276 of file kpttaskeditor.cc.
References KPlato::Node::leader(), and node().
Referenced by data().
bool KPlato::NodeItemModel::setLeader | ( | Node * | node, | |
const QVariant & | value, | |||
int | role | |||
) | [protected] |
Definition at line 290 of file kpttaskeditor.cc.
References KPlato::Part::addCommand(), KPlato::ItemModelBase::m_part, and node().
Referenced by setData().
QVariant KPlato::NodeItemModel::description | ( | const Node * | node, | |
int | role | |||
) | const [protected] |
Definition at line 300 of file kpttaskeditor.cc.
References KPlato::Node::description(), and node().
Referenced by data().
bool KPlato::NodeItemModel::setDescription | ( | Node * | node, | |
const QVariant & | value, | |||
int | role | |||
) | [protected] |
Definition at line 314 of file kpttaskeditor.cc.
References KPlato::Part::addCommand(), KPlato::ItemModelBase::m_part, and node().
Referenced by setData().
QVariant KPlato::NodeItemModel::type | ( | const Node * | node, | |
int | role | |||
) | const [protected] |
Definition at line 324 of file kpttaskeditor.cc.
References node(), and KPlato::Node::typeToString().
Referenced by data().
bool KPlato::NodeItemModel::setType | ( | Node * | node, | |
const QVariant & | value, | |||
int | role | |||
) | [protected] |
QVariant KPlato::NodeItemModel::constraint | ( | const Node * | node, | |
int | role | |||
) | const [protected] |
Definition at line 345 of file kpttaskeditor.cc.
References KPlato::Node::constraint(), KPlato::Node::constraintList(), KPlato::Node::constraintToString(), KPlato::Role::EnumList, KPlato::Role::EnumListValue, and node().
Referenced by data().
bool KPlato::NodeItemModel::setConstraint | ( | Node * | node, | |
const QVariant & | value, | |||
int | role | |||
) | [protected] |
Definition at line 364 of file kpttaskeditor.cc.
References KPlato::Part::addCommand(), KPlato::ItemModelBase::m_part, and node().
Referenced by setData().
QVariant KPlato::NodeItemModel::constraintStartTime | ( | const Node * | node, | |
int | role | |||
) | const [protected] |
Definition at line 376 of file kpttaskeditor.cc.
References KPlato::Node::constraint(), KPlato::Node::constraintStartTime(), KPlato::Node::FixedInterval, KPlato::Node::MustStartOn, node(), and KPlato::Node::StartNotEarlier.
Referenced by data().
bool KPlato::NodeItemModel::setConstraintStartTime | ( | Node * | node, | |
const QVariant & | value, | |||
int | role | |||
) | [protected] |
Definition at line 407 of file kpttaskeditor.cc.
References KPlato::Part::addCommand(), KPlato::ItemModelBase::m_part, and node().
Referenced by setData().
QVariant KPlato::NodeItemModel::constraintEndTime | ( | const Node * | node, | |
int | role | |||
) | const [protected] |
Definition at line 417 of file kpttaskeditor.cc.
References KPlato::Node::constraint(), KPlato::Node::constraintEndTime(), KPlato::Node::FinishNotLater, KPlato::Node::FixedInterval, KPlato::Node::MustFinishOn, and node().
Referenced by data().
bool KPlato::NodeItemModel::setConstraintEndTime | ( | Node * | node, | |
const QVariant & | value, | |||
int | role | |||
) | [protected] |
Definition at line 448 of file kpttaskeditor.cc.
References KPlato::Part::addCommand(), KPlato::ItemModelBase::m_part, and node().
Referenced by setData().
QVariant KPlato::NodeItemModel::estimateType | ( | const Node * | node, | |
int | role | |||
) | const [protected] |
Definition at line 458 of file kpttaskeditor.cc.
References KPlato::Node::effort(), KPlato::Role::EnumList, KPlato::Role::EnumListValue, node(), KPlato::Effort::type(), KPlato::Effort::typeToString(), and KPlato::Effort::typeToStringList().
Referenced by data().
bool KPlato::NodeItemModel::setEstimateType | ( | Node * | node, | |
const QVariant & | value, | |||
int | role | |||
) | [protected] |
Definition at line 476 of file kpttaskeditor.cc.
References KPlato::Part::addCommand(), KPlato::Node::effort(), KPlato::ItemModelBase::m_part, node(), and KPlato::Effort::type().
Referenced by setData().
QVariant KPlato::NodeItemModel::test | ( | const Node * | node, | |
int | role | |||
) | const [protected] |
bool KPlato::NodeItemModel::setTest | ( | Node * | node, | |
const QVariant & | value, | |||
int | role | |||
) | [protected] |