forked from qt-creator/qt-creator
Rework the project settings.
This has still a few missing things, but this enough to start getting some feedback. Missing are non qt projects, a solution for the runconfiguration, a missing black line between the treeview on top and the project settings at the bottom. Some flickering with removing/adding widgets to the QScrollArea and not showing the expanded widget if the Details button is right at the bottom.
This commit is contained in:
@@ -40,7 +40,7 @@ using namespace CMakeProjectManager;
|
||||
using namespace CMakeProjectManager::Internal;
|
||||
|
||||
CMakeBuildEnvironmentWidget::CMakeBuildEnvironmentWidget(CMakeProject *project)
|
||||
: BuildStepConfigWidget(), m_pro(project)
|
||||
: BuildConfigWidget(), m_pro(project)
|
||||
{
|
||||
QVBoxLayout *vbox = new QVBoxLayout(this);
|
||||
vbox->setMargin(0);
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace CMakeProjectManager {
|
||||
namespace Internal {
|
||||
class CMakeProject;
|
||||
|
||||
class CMakeBuildEnvironmentWidget : public ProjectExplorer::BuildStepConfigWidget
|
||||
class CMakeBuildEnvironmentWidget : public ProjectExplorer::BuildConfigWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
@@ -512,14 +512,14 @@ QString CMakeProject::buildDirectory(const QString &buildConfiguration) const
|
||||
return buildDirectory;
|
||||
}
|
||||
|
||||
ProjectExplorer::BuildStepConfigWidget *CMakeProject::createConfigWidget()
|
||||
ProjectExplorer::BuildConfigWidget *CMakeProject::createConfigWidget()
|
||||
{
|
||||
return new CMakeBuildSettingsWidget(this);
|
||||
}
|
||||
|
||||
QList<ProjectExplorer::BuildStepConfigWidget*> CMakeProject::subConfigWidgets()
|
||||
QList<ProjectExplorer::BuildConfigWidget*> CMakeProject::subConfigWidgets()
|
||||
{
|
||||
QList<ProjectExplorer::BuildStepConfigWidget*> list;
|
||||
QList<ProjectExplorer::BuildConfigWidget*> list;
|
||||
list << new CMakeBuildEnvironmentWidget(this);
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -89,8 +89,8 @@ public:
|
||||
|
||||
virtual QString buildDirectory(const QString &buildConfiguration) const;
|
||||
|
||||
virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
|
||||
virtual QList<ProjectExplorer::BuildStepConfigWidget*> subConfigWidgets();
|
||||
virtual ProjectExplorer::BuildConfigWidget *createConfigWidget();
|
||||
virtual QList<ProjectExplorer::BuildConfigWidget*> subConfigWidgets();
|
||||
|
||||
// This method is called for new build configurations
|
||||
// You should probably set some default values in this method
|
||||
@@ -204,7 +204,7 @@ private:
|
||||
QString m_fileName;
|
||||
};
|
||||
|
||||
class CMakeBuildSettingsWidget : public ProjectExplorer::BuildStepConfigWidget
|
||||
class CMakeBuildSettingsWidget : public ProjectExplorer::BuildConfigWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
@@ -145,6 +145,18 @@ void MakeStep::setAdditionalArguments(const QString &buildConfiguration, const Q
|
||||
setValue(buildConfiguration, "additionalArguments", list);
|
||||
}
|
||||
|
||||
// TODO
|
||||
//QString MakeStep::oneLineSummary(const QString &buildConfiguration)
|
||||
//{
|
||||
// QStringList arguments = value(buildConfiguration, "buildTargets").toStringList();
|
||||
// arguments << additionalArguments(buildConfiguration);
|
||||
// return tr("<b>%1 %2</b> in %3").arg(
|
||||
// m_pro->toolChain(buildConfiguration)->makeCommand(),
|
||||
// arguments.join(" "),
|
||||
// m_pro->buildDirectory(buildConfiguration));
|
||||
//
|
||||
//}
|
||||
|
||||
//
|
||||
// MakeStepConfigWidget
|
||||
//
|
||||
@@ -214,6 +226,12 @@ void MakeStepConfigWidget::init(const QString &buildConfiguration)
|
||||
m_additionalArguments->setText(ProjectExplorer::Environment::joinArgumentList(m_makeStep->additionalArguments(m_buildConfiguration)));
|
||||
}
|
||||
|
||||
QString MakeStepConfigWidget::summaryText() const
|
||||
{
|
||||
// TODO
|
||||
return tr("<b>Make:</b>");
|
||||
}
|
||||
|
||||
//
|
||||
// MakeStepFactory
|
||||
//
|
||||
|
||||
@@ -78,6 +78,7 @@ public:
|
||||
MakeStepConfigWidget(MakeStep *makeStep);
|
||||
virtual QString displayName() const;
|
||||
virtual void init(const QString &buildConfiguration);
|
||||
virtual QString summaryText() const;
|
||||
private slots:
|
||||
void itemChanged(QListWidgetItem*);
|
||||
void additionalArgumentsEdited();
|
||||
|
||||
Reference in New Issue
Block a user