QuickContainers
expose a generic container (QVector or std::vector) of items to an observale Qt item model.
QuickContainers
support to following containers with a unique interface:
- Qt containers: QVector, QList and QSet.
- Std containers: std::vector
With any combinations of:
- std::weak_ptr
- std::unique_ptr
- QPointer
- Raw QObject pointers.
- Any pod type.
Note: Using containers with non pointer QObject is not well supported (for example an std::vector with QObjectSub having a user defined copy constructor).
Interface: reserve(QList& c, std::size_t size) { c.reserve(static_cast(size)); }
- append():
- insert():
- remove():
- removeAll():
- contains():
- indexOf():
//
qcm::adapter<QVector, int> container;
container.insert(42);
- [] Add better support for move semantic.
- [] Add support for a simplified std interface (actually primary interface is "Qt style").
- [] Add support for std::set and std::unordered_set.
- [] Add direct "key"/"value" support for non-trivial associative containers.
- [] Add support for non-pointer QObject with copy ctor.
- [] Add support for Qt smart pointers (QSharedPointer/QWeakPointer)
Copyright (c) 2018 BA