File indexing completed on 2024-05-12 04:37:37

0001 /*
0002     SPDX-FileCopyrightText: 2009 Niko Sams <niko.sams@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef KDEVPLATFORM_PATHMAPPINGSWIDGET_H
0008 #define KDEVPLATFORM_PATHMAPPINGSWIDGET_H
0009 
0010 #include <QWidget>
0011 
0012 #include <QUrl>
0013 #include <KConfigGroup>
0014 
0015 #include <debugger/debuggerexport.h>
0016 
0017 class QTableView;
0018 
0019 namespace KDevelop {
0020 
0021 class KDEVPLATFORMDEBUGGER_EXPORT PathMappings
0022 {
0023 public:
0024     static const QString pathMappingsEntry;
0025     static const QString pathMappingRemoteEntry;
0026     static const QString pathMappingLocalEntry;
0027 
0028     static QUrl convertToLocalUrl(const KConfigGroup &config, const QUrl& remoteUrl);
0029     static QUrl convertToRemoteUrl(const KConfigGroup &config, const QUrl& localUrl);
0030 };
0031 
0032 class KDEVPLATFORMDEBUGGER_EXPORT PathMappingsWidget : public QWidget
0033 {
0034     Q_OBJECT
0035 public:
0036     explicit PathMappingsWidget(QWidget* parent = nullptr);
0037 
0038     void loadFromConfiguration(const KConfigGroup& cfg);
0039     void saveToConfiguration(const KConfigGroup& cfg) const;
0040 Q_SIGNALS:
0041     void changed();
0042 
0043 private Q_SLOTS:
0044     void deletePath();
0045 private:
0046     QTableView *m_pathMappingTable;
0047 };
0048 
0049 }
0050 
0051 #endif