MacroModel

Qt table model for displaying macros in the macro panel.

class macro_plugin.ui.macro_model.MacroTableModel[source]

Bases: _Stub

Table model for a list of Macro objects.

headers: ClassVar[dict[int, str]] = {0: 'Macro'}
add_macro(macro)[source]

Append a macro and notify attached views.

Parameters:

macro (Macro)

Return type:

None

remove_macro(row)[source]

Remove the macro at row and notify attached views.

Parameters:

row (int)

Return type:

None

reset_macros(macros)[source]

Replace the entire macro list and reset the model.

Parameters:

macros (list[Macro])

Return type:

None

rowCount(parent)[source]
Parameters:

parent (_Stub)

Return type:

int

columnCount(parent)[source]
Parameters:

parent (_Stub)

Return type:

int

headerData(section, orientation, role=)[source]
Parameters:
  • section (int)

  • orientation

  • role

Return type:

flags(index)[source]

Return the flags for the given index.

Parameters:

index (_Stub)

Return type:

data(index, role=)[source]

Return the data for the given index and role.

Parameters:
  • index (_Stub)

  • role

Return type:

setData(index, value, role=)[source]

Set the data for the given index and role.

Parameters:
  • index (_Stub)

  • value (str)

  • role

Return type:

bool