-
Notifications
You must be signed in to change notification settings - Fork 23
/
VlYosysConfiguration.h
140 lines (117 loc) · 4.1 KB
/
VlYosysConfiguration.h
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
#ifndef VYOSYSCONFIGURATION_H
#define VYOSYSCONFIGURATION_H
/*
* Copyright 2018 Rochus Keller <mailto:me@rochus-keller.ch>
*
* This file is part of the VerilogCreator plugin.
*
* The following is the license that applies to this copy of the
* plugin. For a license to use the plugin under conditions
* other than those described here, please email to me@rochus-keller.ch.
*
* GNU General Public License Usage
* This file may be used under the terms of the GNU General Public
* License (GPL) versions 2.0 or 3.0 as published by the Free Software
* Foundation and appearing in the file LICENSE.GPL included in
* the packaging of this file. Please review the following information
* to ensure GNU General Public Licensing requirements will be met:
* http://www.fsf.org/licensing/licenses/info/GPLv2.html and
* http://www.gnu.org/copyleft/gpl.html.
*/
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/namedwidget.h>
#include <projectexplorer/abstractprocessstep.h>
#include <projectexplorer/localapplicationrunconfiguration.h>
#include <utils/pathchooser.h>
class QLabel;
class QCheckBox;
namespace Vl
{
class YosysBuildConfig : public ProjectExplorer::BuildConfiguration
{
Q_OBJECT
public:
static const char* ID;
static const char* Name;
explicit YosysBuildConfig(ProjectExplorer::Target *parent);
ProjectExplorer::NamedWidget* createConfigWidget();
BuildType buildType() const;
static ProjectExplorer::BuildConfiguration* create( ProjectExplorer::Target* parent,
const ProjectExplorer::BuildInfo* info );
protected:
YosysBuildConfig(ProjectExplorer::Target *parent, Core::Id id);
YosysBuildConfig(ProjectExplorer::Target *parent, YosysBuildConfig *source);
friend class BuildConfigurationFactory;
friend class YosysBuildConfigWidget;
};
class YosysBuildConfigWidget : public ProjectExplorer::NamedWidget
{
Q_OBJECT
public:
YosysBuildConfigWidget(YosysBuildConfig *bc);
protected slots:
void buildDirectoryChanged();
void environmentChanged();
private:
Utils::PathChooser* d_buildPath;
YosysBuildConfig* d_conf;
};
class YosysMakeStep : public ProjectExplorer::AbstractProcessStep
{
Q_OBJECT
public:
static const char* ID;
explicit YosysMakeStep(ProjectExplorer::BuildStepList *parent);
bool init();
void run(QFutureInterface<bool> &fi);
bool immutable() const { return false; }
ProjectExplorer::BuildStepConfigWidget* createConfigWidget();
QVariantMap toMap() const;
protected:
QString makeCommand(const Utils::Environment &environment) const;
bool fromMap(const QVariantMap &map);
private:
QString d_cmd;
QString d_args;
friend class YosysMakeStepWidget;
};
class YosysMakeStepWidget : public ProjectExplorer::BuildStepConfigWidget
{
Q_OBJECT
public:
YosysMakeStepWidget(YosysMakeStep *makeStep);
QString displayName() const;
QString summaryText() const;
private slots:
void makeLineEditTextEdited();
void makeArgumentsLineEditTextEdited();
void updateMakeOverrrideLabel();
void updateDetails();
private:
YosysMakeStep* d_step;
QString d_summary;
QLabel* d_cmdLabel;
QLineEdit* d_cmd;
QLineEdit* d_args;
};
class YosysCleanStep : public ProjectExplorer::AbstractProcessStep
{
Q_OBJECT
public:
static const char* ID;
explicit YosysCleanStep(ProjectExplorer::BuildStepList *parent);
bool init();
void run(QFutureInterface<bool> &fi);
bool immutable() const { return true; }
ProjectExplorer::BuildStepConfigWidget* createConfigWidget();
};
class YosysCleanStepWidget : public ProjectExplorer::BuildStepConfigWidget
{
Q_OBJECT
public:
YosysCleanStepWidget(YosysCleanStep *makeStep);
QString displayName() const;
QString summaryText() const;
};
}
#endif // VYOSYSCONFIGURATION_H