46 #include <QAbstractItemModel> 55 virtual int rowCount(
const QModelIndex & parent = QModelIndex())
const;
56 virtual QVariant data(
const QModelIndex & index,
int role = Qt::DisplayRole)
const;
58 void removeObject(
int _id);
60 void refresh(
const DataType &datatype);
65 ObjectInfo(
const QString &name,
const int id) : name(name), id(
id) {}
68 const int nameCmp = name.compare(rhs.name);
69 if (!nameCmp)
return id < rhs.id;
74 return id == rhs.id && name == rhs.name;
77 const QString &getName()
const {
return name; }
78 int getId()
const {
return id; }
85 std::vector<ObjectInfo> objects_;