void BareMetalRunConfigurationWidget::addGenericWidgets(QVBoxLayout *mainLayout) { Utils::DetailsWidget *detailsContainer = new Utils::DetailsWidget(this); detailsContainer->setState(Utils::DetailsWidget::NoSummary); QWidget *details = new QWidget(this); details->setLayout(&d->genericWidgetsLayout); detailsContainer->setWidget(details); mainLayout->addWidget(detailsContainer); d->genericWidgetsLayout.setFormAlignment(Qt::AlignLeft | Qt::AlignVCenter); d->localExecutableLabel.setText(d->runConfiguration->localExecutableFilePath()); d->genericWidgetsLayout.addRow(tr("Executable:"),&d->localExecutableLabel); //d->genericWidgetsLayout.addRow(tr("Debugger host:"),d->runConfiguration); //d->genericWidgetsLayout.addRow(tr("Debugger port:"),d->runConfiguration); d->argsLineEdit.setText(d->runConfiguration->arguments()); d->genericWidgetsLayout.addRow(tr("Arguments:"), &d->argsLineEdit); d->workingDirLineEdit.setPlaceholderText(tr("<default>")); d->workingDirLineEdit.setText(d->runConfiguration->workingDirectory()); d->genericWidgetsLayout.addRow(tr("Working directory:"), &d->workingDirLineEdit); connect(&d->argsLineEdit, &QLineEdit::textEdited, this, &BareMetalRunConfigurationWidget::argumentsEdited); connect(d->runConfiguration, &BareMetalRunConfiguration::targetInformationChanged, this, &BareMetalRunConfigurationWidget::updateTargetInformation); connect(&d->workingDirLineEdit, &QLineEdit::textEdited, this, &BareMetalRunConfigurationWidget::handleWorkingDirectoryChanged); }
void RemoteLinuxRunConfigurationWidget::addGenericWidgets(QVBoxLayout *mainLayout) { Utils::DetailsWidget *detailsContainer = new Utils::DetailsWidget(this); detailsContainer->setState(Utils::DetailsWidget::NoSummary); QWidget *details = new QWidget(this); details->setLayout(&d->genericWidgetsLayout); detailsContainer->setWidget(details); mainLayout->addWidget(detailsContainer); d->genericWidgetsLayout.setFormAlignment(Qt::AlignLeft | Qt::AlignVCenter); d->localExecutableLabel.setText(d->runConfiguration->localExecutableFilePath()); d->genericWidgetsLayout.addRow(tr("Executable on host:"), &d->localExecutableLabel); d->genericWidgetsLayout.addRow(tr("Executable on device:"), &d->remoteExecutableLabel); QWidget * const altRemoteExeWidget = new QWidget; QHBoxLayout * const altRemoteExeLayout = new QHBoxLayout(altRemoteExeWidget); altRemoteExeLayout->setContentsMargins(0, 0, 0, 0); d->alternateCommand.setText(d->runConfiguration->alternateRemoteExecutable()); altRemoteExeLayout->addWidget(&d->alternateCommand); d->useAlternateCommandBox.setText(tr("Use this command instead")); d->useAlternateCommandBox.setChecked(d->runConfiguration->useAlternateExecutable()); altRemoteExeLayout->addWidget(&d->useAlternateCommandBox); d->genericWidgetsLayout.addRow(tr("Alternate executable on device:"), altRemoteExeWidget); d->argsLineEdit.setText(Utils::QtcProcess::joinArgs(d->runConfiguration->arguments(), Utils::OsTypeLinux)); d->genericWidgetsLayout.addRow(tr("Arguments:"), &d->argsLineEdit); d->workingDirLineEdit.setPlaceholderText(tr("<default>")); d->workingDirLineEdit.setText(d->runConfiguration->workingDirectory()); d->genericWidgetsLayout.addRow(tr("Working directory:"), &d->workingDirLineEdit); connect(&d->argsLineEdit, &QLineEdit::textEdited, this, &RemoteLinuxRunConfigurationWidget::argumentsEdited); connect(d->runConfiguration, &RemoteLinuxRunConfiguration::targetInformationChanged, this, &RemoteLinuxRunConfigurationWidget::updateTargetInformation); connect(d->runConfiguration, &RemoteLinuxRunConfiguration::deploySpecsChanged, this, &RemoteLinuxRunConfigurationWidget::handleDeploySpecsChanged); connect(&d->useAlternateCommandBox, &QCheckBox::toggled, this, &RemoteLinuxRunConfigurationWidget::handleUseAlternateCommandChanged); connect(&d->alternateCommand, &QLineEdit::textEdited, this, &RemoteLinuxRunConfigurationWidget::handleAlternateCommandChanged); connect(&d->workingDirLineEdit, &QLineEdit::textEdited, this, &RemoteLinuxRunConfigurationWidget::handleWorkingDirectoryChanged); handleDeploySpecsChanged(); handleUseAlternateCommandChanged(); }
BareMetalRunConfigurationWidget::BareMetalRunConfigurationWidget(BareMetalRunConfiguration *runConfiguration, QWidget *parent) : QWidget(parent),d(new BareMetalRunConfigurationWidgetPrivate(runConfiguration)) { QVBoxLayout *topLayout = new QVBoxLayout(this); topLayout->setMargin(0); addDisabledLabel(topLayout); topLayout->addWidget(&d->topWidget); QVBoxLayout *mainLayout = new QVBoxLayout(&d->topWidget); mainLayout->setMargin(0); Utils::DetailsWidget *detailsContainer = new Utils::DetailsWidget(this); detailsContainer->setState(Utils::DetailsWidget::NoSummary); QWidget *details = new QWidget(this); details->setLayout(&d->genericWidgetsLayout); detailsContainer->setWidget(details); mainLayout->addWidget(detailsContainer); d->genericWidgetsLayout.setFormAlignment(Qt::AlignLeft | Qt::AlignVCenter); d->localExecutableLabel.setText(d->runConfiguration->localExecutableFilePath()); d->genericWidgetsLayout.addRow(tr("Executable:"),&d->localExecutableLabel); //d->genericWidgetsLayout.addRow(tr("Debugger host:"),d->runConfiguration); //d->genericWidgetsLayout.addRow(tr("Debugger port:"),d->runConfiguration); runConfiguration->extraAspect<ArgumentsAspect>()->addToMainConfigurationWidget(this, &d->genericWidgetsLayout); d->workingDirLineEdit.setPlaceholderText(tr("<default>")); d->workingDirLineEdit.setText(d->runConfiguration->workingDirectory()); d->genericWidgetsLayout.addRow(tr("Working directory:"), &d->workingDirLineEdit); connect(d->runConfiguration, &BareMetalRunConfiguration::targetInformationChanged, this, &BareMetalRunConfigurationWidget::updateTargetInformation); connect(&d->workingDirLineEdit, &QLineEdit::textEdited, this, &BareMetalRunConfigurationWidget::handleWorkingDirectoryChanged); connect(d->runConfiguration, &ProjectExplorer::RunConfiguration::enabledChanged, this, &BareMetalRunConfigurationWidget::runConfigurationEnabledChange); runConfigurationEnabledChange(); }