Limo
A simple mod manager
Loading...
Searching...
No Matches
ManageModTagsDialog Class Reference

Dialog for choosing which deployers manage a given set of mods. More...

#include <managemodtagsdialog.h>

Inheritance diagram for ManageModTagsDialog:
Collaboration diagram for ManageModTagsDialog:

Signals

void modTagsUpdated (int app_id, QStringList tags, std::vector< int > mod_ids, int mode)
 Signals completion of the dialog.
 
void dialogClosed ()
 Emitted when the dialog has been closed by pressing the cancel button.
 

Public Member Functions

 ManageModTagsDialog (QWidget *parent=nullptr)
 Initializes the UI.
 
 ~ManageModTagsDialog ()
 Deletes the UI.
 
void setupDialog (int app_id, const QStringList &tags, const QStringList &mod_tags, const QString &mod_name, const std::vector< int > &mod_ids)
 Initializes the dialog.
 
void closeEvent (QCloseEvent *event) override
 Emits dialogClosed.
 
void reject () override
 Closes the dialog and emits a signal indicating the dialog has been closed.
 

Static Public Attributes

static constexpr int add_mode = 0
 Index for add mode in the mode combo box.
 
static constexpr int remove_mode = 1
 Index for remove mode in the mode combo box.
 
static constexpr int overwrite_mode = 2
 Index for overwrite mode in the mode combo box.
 

Private Slots

void on_buttonBox_accepted ()
 Closes the dialog and emits a signal for completion.
 
void on_buttonBox_rejected ()
 Closes the dialog and emits a signal for cancelation.
 
void on_mode_box_currentIndexChanged (int index)
 Calls updateHintText.
 

Private Member Functions

void updateHintText ()
 Updates the text above the tag list according to current settings.
 

Private Attributes

int app_id_
 ModdedApplication to which the tags belong.
 
Ui::ManageModTagsDialog * ui
 Contains auto-generated UI elements.
 
std::vector< int > mod_ids_
 Target mod ids.
 
QString mod_name_
 Name of the first selected mod.
 
bool dialog_completed_ = false
 Indicates whether the dialog has been completed.
 

Detailed Description

Dialog for choosing which deployers manage a given set of mods.

Constructor & Destructor Documentation

◆ ManageModTagsDialog()

ManageModTagsDialog::ManageModTagsDialog ( QWidget * parent = nullptr)
explicit

Initializes the UI.

Parameters
parentParent for this widget, this is passed to the constructor of QDialog.

Member Function Documentation

◆ closeEvent()

void ManageModTagsDialog::closeEvent ( QCloseEvent * event)
override

Emits dialogClosed.

Parameters
eventThe close event sent upon closing the dialog.

◆ modTagsUpdated

void ManageModTagsDialog::modTagsUpdated ( int app_id,
QStringList tags,
std::vector< int > mod_ids,
int mode )
signal

Signals completion of the dialog.

Parameters
app_idTarget ModdedApplication.
tagsAll tags to be assigned for all given mods.
mod_idsIds of the mods for which tags are to be updated.
modeIndicates whether tags should be added, removed or overwritten.

◆ on_mode_box_currentIndexChanged

void ManageModTagsDialog::on_mode_box_currentIndexChanged ( int index)
privateslot

Calls updateHintText.

Parameters
indexNew index.

◆ setupDialog()

void ManageModTagsDialog::setupDialog ( int app_id,
const QStringList & tags,
const QStringList & mod_tags,
const QString & mod_name,
const std::vector< int > & mod_ids )

Initializes the dialog.

Parameters
app_idTarget app.
tagsAll manual tags available in the current ModdedApplication.
mod_tagsAll tags assigned to the first selected mod.
mod_nameName of the first selected mod.
mod_idsIds for all selected mods.

The documentation for this class was generated from the following files: