summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
diff options
context:
space:
mode:
authordt <qtc-committer@nokia.com>2009-09-17 13:59:10 +0200
committerdt <qtc-committer@nokia.com>2009-09-17 13:59:10 +0200
commit65648ee17ad1cfc93666b8c4b06fac5c3e6d6fe0 (patch)
treed6e4cd550c85a8532d508abb1eaaca70b97cf280 /src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
parentf52077bd81abebea6182420645c97e291cde5af6 (diff)
downloadqt-creator-65648ee17ad1cfc93666b8c4b06fac5c3e6d6fe0.tar.gz
The project pane rewrite version 2.
This splits up the edit and active settings. Let people try it and report usability problems. I'm not 100% convinced of the layout either.
Diffstat (limited to 'src/plugins/projectexplorer/customexecutablerunconfiguration.cpp')
-rw-r--r--src/plugins/projectexplorer/customexecutablerunconfiguration.cpp33
1 files changed, 31 insertions, 2 deletions
diff --git a/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp b/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
index d2ce450d03..0df2b30726 100644
--- a/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
+++ b/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
@@ -33,6 +33,7 @@
#include <coreplugin/icore.h>
#include <projectexplorer/debugginghelper.h>
+#include <utils/detailsbutton.h>
#include <QtGui/QCheckBox>
#include <QtGui/QFormLayout>
@@ -91,7 +92,22 @@ CustomExecutableConfigurationWidget::CustomExecutableConfigurationWidget(CustomE
QVBoxLayout *vbox = new QVBoxLayout(this);
vbox->setContentsMargins(0, -1, 0, -1);
- vbox->addLayout(layout);
+
+ m_summaryLabel = new QLabel(this);
+
+ m_detailsButton = new Utils::DetailsButton(this);
+ connect(m_detailsButton, SIGNAL(clicked()),
+ this, SLOT(toggleDetails()));
+
+ QHBoxLayout *hbox = new QHBoxLayout();
+ hbox->addWidget(m_summaryLabel);
+ hbox->addWidget(m_detailsButton);
+ vbox->addLayout(hbox);
+
+ m_detailsWidget = new QWidget(this);
+ m_detailsWidget->setLayout(layout);
+ vbox->addWidget(m_detailsWidget);
+ m_detailsWidget->setVisible(false);
QLabel *environmentLabel = new QLabel(this);
environmentLabel->setText(tr("Run Environment"));
@@ -146,6 +162,11 @@ CustomExecutableConfigurationWidget::CustomExecutableConfigurationWidget(CustomE
this, SLOT(userEnvironmentChangesChanged()));
}
+void CustomExecutableConfigurationWidget::toggleDetails()
+{
+ m_detailsWidget->setVisible(!m_detailsWidget->isVisible());
+}
+
void CustomExecutableConfigurationWidget::userChangesUpdated()
{
m_runConfiguration->setUserEnvironmentChanges(m_environmentWidget->userChanges());
@@ -211,10 +232,18 @@ void CustomExecutableConfigurationWidget::termToggled(bool on)
void CustomExecutableConfigurationWidget::changed()
{
+ const QString &executable = m_runConfiguration->baseExecutable();
+ QString text = tr("No Executable specified.");
+ if (!executable.isEmpty())
+ text = tr("Running executable: <b>%1</b> %2").
+ arg(executable,
+ ProjectExplorer::Environment::joinArgumentList(m_runConfiguration->commandLineArguments()));
+
+ m_summaryLabel->setText(text);
// We triggered the change, don't update us
if (m_ignoreChange)
return;
- m_executableChooser->setPath(m_runConfiguration->baseExecutable());
+ m_executableChooser->setPath(executable);
m_commandLineArgumentsLineEdit->setText(ProjectExplorer::Environment::joinArgumentList(m_runConfiguration->commandLineArguments()));
m_workingDirectory->setPath(m_runConfiguration->baseWorkingDirectory());
m_useTerminalCheck->setChecked(m_runConfiguration->runMode() == ApplicationRunConfiguration::Console);