![]() |
iVS3D v2.0.9
|
Manages a stack of mask generation records for later export. More...
#include <maskstack.h>
Signals | |
| void | sig_recordAdded (const MaskRecord &record) |
| Emitted when a new record is added to the stack. | |
| void | sig_recordRemoved (const MaskRecord &record) |
| Emitted when a record is removed from the stack. | |
| void | sig_stackCleared () |
| Emitted when the entire stack is cleared. | |
| void | sig_stackChanged () |
| Emitted whenever the stack contents change (after add, remove, or clear operations) | |
Public Member Functions | |
| MaskStack (QObject *parent=nullptr) | |
| Construct an empty mask stack. | |
| void | addRecord (const MaskRecord &record) |
| Add a new mask record to the stack. | |
| bool | removeRecord (int index) |
| Remove a record at the given index. | |
| bool | removeRecordById (int id) |
| Remove a record by its ID. | |
| void | clear () |
| Clear all records from the stack. | |
| int | size () const |
| Get the number of records in the stack. | |
| bool | isEmpty () const |
| Check if the stack is empty. | |
| const MaskRecord * | getRecord (int index) const |
| Get a record by index. | |
| QVector< MaskRecord > | getAllRecords () const |
| Get all records in the stack. | |
| const MaskRecord * | getRecordById (int id) const |
| Get a record by its ID. | |
Manages a stack of mask generation records for later export.
This class maintains a list of mask generation configurations. Each entry represents a call to "Add Mask" by the user with specific plugin settings. At export time, the application will iterate through this stack and generate masks for each image using the stored configurations.
Features:
|
explicit |
Construct an empty mask stack.
| parent | The parent QObject |
| void MaskStack::addRecord | ( | const MaskRecord & | record | ) |
Add a new mask record to the stack.
| record | The MaskRecord to add |
| void MaskStack::clear | ( | ) |
Clear all records from the stack.
| QVector< MaskRecord > MaskStack::getAllRecords | ( | ) | const |
Get all records in the stack.
| const MaskRecord * MaskStack::getRecord | ( | int | index | ) | const |
Get a record by index.
| index | The index of the record (0-based) |
| const MaskRecord * MaskStack::getRecordById | ( | int | id | ) | const |
Get a record by its ID.
| id | The ID of the record |
| bool MaskStack::isEmpty | ( | ) | const |
Check if the stack is empty.
| bool MaskStack::removeRecord | ( | int | index | ) |
Remove a record at the given index.
| index | The index of the record to remove (0-based) |
| bool MaskStack::removeRecordById | ( | int | id | ) |
Remove a record by its ID.
| id | The ID of the record to remove |
|
signal |
Emitted when a new record is added to the stack.
| record | The newly added record |
|
signal |
Emitted when a record is removed from the stack.
| record | The removed record |
| int MaskStack::size | ( | ) | const |
Get the number of records in the stack.