void HUD::updateTargetObject() { if (_targetObject) { Door *door = ObjectContainer::toDoor(_targetObject); if (door && !door->isUsable()) _targetObject = nullptr; } if (!_targetObject) { _targetCircle->hide(); hideTargetInformation(); return; } _targetCircle->setHovered(_hoveredObject == _targetObject); float sX, sY; bool onScreen = _targetCircle->moveTo(_targetObject, sX, sY); if (onScreen) { _targetCircle->show(); updateTargetInformation(_targetObject, sX, sY); showTargetInformation(_targetObject); } else { _targetCircle->hide(); hideTargetInformation(); } }
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(d->runConfiguration->arguments().join(QLatin1String(" "))); 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, SIGNAL(textEdited(QString)), SLOT(argumentsEdited(QString))); connect(d->runConfiguration, SIGNAL(targetInformationChanged()), this, SLOT(updateTargetInformation())); connect(d->runConfiguration, SIGNAL(deploySpecsChanged()), SLOT(handleDeploySpecsChanged())); connect(&d->useAlternateCommandBox, SIGNAL(toggled(bool)), SLOT(handleUseAlternateCommandChanged())); connect(&d->alternateCommand, SIGNAL(textEdited(QString)), SLOT(handleAlternateCommandChanged())); connect(&d->workingDirLineEdit, SIGNAL(textEdited(QString)), SLOT(handleWorkingDirectoryChanged())); handleDeploySpecsChanged(); handleUseAlternateCommandChanged(); }
void CMakeRunConfiguration::doAdditionalSetup(const RunConfigurationCreationInfo &info) { Q_UNUSED(info); updateTargetInformation(); }