File indexing completed on 2024-04-28 05:49:36

0001 /*
0002  *  SPDX-FileCopyrightText: 2022 Waqar Ahmed <waqar.17a@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: LGPL-2.0-or-later
0005  */
0006 
0007 #pragma once
0008 
0009 #include <QMimeData>
0010 
0011 #include "kateviewspace.h"
0012 
0013 #include <optional>
0014 
0015 namespace KTextEditor
0016 {
0017 class Document;
0018 }
0019 
0020 class TabMimeData : public QMimeData
0021 {
0022     Q_OBJECT
0023 public:
0024     struct DroppedData {
0025         int line = -1;
0026         int col = -1;
0027         QUrl url;
0028     };
0029 
0030     TabMimeData(KateViewSpace *vs, DocOrWidget d);
0031 
0032     static bool hasValidData(const QMimeData *md);
0033 
0034     static std::optional<DroppedData> data(const QMimeData *md);
0035 
0036     KateViewSpace *const sourceVS;
0037     const DocOrWidget doc;
0038 };