3#include <QtCore/QLoggingCategory>
4#include <QtCore/QObject>
5#include <QtQmlIntegration/QtQmlIntegration>
45 int rowCount (
const QModelIndex & parent = QModelIndex())
const override;
46 int columnCount (
const QModelIndex &parent = QModelIndex())
const override;
47 QVariant
data (
const QModelIndex & index,
int role = Qt::DisplayRole)
const override;
48 QHash<int, QByteArray>
roleNames(
void)
const override;
54 bool _isResetting()
const {
return _resetNestingCount > 0; }
56 int _tableViewColCount = 3;
57 QList<ColumnData> _tableData;
58 uint _resetNestingCount = 0;
71 QAbstractTableModel* getFacts(
void) {
return &
facts; }
102 Q_PROPERTY(
int componentId MEMBER componentId
CONSTANT)
130 Q_PROPERTY(QObject* currentCategory READ currentCategory WRITE setCurrentCategory NOTIFY
currentCategoryChanged)
131 Q_PROPERTY(QObject* currentGroup READ currentGroup WRITE setCurrentGroup NOTIFY
currentGroupChanged)
132 Q_PROPERTY(QAbstractTableModel* parameters MEMBER _parameters NOTIFY
parametersChanged)
144 Q_INVOKABLE
void saveToFile (
const QString& filename);
145 Q_INVOKABLE
bool buildDiffFromFile (
const QString& filename);
146 Q_INVOKABLE
void clearDiff (
void);
147 Q_INVOKABLE
void sendDiff (
void);
148 Q_INVOKABLE
void refresh (
void);
149 Q_INVOKABLE
void resetAllToDefaults (
void);
150 Q_INVOKABLE
void resetAllToVehicleConfiguration (
void);
152 QObject* currentCategory (
void) {
return _currentCategory; }
153 QObject* currentGroup (
void) {
return _currentGroup; }
156 void setCurrentCategory (QObject* currentCategory);
157 void setCurrentGroup (QObject* currentGroup);
169 void _currentCategoryChanged(
void);
170 void _currentGroupChanged (
void);
171 void _searchTextChanged (
void);
172 void _buildLists (
void);
173 void _buildListsForComponent(
int compId);
174 void _factAdded (
int compId,
Fact* fact);
177 bool _shouldShow(
Fact *fact)
const;
178 void _performSearch();
186 bool _showModifiedOnly =
false;
187 bool _diffOtherVehicle =
false;
188 bool _diffMultipleComponents =
false;
193 QAbstractTableModel* _parameters =
nullptr;
194 QMap<QString, ParameterEditorCategory*> _mapCategoryName2Category;
Q_DECLARE_LOGGING_CATEGORY(AndroidSerialLog)
Used for handling missing Facts from C++ code.
A Fact is used to hold a single value within the system.
QMap< QString, ParameterEditorGroup * > mapGroupName2Group
QmlObjectListModel groups
ParameterEditorCategory(QObject *parent)
QString name MEMBER name CONSTANT(QmlObjectListModel *groups READ getGroups CONSTANT) QmlObjectListModel *getGroups(void)
void parametersChanged(void)
void currentGroupChanged(void)
void diffMultipleComponentsChanged(bool diffMultipleComponents)
void searchTextChanged(QString searchText)
void currentCategoryChanged(void)
void diffOtherVehicleChanged(bool diffOtherVehicle)
void showModifiedOnlyChanged(void)
void loadChanged(bool load)
FactMetaData::ValueType_t valueType
ParameterEditorDiff(QObject *parent)
int componentId MEMBER componentId CONSTANT(QString name MEMBER name CONSTANT) 1(QString fileValue MEMBER fileValue CONSTANT) 1(QString vehicleValue MEMBER vehicleValue CONSTANT) 1(bool noVehicleValue MEMBER noVehicleValue CONSTANT) 1(QString units MEMBER units CONSTANT) 1(bool load MEMBER load NOTIFY loadChanged) int componentId
QString name MEMBER name CONSTANT(QAbstractTableModel *facts READ getFacts CONSTANT) QAbstractTableModel *getFacts(void)
ParameterTableModel facts
QVector< QVariant > ColumnData
void insert(int row, Fact *fact)
int rowCount(const QModelIndex &parent=QModelIndex()) const override
int rowCount READ rowCount NOTIFY rowCountChanged void append(Fact *fact)
int columnCount(const QModelIndex &parent=QModelIndex()) const override
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
QHash< int, QByteArray > roleNames(void) const override
~ParameterTableModel() override
void rowCountChanged(int count)
void endReset()
Supports nesting - only outermost call has effect.
void beginReset()
Supports nesting - only outermost call has effect.
Fact * factAt(int row) const