15 #include <QAbstractListModel>
19 #include <QModelIndex>
24 #include "../drivers/btconstmoduleset.h"
66 static std::shared_ptr<BtBookshelfModel>
newInstance();
75 int rowCount(const QModelIndex & parent = QModelIndex()) const override;
77 QVariant
data(const QModelIndex & index,
int role) const override;
79 Qt::Orientation orientation,
80 int role = Qt::DisplayRole) const override;
81 bool setData(const QModelIndex & index,
82 const QVariant & value,
101 void clear(
bool destroy =
false);
115 bool destroy =
false);
124 bool destroy =
false);
133 bool destroy =
false);
static std::shared_ptr< BtBookshelfModel > newInstance()
void removeModule(CSwordModuleInfo *const module, bool destroy=false)
void addModule(CSwordModuleInfo *const module)
void moduleIndexed(bool indexed)
CSwordModuleInfo * module(QModelIndex const &index) const
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
bool setData(const QModelIndex &index, const QVariant &value, int role=ModuleHiddenRole) override
~BtBookshelfModel() noexcept override
QList< CSwordModuleInfo * > m_data
QVariant data(CSwordModuleInfo *module, int role) const
BtBookshelfModel(BtBookshelfModel const &)=delete
void moduleHidden(bool hidden)
CSwordModuleInfo * getModule(const QString &name) const
QList< CSwordModuleInfo * > const & moduleList() const
int rowCount(const QModelIndex &parent=QModelIndex()) const override
void moduleUnlocked(bool unlocked)
void moduleDataChanged(CSwordModuleInfo *module)
BtBookshelfModel(BtBookshelfModel &&)=delete
void removeModules(BtConstModuleSet const &modules, bool destroy=false)
void clear(bool destroy=false)
Used to restrict construction to newInstance() only.