mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-23 05:45:35 +08:00
Issue #77 toIcon returns a simple enum instead of a full object
This commit is contained in:
@@ -48,14 +48,17 @@ namespace BlackMisc
|
||||
//! Default constructor.
|
||||
CIcon() {}
|
||||
|
||||
//! Constructor.
|
||||
CIcon(CIcons::IconIndex index);
|
||||
|
||||
//! Constructor.
|
||||
CIcon(CIcons::IconIndex index, const QString &descriptiveText);
|
||||
|
||||
//! Constructor for generated icon
|
||||
CIcon(const QPixmap &pixmap, const QString &descriptiveText);
|
||||
//CIcon(const QPixmap &pixmap, const QString &descriptiveText);
|
||||
|
||||
//! Constructor for file icons
|
||||
CIcon(const QString &resourceFilePath, const QString &descriptiveText);
|
||||
//CIcon(const QString &resourceFilePath, const QString &descriptiveText);
|
||||
|
||||
//! Get descriptive text
|
||||
const QString &getDescriptiveText() const { return m_descriptiveText; }
|
||||
@@ -85,7 +88,7 @@ namespace BlackMisc
|
||||
QPixmap toPixmap() const;
|
||||
|
||||
//! Identity function
|
||||
CIcon toIcon() const { return *this; }
|
||||
CIcons::IconIndex toIcon() const { return m_index; }
|
||||
|
||||
//! A QIcon
|
||||
QIcon toQIcon() const;
|
||||
@@ -123,12 +126,6 @@ namespace BlackMisc
|
||||
BLACK_METAMEMBER(fileResourcePath)
|
||||
);
|
||||
};
|
||||
|
||||
namespace Private
|
||||
{
|
||||
//! \private Needed so CValueObjectMetaInfoHelper can copy forward-declared CIcon.
|
||||
inline void assign(CIcon &a, const CIcon &b) { a = b; }
|
||||
}
|
||||
} // namespace
|
||||
|
||||
Q_DECLARE_METATYPE(BlackMisc::CIcon)
|
||||
|
||||
Reference in New Issue
Block a user