mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 05:26:45 +08:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user