feat(cpn): Add radio sort order edit and sorting models list by any column (#3659)

* feat(cpn): Add radio sort order edit (color) and sorting models list by any column (all)

* Add column double click to enable/disable model sorting (disabled by default)
This commit is contained in:
Neil Horne
2023-06-23 09:07:55 +10:00
committed by GitHub
parent d57961917e
commit 42098ae514
6 changed files with 204 additions and 55 deletions
+11 -2
View File
@@ -22,7 +22,7 @@
ModelListItem::ModelListItem(const QVector<QVariant> & itemData):
itemData(itemData),
parentItem(NULL),
parentItem(nullptr),
modelIndex(-1),
flags(0),
highlightRX(false)
@@ -609,7 +609,7 @@ void ModelsListModel::refresh()
for (unsigned i = 0; i < radioData->models.size(); i++) {
ModelData & model = radioData->models[i];
int currentColumn = 0;
ModelListItem * current = NULL;
ModelListItem * current = nullptr;
model.modelIndex = i;
@@ -679,3 +679,12 @@ bool ModelsListModel::isModelIdUnique(unsigned modelIdx, unsigned module, unsign
return true;
}
/*
ModelsListProxyModel
*/
bool ModelsListProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex & sourceParent) const
{
return true;
}