refs #264, QPixmap enable list model base to simplify columns with icons

* new constructor in column class
* removed overridden data method, no longer needed
* added icons for ATC station views
* QPixmap comparison for such columns (free functions)
This commit is contained in:
Klaus Basan
2014-06-10 02:05:44 +02:00
parent 9ea1fd86ef
commit 56430c860a
9 changed files with 59 additions and 34 deletions

View File

@@ -222,6 +222,13 @@ int BlackMisc:: compareQVariants(const QVariant &v1, const QVariant &v2)
if (t1 == t2) return 0;
return t1 < t2 ? -1 : 1;
}
case QMetaType::QPixmap:
{
QPixmap p1 = v1.value<QPixmap>();
QPixmap p2 = v2.value<QPixmap>();
if (p1.width() == p2.width()) return 0;
return p1.width() < p2.width() ? -1 : 1;
}
default:
break;
}