15 : QSortFilterProxyModel(parent)
46 if (left.parent() == QModelIndex() || left.parent().parent() == QModelIndex()) {
47 QVariant LeftData = sourceModel()->data(left);
48 QVariant RightData = sourceModel()->data(right);
50 switch (LeftData.type()) {
53 return (LeftData.toUInt() < RightData.toUInt());
56 return (LeftData.toInt() < RightData.toInt());
58 case QVariant::String:
59 return ((LeftData.toString()).compare(RightData.toString()) > 0);
90 for (QString& ClassName : ClassList) {
97 if (sourceModel()->canFetchMore(ParentIndex))
98 sourceModel()->fetchMore(ParentIndex);
108 if (index.isValid()) {
109 QModelIndex sourceParent = mapToSource(index);
117 throw daq::dbe::cannot_handle_invalid_qmodelindex(
ERS_HERE);
123 QModelIndex sourceParent = mapToSource(index);
127 return my->
getnode(sourceParent);
136 QModelIndex sourceParent = mapToSource(index);
149 return sourceModel();
156 Q_UNUSED(source_parent)
166 QModelIndex
const& nodeindex = srcmodel->
index(source_row, 0, source_parent);
168 QString
const nodename = srcmodel->
data(nodeindex).toString();
170 if (not source_parent.isValid()) {
180 }
else if (
dynamic_cast<ObjectNode*
>(tofilter)) {
184 QString
const related = sourceModel()->data(nodeindex.parent().parent()).toString();
204 auto found = [&obj, classnode](
int i) {
205 return obj.UID() == classnode->GetChild(i)->GetData(0).toString().toStdString();
209 int const childs = classnode->ChildCount();
211 for (; i < childs and not found(i); ++i)
214 return i == childs ? QModelIndex() : index(i, 0, QModelIndex());
217 return QModelIndex();
229 if (index.isValid()) {
230 this->removeRows(index.row(), 1, index.parent());
#define TREEMODEL_REMOVE_ROWS_DEF(classname)
static cptr< datahandler > gethandler()
static cptr< ui::config::info > guiconfig()
void model_common_connections()
treenode * getnode(const QModelIndex &index) const
bool this_apply_default_filter
bool lessThan(const QModelIndex &left, const QModelIndex &right) const
bool ApplyDefaultFilter(int source_row, const QModelIndex &source_parent) const
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
QStringList this_default_filter
Window this_window_config
QString this_gui_windowname
subtree_proxy(const QString &Name, const QStringList &Default, QObject *parent=nullptr)
Including DBE.
bool ApplyUserFilter(int source_row, const QModelIndex &source_parent) const
QVariant data(const type_index &index, int role=Qt::DisplayRole) const override
type_index getindex(treenode *NodeItem, type_index const &RootIndex=QModelIndex()) const
type_datum * getnode(const type_index &index) const override
type_index index(int row, int column, const type_index &parent) const override
#define MODEL_COMMON_INTERFACE_LOOKUP_IMPL(classname)
#define MODEL_COMMON_INTERFACE_RENAME_THAT_OBJ_IMPL(classname)
#define MODEL_COMMON_INTERFACE_UPDATE_THAT_OBJ_IMPL(classname)
#define MODEL_COMMON_INTERFACE_DELETE_THAT_OBJ_IMPL(classname)
#define MODEL_COMMON_INTERFACE_SLOTS_DEF(classname)
#define MODEL_COMMON_INTERFACE_CREATE_THAT_OBJ_IMPL(classname)
inner::configobject::tref tref
QString DatabaseClassName
QStringList DerivedClasses
bool ShowAllRelationships
QStringList Relationships
virtual type_class_info getclass(type_index const &index) const =0
virtual type_object_ref getobject(type_index const &index) const =0
virtual QAbstractItemModel * ReturnSourceModel() const =0