Commit d50cc220 authored by dt's avatar dt
Browse files

Also switch the cmake run configuration to using the detailswidget

parent 8a855165
......@@ -35,7 +35,6 @@
#include <projectexplorer/environment.h>
#include <projectexplorer/debugginghelper.h>
#include <utils/qtcassert.h>
#include <utils/detailsbutton.h>
#include <QtGui/QFormLayout>
#include <QtGui/QLineEdit>
#include <QtGui/QGroupBox>
......@@ -262,21 +261,15 @@ CMakeRunConfigurationWidget::CMakeRunConfigurationWidget(CMakeRunConfiguration *
fl->addRow(tr("Working Directory:"), boxlayout);
m_detailsWidget = new QWidget(this);
m_detailsWidget->setLayout(fl);
m_detailsWidget->setVisible(false);
m_detailsContainer = new Utils::DetailsWidget(this);
m_summaryLabel = new QLabel(this);
m_detailsButton = new Utils::DetailsButton(this);
QHBoxLayout *hbox = new QHBoxLayout();
hbox->addWidget(m_summaryLabel);
hbox->addWidget(m_detailsButton);
QWidget *m_details = new QWidget(m_detailsContainer);
m_detailsContainer->setWidget(m_details);
m_details->setLayout(fl);
QVBoxLayout *vbx = new QVBoxLayout(this);
vbx->setContentsMargins(0, -1, 0, -1);
vbx->addLayout(hbox);
vbx->addWidget(m_detailsWidget);
vbx->setMargin(0);;
vbx->addWidget(m_detailsContainer);
QLabel *environmentLabel = new QLabel(this);
environmentLabel->setText(tr("Run Environment"));
......@@ -316,9 +309,6 @@ CMakeRunConfigurationWidget::CMakeRunConfigurationWidget(CMakeRunConfiguration *
connect(resetButton, SIGNAL(clicked()),
this, SLOT(resetWorkingDirectory()));
connect(m_detailsButton, SIGNAL(clicked()),
this, SLOT(toggleDetails()));
connect(m_environmentWidget, SIGNAL(userChangesUpdated()),
this, SLOT(userChangesUpdated()));
......@@ -331,11 +321,6 @@ CMakeRunConfigurationWidget::CMakeRunConfigurationWidget(CMakeRunConfiguration *
}
void CMakeRunConfigurationWidget::toggleDetails()
{
m_detailsWidget->setVisible(!m_detailsWidget->isVisible());
}
void CMakeRunConfigurationWidget::setWorkingDirectory()
{
if (m_ignoreChange)
......@@ -397,7 +382,7 @@ void CMakeRunConfigurationWidget::updateSummary()
QString text = tr("Running executable: <b>%1</b> %2")
.arg(QFileInfo(m_cmakeRunConfiguration->executable()).fileName(),
ProjectExplorer::Environment::joinArgumentList(m_cmakeRunConfiguration->commandLineArguments()));
m_summaryLabel->setText(text);
m_detailsContainer->setSummaryText(text);
}
......
......@@ -35,6 +35,7 @@
#include <projectexplorer/persistentsettings.h>
#include <projectexplorer/environmenteditmodel.h>
#include <utils/pathchooser.h>
#include <utils/detailswidget.h>
QT_BEGIN_NAMESPACE
class QComboBox;
......@@ -115,7 +116,6 @@ private slots:
private slots:
void baseEnvironmentComboBoxChanged(int index);
void workingDirectoryChanged(const QString &workingDirectory);
void toggleDetails();
private:
void updateSummary();
bool m_ignoreChange;
......@@ -123,9 +123,7 @@ private:
Core::Utils::PathChooser *m_workingDirectoryEdit;
QComboBox *m_baseEnvironmentComboBox;
ProjectExplorer::EnvironmentWidget *m_environmentWidget;
QWidget *m_detailsWidget;
QLabel *m_summaryLabel;
QAbstractButton *m_detailsButton;
Utils::DetailsWidget *m_detailsContainer;
};
class CMakeRunConfigurationFactory : public ProjectExplorer::IRunConfigurationFactory
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment