|
|
|
@ -15,6 +15,13 @@ class QDataStream; |
|
|
|
class HistoryItem; |
|
|
|
class HistoryItem; |
|
|
|
typedef QSharedPointer<HistoryItem> HistoryItemPtr; |
|
|
|
typedef QSharedPointer<HistoryItem> HistoryItemPtr; |
|
|
|
typedef QSharedPointer<const HistoryItem> HistoryItemConstPtr; |
|
|
|
typedef QSharedPointer<const HistoryItem> HistoryItemConstPtr; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
enum class HistoryItemType { |
|
|
|
|
|
|
|
Text, |
|
|
|
|
|
|
|
Image, |
|
|
|
|
|
|
|
Url, |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An entry in the clipboard history. |
|
|
|
* An entry in the clipboard history. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ -24,6 +31,11 @@ public: |
|
|
|
explicit HistoryItem(const QByteArray &uuid); |
|
|
|
explicit HistoryItem(const QByteArray &uuid); |
|
|
|
virtual ~HistoryItem(); |
|
|
|
virtual ~HistoryItem(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Returns the item type. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
virtual HistoryItemType type() const = 0; |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Return the current item as text |
|
|
|
* Return the current item as text |
|
|
|
* An image would be returned as a descriptive |
|
|
|
* An image would be returned as a descriptive |
|
|
|
@ -112,3 +124,4 @@ inline QDataStream &operator<<(QDataStream &lhs, HistoryItem const *const rhs) |
|
|
|
Q_DECLARE_METATYPE(HistoryItem *) |
|
|
|
Q_DECLARE_METATYPE(HistoryItem *) |
|
|
|
Q_DECLARE_METATYPE(HistoryItemPtr) |
|
|
|
Q_DECLARE_METATYPE(HistoryItemPtr) |
|
|
|
Q_DECLARE_METATYPE(HistoryItemConstPtr) |
|
|
|
Q_DECLARE_METATYPE(HistoryItemConstPtr) |
|
|
|
|
|
|
|
Q_DECLARE_METATYPE(HistoryItemType) |
|
|
|
|