Android: Un-export CreateAndroidManifestWizard

Not needed outside.

Change-Id: I390802c73d3d8c2a3fa95bc24e944913cea49393
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
hjk
2020-02-13 14:15:54 +01:00
parent b18fceb15d
commit 644f1e4faa
2 changed files with 58 additions and 61 deletions

View File

@@ -40,6 +40,7 @@
#include <qtsupport/qtkitinformation.h>
#include <utils/infolabel.h>
#include <utils/pathchooser.h>
#include <QCheckBox>
#include <QComboBox>
@@ -54,24 +55,49 @@ using namespace ProjectExplorer;
using namespace Utils;
namespace Android {
namespace Internal {
//
// NoApplicationProFilePage
//
NoApplicationProFilePage::NoApplicationProFilePage(CreateAndroidManifestWizard *wizard)
: m_wizard(wizard)
class NoApplicationProFilePage : public QWizardPage
{
Q_DECLARE_TR_FUNCTIONS(Android::NoApplicationProFilePage)
public:
NoApplicationProFilePage(CreateAndroidManifestWizard *wizard);
};
NoApplicationProFilePage::NoApplicationProFilePage(CreateAndroidManifestWizard *)
{
auto layout = new QVBoxLayout(this);
QLabel *label = new QLabel(this);
auto label = new QLabel(this);
label->setWordWrap(true);
label->setText(tr("No application .pro file found in this project."));
layout->addWidget(label);
setTitle(tr("No Application .pro File"));
}
//
// ChooseProFilePage
//
class ChooseProFilePage : public QWizardPage
{
Q_DECLARE_TR_FUNCTIONS(Android::ChooseProfilePage)
public:
explicit ChooseProFilePage(CreateAndroidManifestWizard *wizard);
private:
void nodeSelected(int index);
CreateAndroidManifestWizard *m_wizard;
QComboBox *m_comboBox;
};
ChooseProFilePage::ChooseProFilePage(CreateAndroidManifestWizard *wizard)
: m_wizard(wizard)
{
@@ -112,8 +138,29 @@ void ChooseProFilePage::nodeSelected(int index)
//
// ChooseDirectoryPage
//
class ChooseDirectoryPage : public QWizardPage
{
Q_DECLARE_TR_FUNCTIONS(Android::ChooseDirectoryPage)
public:
ChooseDirectoryPage(CreateAndroidManifestWizard *wizard);
private:
void initializePage();
bool isComplete() const;
void checkPackageSourceDir();
CreateAndroidManifestWizard *m_wizard;
PathChooser *m_androidPackageSourceDir = nullptr;
InfoLabel *m_sourceDirectoryWarning = nullptr;
QLabel *m_label;
QFormLayout *m_layout;
bool m_complete = true;
};
ChooseDirectoryPage::ChooseDirectoryPage(CreateAndroidManifestWizard *wizard)
: m_wizard(wizard), m_androidPackageSourceDir(nullptr), m_complete(true)
: m_wizard(wizard)
{
m_layout = new QFormLayout(this);
m_label = new QLabel(this);
@@ -125,8 +172,8 @@ ChooseDirectoryPage::ChooseDirectoryPage(CreateAndroidManifestWizard *wizard)
m_layout->addRow(tr("Android package source directory:"), m_androidPackageSourceDir);
m_sourceDirectoryWarning =
new Utils::InfoLabel(tr("The Android package source directory cannot be the same as "
"the project directory."), Utils::InfoLabel::Error, this);
new InfoLabel(tr("The Android package source directory cannot be the same as "
"the project directory."), InfoLabel::Error, this);
m_sourceDirectoryWarning->setVisible(false);
m_sourceDirectoryWarning->setElideMode(Qt::ElideNone);
m_sourceDirectoryWarning->setWordWrap(true);
@@ -370,4 +417,5 @@ void CreateAndroidManifestWizard::accept()
Wizard::accept();
}
} // namespace Internal
} // namespace Android

View File

@@ -28,69 +28,17 @@
#include "android_global.h"
#include <utils/fileutils.h>
#include <utils/pathchooser.h>
#include <utils/wizard.h>
QT_BEGIN_NAMESPACE
class QComboBox;
class QLabel;
class QFormLayout;
QT_END_NAMESPACE
namespace Utils {
class InfoLabel;
}
namespace ProjectExplorer { class BuildSystem; }
namespace Android {
namespace Internal {
class CreateAndroidManifestWizard;
class NoApplicationProFilePage : public QWizardPage
class CreateAndroidManifestWizard : public Utils::Wizard
{
Q_OBJECT
public:
NoApplicationProFilePage(CreateAndroidManifestWizard *wizard);
private:
CreateAndroidManifestWizard *m_wizard;
};
Q_DECLARE_TR_FUNCTIONS(Android::CreateAndroidManifestWizard)
class ChooseProFilePage : public QWizardPage
{
Q_OBJECT
public:
explicit ChooseProFilePage(CreateAndroidManifestWizard *wizard);
private:
void nodeSelected(int index);
private:
CreateAndroidManifestWizard *m_wizard;
QComboBox *m_comboBox;
};
class ChooseDirectoryPage : public QWizardPage
{
Q_OBJECT
public:
ChooseDirectoryPage(CreateAndroidManifestWizard *wizard);
void initializePage();
protected:
bool isComplete() const;
private:
void checkPackageSourceDir();
private:
CreateAndroidManifestWizard *m_wizard;
Utils::PathChooser *m_androidPackageSourceDir;
Utils::InfoLabel *m_sourceDirectoryWarning;
QLabel *m_label;
QFormLayout *m_layout;
bool m_complete;
};
class ANDROID_EXPORT CreateAndroidManifestWizard : public Utils::Wizard
{
Q_OBJECT
public:
CreateAndroidManifestWizard(ProjectExplorer::BuildSystem *buildSystem);
@@ -122,4 +70,5 @@ private:
bool m_copyGradle;
};
} // namespace Internal
} // namespace Android