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

Dialog for adding a mod to a group. More...

#include <addtogroupdialog.h>

Inheritance diagram for AddToGroupDialog:
Collaboration diagram for AddToGroupDialog:

Signals

void modAddedToGroup (int mod_id, int target_id)
 Signals completion of the dialog.
 

Public Member Functions

 AddToGroupDialog (QWidget *parent=nullptr)
 Initializes the UI.
 
 ~AddToGroupDialog ()
 Deletes the UI.
 
void setupDialog (const QStringList &groups, const std::vector< int > &mod_ids, const QString &mod_name, int mod_id)
 Initializes the dialog.
 

Private Slots

void on_buttonBox_accepted ()
 Closes the dialog and emits a signal for completion.
 
void on_group_field_textChanged (const QString &text)
 Ensures Ok button is only available when a valid group has been selected.
 

Private Attributes

Ui::AddToGroupDialog * ui
 Contains auto-generated UI elements.
 
int mod_id_
 Id of the mod which is to be added to a group.
 
std::vector< int > mod_ids_
 Ids of all installed mods except the target mod.
 
std::unique_ptr< QCompleter > completer_
 Completer used for group names.
 
QStringList groups_
 Contains names of all available groups.
 
bool dialog_completed_ = false
 Indicates whether the dialog has been completed.
 

Detailed Description

Dialog for adding a mod to a group.

Constructor & Destructor Documentation

◆ AddToGroupDialog()

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

Initializes the UI.

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

Member Function Documentation

◆ modAddedToGroup

void AddToGroupDialog::modAddedToGroup ( int mod_id,
int target_id )
signal

Signals completion of the dialog.

Parameters
mod_idId Id of the mod which is to be added to a group.
target_idId of the mod to whose group the mod will be added.

◆ on_group_field_textChanged

void AddToGroupDialog::on_group_field_textChanged ( const QString & text)
privateslot

Ensures Ok button is only available when a valid group has been selected.

Parameters
textThe new input.

◆ setupDialog()

void AddToGroupDialog::setupDialog ( const QStringList & groups,
const std::vector< int > & mod_ids,
const QString & mod_name,
int mod_id )

Initializes the dialog.

Parameters
groupsNames of all installed mods except the target mod.
mod_idsIds for all installed mods except the target mod.
mod_nameName of the mod which is to be added to a group.
mod_idId of the mod which is to be added to a group.

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