3#include <QAbstractListModel>
4#include <QAbstractItemView>
29 [[nodiscard]] QVariant
headerData(
int section, Qt::Orientation orientation,
int role)
const override;
34 [[nodiscard]]
int rowCount(
const QModelIndex& parent)
const override;
39 [[nodiscard]] QVariant
data(
const QModelIndex& index,
int role)
const override;
44 [[nodiscard]]
int columnCount(
const QModelIndex& parent)
const override;
49 [[nodiscard]] Qt::ItemFlags
flags(
const QModelIndex& index)
const override;
58 bool edit(QModelIndex index);
68 [[nodiscard]]
bool isDirty()
const {
return _dirty;};
List model for manipulating the passed script manager.
Definition FollowersListModel.h:14
FollowersListModel(UnitConversionServerEx *ucs, QObject *parent=nullptr)
Constructor.
bool edit(QModelIndex index)
Edits a entry depending on the validity of the passed index.
int columnCount(const QModelIndex &parent) const override
Overridden from base class to provide the amount of columns.
int rowCount(const QModelIndex &parent) const override
Overridden from base class to provide the amount of rows.
QVariant data(const QModelIndex &index, int role) const override
Overridden from base class to provide the data to present.
void sync()
Saves changes to the unit server and resets the list's dirty flag.
bool isDirty() const
Gets the modification flag.
Definition FollowersListModel.h:68
void refresh()
Called to refresh the attached viewer.
Qt::ItemFlags flags(const QModelIndex &index) const override
Overridden from base class to provide flags on an item by index.
bool add()
Adds a entry depending on the validity of the passed index.
bool remove(QModelIndex index)
QVariant headerData(int section, Qt::Orientation orientation, int role) const override
Overridden from base class to provide column display names.
Extended UnitConversionServer with master and slaved variables.
Definition UnitConversionServerEx.h:16
Definition Application.h:10
Entry in to the temporary list of followers.
Definition FollowersListModel.h:79
Variable::id_type _masterId
Definition FollowersListModel.h:80
QList< Variable::id_type > _followerIds
Definition FollowersListModel.h:83
QString _unit
Definition FollowersListModel.h:82
QString _formula
Definition FollowersListModel.h:81