Dialog used to add, remove or rename manual tags.
More...
#include <editmanualtagsdialog.h>
|
void | manualTagsEdited (int app_id, std::vector< EditManualTagAction > actions) |
| Signals dialog completion.
|
|
void | dialogClosed () |
| Signals tag editing has been cancled without action.
|
|
|
| EditManualTagsDialog (QWidget *parent=nullptr) |
| Initializes the UI.
|
|
| ~EditManualTagsDialog () |
| Deletes the UI.
|
|
void | setupDialog (int app_id, const QStringList &tag_names, const std::vector< int > num_mods_per_tag) |
| Initializes this dialog with the given data.
|
|
void | closeEvent (QCloseEvent *event) override |
| Emits dialogClosed.
|
|
void | reject () override |
| Closes the dialog and emits a signal indicating the dialog has been closed.
|
|
|
void | onTagRemoved (int row, int col) |
| Removed the tag in the given row of the tag table.
|
|
void | onTagAdded () |
| Adds a new tag.
|
|
void | onTableCellEdited (int row, int col) |
| Renames the tag in the given row.
|
|
void | on_buttonBox_accepted () |
| Emits manualTagsEdited with all actions performed in this dialog.
|
|
void | on_buttonBox_rejected () |
| Emits a signal that this dialog has been closed without changes.
|
|
|
void | updateTable () |
| Updates the tag table with data stored in tag_names_ and num_mods_per_tag_.
|
|
|
Ui::EditManualTagsDialog * | ui |
| Contains auto-generated UI elements.
|
|
int | app_id_ |
| App for which the tags are to be edited.
|
|
QStringList | tag_names_ |
| Contains names of all tags. Names are unique.
|
|
std::vector< int > | num_mods_per_tag_ |
| For every tag: The number of mods to which the tag has been added.
|
|
std::vector< EditManualTagAction > | actions_ |
| Contains all actions performed in this dialog. Emitted after dialog completes.
|
|
bool | dialog_completed_ = false |
| Indicates whether the dialog has been completed.
|
|
|
static constexpr int | ACTION_COL = 0 |
| Action column in the tag table.
|
|
static constexpr int | NAME_COL = 1 |
| Tag name column in the tag table.
|
|
static constexpr int | NUM_MODS_COL = 2 |
| Number of mods column in the tag table.
|
|
Dialog used to add, remove or rename manual tags.
◆ EditManualTagsDialog()
EditManualTagsDialog::EditManualTagsDialog |
( |
QWidget * | parent = nullptr | ) |
|
|
explicit |
Initializes the UI.
- Parameters
-
parent | Parent for this widget, this is passed to the constructor of QDialog. |
◆ closeEvent()
void EditManualTagsDialog::closeEvent |
( |
QCloseEvent * | event | ) |
|
|
override |
Emits dialogClosed.
- Parameters
-
event | The close event sent upon closing the dialog. |
◆ manualTagsEdited
void EditManualTagsDialog::manualTagsEdited |
( |
int | app_id, |
|
|
std::vector< EditManualTagAction > | actions ) |
|
signal |
Signals dialog completion.
- Parameters
-
app_id | App for which the tags are to be edited. |
actions | All actions performed in this dialog in the order in which they have been performed by the user. |
◆ onTableCellEdited
void EditManualTagsDialog::onTableCellEdited |
( |
int | row, |
|
|
int | col ) |
|
privateslot |
Renames the tag in the given row.
- Parameters
-
row | Target row. |
col | Column of the tag name. Not used. |
◆ onTagRemoved
void EditManualTagsDialog::onTagRemoved |
( |
int | row, |
|
|
int | col ) |
|
privateslot |
Removed the tag in the given row of the tag table.
- Parameters
-
row | Target row. |
col | Contains the buttons column. Not used. |
◆ setupDialog()
void EditManualTagsDialog::setupDialog |
( |
int | app_id, |
|
|
const QStringList & | tag_names, |
|
|
const std::vector< int > | num_mods_per_tag ) |
Initializes this dialog with the given data.
- Parameters
-
app_id | App for which the tags are to be edited. |
tag_names | Names of all manual tags belonging to the given app. Names must be unique. |
num_mods_per_tag | Number of mods for every given tag. |
The documentation for this class was generated from the following files: