Files
create/src/Mod/TechDraw/Gui/mtextedit.h
2023-08-04 17:09:53 +02:00

48 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 <Mod/TechDraw/TechDrawGlobal.h>
#include <QImage>
#include <QMimeData>
#include <QTextEdit>
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 override;
void insertFromMimeData(const QMimeData *source) override;
QMimeData *createMimeDataFromSelection() const override;
};
#endif