mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 21:56:43 +08:00
CValueObject virtual method toIcon, reprsenting the object as icon where applicable.
Currently used for status messages (severity), will be used for CAtcStation and others as well.
This commit is contained in:
committed by
Mathew Sutcliffe
parent
4ec1db4b38
commit
fda587994d
@@ -6,6 +6,7 @@
|
||||
#include <QtGlobal>
|
||||
#include <QDataStream>
|
||||
#include <QDebug>
|
||||
#include <QPixmap>
|
||||
#include <type_traits>
|
||||
#include <iostream>
|
||||
|
||||
@@ -173,6 +174,12 @@ namespace BlackMisc
|
||||
*/
|
||||
virtual QVariant toQVariant() const = 0;
|
||||
|
||||
/*!
|
||||
* \brief As icon, not implement by all classes
|
||||
* \return
|
||||
*/
|
||||
virtual const QPixmap &toIcon() const { static const QPixmap p; return p; }
|
||||
|
||||
/*!
|
||||
* \brief Set property by index
|
||||
* \remarks Intentionally not abstract, avoiding all classes need to implement this method
|
||||
|
||||
Reference in New Issue
Block a user