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();
|
||||
|
||||
@@ -193,6 +193,12 @@ void GenericMakeStepConfigWidget::init(const QString &buildConfiguration)
|
||||
connect(m_ui->targetsList, SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(itemChanged(QListWidgetItem*)));
|
||||
}
|
||||
|
||||
QString GenericMakeStepConfigWidget::summaryText() const
|
||||
{
|
||||
// TODO
|
||||
return tr("<b>Make:</b>");
|
||||
}
|
||||
|
||||
void GenericMakeStepConfigWidget::itemChanged(QListWidgetItem *item)
|
||||
{
|
||||
QTC_ASSERT(!m_buildConfiguration.isNull(), return);
|
||||
|
||||
@@ -73,6 +73,7 @@ public:
|
||||
GenericMakeStepConfigWidget(GenericMakeStep *makeStep);
|
||||
virtual QString displayName() const;
|
||||
virtual void init(const QString &buildConfiguration);
|
||||
virtual QString summaryText() const;
|
||||
private slots:
|
||||
void itemChanged(QListWidgetItem*);
|
||||
void makeLineEditTextEdited();
|
||||
|
||||
@@ -427,14 +427,14 @@ QString GenericProject::buildDirectory(const QString &buildConfiguration) const
|
||||
return buildDirectory;
|
||||
}
|
||||
|
||||
ProjectExplorer::BuildStepConfigWidget *GenericProject::createConfigWidget()
|
||||
ProjectExplorer::BuildConfigWidget *GenericProject::createConfigWidget()
|
||||
{
|
||||
return new GenericBuildSettingsWidget(this);
|
||||
}
|
||||
|
||||
QList<ProjectExplorer::BuildStepConfigWidget*> GenericProject::subConfigWidgets()
|
||||
QList<ProjectExplorer::BuildConfigWidget*> GenericProject::subConfigWidgets()
|
||||
{
|
||||
return QList<ProjectExplorer::BuildStepConfigWidget*>();
|
||||
return QList<ProjectExplorer::BuildConfigWidget*>();
|
||||
}
|
||||
|
||||
void GenericProject::newBuildConfiguration(const QString &buildConfiguration)
|
||||
|
||||
@@ -82,8 +82,8 @@ public:
|
||||
virtual ProjectExplorer::Environment environment(const QString &buildConfiguration) const;
|
||||
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();
|
||||
|
||||
virtual void newBuildConfiguration(const QString &buildConfiguration);
|
||||
virtual GenericProjectNode *rootProjectNode() const;
|
||||
@@ -172,7 +172,7 @@ private:
|
||||
QString m_fileName;
|
||||
};
|
||||
|
||||
class GenericBuildSettingsWidget : public ProjectExplorer::BuildStepConfigWidget
|
||||
class GenericBuildSettingsWidget : public ProjectExplorer::BuildConfigWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
@@ -212,14 +212,14 @@ void BuildSettingsWidget::updateBuildSettings()
|
||||
m_removeButton->setEnabled(m_project->buildConfigurations().size() > 1);
|
||||
|
||||
// Add pages
|
||||
BuildStepConfigWidget *generalConfigWidget = m_project->createConfigWidget();
|
||||
BuildConfigWidget *generalConfigWidget = m_project->createConfigWidget();
|
||||
m_subWidgets->addWidget(generalConfigWidget->displayName(), generalConfigWidget);
|
||||
|
||||
m_subWidgets->addWidget(tr("Build Steps"), new BuildStepsPage(m_project));
|
||||
m_subWidgets->addWidget(tr("Clean Steps"), new BuildStepsPage(m_project, true));
|
||||
|
||||
QList<BuildStepConfigWidget *> subConfigWidgets = m_project->subConfigWidgets();
|
||||
foreach (BuildStepConfigWidget *subConfigWidget, subConfigWidgets)
|
||||
QList<BuildConfigWidget *> subConfigWidgets = m_project->subConfigWidgets();
|
||||
foreach (BuildConfigWidget *subConfigWidget, subConfigWidgets)
|
||||
m_subWidgets->addWidget(subConfigWidget->displayName(), subConfigWidget);
|
||||
|
||||
// Add tree items
|
||||
@@ -254,7 +254,7 @@ void BuildSettingsWidget::activeBuildConfigurationChanged()
|
||||
}
|
||||
}
|
||||
foreach (QWidget *widget, m_subWidgets->widgets()) {
|
||||
if (BuildStepConfigWidget *buildStepWidget = qobject_cast<BuildStepConfigWidget*>(widget)) {
|
||||
if (BuildConfigWidget *buildStepWidget = qobject_cast<BuildConfigWidget*>(widget)) {
|
||||
buildStepWidget->init(activeBuildConfiguration);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,8 +131,6 @@ Q_SIGNALS:
|
||||
void addToTaskWindow(const QString &filename, int type, int linenumber, const QString &description);
|
||||
void addToOutputWindow(const QString &string);
|
||||
|
||||
void displayNameChanged(BuildStep *, const QString &displayName);
|
||||
|
||||
private:
|
||||
QList<Internal::BuildConfiguration *> buildConfigurations();
|
||||
void addBuildConfiguration(const QString & name);
|
||||
@@ -164,22 +162,34 @@ public:
|
||||
virtual QString displayNameForName(const QString &name) const = 0;
|
||||
};
|
||||
|
||||
class PROJECTEXPLORER_EXPORT BuildStepConfigWidget
|
||||
class PROJECTEXPLORER_EXPORT BuildConfigWidget
|
||||
: public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
BuildStepConfigWidget()
|
||||
BuildConfigWidget()
|
||||
:QWidget(0)
|
||||
{}
|
||||
|
||||
virtual QString displayName() const = 0;
|
||||
|
||||
// This is called to set up the config widget before showing it
|
||||
// buildConfiguration is QString::null for the non buildConfiguration specific page
|
||||
virtual void init(const QString &buildConfiguration) = 0;
|
||||
};
|
||||
|
||||
class PROJECTEXPLORER_EXPORT BuildStepConfigWidget
|
||||
: public BuildConfigWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
BuildStepConfigWidget()
|
||||
: BuildConfigWidget()
|
||||
{}
|
||||
virtual QString summaryText() const = 0;
|
||||
signals:
|
||||
void updateSummary();
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // BUILDSTEP_H
|
||||
|
||||
@@ -36,67 +36,80 @@
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QtGui/QLabel>
|
||||
#include <QtGui/QPushButton>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
using namespace ProjectExplorer::Internal;
|
||||
|
||||
BuildStepsPage::BuildStepsPage(Project *project, bool clean) :
|
||||
BuildStepConfigWidget(),
|
||||
m_ui(new Ui::BuildStepsPage),
|
||||
BuildConfigWidget(),
|
||||
m_pro(project),
|
||||
m_clean(clean)
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
m_ui->buildStepAddButton->setMenu(new QMenu(this));
|
||||
m_ui->buildStepAddButton->setIcon(QIcon(Core::Constants::ICON_PLUS));
|
||||
m_ui->buildStepRemoveToolButton->setIcon(QIcon(Core::Constants::ICON_MINUS));
|
||||
m_ui->buildStepUpToolButton->setArrowType(Qt::UpArrow);
|
||||
m_ui->buildStepDownToolButton->setArrowType(Qt::DownArrow);
|
||||
|
||||
connect(m_ui->buildSettingsList, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)),
|
||||
this, SLOT(updateBuildStepWidget(QTreeWidgetItem *, QTreeWidgetItem *)));
|
||||
|
||||
connect(m_ui->buildStepAddButton->menu(), SIGNAL(aboutToShow()),
|
||||
this, SLOT(updateAddBuildStepMenu()));
|
||||
|
||||
connect(m_ui->buildStepAddButton, SIGNAL(clicked()),
|
||||
this, SLOT(addBuildStep()));
|
||||
connect(m_ui->buildStepRemoveToolButton, SIGNAL(clicked()),
|
||||
this, SLOT(removeBuildStep()));
|
||||
connect(m_ui->buildStepUpToolButton, SIGNAL(clicked()),
|
||||
this, SLOT(upBuildStep()));
|
||||
connect(m_ui->buildStepDownToolButton, SIGNAL(clicked()),
|
||||
this, SLOT(downBuildStep()));
|
||||
|
||||
// Remove dummy pages
|
||||
while (QWidget *widget = m_ui->buildSettingsWidget->currentWidget()) {
|
||||
m_ui->buildSettingsWidget->removeWidget(widget);
|
||||
delete widget;
|
||||
}
|
||||
|
||||
// Add buildsteps
|
||||
m_vbox = new QVBoxLayout(this);
|
||||
m_vbox->setContentsMargins(20, 0, 0, 0);
|
||||
const QList<BuildStep *> &steps = m_clean ? m_pro->cleanSteps() : m_pro->buildSteps();
|
||||
foreach (BuildStep *bs, steps) {
|
||||
connect(bs, SIGNAL(displayNameChanged(BuildStep *, QString)),
|
||||
this, SLOT(displayNameChanged(BuildStep *,QString)));
|
||||
|
||||
QTreeWidgetItem *buildStepItem = new QTreeWidgetItem();
|
||||
buildStepItem->setText(0, bs->displayName());
|
||||
m_ui->buildSettingsWidget->addWidget(bs->createConfigWidget());
|
||||
m_ui->buildSettingsList->invisibleRootItem()->addChild(buildStepItem);
|
||||
addBuildStepWidget(-1, bs);
|
||||
}
|
||||
|
||||
m_noStepsLabel = new QLabel(tr("No Build Steps"), this);
|
||||
m_noStepsLabel->setVisible(steps.isEmpty());
|
||||
m_vbox->addWidget(m_noStepsLabel);
|
||||
|
||||
QHBoxLayout *hboxLayout = new QHBoxLayout();
|
||||
m_addButton = new QPushButton(this);
|
||||
m_addButton->setText(tr("Add build step"));
|
||||
m_addButton->setMenu(new QMenu(this));
|
||||
hboxLayout->addWidget(m_addButton);
|
||||
|
||||
m_removeButton = new QPushButton(this);
|
||||
m_removeButton->setText(tr("Remove build step"));
|
||||
m_removeButton->setMenu(new QMenu(this));
|
||||
hboxLayout->addWidget(m_removeButton);
|
||||
hboxLayout->addStretch(10);
|
||||
|
||||
m_vbox->addLayout(hboxLayout);
|
||||
|
||||
updateBuildStepButtonsState();
|
||||
|
||||
connect(m_addButton->menu(), SIGNAL(aboutToShow()),
|
||||
this, SLOT(updateAddBuildStepMenu()));
|
||||
|
||||
connect(m_removeButton->menu(), SIGNAL(aboutToShow()),
|
||||
this, SLOT(updateRemoveBuildStepMenu()));
|
||||
}
|
||||
|
||||
BuildStepsPage::~BuildStepsPage()
|
||||
{
|
||||
// Also deletes all added widgets
|
||||
delete m_ui;
|
||||
foreach(BuildStepsWidgetStruct s, m_buildSteps) {
|
||||
delete s.detailsLabel;
|
||||
delete s.upButton;
|
||||
delete s.downButton;
|
||||
delete s.detailsButton;
|
||||
delete s.hbox;
|
||||
delete s.widget;
|
||||
}
|
||||
m_buildSteps.clear();
|
||||
}
|
||||
|
||||
void BuildStepsPage::displayNameChanged(BuildStep *bs, const QString & /* displayName */)
|
||||
void BuildStepsPage::toggleDetails()
|
||||
{
|
||||
int index = m_clean ? m_pro->cleanSteps().indexOf(bs) : m_pro->buildSteps().indexOf(bs);
|
||||
m_ui->buildSettingsList->invisibleRootItem()->child(index)->setText(0, bs->displayName());
|
||||
QToolButton *tb = qobject_cast<QToolButton *>(sender());
|
||||
if (tb)
|
||||
foreach(const BuildStepsWidgetStruct &s, m_buildSteps)
|
||||
if (s.detailsButton == tb)
|
||||
s.widget->setVisible(!s.widget->isVisible());
|
||||
}
|
||||
|
||||
void BuildStepsPage::updateSummary()
|
||||
{
|
||||
BuildStepConfigWidget *widget = qobject_cast<BuildStepConfigWidget *>(sender());
|
||||
if (widget)
|
||||
foreach(const BuildStepsWidgetStruct &s, m_buildSteps)
|
||||
if (s.widget == widget)
|
||||
s.detailsLabel->setText(widget->summaryText());
|
||||
}
|
||||
|
||||
QString BuildStepsPage::displayName() const
|
||||
@@ -108,33 +121,13 @@ void BuildStepsPage::init(const QString &buildConfiguration)
|
||||
{
|
||||
m_configuration = buildConfiguration;
|
||||
|
||||
m_ui->buildSettingsList->setCurrentItem(m_ui->buildSettingsList->invisibleRootItem()->child(0));
|
||||
// make sure widget is updated
|
||||
if (m_ui->buildSettingsWidget->currentWidget()) {
|
||||
BuildStepConfigWidget *widget = qobject_cast<BuildStepConfigWidget *>(m_ui->buildSettingsWidget->currentWidget());
|
||||
widget->init(m_configuration);
|
||||
foreach(BuildStepsWidgetStruct s, m_buildSteps) {
|
||||
s.widget->init(m_configuration);
|
||||
s.detailsLabel->setText(s.widget->summaryText());
|
||||
}
|
||||
}
|
||||
|
||||
/* switch from one tree item / build step to another */
|
||||
void BuildStepsPage::updateBuildStepWidget(QTreeWidgetItem *newItem, QTreeWidgetItem *oldItem)
|
||||
{
|
||||
if (oldItem == newItem)
|
||||
return;
|
||||
Q_ASSERT(m_pro);
|
||||
|
||||
if (newItem) {
|
||||
int row = m_ui->buildSettingsList->indexOfTopLevelItem(newItem);
|
||||
m_ui->buildSettingsWidget->setCurrentIndex(row);
|
||||
m_ui->groupBox->setTitle(newItem->text(0));
|
||||
BuildStepConfigWidget *widget = qobject_cast<BuildStepConfigWidget *>(m_ui->buildSettingsWidget->currentWidget());
|
||||
Q_ASSERT(widget);
|
||||
widget->init(m_configuration);
|
||||
}
|
||||
updateBuildStepButtonsState();
|
||||
}
|
||||
|
||||
|
||||
void BuildStepsPage::updateAddBuildStepMenu()
|
||||
{
|
||||
QMap<QString, QPair<QString, IBuildStepFactory *> > map;
|
||||
@@ -148,7 +141,7 @@ void BuildStepsPage::updateAddBuildStepMenu()
|
||||
}
|
||||
|
||||
// Ask the user which one to add
|
||||
QMenu *menu = m_ui->buildStepAddButton->menu();
|
||||
QMenu *menu = m_addButton->menu();
|
||||
m_addBuildStepHash.clear();
|
||||
menu->clear();
|
||||
if (!map.isEmpty()) {
|
||||
@@ -164,119 +157,165 @@ void BuildStepsPage::updateAddBuildStepMenu()
|
||||
}
|
||||
}
|
||||
|
||||
void BuildStepsPage::addBuildStepWidget(int pos, BuildStep *step)
|
||||
{
|
||||
// create everything
|
||||
BuildStepsWidgetStruct s;
|
||||
s.widget = step->createConfigWidget();
|
||||
s.detailsLabel = new QLabel(this);
|
||||
s.detailsLabel->setText(s.widget->summaryText());
|
||||
s.upButton = new QToolButton(this);
|
||||
s.upButton->setArrowType(Qt::UpArrow);
|
||||
s.downButton = new QToolButton(this);
|
||||
s.downButton->setArrowType(Qt::DownArrow);
|
||||
s.detailsButton = new QToolButton(this);
|
||||
s.detailsButton->setText(tr("Details"));
|
||||
|
||||
// layout
|
||||
s.hbox = new QHBoxLayout();
|
||||
s.hbox->addWidget(s.detailsLabel);
|
||||
s.hbox->addWidget(s.upButton);
|
||||
s.hbox->addWidget(s.downButton);
|
||||
s.hbox->addWidget(s.detailsButton);
|
||||
|
||||
if (pos == -1)
|
||||
m_buildSteps.append(s);
|
||||
else
|
||||
m_buildSteps.insert(pos, s);
|
||||
|
||||
if (pos == -1) {
|
||||
m_vbox->addLayout(s.hbox);
|
||||
m_vbox->addWidget(s.widget);
|
||||
} else {
|
||||
m_vbox->insertLayout(pos *2, s.hbox);
|
||||
m_vbox->insertWidget(pos *2 + 1, s.widget);
|
||||
}
|
||||
s.widget->hide();
|
||||
|
||||
// connect
|
||||
connect(s.detailsButton, SIGNAL(clicked()),
|
||||
this, SLOT(toggleDetails()));
|
||||
|
||||
connect(s.widget, SIGNAL(updateSummary()),
|
||||
this, SLOT(updateSummary()));
|
||||
|
||||
connect(s.upButton, SIGNAL(clicked()),
|
||||
this, SLOT(upBuildStep()));
|
||||
connect(s.downButton, SIGNAL(clicked()),
|
||||
this, SLOT(downBuildStep()));
|
||||
}
|
||||
|
||||
void BuildStepsPage::addBuildStep()
|
||||
{
|
||||
if (QAction *action = qobject_cast<QAction *>(sender())) {
|
||||
QPair<QString, IBuildStepFactory *> pair = m_addBuildStepHash.value(action);
|
||||
BuildStep *newStep = pair.second->create(m_pro, pair.first);
|
||||
m_clean ? m_pro->insertCleanStep(0, newStep) : m_pro->insertBuildStep(0, newStep);
|
||||
QTreeWidgetItem *buildStepItem = new QTreeWidgetItem();
|
||||
buildStepItem->setText(0, newStep->displayName());
|
||||
m_ui->buildSettingsList->invisibleRootItem()->insertChild(0, buildStepItem);
|
||||
m_ui->buildSettingsWidget->insertWidget(0, newStep->createConfigWidget());
|
||||
m_ui->buildSettingsList->setCurrentItem(buildStepItem);
|
||||
int pos = m_clean ? m_pro->cleanSteps().count() : m_pro->buildSteps().count();
|
||||
m_clean ? m_pro->insertCleanStep(pos, newStep) : m_pro->insertBuildStep(pos, newStep);
|
||||
|
||||
connect(newStep, SIGNAL(displayNameChanged(BuildStep *, QString)),
|
||||
this, SLOT(displayNameChanged(BuildStep *,QString)));
|
||||
addBuildStepWidget(pos, newStep);
|
||||
const BuildStepsWidgetStruct s = m_buildSteps.at(pos);
|
||||
s.widget->init(m_configuration);
|
||||
s.detailsLabel->setText(s.widget->summaryText());
|
||||
}
|
||||
}
|
||||
|
||||
void BuildStepsPage::updateRemoveBuildStepMenu()
|
||||
{
|
||||
QMenu *menu = m_removeButton->menu();
|
||||
menu->clear();
|
||||
const QList<BuildStep *> &steps = m_clean ? m_pro->cleanSteps() : m_pro->buildSteps();
|
||||
foreach(BuildStep *step, steps) {
|
||||
QAction *action = menu->addAction(step->displayName());
|
||||
if (step->immutable())
|
||||
action->setEnabled(false);
|
||||
connect(action, SIGNAL(triggered()),
|
||||
this, SLOT(removeBuildStep()));
|
||||
}
|
||||
}
|
||||
|
||||
void BuildStepsPage::removeBuildStep()
|
||||
{
|
||||
int pos = m_ui->buildSettingsList->currentIndex().row();
|
||||
const QList<BuildStep *> &steps = m_clean ? m_pro->cleanSteps() : m_pro->buildSteps();
|
||||
if (steps.at(pos)->immutable())
|
||||
return;
|
||||
bool blockSignals = m_ui->buildSettingsList->blockSignals(true);
|
||||
delete m_ui->buildSettingsList->invisibleRootItem()->takeChild(pos);
|
||||
m_ui->buildSettingsList->blockSignals(blockSignals);
|
||||
QWidget *widget = m_ui->buildSettingsWidget->widget(pos);
|
||||
m_ui->buildSettingsWidget->removeWidget(widget);
|
||||
delete widget;
|
||||
if (pos < m_ui->buildSettingsList->invisibleRootItem()->childCount())
|
||||
m_ui->buildSettingsList->setCurrentItem(m_ui->buildSettingsList->invisibleRootItem()->child(pos));
|
||||
else
|
||||
m_ui->buildSettingsList->setCurrentItem(m_ui->buildSettingsList->invisibleRootItem()->child(pos - 1));
|
||||
m_clean ? m_pro->removeCleanStep(pos) : m_pro->removeBuildStep(pos);
|
||||
updateBuildStepButtonsState();
|
||||
QAction *action = qobject_cast<QAction *>(sender());
|
||||
if (action) {
|
||||
int pos = m_removeButton->menu()->actions().indexOf(action);
|
||||
qDebug()<<"pos:"<<pos;
|
||||
|
||||
const QList<BuildStep *> &steps = m_clean ? m_pro->cleanSteps() : m_pro->buildSteps();
|
||||
if (steps.at(pos)->immutable())
|
||||
return;
|
||||
|
||||
BuildStepsWidgetStruct s = m_buildSteps.at(pos);
|
||||
delete s.detailsLabel;
|
||||
delete s.upButton;
|
||||
delete s.downButton;
|
||||
delete s.detailsButton;
|
||||
delete s.hbox;
|
||||
delete s.widget;
|
||||
m_buildSteps.removeAt(pos);
|
||||
m_clean ? m_pro->removeCleanStep(pos) : m_pro->removeBuildStep(pos);
|
||||
}
|
||||
}
|
||||
|
||||
void BuildStepsPage::upBuildStep()
|
||||
{
|
||||
int pos = m_ui->buildSettingsList->currentIndex().row();
|
||||
if (pos < 1)
|
||||
return;
|
||||
if (pos > m_ui->buildSettingsList->invisibleRootItem()->childCount()-1)
|
||||
return;
|
||||
const QList<BuildStep *> &steps = m_clean ? m_pro->cleanSteps() : m_pro->buildSteps();
|
||||
if (steps.at(pos)->immutable() && steps.at(pos-1)->immutable())
|
||||
int pos = -1;
|
||||
QToolButton *tb = qobject_cast<QToolButton *>(sender());
|
||||
if (!tb)
|
||||
return;
|
||||
|
||||
for (int i=0; i<m_buildSteps.count(); ++i) {
|
||||
if (m_buildSteps.at(i).upButton == tb) {
|
||||
pos = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (pos == -1)
|
||||
return;
|
||||
|
||||
bool blockSignals = m_ui->buildSettingsList->blockSignals(true);
|
||||
m_clean ? m_pro->moveCleanStepUp(pos) : m_pro->moveBuildStepUp(pos);
|
||||
stepMoveUp(pos);
|
||||
QTreeWidgetItem *item = m_ui->buildSettingsList->invisibleRootItem()->child(pos - 1);
|
||||
m_ui->buildSettingsList->blockSignals(blockSignals);
|
||||
m_ui->buildSettingsList->setCurrentItem(item);
|
||||
updateBuildStepButtonsState();
|
||||
}
|
||||
|
||||
void BuildStepsPage::downBuildStep()
|
||||
{
|
||||
int pos = m_ui->buildSettingsList->currentIndex().row() + 1;
|
||||
if (pos < 1)
|
||||
return;
|
||||
if (pos > m_ui->buildSettingsList->invisibleRootItem()->childCount() - 1)
|
||||
return;
|
||||
const QList<BuildStep *> &steps = m_clean ? m_pro->cleanSteps() : m_pro->buildSteps();
|
||||
if (steps.at(pos)->immutable() && steps.at(pos - 1)->immutable())
|
||||
int pos = -1;
|
||||
QToolButton *tb = qobject_cast<QToolButton *>(sender());
|
||||
if (!tb)
|
||||
return;
|
||||
|
||||
bool blockSignals = m_ui->buildSettingsList->blockSignals(true);
|
||||
m_clean ? m_pro->moveCleanStepUp(pos) : m_pro->moveBuildStepUp(pos);
|
||||
stepMoveUp(pos);
|
||||
QTreeWidgetItem *item = m_ui->buildSettingsList->invisibleRootItem()->child(pos);
|
||||
m_ui->buildSettingsList->blockSignals(blockSignals);
|
||||
m_ui->buildSettingsList->setCurrentItem(item);
|
||||
updateBuildStepButtonsState();
|
||||
}
|
||||
|
||||
void BuildStepsPage::changeEvent(QEvent *e)
|
||||
{
|
||||
BuildStepConfigWidget::changeEvent(e);
|
||||
switch (e->type()) {
|
||||
case QEvent::LanguageChange:
|
||||
m_ui->retranslateUi(this);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
for (int i=0; i<m_buildSteps.count(); ++i) {
|
||||
if (m_buildSteps.at(i).downButton == tb) {
|
||||
pos = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (pos == -1)
|
||||
return;
|
||||
|
||||
stepMoveUp(pos + 1);
|
||||
updateBuildStepButtonsState();
|
||||
}
|
||||
|
||||
void BuildStepsPage::stepMoveUp(int pos)
|
||||
{
|
||||
QWidget *widget = m_ui->buildSettingsWidget->widget(pos);
|
||||
m_ui->buildSettingsWidget->removeWidget(widget);
|
||||
m_ui->buildSettingsWidget->insertWidget(pos -1, widget);
|
||||
QTreeWidgetItem *item = m_ui->buildSettingsList->invisibleRootItem()->takeChild(pos);
|
||||
m_ui->buildSettingsList->invisibleRootItem()->insertChild(pos - 1, item);
|
||||
m_clean ? m_pro->moveCleanStepUp(pos) : m_pro->moveBuildStepUp(pos);
|
||||
|
||||
m_buildSteps.at(pos).hbox->setParent(0);
|
||||
m_vbox->insertLayout((pos - 1) * 2, m_buildSteps.at(pos).hbox);
|
||||
m_vbox->insertWidget((pos - 1) * 2 + 1, m_buildSteps.at(pos).widget);
|
||||
|
||||
BuildStepsWidgetStruct tmp = m_buildSteps.at(pos -1);
|
||||
m_buildSteps[pos -1] = m_buildSteps.at(pos);
|
||||
m_buildSteps[pos] = tmp;
|
||||
}
|
||||
|
||||
void BuildStepsPage::updateBuildStepButtonsState()
|
||||
{
|
||||
int pos = m_ui->buildSettingsList->currentIndex().row();
|
||||
if (pos == -1) {
|
||||
m_ui->buildStepRemoveToolButton->setEnabled(false);
|
||||
m_ui->buildStepUpToolButton->setEnabled(false);
|
||||
m_ui->buildStepDownToolButton->setEnabled(false);
|
||||
} else {
|
||||
const QList<BuildStep *> &steps = m_clean ? m_pro->cleanSteps() : m_pro->buildSteps();
|
||||
m_ui->buildStepRemoveToolButton->setEnabled(!steps.at(pos)->immutable());
|
||||
bool enableUp = pos>0 && !(steps.at(pos)->immutable() && steps.at(pos-1)->immutable());
|
||||
m_ui->buildStepUpToolButton->setEnabled(enableUp);
|
||||
bool enableDown = pos < (m_ui->buildSettingsList->invisibleRootItem()->childCount() - 1) &&
|
||||
!(steps.at(pos)->immutable() && steps.at(pos+1)->immutable());
|
||||
m_ui->buildStepDownToolButton->setEnabled(enableDown);
|
||||
const QList<BuildStep *> &steps = m_clean ? m_pro->cleanSteps() : m_pro->buildSteps();
|
||||
for(int i=0; i<m_buildSteps.count(); ++i) {
|
||||
BuildStepsWidgetStruct s = m_buildSteps.at(i);
|
||||
s.upButton->setEnabled((i>0) && !(steps.at(i)->immutable() && steps.at(i - 1)));
|
||||
s.downButton->setEnabled((i + 1< steps.count()) && !(steps.at(i)->immutable() && steps.at(i + 1)->immutable()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,11 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QTreeWidgetItem;
|
||||
class QHBoxLayout;
|
||||
class QPushButton;
|
||||
class QToolButton;
|
||||
class QLabel;
|
||||
class QVBoxLayout;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace ProjectExplorer {
|
||||
@@ -46,7 +51,18 @@ namespace Ui {
|
||||
class BuildStepsPage;
|
||||
}
|
||||
|
||||
class BuildStepsPage : public BuildStepConfigWidget {
|
||||
struct BuildStepsWidgetStruct
|
||||
{
|
||||
BuildStepConfigWidget *widget;
|
||||
QLabel *detailsLabel;
|
||||
QToolButton *detailsButton;
|
||||
QToolButton *upButton;
|
||||
QToolButton *downButton;
|
||||
QHBoxLayout *hbox;
|
||||
};
|
||||
|
||||
class BuildStepsPage : public BuildConfigWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(BuildStepsPage)
|
||||
public:
|
||||
@@ -56,27 +72,34 @@ public:
|
||||
QString displayName() const;
|
||||
void init(const QString &buildConfiguration);
|
||||
|
||||
protected:
|
||||
virtual void changeEvent(QEvent *e);
|
||||
|
||||
private slots:
|
||||
void displayNameChanged(BuildStep *bs, const QString &displayName);
|
||||
void updateBuildStepWidget(QTreeWidgetItem *newItem, QTreeWidgetItem *oldItem);
|
||||
void updateAddBuildStepMenu();
|
||||
void addBuildStep();
|
||||
void updateRemoveBuildStepMenu();
|
||||
void removeBuildStep();
|
||||
void upBuildStep();
|
||||
void downBuildStep();
|
||||
void toggleDetails();
|
||||
void updateSummary();
|
||||
|
||||
private:
|
||||
void stepMoveUp(int pos);
|
||||
void updateBuildStepButtonsState();
|
||||
void addBuildStepWidget(int pos, BuildStep *step);
|
||||
|
||||
Ui::BuildStepsPage *m_ui;
|
||||
Project *m_pro;
|
||||
QString m_configuration;
|
||||
QHash<QAction *, QPair<QString, ProjectExplorer::IBuildStepFactory *> > m_addBuildStepHash;
|
||||
bool m_clean;
|
||||
|
||||
QList<QHBoxLayout *> m_titleLayouts;
|
||||
QList<BuildStepsWidgetStruct> m_buildSteps;
|
||||
|
||||
QVBoxLayout *m_vbox;
|
||||
|
||||
QLabel *m_noStepsLabel;
|
||||
QPushButton *m_addButton;
|
||||
QPushButton *m_removeButton;
|
||||
};
|
||||
|
||||
} // Internal
|
||||
|
||||
@@ -36,12 +36,14 @@
|
||||
#include <QtCore/QVector>
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtCore/QAbstractListModel>
|
||||
#include <QtGui/QLabel>
|
||||
#include <QtGui/QHBoxLayout>
|
||||
#include <QtGui/QTreeView>
|
||||
#include <QtGui/QSpacerItem>
|
||||
#include <QtGui/QHeaderView>
|
||||
#include <QtGui/QMessageBox>
|
||||
#include <QtGui/QPushButton>
|
||||
#include <QtGui/QToolButton>
|
||||
#include <QtCore/QCoreApplication>
|
||||
|
||||
namespace ProjectExplorer {
|
||||
@@ -73,7 +75,6 @@ DependenciesModel::~DependenciesModel()
|
||||
|
||||
void DependenciesModel::resetModel()
|
||||
{
|
||||
qDebug()<<"Resetting";
|
||||
m_projects = m_session->projects();
|
||||
m_projects.removeAll(m_project);
|
||||
reset();
|
||||
@@ -110,7 +111,7 @@ bool DependenciesModel::setData(const QModelIndex &index, const QVariant &value,
|
||||
qDebug() << index << value << role << value.toBool();
|
||||
|
||||
if (role == Qt::CheckStateRole) {
|
||||
const Project *p = m_projects.at(index.row());
|
||||
Project *p = m_projects.at(index.row());
|
||||
const Qt::CheckState c = static_cast<Qt::CheckState>(value.toInt());
|
||||
|
||||
if (c == Qt::Checked) {
|
||||
@@ -140,36 +141,155 @@ Qt::ItemFlags DependenciesModel::flags(const QModelIndex &index) const
|
||||
return rc;
|
||||
}
|
||||
|
||||
//
|
||||
// DependenciesView
|
||||
//
|
||||
DependenciesView::DependenciesView(QWidget *parent)
|
||||
: QTreeView(parent)
|
||||
{
|
||||
m_sizeHint = QSize(250, 250);
|
||||
setUniformRowHeights(true);
|
||||
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::MinimumExpanding);
|
||||
setRootIsDecorated(false);
|
||||
}
|
||||
|
||||
DependenciesView::~DependenciesView()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
QSize DependenciesView::sizeHint() const
|
||||
{
|
||||
qDebug()<<"sizeHint()"<<m_sizeHint;
|
||||
return m_sizeHint;
|
||||
}
|
||||
|
||||
void DependenciesView::setModel(QAbstractItemModel *newModel)
|
||||
{
|
||||
if (QAbstractItemModel *oldModel = model()) {
|
||||
disconnect(oldModel, SIGNAL(rowsInserted(QModelIndex,int,int)),
|
||||
this, SLOT(updateSizeHint()));
|
||||
disconnect(oldModel, SIGNAL(rowsRemoved(QModelIndex,int,int)),
|
||||
this, SLOT(updateSizeHint()));
|
||||
disconnect(oldModel, SIGNAL(modelReset()),
|
||||
this, SLOT(updateSizeHint()));
|
||||
disconnect(oldModel, SIGNAL(layoutChanged()),
|
||||
this, SLOT(updateSizeHint()));
|
||||
}
|
||||
|
||||
QTreeView::setModel(newModel);
|
||||
|
||||
if (newModel) {
|
||||
connect(newModel, SIGNAL(rowsInserted(QModelIndex,int,int)),
|
||||
this, SLOT(updateSizeHint()));
|
||||
connect(newModel, SIGNAL(rowsRemoved(QModelIndex,int,int)),
|
||||
this, SLOT(updateSizeHint()));
|
||||
connect(newModel, SIGNAL(modelReset()),
|
||||
this, SLOT(updateSizeHint()));
|
||||
connect(newModel, SIGNAL(layoutChanged()),
|
||||
this, SLOT(updateSizeHint()));
|
||||
}
|
||||
updateSizeHint();
|
||||
}
|
||||
|
||||
void DependenciesView::updateSizeHint()
|
||||
{
|
||||
if (!model()) {
|
||||
m_sizeHint = QSize(250, 250);
|
||||
return;
|
||||
}
|
||||
|
||||
int heightOffset = size().height() - viewport()->height();
|
||||
|
||||
qDebug()<<"updating sizehint";
|
||||
int heightPerRow = sizeHintForRow(0);
|
||||
if (heightPerRow == -1) {
|
||||
qDebug()<<"No row height";
|
||||
heightPerRow = 30;
|
||||
}
|
||||
int rows = qMin(qMax(model()->rowCount(), 2), 10);
|
||||
int height = rows * heightPerRow + heightOffset;
|
||||
if (m_sizeHint.height() != height) {
|
||||
m_sizeHint.setHeight(height);
|
||||
updateGeometry();
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// DependenciesWidget
|
||||
//
|
||||
|
||||
class DependenciesWidget : public QWidget
|
||||
{
|
||||
public:
|
||||
DependenciesWidget(SessionManager *session, Project *project,
|
||||
QWidget *parent = 0);
|
||||
|
||||
private:
|
||||
SessionManager *m_session;
|
||||
DependenciesModel *m_model;
|
||||
};
|
||||
|
||||
DependenciesWidget::DependenciesWidget(SessionManager *session,
|
||||
Project *project,
|
||||
QWidget *parent)
|
||||
: QWidget(parent)
|
||||
, m_session(session)
|
||||
, m_project(project)
|
||||
, m_model(new DependenciesModel(session, project, this))
|
||||
{
|
||||
QHBoxLayout *layout = new QHBoxLayout(this);
|
||||
QVBoxLayout *vbox = new QVBoxLayout(this);
|
||||
vbox->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
QHBoxLayout *hbox = new QHBoxLayout();
|
||||
m_titleLabel = new QLabel(this);
|
||||
m_titleLabel->setText("Dummy Text");
|
||||
hbox->addWidget(m_titleLabel);
|
||||
|
||||
QToolButton *detailsButton = new QToolButton(this);
|
||||
detailsButton->setText(tr("Details"));
|
||||
connect(detailsButton, SIGNAL(clicked()),
|
||||
this, SLOT(toggleDetails()));
|
||||
|
||||
hbox->addWidget(detailsButton);
|
||||
vbox->addLayout(hbox);
|
||||
|
||||
m_detailsWidget = new QWidget(this);
|
||||
QHBoxLayout *layout = new QHBoxLayout(m_detailsWidget);
|
||||
layout->setContentsMargins(0, -1, 0, -1);
|
||||
QTreeView *treeView = new QTreeView(this);
|
||||
DependenciesView *treeView = new DependenciesView(this);
|
||||
treeView->setModel(m_model);
|
||||
treeView->setHeaderHidden(true);
|
||||
treeView->setMinimumHeight(250);
|
||||
layout->addWidget(treeView);
|
||||
layout->addSpacerItem(new QSpacerItem(0, 0 , QSizePolicy::Expanding, QSizePolicy::Fixed));
|
||||
vbox->addWidget(m_detailsWidget);
|
||||
m_detailsWidget->setVisible(false);
|
||||
|
||||
updateDetails();
|
||||
|
||||
connect(session, SIGNAL(dependencyChanged(ProjectExplorer::Project*,ProjectExplorer::Project*)),
|
||||
this, SLOT(updateDetails()));
|
||||
|
||||
connect(session, SIGNAL(projectRemoved(ProjectExplorer::Project*)),
|
||||
this, SLOT(updateDetails()));
|
||||
connect(session, SIGNAL(projectAdded(ProjectExplorer::Project*)),
|
||||
this, SLOT(updateDetails()));
|
||||
connect(session, SIGNAL(sessionLoaded()),
|
||||
this, SLOT(updateDetails()));
|
||||
}
|
||||
|
||||
void DependenciesWidget::toggleDetails()
|
||||
{
|
||||
m_detailsWidget->setVisible(!m_detailsWidget->isVisible());
|
||||
}
|
||||
|
||||
void DependenciesWidget::updateDetails()
|
||||
{
|
||||
QStringList dependsOn;
|
||||
|
||||
foreach(Project *other, m_session->projects()) {
|
||||
if (m_session->hasDependency(m_project, other)) {
|
||||
dependsOn.append(other->name());
|
||||
}
|
||||
}
|
||||
QString text;
|
||||
if (dependsOn.isEmpty()) {
|
||||
text = tr("%1 has no dependencies.").arg(m_project->name());
|
||||
} else if (dependsOn.count() == 1) {
|
||||
text =tr("%1 depends on %2.").arg(m_project->name(), dependsOn.first());
|
||||
} else {
|
||||
text = tr("%1 depends on: %2.").arg(m_project->name(), dependsOn.join(tr(", ")));
|
||||
}
|
||||
m_titleLabel->setText(text);
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -32,7 +32,10 @@
|
||||
|
||||
#include "iprojectproperties.h"
|
||||
|
||||
#include <QtCore/QSize>
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtGui/QLabel>
|
||||
#include <QtGui/QTreeView>
|
||||
|
||||
namespace ProjectExplorer {
|
||||
|
||||
@@ -95,6 +98,38 @@ private:
|
||||
QList<Project *> m_projects;
|
||||
};
|
||||
|
||||
class DependenciesView : public QTreeView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
DependenciesView(QWidget *parent);
|
||||
~DependenciesView();
|
||||
virtual QSize sizeHint() const;
|
||||
virtual void setModel(QAbstractItemModel *model);
|
||||
private slots:
|
||||
void updateSizeHint();
|
||||
private:
|
||||
QSize m_sizeHint;
|
||||
};
|
||||
|
||||
class DependenciesWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
DependenciesWidget(SessionManager *session, Project *project,
|
||||
QWidget *parent = 0);
|
||||
private slots:
|
||||
void toggleDetails();
|
||||
void updateDetails();
|
||||
|
||||
private:
|
||||
SessionManager *m_session;
|
||||
Project *m_project;
|
||||
DependenciesModel *m_model;
|
||||
QWidget *m_detailsWidget;
|
||||
QLabel *m_titleLabel;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
|
||||
@@ -71,7 +71,6 @@ QString ProcessStep::name()
|
||||
void ProcessStep::setDisplayName(const QString &name)
|
||||
{
|
||||
setValue("ProjectExplorer.ProcessStep.DisplayName", name);
|
||||
emit displayNameChanged(this, name);
|
||||
}
|
||||
|
||||
QString ProcessStep::displayName()
|
||||
@@ -142,8 +141,27 @@ ProcessStepConfigWidget::ProcessStepConfigWidget(ProcessStep *step)
|
||||
this, SLOT(nameLineEditTextEdited()));
|
||||
connect(m_ui.commandArgumentsLineEdit, SIGNAL(textEdited(const QString&)),
|
||||
this, SLOT(commandArgumentsLineEditTextEdited()));
|
||||
connect(m_ui.enabledGroupBox, SIGNAL(clicked(bool)),
|
||||
this, SLOT(enabledGroupBoxClicked(bool)));
|
||||
connect(m_ui.enabledCheckBox, SIGNAL(clicked(bool)),
|
||||
this, SLOT(enabledCheckBoxClicked(bool)));
|
||||
|
||||
connect(m_ui.detailsButton, SIGNAL(clicked()),
|
||||
this, SLOT(toggleDetails()));
|
||||
|
||||
m_ui.detailsWidget->setVisible(false);
|
||||
}
|
||||
|
||||
void ProcessStepConfigWidget::updateDetails()
|
||||
{
|
||||
m_summaryText = tr("<b>Process Step</b> %1 %2 %3")
|
||||
.arg(m_step->command(m_buildConfiguration),
|
||||
m_step->arguments(m_buildConfiguration).join(" "),
|
||||
m_step->enabled(m_buildConfiguration) ? "" : tr("(disabled)"));
|
||||
emit updateSummary();
|
||||
}
|
||||
|
||||
void ProcessStepConfigWidget::toggleDetails()
|
||||
{
|
||||
m_ui.detailsWidget->setVisible(!m_ui.detailsWidget->isVisible());
|
||||
}
|
||||
|
||||
QString ProcessStepConfigWidget::displayName() const
|
||||
@@ -163,9 +181,15 @@ void ProcessStepConfigWidget::init(const QString &buildConfiguration)
|
||||
m_ui.workingDirectory->setPath(workingDirectory);
|
||||
|
||||
m_ui.commandArgumentsLineEdit->setText(m_step->arguments(buildConfiguration).join(" "));
|
||||
m_ui.enabledGroupBox->setChecked(m_step->enabled(buildConfiguration));
|
||||
m_ui.enabledCheckBox->setChecked(m_step->enabled(buildConfiguration));
|
||||
}
|
||||
m_ui.nameLineEdit->setText(m_step->displayName());
|
||||
updateDetails();
|
||||
}
|
||||
|
||||
QString ProcessStepConfigWidget::summaryText() const
|
||||
{
|
||||
return m_summaryText;
|
||||
}
|
||||
|
||||
void ProcessStepConfigWidget::nameLineEditTextEdited()
|
||||
@@ -176,6 +200,7 @@ void ProcessStepConfigWidget::nameLineEditTextEdited()
|
||||
void ProcessStepConfigWidget::commandLineEditTextEdited()
|
||||
{
|
||||
m_step->setCommand(m_buildConfiguration, m_ui.command->path());
|
||||
updateDetails();
|
||||
}
|
||||
|
||||
void ProcessStepConfigWidget::workingDirectoryLineEditTextEdited()
|
||||
@@ -188,9 +213,11 @@ void ProcessStepConfigWidget::commandArgumentsLineEditTextEdited()
|
||||
{
|
||||
m_step->setArguments(m_buildConfiguration, m_ui.commandArgumentsLineEdit->text().split(" ",
|
||||
QString::SkipEmptyParts));
|
||||
updateDetails();
|
||||
}
|
||||
|
||||
void ProcessStepConfigWidget::enabledGroupBoxClicked(bool)
|
||||
void ProcessStepConfigWidget::enabledCheckBoxClicked(bool)
|
||||
{
|
||||
m_step->setEnabled(m_buildConfiguration, m_ui.enabledGroupBox->isChecked());
|
||||
m_step->setEnabled(m_buildConfiguration, m_ui.enabledCheckBox->isChecked());
|
||||
updateDetails();
|
||||
}
|
||||
|
||||
@@ -74,16 +74,20 @@ public:
|
||||
ProcessStepConfigWidget(ProcessStep *step);
|
||||
virtual QString displayName() const;
|
||||
virtual void init(const QString &buildConfiguration);
|
||||
virtual QString summaryText() const;
|
||||
private slots:
|
||||
void nameLineEditTextEdited();
|
||||
void commandLineEditTextEdited();
|
||||
void workingDirectoryLineEditTextEdited();
|
||||
void commandArgumentsLineEditTextEdited();
|
||||
void enabledGroupBoxClicked(bool);
|
||||
void enabledCheckBoxClicked(bool);
|
||||
void toggleDetails();
|
||||
private:
|
||||
void updateDetails();
|
||||
QString m_buildConfiguration;
|
||||
ProcessStep *m_step;
|
||||
Ui::ProcessStepWidget m_ui;
|
||||
QString m_summaryText;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -6,85 +6,95 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>509</width>
|
||||
<height>271</height>
|
||||
<width>299</width>
|
||||
<height>154</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="enabledGroupBox">
|
||||
<property name="title">
|
||||
<string>Enable custom process step</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="titleLabel">
|
||||
<property name="text">
|
||||
<string>Custom Process:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="detailsButton">
|
||||
<property name="text">
|
||||
<string>Details</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="detailsWidget" native="true">
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Enable Custom Process Step</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="enabledCheckBox">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="nameLabel">
|
||||
<property name="text">
|
||||
<string>Name:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="nameLineEdit"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="commandLabel">
|
||||
<property name="text">
|
||||
<string>Command:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="Core::Utils::PathChooser" name="command"/>
|
||||
<item row="2" column="1">
|
||||
<widget class="Core::Utils::PathChooser" name="command" native="true"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="workingDirecoryLabel">
|
||||
<property name="text">
|
||||
<string>Working Directory:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="Core::Utils::PathChooser" name="workingDirectory"/>
|
||||
<item row="3" column="1">
|
||||
<widget class="Core::Utils::PathChooser" name="workingDirectory" native="true"/>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="commandArgumentsLabel">
|
||||
<property name="text">
|
||||
<string>Command Arguments:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="commandArgumentsLineEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
|
||||
@@ -194,9 +194,9 @@ bool Project::restoreSettings()
|
||||
return true;
|
||||
}
|
||||
|
||||
QList<BuildStepConfigWidget*> Project::subConfigWidgets()
|
||||
QList<BuildConfigWidget*> Project::subConfigWidgets()
|
||||
{
|
||||
return QList<BuildStepConfigWidget*>();
|
||||
return QList<BuildConfigWidget*>();
|
||||
}
|
||||
|
||||
void Project::saveSettingsImpl(PersistentSettingsWriter &writer)
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace ProjectExplorer {
|
||||
|
||||
class BuildManager;
|
||||
class BuildStep;
|
||||
class BuildStepConfigWidget;
|
||||
class BuildConfigWidget;
|
||||
class IProjectManager;
|
||||
class RunConfiguration;
|
||||
class EditorConfiguration;
|
||||
@@ -126,8 +126,8 @@ public:
|
||||
void saveSettings();
|
||||
bool restoreSettings();
|
||||
|
||||
virtual BuildStepConfigWidget *createConfigWidget() = 0;
|
||||
virtual QList<BuildStepConfigWidget*> subConfigWidgets();
|
||||
virtual BuildConfigWidget *createConfigWidget() = 0;
|
||||
virtual QList<BuildConfigWidget*> subConfigWidgets();
|
||||
|
||||
/* This method is called for new build configurations. You should probably
|
||||
* set some default values in this method.
|
||||
|
||||
@@ -71,6 +71,7 @@ PanelsWidget::PanelsWidget(QWidget *parent)
|
||||
QWidget *verticalWidget = new QWidget;
|
||||
verticalWidget->setMaximumWidth(800);
|
||||
m_layout = new QVBoxLayout;
|
||||
m_layout->addStretch(10);
|
||||
verticalWidget->setLayout(m_layout);
|
||||
topwidgetLayout->addWidget(verticalWidget);
|
||||
topwidgetLayout->addStretch(10);
|
||||
@@ -95,10 +96,15 @@ void PanelsWidget::addWidget(const QString &name, QWidget *widget)
|
||||
f.setPointSizeF(f.pointSizeF() * 1.4);
|
||||
p.nameLabel->setFont(f);
|
||||
p.panelWidget = widget;
|
||||
m_panels.append(p);
|
||||
|
||||
m_layout->addWidget(p.nameLabel);
|
||||
m_layout->addWidget(p.panelWidget);
|
||||
m_layout->insertWidget(m_layout->count() -1, p.nameLabel);
|
||||
QHBoxLayout *hboxLayout = new QHBoxLayout();
|
||||
hboxLayout->setContentsMargins(20, 0, 0, 0);
|
||||
hboxLayout->addWidget(p.panelWidget);
|
||||
p.marginLayout = hboxLayout;
|
||||
m_layout->insertLayout(m_layout->count() -1, hboxLayout);
|
||||
|
||||
m_panels.append(p);
|
||||
}
|
||||
|
||||
void PanelsWidget::clear()
|
||||
@@ -106,10 +112,74 @@ void PanelsWidget::clear()
|
||||
foreach(Panel p, m_panels) {
|
||||
delete p.nameLabel;
|
||||
delete p.panelWidget;
|
||||
delete p.marginLayout;
|
||||
}
|
||||
m_panels.clear();
|
||||
}
|
||||
|
||||
///
|
||||
// ProjectView
|
||||
///
|
||||
|
||||
ProjectView::ProjectView(QWidget *parent)
|
||||
: QTreeWidget(parent)
|
||||
{
|
||||
m_sizeHint = QSize(250, 250);
|
||||
setUniformRowHeights(true);
|
||||
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||
|
||||
QAbstractItemModel *m = model();
|
||||
connect(m, SIGNAL(rowsInserted(QModelIndex,int,int)),
|
||||
this, SLOT(updateSizeHint()));
|
||||
connect(m, SIGNAL(rowsRemoved(QModelIndex,int,int)),
|
||||
this, SLOT(updateSizeHint()));
|
||||
connect(m, SIGNAL(modelReset()),
|
||||
this, SLOT(updateSizeHint()));
|
||||
connect(m, SIGNAL(layoutChanged()),
|
||||
this, SLOT(updateSizeHint()));
|
||||
updateSizeHint();
|
||||
}
|
||||
|
||||
ProjectView::~ProjectView()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
QSize ProjectView::sizeHint() const
|
||||
{
|
||||
qDebug()<<"sizeHint()"<<m_sizeHint;
|
||||
return m_sizeHint;
|
||||
}
|
||||
|
||||
void ProjectView::updateSizeHint()
|
||||
{
|
||||
if (!model()) {
|
||||
m_sizeHint = QSize(250, 250);
|
||||
return;
|
||||
}
|
||||
|
||||
int heightOffset = size().height() - viewport()->height();
|
||||
qDebug()<<"heightOffset"<<heightOffset;
|
||||
|
||||
qDebug()<<"updating sizehint";
|
||||
int heightPerRow = sizeHintForRow(0);
|
||||
if (heightPerRow == -1) {
|
||||
qDebug()<<"No row height";
|
||||
heightPerRow = 30;
|
||||
}
|
||||
int rows = qMin(qMax(model()->rowCount(), 2), 6);
|
||||
int height = rows * heightPerRow + heightOffset;
|
||||
if (m_sizeHint.height() != height) {
|
||||
m_sizeHint.setHeight(height);
|
||||
updateGeometry();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
// ProjectWindow
|
||||
///
|
||||
|
||||
ProjectWindow::ProjectWindow(QWidget *parent)
|
||||
: QWidget(parent), m_currentItemChanged(false)
|
||||
{
|
||||
@@ -119,7 +189,7 @@ ProjectWindow::ProjectWindow(QWidget *parent)
|
||||
m_projectExplorer = ProjectExplorerPlugin::instance();
|
||||
m_session = m_projectExplorer->session();
|
||||
|
||||
m_treeWidget = new QTreeWidget(this);
|
||||
m_treeWidget = new ProjectView(this);
|
||||
m_treeWidget->setSelectionMode(QAbstractItemView::SingleSelection);
|
||||
m_treeWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
|
||||
m_treeWidget->setFrameStyle(QFrame::NoFrame);
|
||||
@@ -138,27 +208,11 @@ ProjectWindow::ProjectWindow(QWidget *parent)
|
||||
|
||||
m_panelsWidget = new PanelsWidget(this);
|
||||
|
||||
QWidget *dummy = new QWidget;
|
||||
QVBoxLayout *dummyLayout = new QVBoxLayout(dummy);
|
||||
dummyLayout->setMargin(0);
|
||||
dummyLayout->setSpacing(0);
|
||||
dummyLayout->addWidget(new Core::Utils::StyledBar(dummy));
|
||||
dummyLayout->addWidget(m_treeWidget);
|
||||
|
||||
QSplitter *splitter = new Core::MiniSplitter;
|
||||
splitter->setOrientation(Qt::Vertical);
|
||||
splitter->addWidget(dummy);
|
||||
splitter->addWidget(m_panelsWidget);
|
||||
|
||||
// make sure that the tree treewidget has same size policy as qtabwidget
|
||||
m_treeWidget->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred));
|
||||
const int treeWidgetMinSize = m_treeWidget->minimumSizeHint().height();
|
||||
splitter->setSizes(QList<int>() << treeWidgetMinSize << splitter->height() - treeWidgetMinSize);
|
||||
|
||||
QVBoxLayout *topLayout = new QVBoxLayout(this);
|
||||
topLayout->setMargin(0);
|
||||
topLayout->setSpacing(0);
|
||||
topLayout->addWidget(splitter);
|
||||
QVBoxLayout *topLevelLayout = new QVBoxLayout(this);
|
||||
topLevelLayout->setMargin(0);
|
||||
topLevelLayout->addWidget(new Core::Utils::StyledBar(this));
|
||||
topLevelLayout->addWidget(m_treeWidget);
|
||||
topLevelLayout->addWidget(m_panelsWidget);
|
||||
|
||||
connect(m_session, SIGNAL(sessionLoaded()), this, SLOT(restoreStatus()));
|
||||
connect(m_session, SIGNAL(aboutToSaveSession()), this, SLOT(saveStatus()));
|
||||
@@ -167,7 +221,6 @@ ProjectWindow::ProjectWindow(QWidget *parent)
|
||||
connect(m_session, SIGNAL(projectAdded(ProjectExplorer::Project*)), this, SLOT(updateTreeWidgetProjectAdded(ProjectExplorer::Project*)));
|
||||
connect(m_session, SIGNAL(projectRemoved(ProjectExplorer::Project*)), this, SLOT(updateTreeWidgetProjectRemoved(ProjectExplorer::Project*)));
|
||||
connect(m_session, SIGNAL(aboutToRemoveProject(ProjectExplorer::Project*)), this, SLOT(updateTreeWidgetAboutToRemoveProject(ProjectExplorer::Project*)));
|
||||
|
||||
}
|
||||
|
||||
ProjectWindow::~ProjectWindow()
|
||||
|
||||
@@ -32,14 +32,15 @@
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtGui/QScrollArea>
|
||||
#include <QtGui/QTreeWidget>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QLabel;
|
||||
class QVBoxLayout;
|
||||
class QModelIndex;
|
||||
class QTabWidget;
|
||||
class QTreeWidget;
|
||||
class QTreeWidgetItem;
|
||||
class QHBoxLayout;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace ProjectExplorer {
|
||||
@@ -68,11 +69,26 @@ private:
|
||||
{
|
||||
QLabel *nameLabel;
|
||||
QWidget *panelWidget;
|
||||
QHBoxLayout *marginLayout;
|
||||
};
|
||||
QVBoxLayout *m_layout;
|
||||
QList<Panel> m_panels;
|
||||
};
|
||||
|
||||
|
||||
class ProjectView : public QTreeWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ProjectView (QWidget *parent);
|
||||
~ProjectView ();
|
||||
virtual QSize sizeHint() const;
|
||||
private slots:
|
||||
void updateSizeHint();
|
||||
private:
|
||||
QSize m_sizeHint;
|
||||
};
|
||||
|
||||
class ProjectWindow : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -98,13 +114,14 @@ private:
|
||||
SessionManager *m_session;
|
||||
ProjectExplorerPlugin *m_projectExplorer;
|
||||
|
||||
QTreeWidget* m_treeWidget;
|
||||
ProjectView* m_treeWidget;
|
||||
PanelsWidget *m_panelsWidget;
|
||||
|
||||
Project *findProject(const QString &path) const;
|
||||
bool m_currentItemChanged;
|
||||
};
|
||||
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
|
||||
@@ -484,7 +484,7 @@ bool SessionManager::canAddDependency(const Project *project, const Project *dep
|
||||
return recursiveDependencyCheck(newDep, checkDep);
|
||||
}
|
||||
|
||||
bool SessionManager::addDependency(const Project *project, const Project *depProject)
|
||||
bool SessionManager::addDependency(Project *project, Project *depProject)
|
||||
{
|
||||
const QString &proName = project->file()->fileName();
|
||||
const QString &depName = depProject->file()->fileName();
|
||||
@@ -498,11 +498,12 @@ bool SessionManager::addDependency(const Project *project, const Project *depPro
|
||||
proDeps.append(depName);
|
||||
m_file->m_depMap[proName] = proDeps;
|
||||
}
|
||||
emit dependencyChanged(project, depProject);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void SessionManager::removeDependency(const Project *project, const Project *depProject)
|
||||
void SessionManager::removeDependency(Project *project, Project *depProject)
|
||||
{
|
||||
const QString &proName = project->file()->fileName();
|
||||
const QString &depName = depProject->file()->fileName();
|
||||
@@ -514,6 +515,7 @@ void SessionManager::removeDependency(const Project *project, const Project *dep
|
||||
} else {
|
||||
m_file->m_depMap[proName] = proDeps;
|
||||
}
|
||||
emit dependencyChanged(project, depProject);
|
||||
}
|
||||
|
||||
void SessionManager::setStartupProject(Project *startupProject)
|
||||
|
||||
@@ -122,8 +122,8 @@ public:
|
||||
QList<Project *> dependencies(const Project *project) const;
|
||||
bool hasDependency(const Project *project, const Project *depProject) const;
|
||||
bool canAddDependency(const Project *project, const Project *depProject) const;
|
||||
bool addDependency(const Project *project, const Project *depProject);
|
||||
void removeDependency(const Project *project, const Project *depProject);
|
||||
bool addDependency(Project *project, Project *depProject);
|
||||
void removeDependency(Project *project, Project *depProject);
|
||||
|
||||
Core::IFile *file() const;
|
||||
Project *startupProject() const;
|
||||
@@ -162,6 +162,7 @@ signals:
|
||||
void sessionUnloaded();
|
||||
void sessionLoaded();
|
||||
void aboutToSaveSession();
|
||||
void dependencyChanged(ProjectExplorer::Project *a, ProjectExplorer::Project *b);
|
||||
|
||||
private slots:
|
||||
void saveActiveMode(Core::IMode *mode);
|
||||
|
||||
@@ -129,6 +129,11 @@ void QmlMakeStepConfigWidget::init(const QString &)
|
||||
{
|
||||
}
|
||||
|
||||
QString QmlMakeStepConfigWidget::summaryText() const
|
||||
{
|
||||
return tr("<b>QML Make</b>");
|
||||
}
|
||||
|
||||
//
|
||||
// QmlMakeStepFactory
|
||||
//
|
||||
|
||||
@@ -78,6 +78,7 @@ public:
|
||||
|
||||
virtual QString displayName() const;
|
||||
virtual void init(const QString &buildConfiguration);
|
||||
virtual QString summaryText() const;
|
||||
|
||||
private:
|
||||
QmlMakeStep *m_makeStep;
|
||||
|
||||
@@ -200,14 +200,14 @@ QString QmlProject::buildDirectory(const QString &) const
|
||||
return QString();
|
||||
}
|
||||
|
||||
ProjectExplorer::BuildStepConfigWidget *QmlProject::createConfigWidget()
|
||||
ProjectExplorer::BuildConfigWidget *QmlProject::createConfigWidget()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
QList<ProjectExplorer::BuildStepConfigWidget*> QmlProject::subConfigWidgets()
|
||||
QList<ProjectExplorer::BuildConfigWidget*> QmlProject::subConfigWidgets()
|
||||
{
|
||||
return QList<ProjectExplorer::BuildStepConfigWidget*>();
|
||||
return QList<ProjectExplorer::BuildConfigWidget*>();
|
||||
}
|
||||
|
||||
void QmlProject::newBuildConfiguration(const QString &)
|
||||
|
||||
@@ -69,8 +69,8 @@ public:
|
||||
virtual ProjectExplorer::Environment environment(const QString &buildConfiguration) const;
|
||||
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();
|
||||
|
||||
virtual void newBuildConfiguration(const QString &buildConfiguration);
|
||||
virtual QmlProjectNode *rootProjectNode() const;
|
||||
|
||||
@@ -174,7 +174,51 @@ MakeStepConfigWidget::MakeStepConfigWidget(MakeStep *makeStep)
|
||||
|
||||
connect(makeStep, SIGNAL(changed()),
|
||||
this, SLOT(update()));
|
||||
}
|
||||
|
||||
void MakeStepConfigWidget::updateTitle()
|
||||
{
|
||||
// TODO reduce heavy code duplication
|
||||
QString workingDirectory;
|
||||
Qt4Project *pro = static_cast<Qt4Project *>(m_makeStep->project());
|
||||
if (pro->value(m_buildConfiguration, "useShadowBuild").toBool())
|
||||
workingDirectory = pro->value(m_buildConfiguration, "buildDirectory").toString();
|
||||
if (workingDirectory.isEmpty())
|
||||
workingDirectory = QFileInfo(pro->file()->fileName()).absolutePath();
|
||||
|
||||
Qt4Project *qt4project = qobject_cast<Qt4Project *>(pro);
|
||||
QString makeCmd = qt4project->makeCommand(m_buildConfiguration);
|
||||
if (!m_makeStep->value(m_buildConfiguration, "makeCmd").toString().isEmpty())
|
||||
makeCmd = m_makeStep->value(m_buildConfiguration, "makeCmd").toString();
|
||||
if (!QFileInfo(makeCmd).isAbsolute()) {
|
||||
Environment environment = pro->environment(m_buildConfiguration);
|
||||
// Try to detect command in environment
|
||||
QString tmp = environment.searchInPath(makeCmd);
|
||||
if (tmp == QString::null) {
|
||||
m_summaryText = tr("<b>Make Step:</b> %1 not found in the environment.").arg(makeCmd);
|
||||
emit updateSummary();
|
||||
return;
|
||||
}
|
||||
makeCmd = tmp;
|
||||
}
|
||||
// -w option enables "Enter"/"Leaving directory" messages, which we need for detecting the
|
||||
// absolute file path
|
||||
// FIXME doing this without the user having a way to override this is rather bad
|
||||
// so we only do it for unix and if the user didn't override the make command
|
||||
// but for now this is the least invasive change
|
||||
QStringList args = m_makeStep->value(m_buildConfiguration, "makeargs").toStringList();
|
||||
ProjectExplorer::ToolChain::ToolChainType t = qobject_cast<Qt4Project *>(pro)->toolChain(m_buildConfiguration)->type();
|
||||
if (t != ProjectExplorer::ToolChain::MSVC && t != ProjectExplorer::ToolChain::WINCE) {
|
||||
if (m_makeStep->value(m_buildConfiguration, "makeCmd").toString().isEmpty())
|
||||
args << "-w";
|
||||
}
|
||||
m_summaryText = tr("<b>Make:</b> %1 %2 in %3").arg(QFileInfo(makeCmd).fileName(), args.join(" "), workingDirectory);
|
||||
emit updateSummary();
|
||||
}
|
||||
|
||||
QString MakeStepConfigWidget::summaryText() const
|
||||
{
|
||||
return m_summaryText;
|
||||
}
|
||||
|
||||
QString MakeStepConfigWidget::displayName() const
|
||||
@@ -208,12 +252,14 @@ void MakeStepConfigWidget::init(const QString &buildConfiguration)
|
||||
const QStringList &makeArguments =
|
||||
m_makeStep->value(buildConfiguration, "makeargs").toStringList();
|
||||
m_ui.makeArgumentsLineEdit->setText(ProjectExplorer::Environment::joinArgumentList(makeArguments));
|
||||
updateTitle();
|
||||
}
|
||||
|
||||
void MakeStepConfigWidget::makeLineEditTextEdited()
|
||||
{
|
||||
Q_ASSERT(!m_buildConfiguration.isNull());
|
||||
m_makeStep->setValue(m_buildConfiguration, "makeCmd", m_ui.makeLineEdit->text());
|
||||
updateTitle();
|
||||
}
|
||||
|
||||
void MakeStepConfigWidget::makeArgumentsLineEditTextEdited()
|
||||
@@ -221,6 +267,7 @@ void MakeStepConfigWidget::makeArgumentsLineEditTextEdited()
|
||||
Q_ASSERT(!m_buildConfiguration.isNull());
|
||||
m_makeStep->setValue(m_buildConfiguration, "makeargs",
|
||||
ProjectExplorer::Environment::parseCombinedArgString(m_ui.makeArgumentsLineEdit->text()));
|
||||
updateTitle();
|
||||
}
|
||||
|
||||
///
|
||||
|
||||
@@ -86,14 +86,17 @@ public:
|
||||
MakeStepConfigWidget(MakeStep *makeStep);
|
||||
QString displayName() const;
|
||||
void init(const QString &buildConfiguration);
|
||||
QString summaryText() const;
|
||||
private slots:
|
||||
void makeLineEditTextEdited();
|
||||
void makeArgumentsLineEditTextEdited();
|
||||
void update();
|
||||
private:
|
||||
void updateTitle();
|
||||
QString m_buildConfiguration;
|
||||
Ui::MakeStep m_ui;
|
||||
MakeStep *m_makeStep;
|
||||
QString m_summaryText;
|
||||
};
|
||||
|
||||
} // Qt4ProjectManager
|
||||
|
||||
@@ -7,16 +7,10 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>235</width>
|
||||
<height>78</height>
|
||||
<height>64</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="makeLabel">
|
||||
<property name="text">
|
||||
|
||||
@@ -210,12 +210,40 @@ QMakeStepConfigWidget::QMakeStepConfigWidget(QMakeStep *step)
|
||||
this, SLOT(update()));
|
||||
}
|
||||
|
||||
QString QMakeStepConfigWidget::summaryText() const
|
||||
{
|
||||
return m_summaryText;
|
||||
}
|
||||
|
||||
void QMakeStepConfigWidget::updateTitleLabel()
|
||||
{
|
||||
const QtVersion *qtVersion = static_cast<Qt4Project *>(m_step->project())->qtVersion(m_buildConfiguration);
|
||||
if (!qtVersion) {
|
||||
m_summaryText = tr("<b>QMake:</b> No qt version set. QMake can't be run.");
|
||||
emit updateSummary();
|
||||
return;
|
||||
}
|
||||
|
||||
QStringList args = m_step->arguments(m_buildConfiguration);
|
||||
// We don't want the full path to the .pro file
|
||||
int index = args.indexOf(m_step->project()->file()->fileName());
|
||||
if (index != -1)
|
||||
args[index] = QFileInfo(m_step->project()->file()->fileName()).fileName();
|
||||
|
||||
// And we only use the .pro filename not the full path
|
||||
QString program = QFileInfo(qtVersion->qmakeCommand()).fileName();
|
||||
m_summaryText = tr("<b>QMake:</b> %1 %2").arg(program, args.join(" "));
|
||||
emit updateSummary();
|
||||
|
||||
}
|
||||
|
||||
void QMakeStepConfigWidget::qmakeArgumentsLineEditTextEdited()
|
||||
{
|
||||
Q_ASSERT(!m_buildConfiguration.isNull());
|
||||
m_step->setValue(m_buildConfiguration, "qmakeArgs", ProjectExplorer::Environment::parseCombinedArgString(m_ui.qmakeAdditonalArgumentsLineEdit->text()));
|
||||
m_ui.qmakeArgumentsEdit->setPlainText(ProjectExplorer::Environment::joinArgumentList(m_step->arguments(m_buildConfiguration)));
|
||||
static_cast<Qt4Project *>(m_step->project())->invalidateCachedTargetInformation();
|
||||
updateTitleLabel();
|
||||
}
|
||||
|
||||
void QMakeStepConfigWidget::buildConfigurationChanged()
|
||||
@@ -230,6 +258,7 @@ void QMakeStepConfigWidget::buildConfigurationChanged()
|
||||
m_step->project()->setValue(m_buildConfiguration, "buildConfiguration", int(buildConfiguration));
|
||||
m_ui.qmakeArgumentsEdit->setPlainText(ProjectExplorer::Environment::joinArgumentList(m_step->arguments(m_buildConfiguration)));
|
||||
static_cast<Qt4Project *>(m_step->project())->invalidateCachedTargetInformation();
|
||||
updateTitleLabel();
|
||||
}
|
||||
|
||||
QString QMakeStepConfigWidget::displayName() const
|
||||
@@ -250,6 +279,7 @@ void QMakeStepConfigWidget::init(const QString &buildConfiguration)
|
||||
m_ui.qmakeArgumentsEdit->setPlainText(ProjectExplorer::Environment::joinArgumentList(m_step->arguments(buildConfiguration)));
|
||||
bool debug = QtVersion::QmakeBuildConfig(m_step->project()->value(buildConfiguration, "buildConfiguration").toInt()) & QtVersion::DebugBuild;
|
||||
m_ui.buildConfigurationComboBox->setCurrentIndex(debug? 0 : 1);
|
||||
updateTitleLabel();
|
||||
}
|
||||
|
||||
////
|
||||
|
||||
@@ -102,14 +102,17 @@ public:
|
||||
QMakeStepConfigWidget(QMakeStep *step);
|
||||
QString displayName() const;
|
||||
void init(const QString &buildConfiguration);
|
||||
QString summaryText() const;
|
||||
private slots:
|
||||
void qmakeArgumentsLineEditTextEdited();
|
||||
void buildConfigurationChanged();
|
||||
void update();
|
||||
private:
|
||||
void updateTitleLabel();
|
||||
QString m_buildConfiguration;
|
||||
Ui::QMakeStep m_ui;
|
||||
QMakeStep *m_step;
|
||||
QString m_summaryText;
|
||||
};
|
||||
|
||||
} // namespace Qt4ProjectManager
|
||||
|
||||
@@ -6,17 +6,11 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>436</width>
|
||||
<height>187</height>
|
||||
<width>448</width>
|
||||
<height>210</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
|
||||
@@ -40,7 +40,7 @@ using namespace Qt4ProjectManager;
|
||||
using namespace Qt4ProjectManager::Internal;
|
||||
|
||||
Qt4BuildEnvironmentWidget::Qt4BuildEnvironmentWidget(Qt4Project *project)
|
||||
: BuildStepConfigWidget(), m_pro(project)
|
||||
: BuildConfigWidget(), m_pro(project)
|
||||
{
|
||||
QVBoxLayout *vbox = new QVBoxLayout(this);
|
||||
vbox->setMargin(0);
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Qt4ProjectManager {
|
||||
class Qt4Project;
|
||||
|
||||
namespace Internal {
|
||||
class Qt4BuildEnvironmentWidget : public ProjectExplorer::BuildStepConfigWidget
|
||||
class Qt4BuildEnvironmentWidget : public ProjectExplorer::BuildConfigWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
@@ -891,6 +891,7 @@ ProFileReader *Qt4PriFileNode::createProFileReader() const
|
||||
reader->setQtVersion(version);
|
||||
|
||||
reader->setOutputDir(m_qt4ProFileNode->buildDir());
|
||||
reader->setCumulative(false);
|
||||
|
||||
return reader;
|
||||
}
|
||||
|
||||
@@ -594,7 +594,7 @@ void Qt4Project::updateCodeModel()
|
||||
|
||||
|
||||
pinfo.defines = predefinedMacros;
|
||||
// pinfo->defines += definedMacros; // ### FIXME: me
|
||||
pinfo.defines += definedMacros; // ### FIXME: me
|
||||
pinfo.includePaths = allIncludePaths;
|
||||
pinfo.frameworkPaths = allFrameworkPaths;
|
||||
pinfo.sourceFiles = files;
|
||||
@@ -911,14 +911,14 @@ ProjectExplorer::ToolChain::ToolChainType Qt4Project::toolChainType(const QStrin
|
||||
return type;
|
||||
}
|
||||
|
||||
BuildStepConfigWidget *Qt4Project::createConfigWidget()
|
||||
BuildConfigWidget *Qt4Project::createConfigWidget()
|
||||
{
|
||||
return new Qt4ProjectConfigWidget(this);
|
||||
}
|
||||
|
||||
QList<BuildStepConfigWidget*> Qt4Project::subConfigWidgets()
|
||||
QList<BuildConfigWidget*> Qt4Project::subConfigWidgets()
|
||||
{
|
||||
QList<BuildStepConfigWidget*> subWidgets;
|
||||
QList<BuildConfigWidget*> subWidgets;
|
||||
subWidgets << new Qt4BuildEnvironmentWidget(this);
|
||||
return subWidgets;
|
||||
}
|
||||
|
||||
@@ -166,8 +166,8 @@ public:
|
||||
void setToolChainType(const QString &buildConfiguration, ProjectExplorer::ToolChain::ToolChainType type);
|
||||
ProjectExplorer::ToolChain::ToolChainType toolChainType(const QString &buildConfiguration) const;
|
||||
|
||||
ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
|
||||
QList<ProjectExplorer::BuildStepConfigWidget*> subConfigWidgets();
|
||||
ProjectExplorer::BuildConfigWidget *createConfigWidget();
|
||||
QList<ProjectExplorer::BuildConfigWidget*> subConfigWidgets();
|
||||
|
||||
void setQtVersion(const QString &buildConfiguration, int id);
|
||||
virtual void newBuildConfiguration(const QString &buildConfiguration);
|
||||
|
||||
@@ -51,7 +51,7 @@ using namespace Qt4ProjectManager;
|
||||
using namespace Qt4ProjectManager::Internal;
|
||||
|
||||
Qt4ProjectConfigWidget::Qt4ProjectConfigWidget(Qt4Project *project)
|
||||
: BuildStepConfigWidget(),
|
||||
: BuildConfigWidget(),
|
||||
m_pro(project)
|
||||
{
|
||||
m_ui = new Ui::Qt4ProjectConfigWidget();
|
||||
@@ -76,6 +76,12 @@ Qt4ProjectConfigWidget::Qt4ProjectConfigWidget(Qt4Project *project)
|
||||
m_ui->shadowBuildDirEdit->setExpectedKind(Core::Utils::PathChooser::Directory);
|
||||
m_ui->invalidQtWarningLabel->setVisible(false);
|
||||
|
||||
m_ui->detailsWidget->setVisible(false);
|
||||
m_ui->titleLabel->setText("");
|
||||
|
||||
connect(m_ui->detailsButton, SIGNAL(clicked()),
|
||||
this, SLOT(toggleDetails()));
|
||||
|
||||
connect(m_ui->nameLineEdit, SIGNAL(textEdited(QString)),
|
||||
this, SLOT(changeConfigName(QString)));
|
||||
|
||||
@@ -111,6 +117,29 @@ Qt4ProjectConfigWidget::~Qt4ProjectConfigWidget()
|
||||
delete m_ui;
|
||||
}
|
||||
|
||||
void Qt4ProjectConfigWidget::toggleDetails()
|
||||
{
|
||||
m_ui->detailsWidget->setVisible(!m_ui->detailsWidget->isVisible());
|
||||
}
|
||||
|
||||
void Qt4ProjectConfigWidget::updateDetails()
|
||||
{
|
||||
QtVersion *version = m_pro->qtVersion(m_buildConfiguration);
|
||||
QString versionString;
|
||||
if (m_pro->qtVersionId(m_buildConfiguration) == 0) {
|
||||
versionString = tr("Default Qt Version");
|
||||
} else {
|
||||
versionString = version->name();
|
||||
}
|
||||
// Qt Version, Build Directory and Toolchain
|
||||
m_ui->titleLabel->setText(tr("using Qt Version: <b>%1</b><br>"
|
||||
"with Toolchain <b>%2</b><br>"
|
||||
"building in <b>%3</b>")
|
||||
.arg(versionString,
|
||||
ProjectExplorer::ToolChain::toolChainName(m_pro->toolChainType(m_buildConfiguration)),
|
||||
m_pro->buildDirectory(m_buildConfiguration)));
|
||||
}
|
||||
|
||||
void Qt4ProjectConfigWidget::manageQtVersions()
|
||||
{
|
||||
Core::ICore *core = Core::ICore::instance();
|
||||
@@ -141,6 +170,7 @@ void Qt4ProjectConfigWidget::init(const QString &buildConfiguration)
|
||||
m_ui->shadowBuildDirEdit->setPath(m_pro->buildDirectory(buildConfiguration));
|
||||
updateImportLabel();
|
||||
updateToolChainCombo();
|
||||
updateDetails();
|
||||
}
|
||||
|
||||
void Qt4ProjectConfigWidget::changeConfigName(const QString &newName)
|
||||
@@ -197,6 +227,7 @@ void Qt4ProjectConfigWidget::shadowBuildCheckBoxClicked(bool checked)
|
||||
m_pro->setValue(m_buildConfiguration, "buildDirectory", m_ui->shadowBuildDirEdit->path());
|
||||
else
|
||||
m_pro->setValue(m_buildConfiguration, "buildDirectory", QVariant(QString::null));
|
||||
updateDetails();
|
||||
}
|
||||
|
||||
void Qt4ProjectConfigWidget::updateImportLabel()
|
||||
@@ -236,6 +267,7 @@ void Qt4ProjectConfigWidget::shadowBuildLineEditTextChanged()
|
||||
updateImportLabel();
|
||||
|
||||
m_pro->invalidateCachedTargetInformation();
|
||||
updateDetails();
|
||||
}
|
||||
|
||||
void Qt4ProjectConfigWidget::importLabelClicked()
|
||||
@@ -296,6 +328,7 @@ void Qt4ProjectConfigWidget::importLabelClicked()
|
||||
}
|
||||
}
|
||||
setupQtVersionsComboBox();
|
||||
updateDetails();
|
||||
}
|
||||
|
||||
void Qt4ProjectConfigWidget::qtVersionComboBoxCurrentIndexChanged(const QString &)
|
||||
@@ -315,6 +348,7 @@ void Qt4ProjectConfigWidget::qtVersionComboBoxCurrentIndexChanged(const QString
|
||||
updateToolChainCombo();
|
||||
m_pro->update();
|
||||
}
|
||||
updateDetails();
|
||||
}
|
||||
|
||||
void Qt4ProjectConfigWidget::updateToolChainCombo()
|
||||
@@ -376,4 +410,5 @@ void Qt4ProjectConfigWidget::setToolChain(int index)
|
||||
m_pro->setToolChainType(m_buildConfiguration, selectedToolChainType);
|
||||
if (m_ui->toolChainComboBox->currentIndex() != index)
|
||||
m_ui->toolChainComboBox->setCurrentIndex(index);
|
||||
updateDetails();
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Ui {
|
||||
class Qt4ProjectConfigWidget;
|
||||
}
|
||||
|
||||
class Qt4ProjectConfigWidget : public ProjectExplorer::BuildStepConfigWidget
|
||||
class Qt4ProjectConfigWidget : public ProjectExplorer::BuildConfigWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -63,11 +63,13 @@ private slots:
|
||||
void qtVersionComboBoxCurrentIndexChanged(const QString &);
|
||||
void manageQtVersions();
|
||||
void selectToolChain(int index);
|
||||
void toggleDetails();
|
||||
|
||||
private:
|
||||
void updateToolChainCombo();
|
||||
void updateImportLabel();
|
||||
void setToolChain(int index);
|
||||
void updateDetails();
|
||||
Ui::Qt4ProjectConfigWidget *m_ui;
|
||||
QAbstractButton *m_browseButton;
|
||||
Qt4Project *m_pro;
|
||||
|
||||
@@ -6,163 +6,175 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>652</width>
|
||||
<height>247</height>
|
||||
<width>463</width>
|
||||
<height>221</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="horizontalSpacing">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="nameLabel">
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0" rowspan="2">
|
||||
<widget class="QLabel" name="titleLabel">
|
||||
<property name="text">
|
||||
<string>Configuration Name:</string>
|
||||
<string>Multi
|
||||
Line
|
||||
placeholder</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="nameLineEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>100</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="qtVersionLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<widget class="QToolButton" name="detailsButton">
|
||||
<property name="text">
|
||||
<string>Qt Version:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QComboBox" name="qtVersionComboBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="invalidQtWarningLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>This Qt-Version is invalid.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="manageQtVersionPushButtons">
|
||||
<property name="text">
|
||||
<string>Manage</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Tool Chain:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="toolChainComboBox"/>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Shadow Build:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QCheckBox" name="shadowBuildCheckBox">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="buildDirLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Build Directory:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="Core::Utils::PathChooser" name="shadowBuildDirEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLabel" name="importLabel">
|
||||
<property name="text">
|
||||
<string><a href="import">Import existing build</a></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
<string>Details</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
<widget class="QWidget" name="detailsWidget" native="true">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="nameLabel">
|
||||
<property name="text">
|
||||
<string>Configuration Name:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="nameLineEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>100</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="qtVersionLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Qt Version:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QComboBox" name="qtVersionComboBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="invalidQtWarningLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>This Qt-Version is invalid.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="manageQtVersionPushButtons">
|
||||
<property name="text">
|
||||
<string>Manage</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Tool Chain:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="toolChainComboBox"/>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Shadow Build:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QCheckBox" name="shadowBuildCheckBox">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="buildDirLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Build Directory:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="Core::Utils::PathChooser" name="shadowBuildDirEdit" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLabel" name="importLabel">
|
||||
<property name="text">
|
||||
<string><a href="import">Import existing build</a></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
||||
Reference in New Issue
Block a user