MCPcopy Create free account
hub / github.com/SpartanJ/eepp / UIBuildStep

Method UIBuildStep

src/tools/ecode/uibuildsettings.cpp:250–368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248
249 protected:
250 UIBuildStep( StepType stepType, UIBuildSettings* buildSettings, size_t stepNum,
251 ProjectBuildStep* buildStep ) :
252 UILinearLayout( "buildstep", UIOrientation::Vertical ),
253 mStepType( stepType ),
254 mBuildSettings( buildSettings ),
255 mStepNum( stepNum ),
256 mStep( buildStep ) {
257 setLayoutSizePolicy( SizePolicy::MatchParent, SizePolicy::WrapContent );
258 addClass( "build_step" );
259 addClass( String::toString( (Uint64)stepNum ) );
260
261 static const auto BUILD_STEP_XML = R"xml(
262 <hbox class="header" lw="mp" lh="wc">
263 <TextView lw="0" lw8="1" class="step_name" focusable="false" />
264 <CheckBox class="enabled_checkbox" checked="true" layout_gravity="center_vertical" tooltip="@string(enabled_question, Enabled?)" />
265 <PushButton class="move_up" text="@string(move_up, Move Up)" text-as-fallback="true" icon="icon(arrow-up-s, 12dp)" tooltip="@string(move_up, Move Up)" />
266 <PushButton class="move_down" text="@string(move_down, Move Down)" text-as-fallback="true" icon="icon(arrow-down-s, 12dp)" tooltip="@string(move_down, Move Down)" />
267 <PushButton class="remove_item" text="@string(remove item, Remove Item)" text-as-fallback="true" icon="icon(delete-bin, 12dp)" tooltip="@string(remove_item, Remove Item)" />
268 <PushButton class="details_but" text='@string(details_nbsp, "Details ")' />
269 </hbox>
270 <vbox class="details" lw="mp" lh="wc">
271 <hbox lw="mp">
272 <TextView lh="mp" min-width="100dp" text="@string(command, Command)" focusable="false" />
273 <TextInput class="input_cmd" lw="0" lw8="1" />
274 </hbox>
275 <hbox lw="mp">
276 <TextView lh="mp" min-width="100dp" text="@string(arguments, Arguments)" focusable="false" />
277 <TextInput class="input_args" lw="0" lw8="1" />
278 </hbox>
279 <hbox lw="mp">
280 <TextView lh="mp" min-width="100dp" text="@string(working_dir, Working Directory)" focusable="false" />
281 <TextInput class="input_working_dir" lw="0" lw8="1" />
282 </hbox>
283 <StackLayout lw="mp">
284 <CheckBox class="run_in_terminal" text="@string(run_in_terminal, Run in terminal)" visible="false" />
285 <CheckBox margin-left="8dp" class="reuse_previous_terminal" text="@string(reuse_previous_terminal, Reuse previous terminal)" visible="false" />
286 <CheckBox margin-left="8dp" class="use_statusbar_terminal" text="@string(use_statusbar_terminal, Use status bar terminal)" visible="false" />
287 <CheckBox margin-left="8dp" class="strip_ansi_codes" text="@string(strip_ansi_codes, Strip ANSI codes)" visible="false" />
288 </StackLayout>
289 </vbox>
290)xml";
291
292 getUISceneNode()->loadLayoutFromString( BUILD_STEP_XML, this );
293
294 if ( !isBuildOrClean() ) {
295 findByClass( "enabled_checkbox" )->setVisible( false );
296 auto runInTerminal = findByClass( "run_in_terminal" )->asType<UICheckBox>();
297
298 auto reusePreviousTerminal =
299 findByClass( "reuse_previous_terminal" )->asType<UICheckBox>();
300
301 auto useStatusBarTerminal =
302 findByClass( "use_statusbar_terminal" )->asType<UICheckBox>();
303
304 auto stripAnsiCodes = findByClass( "strip_ansi_codes" )->asType<UICheckBox>();
305
306 runInTerminal->setVisible( true );
307 runInTerminal->setChecked( buildStep->runInTerminal );

Callers

nothing calls this directly

Calls 14

findByClassFunction · 0.85
loadLayoutFromStringMethod · 0.80
setCheckedMethod · 0.80
getNodeMethod · 0.80
toggleClassMethod · 0.80
moveStepDownMethod · 0.80
moveStepUpMethod · 0.80
deleteStepMethod · 0.80
toStringFunction · 0.50
setVisibleMethod · 0.45
onMethod · 0.45
setEnabledMethod · 0.45

Tested by

no test coverage detected