File indexing completed on 2024-05-12 04:38:56

0001 /*
0002     SPDX-FileCopyrightText: 2007 Andreas Pakulat <apaku@gmx.de>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #ifndef KDEVPLATFORM_VCSIMPORTMETADATAWIDGET_H
0008 #define KDEVPLATFORM_VCSIMPORTMETADATAWIDGET_H
0009 
0010 #include <QWidget>
0011 #include <vcs/vcsexport.h>
0012 
0013 class QUrl;
0014 
0015 namespace KDevelop
0016 {
0017 
0018 class VcsLocation;
0019 
0020 class KDEVPLATFORMVCS_EXPORT VcsImportMetadataWidget : public QWidget
0021 {
0022 Q_OBJECT
0023 public:
0024     explicit VcsImportMetadataWidget( QWidget* parent );
0025     ~VcsImportMetadataWidget() override;
0026     virtual QUrl source() const = 0;
0027     virtual VcsLocation destination() const = 0;
0028     virtual QString message() const = 0;
0029 
0030     /**
0031      * Check whether the given data is valid.
0032      * @returns true if all data in the widget is valid
0033      */
0034     virtual bool hasValidData() const = 0;
0035     
0036     /**
0037      * Select whether the widget should re-use the last part of the source location
0038      * for the destination. The default implementation simply ignores this setting.
0039      */
0040     virtual void setUseSourceDirForDestination( bool ) {}
0041 Q_SIGNALS:
0042     void changed();
0043 public Q_SLOTS:
0044     virtual void setSourceLocation( const VcsLocation& ) = 0;
0045     virtual void setSourceLocationEditable( bool ) = 0;
0046     virtual void setMessage(const QString& message) = 0;
0047 };
0048 
0049 }
0050 
0051 #endif