widgets.add_tool_widget

Widget shown to user when a new Tool is created.

author:
  1. Savolainen (VTT)
date:

19.1.2017

Module Contents

class widgets.add_tool_widget.AddToolWidget(toolbox, x, y)[source]

Bases: PySide2.QtWidgets.QWidget

A widget that queries user’s preferences for a new item.

toolbox

Parent widget

Type:ToolboxUI
x

X coordinate of new item

Type:int
y

Y coordinate of new item

Type:int
connect_signals(self)[source]

Connect signals to slots.

update_args(self, row)[source]

Show Tool template command line arguments in text input.

Parameters:row (int) – Selected row number
name_changed(self)[source]

Update label to show upcoming folder name.

ok_clicked(self)[source]

Check that given item name is valid and add it to project.

call_add_item(self)[source]

Creates new Item according to user’s selections.

keyPressEvent(self, e)[source]

Close Setup form when escape key is pressed.

Parameters:e (QKeyEvent) – Received key press event.
closeEvent(self, event=None)[source]

Handle close window.

Parameters:event (QEvent) – Closing event if ‘X’ is clicked.