MCPcopy Create free account
hub / github.com/KDE/kdevelop / NativeAppConfigPage

Method NativeAppConfigPage

plugins/execute/nativeappconfig.cpp:116–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116NativeAppConfigPage::NativeAppConfigPage( QWidget* parent )
117 : LaunchConfigurationPage( parent )
118{
119 setupUi(this);
120 //Setup data info for combobox
121 dependencyAction->setItemData(0, QStringLiteral("Nothing"));
122 dependencyAction->setItemData(1, QStringLiteral("Build"));
123 dependencyAction->setItemData(2, QStringLiteral("Install"));
124
125 killBeforeStartingAgain->addItem(i18nc("@item:inlistbox", "Ask If Running"), NativeAppJob::askIfRunning);
126 killBeforeStartingAgain->addItem(i18nc("@item:inlistbox", "Kill All Instances"), NativeAppJob::killAllInstances);
127 killBeforeStartingAgain->addItem(i18nc("@item:inlistbox", "Start Another"), NativeAppJob::startAnother);
128
129 terminal->addItems(executePlugin().defaultExternalTerminalCommands());
130 terminal->setToolTip(
131 terminal->toolTip()
132 + i18n("<p>Note: <code>gnome-terminal</code> is only partially supported due to its limitations.</p>"));
133
134 //Set workingdirectory widget to ask for directories rather than files
135 workingDirectory->setMode(KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly);
136
137 configureEnvironment->setSelectionWidget(environment);
138
139 //connect signals to changed signal
140 connect( projectTarget, &QComboBox::currentTextChanged, this, &NativeAppConfigPage::changed );
141 connect( projectTargetRadio, &QRadioButton::toggled, this, &NativeAppConfigPage::changed );
142 connect( executableRadio, &QRadioButton::toggled, this, &NativeAppConfigPage::changed );
143 connect( executablePath->lineEdit(), &KLineEdit::textEdited, this, &NativeAppConfigPage::changed );
144 connect( executablePath, &KUrlRequester::urlSelected, this, &NativeAppConfigPage::changed );
145 connect( arguments, &QLineEdit::textEdited, this, &NativeAppConfigPage::changed );
146 connect( workingDirectory, &KUrlRequester::urlSelected, this, &NativeAppConfigPage::changed );
147 connect( workingDirectory->lineEdit(), &KLineEdit::textEdited, this, &NativeAppConfigPage::changed );
148 connect( environment, &EnvironmentSelectionWidget::currentProfileChanged, this, &NativeAppConfigPage::changed );
149 connect( dependencyAction, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &NativeAppConfigPage::changed );
150 connect( runInTerminal, &QCheckBox::toggled, this, &NativeAppConfigPage::changed );
151 connect( terminal, &KComboBox::editTextChanged, this, &NativeAppConfigPage::changed );
152 connect( terminal, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &NativeAppConfigPage::changed );
153 connect( dependencyAction, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &NativeAppConfigPage::activateDeps );
154 connect( killBeforeStartingAgain, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &NativeAppConfigPage::changed );
155 connect( dependencies, &DependenciesWidget::changed, this, &NativeAppConfigPage::changed );
156}
157
158void NativeAppConfigPage::activateDeps( int idx )
159{

Callers

nothing calls this directly

Calls 8

setItemDataMethod · 0.80
setToolTipMethod · 0.80
setSelectionWidgetMethod · 0.80
addItemMethod · 0.45
addItemsMethod · 0.45
toolTipMethod · 0.45
setModeMethod · 0.45

Tested by

no test coverage detected