Files
create/src/Mod/TechDraw/Gui/mtextedit.h
2019-05-14 15:38:52 +02:00

45 lines
1.4 KiB
C++

/*
** Copyright (C) 2013 Jiří Procházka (Hobrasoft)
** Contact: http://www.hobrasoft.cz/
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file is under the terms of the GNU Lesser General Public License
** version 2.1 as published by the Free Software Foundation and appearing
** in the file LICENSE.LGPL included in the packaging of this file.
** Please review the following information to ensure the
** GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
*/
#ifndef _MTEXTEDIT_H_
#define _MTEXTEDIT_H_
#include <QTextEdit>
#include <QMimeData>
#include <QImage>
class MTextEdit : public QTextEdit {
Q_OBJECT
public:
MTextEdit(QWidget *parent);
void dropImage(const QImage& image, const QString& format);
protected:
bool canInsertFromMimeData(const QMimeData *source) const;
void insertFromMimeData(const QMimeData *source);
QMimeData *createMimeDataFromSelection() const;
};
#endif