MCPcopy Create free account
hub / github.com/XRay3D/GERBER_X3 / data

Method data

shape_plugins/shape/shnode.cpp:56–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54 // }
55}
56QVariant Node::data(const QModelIndex& index, int role) const
57{
58 return shape->data(index, role);
59 // switch (FileTree::Column(index.column())) {
60 // case FileTree::Column::NameColorVisible:
61 // switch (role) {
62 // case Qt::DisplayRole:
63 // if (static_cast<GiType>(shape()->type()) == GiType::ShText)
64 // return QString("%1 (%2, %3)")
65 // .arg(shape()->name())
66 // .arg(m_id)
67 // .arg(static_cast<Text*>(shape())->text());
68 // else
69 // return QString("%1 (%2)")
70 // .arg(shape()->name())
71 // .arg(m_id);
72 // // case Qt::ToolTipRole:
73 // // return file()->shortName() + "\n" + file()->name();
74 // case Qt::CheckStateRole:
75 // return shape()->isVisible() ? Qt::Checked : Qt::Unchecked;
76 // case Qt::DecorationRole:
77 // return shape()->icon();
78 // case FileTree::Id:
79 // return *m_id;
80 // case Qt::EditRole:
81 // if (static_cast<GiType>(shape()->type()) == GiType::ShText)
82 // return static_cast<Text*>(shape())->text();
83 // return QVariant();
84 // default:
85 // return QVariant();
86 // }
87 // case FileTree::Column::SideType:
88 // if (auto text = dynamic_cast<Text*>(shape()); text) {
89 // switch (role) {
90 // case Qt::DisplayRole:
91 // case Qt::ToolTipRole:
92 // return sideStrList[text->side()];
93 // case Qt::EditRole:
94 // return static_cast<bool>(text->side());
95 // default:
96 // return QVariant();
97 // }
98 // }
99 // default:
100 // return QVariant();
101 // }
102}
103
104Qt::ItemFlags Node::flags(const QModelIndex& index) const
105{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected