1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0
#pragma once
#include <projectexplorer/jsonwizard/jsonwizardgeneratorfactory.h>
#include <projectexplorer/jsonwizard/jsonwizardpagefactory.h>
#include <utils/wizardpage.h>
QT_BEGIN_NAMESPACE
class QButtonGroup;
class QComboBox;
class QLineEdit;
QT_END_NAMESPACE
namespace Utils { class InfoLabel; }
namespace Squish {
namespace Internal {
class SquishToolkitsPageFactory : public ProjectExplorer::JsonWizardPageFactory
{
public:
SquishToolkitsPageFactory();
Utils::WizardPage *create(ProjectExplorer::JsonWizard *wizard, Utils::Id typeId,
const QVariant &data) override;
bool validateData(Utils::Id typeId, const QVariant &data, QString *errorMessage) override;
};
class SquishToolkitsPage : public Utils::WizardPage
{
Q_OBJECT
public:
SquishToolkitsPage();
~SquishToolkitsPage() = default;
void initializePage() override;
bool isComplete() const override;
bool handleReject() override;
private:
void delayedInitialize();
void fetchServerSettings();
QButtonGroup *m_buttonGroup = nullptr;
QLineEdit *m_hiddenLineEdit = nullptr;
Utils::InfoLabel *m_errorLabel = nullptr;
};
class SquishScriptLanguagePageFactory : public ProjectExplorer::JsonWizardPageFactory
{
public:
SquishScriptLanguagePageFactory();
Utils::WizardPage *create(ProjectExplorer::JsonWizard *wizard, Utils::Id typeId,
const QVariant &data) override;
bool validateData(Utils::Id typeId, const QVariant &data, QString *errorMessage) override;
};
class SquishScriptLanguagePage : public Utils::WizardPage
{
Q_OBJECT
public:
SquishScriptLanguagePage();
~SquishScriptLanguagePage() = default;
};
class SquishAUTPageFactory : public ProjectExplorer::JsonWizardPageFactory
{
public:
SquishAUTPageFactory();
Utils::WizardPage *create(ProjectExplorer::JsonWizard *wizard, Utils::Id typeId,
const QVariant &data) override;
bool validateData(Utils::Id typeId, const QVariant &data, QString *errorMessage) override;
};
class SquishAUTPage : public Utils::WizardPage
{
Q_OBJECT
public:
SquishAUTPage();
~SquishAUTPage() = default;
void initializePage() override;
private:
QComboBox *m_autCombo = nullptr;
};
class SquishGeneratorFactory : public ProjectExplorer::JsonWizardGeneratorFactory
{
public:
SquishGeneratorFactory();
ProjectExplorer::JsonWizardGenerator *create(Utils::Id typeId, const QVariant &data,
const QString &path, Utils::Id platform,
const QVariantMap &variables) override;
bool validateData(Utils::Id typeId, const QVariant &data, QString *errorMessage) override;
};
class SquishFileGenerator : public ProjectExplorer::JsonWizardGenerator
{
public:
bool setup(const QVariant &data, QString *errorMessage);
Core::GeneratedFiles fileList(Utils::MacroExpander *expander,
const Utils::FilePath &wizardDir,
const Utils::FilePath &projectDir,
QString *errorMessage) override;
bool writeFile(const ProjectExplorer::JsonWizard *wizard, Core::GeneratedFile *file,
QString *errorMessage) override;
bool allDone(const ProjectExplorer::JsonWizard *wizard, Core::GeneratedFile *file,
QString *errorMessage) override;
private:
QString m_mode;
};
} // namespace Internal
} // namespace Squish
|