File indexing completed on 2024-12-22 04:13:08

0001 /*
0002  * SPDX-FileCopyrightText: 2022 L. E. Segovia <amy@amyspark.me>
0003  *
0004  * SPDX-License-Identifier: LGPL-2.0-or-later
0005  */
0006 
0007 #ifndef KIS_CANVAS_DROP_H
0008 #define KIS_CANVAS_DROP_H
0009 
0010 #include <QMenu>
0011 #include <QMimeData>
0012 #include <QPoint>
0013 
0014 class KisCanvasDrop : private QMenu
0015 {
0016     Q_OBJECT
0017 
0018 public:
0019     enum Action {
0020         NONE = 0,
0021 
0022         INSERT_AS_NEW_LAYER,
0023         INSERT_AS_NEW_FILE_LAYER,
0024         OPEN_IN_NEW_DOCUMENT,
0025         INSERT_AS_REFERENCE_IMAGE,
0026 
0027         INSERT_MANY_LAYERS,
0028         INSERT_MANY_FILE_LAYERS,
0029         OPEN_MANY_DOCUMENTS,
0030         INSERT_AS_REFERENCE_IMAGES,
0031     };
0032 
0033     KisCanvasDrop(QWidget *parent = nullptr);
0034 
0035     Action dropAs(const QMimeData &data, QPoint pos);
0036 
0037 private:
0038     class Private;
0039     Private *const d;
0040 };
0041 
0042 #endif // KIS_CANVAS_DROP_H