Merge branch 'qt_clipboard_bitmap' of https://github.com/GeoTeric/wxWidgets
Implement copying bitmap to clipboard for wxQt. See https://github.com/wxWidgets/wxWidgets/pull/1368
This commit is contained in:
@@ -12,6 +12,8 @@
|
||||
// wxDataObject is the same as wxDataObjectBase under wxQT
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class QMimeData;
|
||||
|
||||
class WXDLLIMPEXP_CORE wxDataObject : public wxDataObjectBase
|
||||
{
|
||||
public:
|
||||
@@ -19,6 +21,15 @@ public:
|
||||
virtual ~wxDataObject();
|
||||
|
||||
virtual bool IsSupportedFormat( const wxDataFormat& format, Direction dir = Get ) const;
|
||||
|
||||
// Adds object's data to Qt mime data appropriately for type
|
||||
virtual void QtAddDataTo(QMimeData &mimeData) const;
|
||||
// Sets object's data from Qt mime data appropriately for type
|
||||
virtual bool QtSetDataFrom(const QMimeData &mimeData);
|
||||
|
||||
private:
|
||||
// Sets object's data from Qt mime data in specific format
|
||||
virtual void QtSetDataSingleFormat(const QMimeData &mimeData, const wxDataFormat &format);
|
||||
};
|
||||
|
||||
#endif // _WX_QT_DATAOBJ_H_
|
||||
|
@@ -14,6 +14,11 @@ public:
|
||||
wxBitmapDataObject();
|
||||
wxBitmapDataObject(const wxBitmap& bitmap);
|
||||
|
||||
// Overridden to set image data directly, which Qt will write to clipboard in many formats
|
||||
void QtAddDataTo(QMimeData &mimeData) const wxOVERRIDE;
|
||||
// Overridden to retrieve image data from any format that Qt can read from clipboard
|
||||
bool QtSetDataFrom(const QMimeData &mimeData) wxOVERRIDE;
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
Reference in New Issue
Block a user