File indexing completed on 2024-04-28 04:37:47

0001 /*
0002     SPDX-FileCopyrightText: 2007 Alexander Dymo <adymo@kdevelop.org>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef _APPWIZARDDIALOG_H_
0008 #define _APPWIZARDDIALOG_H_
0009 
0010 #include <QMap>
0011 #include <QUrl>
0012 
0013 #include <KAssistantDialog>
0014 
0015 #include <vcs/vcslocation.h>
0016 
0017 class KPageWidgetItem;
0018 class ProjectSelectionPage;
0019 class ProjectVcsPage;
0020 class ProjectTemplatesModel;
0021 
0022 namespace KDevelop
0023 {
0024 class IPluginController;
0025 }
0026 
0027 class ApplicationInfo
0028 {
0029 public:
0030     QString name;
0031     QUrl location;
0032     QString vcsPluginName;
0033     QUrl sourceLocation;
0034     KDevelop::VcsLocation repository;
0035     QString importCommitMessage;
0036     QString appTemplate;
0037 };
0038 
0039 class AppWizardDialog: public KAssistantDialog {
0040 Q_OBJECT
0041 public:
0042     AppWizardDialog( KDevelop::IPluginController*, ProjectTemplatesModel*,
0043                      QWidget *parent = nullptr);
0044 
0045     ApplicationInfo appInfo() const;
0046 
0047 private Q_SLOTS:
0048     void pageInValid( QWidget* w );
0049     void pageValid( QWidget* w );
0050     void next() override;
0051 private:
0052     QMap<QWidget*, KPageWidgetItem*> m_pageItems;
0053     ProjectSelectionPage* m_selectionPage;
0054     ProjectVcsPage* m_vcsPage;
0055 };
0056 
0057 #endif
0058