QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
qgsimagedroptextedit.h
Go to the documentation of this file.
1
/****************************************************************************
2
**
3
** Copyright (C) 2013 Jiří Procházka (Hobrasoft)
4
** Contact: http://www.hobrasoft.cz/
5
**
6
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
7
** Contact: http://www.qt-project.org/legal
8
**
9
** This library is free software; you can redistribute it and/or
10
** modify it under the terms of the GNU Lesser General Public
11
** License as published by the Free Software Foundation; either
12
** version 2.1 of the License, or (at your option) any later version.
13
**
14
** $QT_BEGIN_LICENSE:LGPL$
15
** GNU Lesser General Public License Usage
16
** This file is under the terms of the GNU Lesser General Public License
17
** version 2.1 as published by the Free Software Foundation and appearing
18
** in the file LICENSE.LGPL included in the packaging of this file.
19
** Please review the following information to ensure the
20
** GNU Lesser General Public License version 2.1 requirements
21
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
22
**
23
** In addition, as a special exception, Digia gives you certain additional
24
** rights. These rights are described in the Digia Qt LGPL Exception
25
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
26
**
27
** $QT_END_LICENSE$
28
**
29
****************************************************************************/
30
#ifndef QGSIMAGEDROPTEXTEDIT_H
31
#define QGSIMAGEDROPTEXTEDIT_H
32
33
#include <memory>
34
35
#include "qgis_gui.h"
36
#include "
qgis_sip.h
"
37
38
#include <QTextEdit>
39
40
#define SIP_NO_FILE
41
42
class
QImage;
43
class
QgsTemporaryCursorOverride
;
44
45
/*
46
* Originally ported from https://github.com/Anchakor/MRichTextEditor, courtesy of Hobrasoft.
47
*/
48
50
class
GUI_EXPORT QgsImageDropTextEdit :
public
QTextEdit
51
{
52
Q_OBJECT
53
54
public
:
55
QgsImageDropTextEdit( QWidget *parent =
nullptr
);
56
~QgsImageDropTextEdit()
override
;
57
58
void
dropImage(
const
QImage &image,
const
QString &format );
59
void
dropLink(
const
QUrl &url );
60
61
protected
:
62
bool
canInsertFromMimeData(
const
QMimeData *source )
const override
;
63
void
insertFromMimeData(
const
QMimeData *source )
override
;
64
void
mouseMoveEvent( QMouseEvent *e )
override
;
65
void
mouseReleaseEvent( QMouseEvent *e )
override
;
66
67
private
:
68
QString mActiveAnchor;
69
std::unique_ptr<QgsTemporaryCursorOverride> mCursorOverride;
70
};
72
73
74
#endif
// QGSIMAGEDROPTEXTEDIT_H
QgsTemporaryCursorOverride
Temporarily sets a cursor override for the QApplication for the lifetime of the object.
Definition
qgsguiutils.h:300
qgis_sip.h
Generated on
for QGIS API Documentation by
1.17.0